diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-01-18 14:52:33 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-01-18 14:52:33 -0800 |
| commit | 8df395e7015d68518f125c71cabaf5666ff9a573 (patch) | |
| tree | 30f684ae1fc61633aed4503d9f23e2f5e22425cc /grammars | |
| parent | ac51181f34e91572ba54853de98095f2c6aefd5a (diff) | |
Fixed some grammar bugs
Diffstat (limited to 'grammars')
| -rw-r--r-- | grammars/bp.bp | 4 | ||||
| -rw-r--r-- | grammars/python.bp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/grammars/bp.bp b/grammars/bp.bp index 7379dfe..0b222ca 100644 --- a/grammars/bp.bp +++ b/grammars/bp.bp @@ -24,8 +24,8 @@ suffixed-pat: ( / Not-eq-pat ) -Eq-pat: @first=pat__"=="__@second=pat -Not-eq-pat: @first=pat__"!="__@second=pat +Eq-pat: @first=(suffixed-pat / simple-pat)__"=="__@second=pat +Not-eq-pat: @first=(suffixed-pat / simple-pat)__"!="__@second=pat Dot: `. !`. String: ( diff --git a/grammars/python.bp b/grammars/python.bp index 938b53e..d6391bf 100644 --- a/grammars/python.bp +++ b/grammars/python.bp @@ -17,4 +17,4 @@ class: class-def +(\N ..$) class-def: ^_|"class"|_id[_parens]_`: function: function-def +(\N ..$) function-def: ^_|"def"|_id parens `: -import: ^_["from"| ..>(|"import"|)] (|"import"|)%parens ..$%parens +import: ^_["from"| ..>(|"import"|)%parens] |"import"| ..$%parens |
