While experimenting and torturing the code from story7 in several ways to try and hack together my own language without properly looking up on the theory, I noticed getting back strange representations for rules like fulltext: WORD fulltext*:
A string like a b c d e f would successfully parse, but only yield:
I managed to trace it back to the condition for while in loop() of parser.py (present in story6 and story7), where the walrus operator is not parenthesis, thus first checking whether func(*args) is not None and assigning that boolean to node instead of the other way around.
While experimenting and torturing the code from story7 in several ways to try and hack together my own language without properly looking up on the theory, I noticed getting back strange representations for rules like
fulltext: WORD fulltext*
: A string likea b c d e f
would successfully parse, but only yield:instead of:
...and so on.
I managed to trace it back to the condition for
while
inloop()
ofparser.py
(present in story6 and story7), where the walrus operator is not parenthesis, thus first checking whetherfunc(*args) is not None
and assigning that boolean tonode
instead of the other way around.