fork download
  1. DIGIT [0-9]
  2. LETTER [A-Z a-z]
  3. DELIM [ \t\n]
  4. WS { DELIM }+
  5. ID {(LETTER)[LETTER/DIGIT]}+
  6. INTEGER {DIGIT}+
  7. %%
  8. {WS} { printf("\n WS special characters \n"); }
  9. {ID} { printf("\n Identifiers \n"); }
  10. {DIGIT} {printf("\n Intgers\n"); }
  11. if { printf("\n Keywords\n"); }
  12. else { printf("\n keywords\n"); }
  13. ">" { printf("\n Relational Operators\n"); }
  14. "<" { printf("\n Relational Operators \n"); }
  15. "<=" { printf("\n Relational Operators \n"); }
  16. "=>" { printf("\n Relational Operators \n"); }
  17. "=" { printf("\n Relational Operators \n"); }
  18. "!=" { printf("\n Logical Operators \n"); }
  19. "&&" { printf("\n Logical Operators \n"); }
  20. "||" { printf("\n Logical Operators \n"); }
  21. "!" { printf("\n Logical Operators \n"); }
  22. "+" { printf("\n Arthmetic Operator\n"); }
  23. "-" { printf("\n Arthmetic Operator\n"); }
  24. "*" { printf("\n Arthmetic Operator\n"); }
  25. "/" { printf("\n Arthmetic Operator\n"); }
  26. "%" { printf("\n Arthmetic Operator\n"); }
  27. %%
  28. int yywrap(){ }
  29. int main()
  30. {
  31. Printf(‘’ Enger the text : ’’)
  32. yylex();
  33. return 0 ;
  34. }
Success #stdin #stdout #stderr 0.02s 6820KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/j5tlX2/prog:34:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit