Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %{
- #include <stdio.h>;
- %}
- %%
- am|is|are|was|were|go|has {printf("%s is a verb\n",yytext);}
- beautiful|very {printf("%s is an adjective\n",yytext);}
- slowly|simply|quickly|gently|then {printf("%s is an adverb\n",yytext);}
- to|from|behind|between {printf("%s is a preposition\n",yytext);}
- if|but|and {printf("%s is a conjunction\n",yytext);}
- a|an|the {printf("%s is an article\n",yytext);}
- he|she {printf("%s is a pronoun\n",yytext);}
- .
- %%
- main()
- {
- yylex();
- return 0;
- }
- int yywrap()
- {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement