Hi -

On 11/26/16, 11:16 AM, "Tomsy Paul" <[email protected]> wrote:

>I want to do some processing with the variables in an expression. For
>example, from the expression i==j in,
>
>
>
>if i==j then writeln("yes");
>
>
>I want to get the lexemes i and j and also their other attributes, say
>types.

I think it would help at this point to describe what it is
you are trying to do.

It depends greatly on when in compilation you are talking about
whether it is even possible to have this information. In particular,
the types are not generally known until after function resolution.
That means to me that the next thing you need to figure out is
*which part* of the compiler you intend to modify.

We can help offer some suggestions in that area but will need to
know more about what you are trying to do.

Cheers,

-michael


> I am doing something with the compiler, so I would like to know how I
>can get this from within the Expr or its derived classes. I tried a
>
>printf("%s",$2->parentSymbol->name); //Simplified grammar, if id == id
>then...
>
>
>from chapel.ypp, but it resulted in an internal error.
>
>
>PLease help.
>
>
>
>
>
>
>
>

------------------------------------------------------------------------------
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to