fork download
  1. lex_by_file( FileName ) :-
  2. get_input_from_file( FileName, TokenList ),
  3. lex( TokenList, OutputList ),
  4. %write_output( OutputList ), !.
  5. maplist(writeln,OutputList),!.
  6.  
  7. %{
  8. %}
  9. %option noyywrap
  10. Motvalid a[a-z]*e
  11. %%
  12. {Motvalid} {
  13. printf("Mot Valid commance par a et termine par e: %s \n",yytext);
  14. }
  15.  
  16.  
  17. %%
  18. int main()
  19. {
  20. yylex();
  21. }
Success #stdin #stdout #stderr 0.02s 6956KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/KhIxbE/prog:21:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit