[LLVMdev] TableGen Operator Names

David A. Greene greened at obbligato.org
Fri Jan 21 14:40:05 PST 2011


Chris Lattner <clattner at apple.com> writes:

>> Fair enough.  What would make a better proposal?  I'd like to keep the
>> syntax concise.  I wonder if there is a way we could get rid of the
>> "operator" entirely and just specify names, like:
>> 
>> strconcat("this", "that")
>> 
>> instead of 
>> 
>> !strconcat("this", "that")
>> 
>> What do you think?
>
> That would be nice.  I haven't looked in years, but I thought that there was a parser ambiguity issue.

I think it would require removing knowledge of operators in the lexer,
just have it return an ID token for the operator name and then have the
parser implement a rule:

Operator : ID '(' ArgList ')'

But I haven't played around with it yet.

                               -Dave



More information about the llvm-dev mailing list