Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. %{
  2. #include <stdio.h>;
  3. %}
  4. %%
  5. am|is|are|was|were|go|has {printf("%s is a verb\n",yytext);}
  6. beautiful|very {printf("%s is an adjective\n",yytext);}
  7. slowly|simply|quickly|gently|then {printf("%s is an adverb\n",yytext);}
  8. to|from|behind|between {printf("%s is a preposition\n",yytext);}
  9. if|but|and {printf("%s is a conjunction\n",yytext);}
  10. a|an|the {printf("%s is an article\n",yytext);}
  11. he|she {printf("%s is a pronoun\n",yytext);}
  12. .
  13.  
  14. %%
  15. main()
  16. {
  17. yylex();
  18. return 0;
  19. }
  20. int yywrap()
  21. {
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement