Re: %prefix with C++ namespaces

2007-10-01 Thread Joel E. Denny
On Mon, 1 Oct 2007, Sebastian Pipping wrote: > Joel E. Denny wrote: > > Well, if we document how the splitting is done, then I figure they can't > > complain too much. I certainly don't want to see Bison parse complex C++ > > constructs. Let the C++ compiler catch those errors. > > Wouldn't it

Re: %prefix with C++ namespaces

2007-10-01 Thread Joel E. Denny
On Mon, 1 Oct 2007, Hans Aberg wrote: > > It also occurs to me now that a leading "::" is not completely redundant. > > The given namespace is used in two ways: for declarations and for > > references. The former needs the splitting we discussed. I think the > > latter would use the given namesp

Re: %prefix with C++ namespaces

2007-10-01 Thread Hans Aberg
On 1 Oct 2007, at 20:46, Joel E. Denny wrote: Should we accept a leading ::? I think so. I see it as redundant but not erroneous. So I thought first, but it implies a name relative the global namespace. So if the Bison generated parser file is included in a namespace, like in: namespac

Current state of the GLR C++ parsing skeleton code

2007-10-01 Thread Sebastian Pipping
Hello again! I want to ask what the current state of the GRL C++ skeleton is. I had no trouble compiling lalr1.cc but grl.cc seems to be different. Can anybody give me a brief overview or a link to more information? Thank you! Sebastian ___ help-

Re: %prefix with C++ namespaces

2007-10-01 Thread Sebastian Pipping
Joel E. Denny wrote: Well, if we document how the splitting is done, then I figure they can't complain too much. I certainly don't want to see Bison parse complex C++ constructs. Let the C++ compiler catch those errors. Wouldn't it be both easy and powerful to solve that namespace thing usin

Re: %prefix with C++ namespaces

2007-10-01 Thread Sebastian Pipping
Joel E. Denny wrote: If we start "parsing" namespace names, we will have a million new questions to answer. What is the output of "::foo", I figured the namespace name is meant to be relative to the global namespace, so a leading "::" is implicit if not specified. I'm not sure if this is tr

Re: %prefix with C++ namespaces

2007-10-01 Thread Joel E. Denny
On Mon, 1 Oct 2007, Hans Aberg wrote: > On 1 Oct 2007, at 03:10, Joel E. Denny wrote: > > > > Should we accept a leading ::? > > > > I think so. I see it as redundant but not erroneous. > > So I thought first, but it implies a name relative the global namespace. So if > the Bison generated par

Re: %prefix with C++ namespaces

2007-10-01 Thread Sebastian Pipping
Joel E. Denny wrote: >> (1) %prefix=abc renames function yylex to "abclex" >> instead of putting it in namespace abc. > > You can write: > > %name-prefix="abc::" > %define "namespace" "abc" Works like a charm, thank you! Sebastian ___ help-

Re: %prefix with C++ namespaces

2007-10-01 Thread Hans Aberg
On 1 Oct 2007, at 03:10, Joel E. Denny wrote: Should we accept a leading ::? I think so. I see it as redundant but not erroneous. So I thought first, but it implies a name relative the global namespace. So if the Bison generated parser file is included in a namespace, like in: namesp