Browse Source

Update lark.lark

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.8.0
MegaIng 4 years ago
committed by GitHub
parent
commit
9552f001b2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      examples/lark.lark

+ 4
- 3
examples/lark.lark View File

@@ -10,11 +10,12 @@ token: TOKEN priority? ":" expansions _NL
priority: "." NUMBER

statement: "%ignore" expansions _NL -> ignore
| "%import" import_args ["->" name] _NL -> import
| "%import" import_path ["->" name] _NL -> import
| "%import" import_path name_list _NL -> multi_import
| "%declare" name+ -> declare

import_args: import_path ["(" name ("," name)* ")"]
import_path: "."? name ("." name)*
!import_path: "."? name ("." name)*
name_list: "(" name ("," name)* ")"

?expansions: alias (_VBAR alias)*



Loading…
Cancel
Save