Browse Source

Grammars: Remove use of /i/ in middle of terminals, to support Lark.js

gm/2021-09-23T00Z/github.com--lark-parser-lark/v0.12.0^2
Erez Sh 3 years ago
parent
commit
6e2842e9a2
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lark/grammars/python.lark

+ 2
- 2
lark/grammars/python.lark View File

@@ -10,8 +10,8 @@ DEC_NUMBER: /0|[1-9][\d_]*/i
HEX_NUMBER.2: /0x[\da-f]*/i HEX_NUMBER.2: /0x[\da-f]*/i
OCT_NUMBER.2: /0o[0-7]*/i OCT_NUMBER.2: /0o[0-7]*/i
BIN_NUMBER.2 : /0b[0-1]*/i BIN_NUMBER.2 : /0b[0-1]*/i
FLOAT_NUMBER.2: /((\d+\.[\d_]*|\.[\d_]+)(e[-+]?\d+)?|\d+(e[-+]?\d+))/i
IMAG_NUMBER.2: /\d+j/i | FLOAT_NUMBER "j"i
FLOAT_NUMBER.2: /((\d+\.[\d_]*|\.[\d_]+)([eE][-+]?\d+)?|\d+([eE][-+]?\d+))/
IMAG_NUMBER.2: /\d+[jJ]/ | FLOAT_NUMBER /[jJ]/




// Comma-separated list (with an optional trailing comma) // Comma-separated list (with an optional trailing comma)


Loading…
Cancel
Save