| link reference issue [message #760435] |
Fri, 02 December 2011 06:28  |
Vlad Dumitrescu Messages: 313 Registered: July 2009 Location: Gothenburg |
Senior Member |
|
|
Hi!
I have some rule like
Function: Clause (';' Clause)* '.' ;
Clause: ID '(' Args ')' '->' Expressions ;
Each clause has the same name (ID) and it actually belongs naturally to the function itself. Is there a way to let the function inherit the name from the first clause without changing the grammar?
The grammar change feels inelegent
Function: ID Clause0 (';' Clause)* '.' ;
Clause0 returns Clause: '(' Args ')' '->' Expressions ;
Clause: ID '(' Args ')' '->' Expressions ;
best regards,
Vlad
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01604 seconds