fork download
  1. %{
  2. #include <stdio.h>
  3. %}
  4.  
  5. %%
  6. [0-9]+ { printf("Integer Constant: %s\n", yytext); }
  7. .|\n { /* Ignore other characters */ }
  8. %%
  9.  
  10. int yywrap() {
  11. return 1;
  12. }
  13.  
  14. int main() {
  15. yylex();
  16. return 0;
  17. }
  18.  
Success #stdin #stdout #stderr 0.02s 6760KB
stdin
int a=10;
int b=25;
int c=a+b;
stdout
Standard output is empty
stderr
ERROR: /home/d89SSH/prog:17:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? ERROR: Can't ignore goal at this port
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? ERROR: Can't ignore goal at this port
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit