Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %}
- %start list
- %token NUMBER
- %token LETTER
- %left '&' '|' '~'
- %left '+' '-'
- %left '*' '/' '%'
- %%
- list:
- | list ArithmeticExpression
- | list error
- { yyerror(); }
- ArithmeticExpression: E
- {
- printf("resultado = ");
- printb($$);
- }
- E: E'+'E { $$ = strbinadd($1,$3); }
- ;
- %%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement