This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA] Add language-dependent post-parser


Daniel,

> I don't see why you can't do it, for instance, here:
> simple_exp :    simple_exp '(' arglist ')'
>                        { 
>                          write_exp_elt_opcode (OP_FUNCALL);
>                          write_exp_elt_longcst ($3);
>				/* check arguments */
>                          write_exp_elt_opcode (OP_FUNCALL);
>                        }
>        ;

> You'd have to wiggle the expression machinery to give you back the
> expression node for the function name, probably by making the
> write_exp_* functions return a pointer.  But that's less intrusive and
> more efficient than adding a second pass.

Yes, that's exactly how I'd LIKE to do it. And I would, but for one
miserable little fact: the expression at this point is in POSTFIX
form.  So, for example, I can't use evaluate_type or the evaluate_exp
member of exp_descriptor, both of which work on PREFIX form.

Paul Hilfinger


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