You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote a simple grammar to parse instance lines in STEP format (STEP.g4)
Grammar is ok, i already generated working Python code.
Golang code generation works too, but I can't build the generated golang source, especially step_parser.go:
tech.fr/parser
tech.fr/parser/step_parser.go:408: cannot use s (type *ParameterContext) as type antlr4.RuleContext in return argument:
*ParameterContext does not implement antlr4.RuleContext (wrong type for String method)
have String() antlr4.TerminalNode
want String([]string, antlr4.RuleContext) string
tech.fr/parser/step_parser.go:425: cannot use NewParameterContext(p, p.BaseParser.GetParserRuleContext(), p.BaseParser.BaseRecognizer.GetState()) (type *ParameterContext) as type IParameterContext in assignment:
*ParameterContext does not implement IParameterContext (wrong type for String method)
have String() antlr4.TerminalNode
want String([]string, antlr4.RuleContext) string
Hi!
I wrote a simple grammar to parse instance lines in STEP format (STEP.g4)
Grammar is ok, i already generated working Python code.
Golang code generation works too, but I can't build the generated golang source, especially step_parser.go:
Any clue to make this work?
Pierre
STEP.g4.txt
step_parser.go.txt
The text was updated successfully, but these errors were encountered: