fork download
  1. %{
  2. %}
  3. oct [0][0-9]+
  4. hex [0][x|X][0-9]+
  5. %%
  6. oct {printf("%s is oct",yytext);}
  7. hex {printf("%s is hex",yytext);}
  8. %%
  9. int main()
  10. {
  11. printf("enter number");
  12. yylex();
  13. }
  14. int yywrap(){
  15. return 1;
  16. }
Success #stdin #stdout #stderr 0.02s 6900KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/YCrxw2/prog:16:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit