Advertisement
Guest User

yacc

a guest
Dec 14th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. %{
  2. #include <stdio.h>
  3. extern int liniinoi;
  4.  
  5. void yyerror(const char *str)
  6. {
  7.     printf("%s %d\n", str, liniinoi);
  8. }
  9. %}
  10. %token ANA ARE MERE NR
  11. %start s
  12. %%
  13. s: ANA ARE NR MERE {printf("Bines\n");}
  14.  ;
  15. %%
  16. int main()
  17. {
  18.     yyparse(); 
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement