Hi,

>>>>>> I can't get i compile and if i get i compile by hand i get errors ... 
>>>>>> please can someone help me out here,
>>>>>> the book doens't go to much into detail about this topic.

Can't help without actual commands and actual error messages.


> 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 ?

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.

You should have a look at the lexical example which is part of the latest 
release of Bison.   It is a good starting point.  If your distro is up to date, 
you'll find it /usr/share/doc/bison/examples/c or something like that.

Cheers!
_______________________________________________
help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to