bug-bison
[Top][All Lists]
Advanced

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

Re: Enhancement request: enabling Variant in C parsers


From: Hans Åberg
Subject: Re: Enhancement request: enabling Variant in C parsers
Date: Sat, 25 Aug 2018 14:56:55 +0200

> On 25 Aug 2018, at 07:54, Akim Demaille <address@hidden> wrote:
> 
>> Le 23 août 2018 à 14:24, Hans Åberg <address@hidden> a écrit :
>> 
>> [The examples]
>> It might be good with a self-contained calc++ directory, with some input 
>> files, so that one can copy it, and start experimenting. An idea might be to 
>> add comments to the lexer, so that they can be added to the input files. 
>> Nothing advanced, just a little more than what is now.
> 
> I don’t understand what you mean with « add comments to the lexer,
> so that they can be added to the input files ».
> 
> I’m not convinced that an input file would be needed, but a README
> in calc++/, with examples, would be useful, indeed.
> 
> FTR, the scanner looks like this currently:
> 
> <scanner.ll>

I was thinking of adding something like
  "#".*\n        { yylloc.lines(1); yylloc.step(); }

Then the example file could have comments like:
  # Run calc++ <this file>
  # Causes a deliberate error. Should report ...

The idea is that coming new to bison copies the calc++ directory, compiles it, 
sees there are some example files to run, and ready to start experimenting.





reply via email to

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