-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4961 from oobabooga/dev
Merge dev branch
- Loading branch information
Showing
30 changed files
with
928 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,14 @@ | ||
root ::= object | ||
value ::= object | array | string | number | ("true" | "false" | "null") ws | ||
|
||
object ::= | ||
"{" ws ( | ||
string ":" ws value | ||
("," ws string ":" ws value)* | ||
)? "}" ws | ||
object ::= "{" ws ( string ":" ws value ("," ws string ":" ws value)* )? "}" | ||
|
||
value ::= object | array | string | number | ("true" | "false" | "null") ws | ||
|
||
array ::= | ||
"[" ws ( | ||
value | ||
("," ws value)* | ||
)? "]" ws | ||
array ::= "[" ws ( value ("," ws value)* )? "]" ws | ||
|
||
string ::= | ||
"\"" ( | ||
[^"\\] | | ||
"\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes | ||
)* "\"" ws | ||
string ::= "\"" ( [a-zA-Z0-9] )* "\"" ws | ||
|
||
number ::= ("-"? ([0-9] | [1-9] [0-9]*)) ("." [0-9]+)? ([eE] [-+]? [0-9]+)? ws | ||
|
||
# Optional space: by convention, applied in this grammar after literal chars when allowed | ||
|
||
ws ::= ([ \t\n] ws)? |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root ::= object | ||
|
||
object ::= "{" ws ( string ":" ws value ("," ws string ":" ws value)* )? "}" ws | ||
|
||
value ::= object | array | string | number | ("true" | "false" | "null") ws | ||
|
||
array ::= "[" ws ( value ("," ws value)* )? "]" ws | ||
|
||
string ::= "\"" ( [a-zA-Z0-9] )* "\"" ws | ||
|
||
number ::= ("-"? ([0-9] | [1-9] [0-9]*)) ("." [0-9]+)? ([eE] [-+]? [0-9]+)? ws | ||
|
||
|
||
ws ::= ([ \t\n] ws)? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
root ::= item+ | ||
|
||
# Excludes various line break characters | ||
item ::= "- " [^\r\n\x0b\x0c\x85\u2028\u2029]+ "\n" | ||
root ::= "1. " paragraph "\n" ([0-9] [0-9]? ". " paragraph "\n")+ | ||
paragraph ::= [a-zA-Z'.,; ]+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
root ::= (expr "=" ws term "\n")+ | ||
expr ::= term ([-+*/] term)* | ||
term ::= num | "(" ws expr ")" ws | ||
num ::= [0-9]+ ws | ||
ws ::= [ \t\n]* | ||
# this is a comment | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.