This repo contains code to mirror other repos. It also contains the code that is getting mirrored.
Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- start: (_item | _NL)*
-
- _item: rule
- | token
- | statement
-
- rule: RULE priority? ":" expansions _NL
- token: TOKEN priority? ":" expansions _NL
-
- priority: "." NUMBER
-
- statement: "%ignore" expansions _NL -> ignore
- | "%import" import_args ["->" name] _NL -> import
- | "%declare" name+ -> declare
-
- import_args: "."? name ("." name)*
-
- ?expansions: alias (_VBAR alias)*
-
- ?alias: expansion ["->" RULE]
-
- ?expansion: expr*
-
- ?expr: atom [OP | "~" NUMBER [".." NUMBER]]
-
- ?atom: "(" expansions ")"
- | "[" expansions "]" -> maybe
- | STRING ".." STRING -> literal_range
- | name
- | (REGEXP | STRING) -> literal
-
- name: RULE
- | TOKEN
-
- _VBAR: _NL? "|"
- OP: /[+*][?]?|[?](?![a-z])/
- RULE: /!?[_?]?[a-z][_a-z0-9]*/
- TOKEN: /_?[A-Z][_A-Z0-9]*/
- STRING: _STRING "i"?
- REGEXP: /\/(?!\/)(\\\/|\\\\|[^\/\n])*?\/[imslux]*/
- _NL: /(\r?\n)+\s*/
-
- %import common.ESCAPED_STRING -> _STRING
- %import common.INT -> NUMBER
- %import common.WS_INLINE
-
- COMMENT: "//" /[^\n]/*
-
- %ignore WS_INLINE
- %ignore COMMENT
|