fork download
  1. %{
  2. #include <stdlib.h>
  3. #include <stdio.h>
  4. int count = 0;
  5. %}
  6.  
  7. %%
  8. [0-9]+ { int no = atoi(yytext);
  9. printf("%x",no);
  10. count++;
  11. }
  12. [\n] return 0;
  13. %%
  14.  
  15. int main(void){
  16. printf("Enter any number(s) to be converted to hexadecimal:\n");
  17. yylex();
  18. printf("\n");
  19. return 0;
  20. }
Success #stdin #stdout #stderr 0.02s 6856KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/bzVxoy/prog:20:0: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit