Hi
When generating the parser from grammar XML, the generator doesn't prefix C# keywords which are used as variables with "@" character. For example, from this definitionwe'll get the following code:
which obviously won't compile. It should be
and similar for Value property.
BTW, why do you call the parser semantic parser, not syntax parser?
When generating the parser from grammar XML, the generator doesn't prefix C# keywords which are used as variables with "@" character. For example, from this definition
<AstNode Name="SomeNode" Description="">
<AstNodeProperty Name="Operator" PropertyType="Simple" Type="System.String" Description="" />
<AstNodeProperty Name="Value" PropertyType="Simple" Type="System.String" Description="" />
</AstNode>
private System.String operator;
private System.String value;
...
public System.String Operator {
get {
return operator;
}
set {
operator = value;
}
}
public System.String Value {
get {
return value;
}
set {
value = value;
}
}
private System.String @operator;
...
public System.String Operator {
get {
return @operator;
}
set {
@operator = value;
}
}
BTW, why do you call the parser semantic parser, not syntax parser?