Hi,
I defined a semantic parser for a language(it looks a bit like PASCAL or VB.NET) with the grammar designer, and the "If" statement like this:But if the user typed like this:
The "xxxx" is invalid, after parsing there will be a red squiggle under the "xxxx", and the tip is "Then expected.", but the "Then" is existing.
And my grammar xml like this:Is there any way to resolve this? Or how did you resolve this problem in your VB.NET add-on?
Thanks a lot!
I defined a semantic parser for a language(it looks a bit like PASCAL or VB.NET) with the grammar designer, and the "If" statement like this:
If condition Then
[statemtns]
EndIf
If True xxxx Then
EndIf
And my grammar xml like this:
'IF<-->'
"LogicalExpression<@ out expression @><-->"
<%
if(expression == null)
this.ReportSyntaxError(ResourceTools.GetResourceString("Condition") +
ResourceTools.GetResourceString("SemanticParserError_Expected"));
%>
'THEN<- ->'
["StatementList<@ out exeStatementList @><- ->"]
'ENDIF'
Thanks a lot!