SHADE-AI / daidepp

Repo to store universal communication specification
2 stars 7 forks source link

ALY daide visitor #52

Closed delaschwein closed 1 year ago

delaschwein commented 1 year ago
from daidepp import create_daide_grammar, daide_visitor

grammar = create_daide_grammar(level=130)
message = <MESSAGE>
parse_tree = grammar.parse(message)
output = daide_visitor.visit(parse_tree)
print(output)

When message is PRP (ALY (FRA ENG) VSS (GER RUS))the visitor works However, when message isPRP (ALY (FRA ENG) VSS (GER)) i.e. when only 1 country is preceded by VSS, it raises parsimonious.exceptions.ParseError: Rule 'ws' didn't match at '))' (line 1, column 28).