|
|
@ -8,7 +8,7 @@ char = { !NEWLINE ~ ANY }
|
|
|
|
// http://pest.rs/book/grammars/syntax.html#atomic
|
|
|
|
// http://pest.rs/book/grammars/syntax.html#atomic
|
|
|
|
inner = @{ char* }
|
|
|
|
inner = @{ char* }
|
|
|
|
|
|
|
|
|
|
|
|
token = { string | array | boolean | keyword }
|
|
|
|
token = { string | array | boolean | number | keyword }
|
|
|
|
|
|
|
|
|
|
|
|
// KEYWORDS
|
|
|
|
// KEYWORDS
|
|
|
|
// has to be atomic for no implicit separate (spaces)
|
|
|
|
// has to be atomic for no implicit separate (spaces)
|
|
|
@ -37,6 +37,13 @@ array = {
|
|
|
|
// BOOLEAN
|
|
|
|
// BOOLEAN
|
|
|
|
boolean = { "True" | "False" }
|
|
|
|
boolean = { "True" | "False" }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NUMBER
|
|
|
|
|
|
|
|
number = @{
|
|
|
|
|
|
|
|
"-"?
|
|
|
|
|
|
|
|
~ ("0" | ASCII_NONZERO_DIGIT ~ ASCII_DIGIT*)
|
|
|
|
|
|
|
|
~ ("." ~ ASCII_DIGIT*)?
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// comments are a # followed by
|
|
|
|
// comments are a # followed by
|
|
|
|
// any number of non-newline characters
|
|
|
|
// any number of non-newline characters
|
|
|
|
COMMENT = _{ "#" ~ char* }
|
|
|
|
COMMENT = _{ "#" ~ char* }
|
|
|
|