help-bison
[Top][All Lists]
Advanced

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

[ENHANCEMENT] change location & position defaults


From: Arthur Schwarz
Subject: [ENHANCEMENT] change location & position defaults
Date: Fri, 13 Dec 2013 09:42:32 -0800 (PST)

It might be time to rethink some options and things that the Bison generates.

In C++:
   If you don't use location information, location and 

       position files are generated.
   If you use @n you don't need to use the %location directive.
   If you do use the %location directive you don't need to 

       use locations.
   If you use the %define api.location.type directive you can't 

       inherit from class location.
   If you use the %define api.position.type directive you can't 

       inherit from class position.
 
An alternative might be:
   If you don't use location information, location and position 

       files are not generated and yylex() does not YYLTYPE.
   If you use @n without the %location directive an error message 

       is output.
   If you use the %location directive the location and position
       files are generated.
   If you use %define api.location.type then you must inherit 

       from class location.
   If you use %define api.position.type then you must inherit 

       from class position.

Java:
   I believe similar comments are in order.

C:
   I have'nt looked into this.




reply via email to

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