This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC 2/8] C language


On Monday, January 16 2012, Tom Tromey wrote:

>>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:
>
> Sergio> Here and in all the .y files, I had to add an argument to the parser and
> Sergio> the lexer functions, which is a `struct parser_state *ps'.
>
> I think 'ps' is too short a name for something used all over the file.

Right.  I was thinking about `pstate' then.  I had an initial version of
the patch with this name, but I decided to shorten it because of
reformatting burden.

> Sergio> +%parse-param {struct parser_state *ps}
> Sergio> +%lex-param {struct parser_state *ps}
>
> This means we would require bison.
>
> I don't really mind us requiring bison, but I think it is a bigger issue
> and would need a separate patch - and at least configury changes.
>
> Another approach would be to temporarily make a "local global" in the .y
> file, then set this local global in the entry point to the parser.
>
> This does not solve the whole problem, but it does make things somewhat
> more modular, as a first step.

Ok, thanks for pointing that out.  I will make the requested changes then.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]