help-bison
[Top][All Lists]
Advanced

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

Re: %prefix with C++ namespaces


From: Joel E. Denny
Subject: Re: %prefix with C++ namespaces
Date: Sat, 29 Sep 2007 22:10:02 -0400 (EDT)

On Sat, 29 Sep 2007, Sebastian Pipping wrote:

> I noticed two things with %prefix when combined
> with a C++ parser that might be bugs:
> 
> 
> (1) %prefix=abc renames function yylex to "abclex"
>     instead of putting it in namespace abc.

You can write:

  %name-prefix="abc::"
  %define "namespace" "abc"
  
This usage is not documented.

> (2) Nested namespaces do not work:
>     %prefix=abc::def should give
> 
>       namespace abc {
>       namespace def {
>         ..
>       }
>       }
> 
>     instead of
> 
>       namespace abc::def {
>         ..
>       }
> 
>     I guess?
> 
> 
> Is this known and planned to fix?

It does need to be fixed.  Thanks for reporting it.




reply via email to

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