Posted 16 years ago
by Jason Tobiasz
I'm having great difficulty modifying our current production. I'm rather new to this stuff and having a hard time putting the pieces together. If you could direct me to some resource other than the help file, I'd greatly appreciate it.
Here is my current issue:
At the end of the production, I want to put out an error messgage:
<Production><![CDATA[
<% //some data init %>
'Define<+ startOffset = this.Token.StartOffset; +>'
(
"procedure<@ out statement @>"
)
| (
"macro<@ out statement @>"
)
| <? true ?><% this.ReportSyntaxError("'Procedure' or 'Macro' expected."); return false; %>
...
Well, I cannot figure out how to stuff that error message into the else after the grammar is generated. By doing it the way I have above, it automatically generates an else if (true) and then an else with a false in it. That creates a compiler warning saying 'Unreachable code'...I'm trying to get rid of it.
[Modified at 04/06/2009 02:12 PM]
Here is my current issue:
At the end of the production, I want to put out an error messgage:
<Production><![CDATA[
<% //some data init %>
'Define<+ startOffset = this.Token.StartOffset; +>'
(
"procedure<@ out statement @>"
)
| (
"macro<@ out statement @>"
)
| <? true ?><% this.ReportSyntaxError("'Procedure' or 'Macro' expected."); return false; %>
...
Well, I cannot figure out how to stuff that error message into the else after the grammar is generated. By doing it the way I have above, it automatically generates an else if (true) and then an else with a false in it. That creates a compiler warning saying 'Unreachable code'...I'm trying to get rid of it.
[Modified at 04/06/2009 02:12 PM]