help-bison
[Top][All Lists]
Advanced

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

Re: Hi everyone,


From: Uxio Prego
Subject: Re: Hi everyone,
Date: Sun, 17 Feb 2019 15:46:40 +0100

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.

If yours is a serious book, it should have made a small
annex stating which versions of Flex and Bison the book
examples are expecting. If it doesn’t, then nothing stops
you from investigating in which years was the book written,
and guessing and eventually figuring out the Flex and
Bison versions used by the examples in it.

If you want an easy quick start, you might consider useful
either to fall back to some other book which would use Yacc
and Lex instead, and then use Bison in Yacc mode until you
know the basics enough to be able to cope with more
advanced contemporary Bison use; or directly fast forward
and use the current Bison and Flex documentation.

Considering you are having some trouble to use Make too,
maybe your case would fit better sticking in C and the Yacc
mode.

> On 17 Feb 2019, at 14:17, address@hidden <address@hidden> wrote:
> 
> 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 ?
> 
> 
> best regards!
> 
> On 17.02.19 13:24, address@hidden wrote:
>> For a beginner it's hard to find what i've to write, on what documentation 
>> should i refer to ? to original bison & flex manual respectiveley ?
>> 
>> 
>> best regards!
>> 
>>  On 17.02.19 13:22, address@hidden wrote:
>>> So my Bison and Flex code is out of date ?
>>> 
>>> 
>>> On 17.02.19 13:04, Uxio Prego wrote:
>>>> Hi,
>>>> review your Makefile, it has errors. Read the Make docs,
>>>> the basic use is:
>>>> 
>>>>      TARGET: DEPENDENCIES
>>>>          ACTIONS_THAT_USE_DEPENDENCIES_TO_UPDATE_TARGET
>>>> 
>>>> You might want to try emulating Yacc if the booking you
>>>> are using is enough old and in case current Bison could
>>>> not be able to really follow it.
>>>> 
>>>> But make sure you are fixing all of your mistakes too.
>>>> 
>>>> If your book mentions a specific version of Bison and
>>>> Flex, you might consider using those at some point.
>>>> 
>>>> Regards,
>>>> 
>>>>> On 17 Feb 2019, at 12:40, address@hidden <address@hidden> wrote:
>>>>> 
>>>>> [...]
>>>>> 
>>>>>> [...]
>>>>>> 
>>>>>> *And here is my 'MakeFile:*
>>>>>> 
>>>>>> test: lexer.l parser.tab.c parser.tab.c
>>>>>>      gcc parser.tabs.c lex.yy.c -lfl -o test
>>>>>> 
>>>>>> parser.tab.c: parser.tab.c paser.tab.c
>>>>>>      bison -d parser.y
>>>>>> 
>>>>>> lexer.l: lex.yy.c
>>>>>>      flex lexer.l
>>>>>> 
>>>>>> clean:
>>>>>>      rm -rf lex.yy.c test1.tab.* test
>>>>>> 
>>>>>> 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.
>>>>>> 
>>>>>> best reagards!
>>>>>> 
>>>>>> _______________________________________________
>>>>>> address@hidden https://lists.gnu.org/mailman/listinfo/help-bison
>>>>> _______________________________________________
>>>>> address@hidden https://lists.gnu.org/mailman/listinfo/help-bison
>>>> 
>>>> _______________________________________________
>>>> address@hidden https://lists.gnu.org/mailman/listinfo/help-bison
>>>> 
>>> 
>>> _______________________________________________
>>> address@hidden https://lists.gnu.org/mailman/listinfo/help-bison
>>> 
>> 
>> _______________________________________________
>> address@hidden https://lists.gnu.org/mailman/listinfo/help-bison
> 
> _______________________________________________
> address@hidden https://lists.gnu.org/mailman/listinfo/help-bison




reply via email to

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