I found the solution, my [a-zA-Z] had not + at the end so he only
recognized single characters instead of strings.. now it's working, thank
best reagrds!
On 17.02.19 19:51, Uxio Prego wrote:
What are you feeding?
What is happening?
What are you expecting instead?
On 17 Feb 2019, at 18:43, workbe...@gmx.at <workbe...@gmx.at> wrote:
Now a very simple question: i have this lexer.l file:
[...]
[a-zA-Z] { strcpy(yytext, yyltext); return STRING; }
[0-9]+ { yylval = atoi(yytext); return NUMBER; }
[...]
On 17.02.19 15:53, Akim Demaille wrote:
Le 17 févr. 2019 à 14:17, workbe...@gmx.at <workbe...@gmx.at> a écrit :
Is there a way i can put my c source code not inside one the the lexer.l or
parser.y files ? so i can keep tem separate from the rules ?
Two opposite answers:
I said:
Le 17 févr. 2019 à 15:49, Akim Demaille <a...@lrde.epita.fr> a écrit :
No, sorry. There are several approaches to parsing, one which is fully declarative and
your rules are "pure". That's not the case of Flex/Bison: you must define
rules with actions. Yet you should keep your action simple and move complex processing
into functions.
Uxio said:
Le 17 févr. 2019 à 15:46, Uxio Prego <uxio.pr...@gmail.com> a écrit :
Yes of course, by inclusion of headers, in a very much
common way. You can then manipulate shorter *.y and
*.l docs, but this is not going to fix any Bison usage issue
you are having.
And of course Uxio is right. You can put the function you depend upon in other
compilation units (i.e., other *.c files). What I meant is: Flex and Bison are
useless if you don't *call* code from your actions.
_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison
_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison