-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsyntax.bnf
21 lines (18 loc) · 895 Bytes
/
syntax.bnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; UPPERCASE rules refer to those defined in the Rust Reference
; lowercase rules are rules defined in dirmod
dirmod_all_args := (dirmod_all_arg (';' dirmod_all_arg)* ';'?)?
dirmod_all_arg := default_mod_arg | special_mod_arg | except_arg
default_mod_arg := 'default' file_type? modifier
special_mod_arg := modifier nonempty_ident_list
except_arg := 'except' nonempty_ident_list
dirmod_os_args := dirmod_cfg_args
dirmod_family_args := dirmod_cfg_args
dirmod_feature_args := dirmod_cfg_args
dirmod_cfg_args := modifier error_fallback?
file_type := 'file' | 'dir'
modifier := vis 'use'?
vis := VISIBILITY | 'priv' ; The VISIBILITY here does not accept empty visibility; use 'priv' to imply private visibility.
nonempty_ident_list := IDENT (',' IDENT)* ','?
error_fallback = error_fallback_default | error_fallback_custom
error_fallback_default = '||'
error_fallback_custom = '||' STRING_LITERAL