Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %{
- #include <stdio.h>
- #include <string>
- #include "parser.tab.h"
- #include <memory>
- #include <cstring>
- int ch;
- %}
- %option noyywrap
- words ([A-Za-z0-9]*)
- %%
- {words} { ch += yyleng; yylval.string = new char[100](); sscanf(yytext, "%s", yylval.string); return STRINGG; }
- %%
- int main() {
- yyparse();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement