On Fri, 26 Apr 2019 11:26:49 +0200, Rainer Gerhards wrote:
> I would like to generate that output file during regular configuration
> processing. So in short I need a capability to see each character that
flex
> processes at exactly the time it processes the character. I did not find a
> documente
On Fri, 22 Feb 2019 17:02:57 +0100, workbe...@gmx.at wrote:
> $gcc lex.yy.c -o test -Wall
Comparing to your earlier compile statement, you dropped '-lfl' which caused
the linking error. To remedy the situation add to the top of the flex file
%option noyywrap
%option noinput nounput
Then the e
On Fri, 22 Feb 2019 15:00:51 +0100, workbe...@gmx.at wrote:
If you replace
> [a-zA-Z]+ { printf("%s is not a verb", yytext); }
by
[a-zA-Z]+ printf("'%s' is not a verb\n", yytext);
you will see that the scanner does exactly what it is expected to do, since the
line
> .|\n { ECHO; /* no
On Sun, 17 Feb 2019 18:43:38 +0100, workbe...@gmx.at wrote:
> Now a very simple question: i have this lexer.l file:
Suggestions for lines you might want to use instead to get things up and
running:
> [a-zA-Z]{ strcpy(yytext, yyltext); return STRING; }
[a-zA-Z]+{ strcpy(yyltext, yytext
I think the following should fix the compile errors. Presumably they are
prompted by compilers more sensitive nowadays than they were back in the days
when this book was written:
- lexer.l: remove the declaration enum yytokentype which is shipped by
including parser.tab.h
- parser.y: add forwar