You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
496 B
15 lines
496 B
whitespace = _{ " " | "\t" | "\r" | "\n" } |
|
multi_comment = { "/*" ~ (!"*/" ~ ANY)* ~ "*/" } |
|
single_comment = { "//" ~ (!NEWLINE ~ ANY)* } |
|
identifier = { ASCII_ALPHA+ ~ (ASCII_ALPHA | ASCII_DIGIT | "_")* } |
|
rvalue = { (!";" ~ ANY)+ } |
|
attribution = { identifier ~ whitespace+ ~ rvalue ~ ";" } |
|
dictionary = { identifier ~ whitespace+ ~ "{" ~ (dictionary | attribution | whitespace)+ ~ "}" } |
|
|
|
file = { SOI ~ ( |
|
whitespace |
|
| multi_comment |
|
| single_comment |
|
| dictionary |
|
| attribution)* |
|
~ EOI }
|
|
|