help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hi everyone,


From: Akim Demaille
Subject: Re: Hi everyone,
Date: Sun, 17 Feb 2019 15:49:30 +0100

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, address@hidden <address@hidden> 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!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]