No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

al.lex 374B

1234567891011121314151617181920212223242526272829303132
  1. %{
  2. #include "as.tab.h"
  3. int yywrap(void){return 1;}
  4. void
  5. yyerror (char const *s)
  6. {
  7. fprintf (stderr, "%s\n", s);
  8. }
  9. %}
  10. %%
  11. "ADD" { return tADD ;}
  12. "MUL" { return tMUL; }
  13. "SOU" { return tSUB;}
  14. "DIV" { return tDIV; }
  15. "COP" { return tCPY; }
  16. "AFC" { return tAFC; }
  17. [0-9]+ { yylval.nombre = atoi(yytext); return tNB; }
  18. "\n" {}
  19. " " {}
  20. "\t" {}
  21. %%