Skip to content

Conversation

@lagru
Copy link
Member

@lagru lagru commented May 16, 2025

Removes an implicit match for "" (nothing) because I left the first line after the ":" empty. Obviously not what is intended! So while it would be more readable to be able to wrap everything inside a rule with an indent, it doesn't seem to be supported currently [1].

Also, allow appending (s) to indicate plural in expressions like list of int(s). A negative lookbehind regex disallows a space directly in front of (s).

Other changes improve on naming, structure and tests.

[1] www.github.com/lark-parser/lark/issues/155

lagru added 5 commits May 15, 2025 22:23
While lark didn't complain at all about this, leaving the first line
after the ":" empty was matching "nothing". Obviously not what is
intended! So while it would be more readable to be able to wrap
everything inside a rule with an indent, it doesn't seem to be
supported currently [1].

[1] www.github.com/lark-parser/lark/issues/155
Still not perfect, but the names and structure make a lot more sense
to me now. This also allows using a plural "(s)" in "container of type"
style expressions.
@lagru lagru added this to the v0.3 (MVP) milestone May 16, 2025
@lagru lagru added the enhancement New feature or functionality label May 16, 2025
@lagru lagru merged commit 7f02a0e into main May 16, 2025
4 checks passed
@lagru lagru deleted the fix-grammar branch May 16, 2025 13:54
@lagru lagru mentioned this pull request May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants