fork download
  1. %{ #include <stdio.h> %}
  2. %% -?[0-9]+\.[0-9]+([eE][+-]?[0-9]+)? { printf("Floating point number: %s\n", yytext); } -?[0-9]+([eE][+-]?[0-9]+) { printf("Scientific notation number: %s\n", yytext); } -?[0-9]+ { printf("Integer number: %s\n", yytext); } [ \t\n]+ { /* Ignore whitespace */ } . { /* Ignore any other character */ } %%
  3. int main() { printf("Enter a number:\n"); yylex(); return 0; }
Success #stdin #stdout #stderr 0.02s 6868KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/3eWska/prog:3:62: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit