fork download
  1. lex_by_file( FileName ) :-
  2. %{
  3. #include<stdio.h>
  4. %}
  5. %%
  6. [a] { printf("\ncharcter a is recognized"); }
  7. %%
  8. void mian()
  9. {
  10. printf("\n enter a charcater ");
  11. yylex();
  12. }
  13. int yywrap()
  14. {
  15. return 1;
  16. }
  17.  
Success #stdin #stdout #stderr 0.03s 7032KB
stdin
a
stdout
Standard output is empty
stderr
ERROR: /home/vfpSJW/prog:16:2: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit