Questions tagged [tatsu]

Use the [tatsu] tag for all questions related to the TatSu or Grako parser generators.

TatSu (the successor to Grako) is a tool that takes grammars in a variation of EBNF as input, and outputs memoizing (Packrat) PEG parsers in Python.

TatSu can also compile a grammar stored in a string into a tatsu.grammars.Grammar object that can be used to parse any given input, much like the re module does with regular expressions.

46 questions
-1
votes
1 answer

How to implement this kind of EBNF grammar (lookahead)?

I am trying to parse the string "###" using an EBNF grammar in TatSu (grako) of this kind: grammar = """mask = | ['()'] ['$'] {'#'} '#' | ['()'] {'#'} '#%' | ['()'] ['$'] {'#'} {'0'} '0' '.#'…
MadInc
  • 1
  • 3
1 2 3
4