help-bison
[Top][All Lists]
Advanced

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

Re: [ENHANCEMENT] change location & position defaults


From: Akim Demaille
Subject: Re: [ENHANCEMENT] change location & position defaults
Date: Sun, 15 Dec 2013 12:15:40 +0100

Hi Arthur,

Sorry for answering so late.  And I can’t answer to everything now.

Le 13 déc. 2013 à 18:42, Arthur Schwarz <address@hidden> a écrit :

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

No they are not.  It used to be the case before 3.0 that locations
are mandated, even if not used.

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

You are not expected to derive from them.

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

That would uselessly break the compatibility with previous
versions of Bison.  3.0 might have been a good moment for
this, but it’s too late now.

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

Why should we derived from it?

> Java:
>    I believe similar comments are in order.

Requests are fine, and will go in the todo list until someone
contributes the code.

> C:
>    I have'nt looked into this.
> 
> 
> _______________________________________________
> address@hidden https://lists.gnu.org/mailman/listinfo/help-bison




reply via email to

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