Skip to content

Commit

Permalink
[bootrstrap] make the generated parser be the bootstrap parser
Browse files Browse the repository at this point in the history
  • Loading branch information
apalala committed Oct 13, 2023
1 parent 82a1165 commit 83d2f7d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tatsu/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
# Any changes you make to it will be overwritten the next time
# the file is generated.

from __future__ import annotations

import sys

from tatsu.buffering import Buffer
Expand All @@ -21,6 +19,8 @@
from tatsu.util import re, generic_main # noqa


COMMENTS_RE = r'[(][*]((?:.|\n)*?)[*][)]'
EOL_COMMENTS_RE = r'#([^\n]*?)$'
KEYWORDS = {
'None',
} # type: ignore
Expand All @@ -35,6 +35,8 @@ def __init__(self, text, /, config: ParserConfig | None = None, **settings):
ignorecase=False,
namechars='',
parseinfo=True,
comments_re=COMMENTS_RE,
eol_comments_re=EOL_COMMENTS_RE,
)
config = config.replace(**settings)
super().__init__(text, config=config)
Expand Down

0 comments on commit 83d2f7d

Please sign in to comment.