Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TDL docstring parsing #167

Closed
goodmami opened this issue Aug 27, 2018 · 0 comments
Closed

Update TDL docstring parsing #167

goodmami opened this issue Aug 27, 2018 · 0 comments
Milestone

Comments

@goodmami
Copy link
Member

See here: http://lists.delph-in.net/archives/developers/2018/002794.html
And here: http://moin.delph-in.net/TdlRfc

Triple-quoted docstrings, before any top-level term or the final . character:

type := """here""" supertype1 & """and here""" &
  """and here""" [ FEAT val ] """and here, too""".
@goodmami goodmami added this to the v0.9.0 milestone Aug 27, 2018
goodmami added a commit that referenced this issue Sep 21, 2018
This lexer relies on the group identifiers of a regular expression,
and it has support for multiline patterns (comments and docstrings),
which are parsed separately from the regex (the regex then picks up
where the special parser stops). Yielded tokens include the group
identifier of the current and next tokens (helping with lookahead in
parsing), the token text, and its line number.

Addresses #167 and #168
goodmami added a commit that referenced this issue Sep 21, 2018
This adds a lot of code to tdl.py, although much of the old stuff will
be removed in a future release. The new-style parsing is ~36% slower
at reading the ERG's lexicon, but it is better able to deal with
malformed TDL, and it handles docstrings and comments in all valid
places.

Addresses #153, #167, #168, and #170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant