fork download
  1. /* LEX program to identify the capitalized words from the given string*/
  2.  
  3. %{
  4. #include<stdio.h>
  5. %}
  6.  
  7. %%
  8. [A-Z] {printf("%s\n", yytext);}
  9. \t ;
  10. \n ;
  11. . ;
  12. %%
  13.  
  14. int main(){
  15. printf("Enter the string:\n");
  16. yylex();
  17. }
  18.  
  19. int yywrap(void){
  20. return 1;
  21. }
  22.  
Success #stdin #stdout #stderr 0.02s 6940KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
ERROR: /home/UfO4C5/prog:4:1: Syntax error: Operator expected
ERROR: /home/UfO4C5/prog:21:1: Syntax error: Unexpected end of file
ERROR: '$runtoplevel'/0: Undefined procedure: program/0
   Exception: (3) program ? EOF: exit