Posted 15 years ago
by Jason Tobiasz
![Avatar](https://secure.gravatar.com/avatar/dc639ba6be1d0494792da6b56ff50154.jpg?s=64&d=identicon&r=g)
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]