|
|
|
|
|
|
|
|
Re: Handling terminal conflicts [message #1712191 is a reply to message #1712190] |
Wed, 21 October 2015 20:24 |
Prakyath Jaladhar Messages: 15 Registered: July 2015 |
Junior Member |
|
|
Hi,
I'll give an example. The language I am working on contains entry methods, so the rule for an entry method may look like this:
Entry:
'entry' 'void' entryName=ID ep=EParameters code=CCode
;
CCode: '[' CCode ']'
| '{' CCode '}'
| '(' CCode ')'
;
As you mentioned, the CCode can also contain braces as well. So basically whatever comes after EParameters which can be inside one of the three braces should be treated as CCode (which can include braces inside as well). How can I achieve this?
[Updated on: Thu, 22 October 2015 15:45] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04327 seconds