Quellcode durchsuchen

Small addition to docs about terminal operators

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.8.0
Erez Sh vor 4 Jahren
Ursprung
Commit
2f92c7b4a7
1 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  1. +5
    -1
      docs/grammar.md

+ 5
- 1
docs/grammar.md Datei anzeigen

@@ -54,6 +54,10 @@ Literals can be one of:
* `/re with flags/imulx`
* Literal range: `"a".."z"`, `"1".."9"`, etc.

Terminals also support grammar operators, such as `|`, `+`, `*` and `?`.

Terminals are a linear construct, and therefor may not contain themselves (recursion isn't allowed).

### Priority

Terminals can be assigned priority only when using a lexer (future versions may support Earley's dynamic lexing).
@@ -74,7 +78,7 @@ When using a lexer (standard or contextual), it is the grammar-author's responsi
IF: "if"
INTEGER : /[0-9]+/
INTEGER2 : ("0".."9")+ //# Same as INTEGER
DECIMAL.2: INTEGER "." INTEGER //# Will be matched before INTEGER
DECIMAL.2: INTEGER? "." INTEGER //# Will be matched before INTEGER
WHITESPACE: (" " | /\t/ )+
SQL_SELECT: "select"i
```


Laden…
Abbrechen
Speichern