Answer the question
In order to leave comments, you need to log in
How to implement an EBNF grammar of this kind?
I'm trying to parse the string "###" using the EBNF grammar rules in the TatSu (grako) library:
grammar = """mask =
| ['()'] ['$'] {'#'} '#'
| ['()'] {'#'} '#%'
| ['()'] ['$'] {'#'} {'0'} '0' '.#' {'#'}
"""
tatsu.exceptions.FailedToken: (1:1) expecting '#' :
#
^
mask
start
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question