Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Assembler{
- String program(){
- String p=".globl main\n main:\n";
- return p;
- }
- //Atribuição
- string expression(String lexeme, int registrador){
- }
- expression : variable '=' expression | simpleExpr;
- variable : Identifier | Identifier '[' expression ']';
- simpleExpr : sumExpr relational sumExpr | sumExpr;
- sumExpr : sumExpr sum term | term;
- term : term multiply factor | factor;
- relational : '<=' | '<' | '>' | '>=' | '==' | '!=';
- sum : '+' | '-';
- multiply : '*' | '/';
- }
Advertisement
Add Comment
Please, Sign In to add comment