]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #8585 : jankobler/rust/extract-grammar-01, r=catamorphism
authorbors <bors@rust-lang.org>
Wed, 21 Aug 2013 09:22:25 +0000 (02:22 -0700)
committerbors <bors@rust-lang.org>
Wed, 21 Aug 2013 09:22:25 +0000 (02:22 -0700)
This fixes some errors which extract_grammar.py reports, when called with

python2.7 src/etc/extract_grammar.py <doc/rust.md

doc/rust.md
src/etc/extract_grammar.py

index 4cd9dc3a1162d445865bc87eb311a82984b619d7..16927d0de7a4a48c27bea63bcc3431bbbcd37cb8 100644 (file)
@@ -788,7 +788,7 @@ extern mod complicated_mod = "some-file/in/the-rust/path";
 ##### Use declarations
 
 ~~~~~~~~ {.ebnf .gram}
-use_decl : "pub"? "use" ident [ '=' path
+use_decl : "pub" ? "use" ident [ '=' path
                           | "::" path_glob ] ;
 
 path_glob : ident [ "::" path_glob ] ?
@@ -1920,7 +1920,7 @@ it is automatically dereferenced to make the field access possible.
 ### Vector expressions
 
 ~~~~~~~~{.ebnf .gram}
-vec_expr : '[' "mut"? vec_elems? ']'
+vec_expr : '[' "mut" ? vec_elems? ']'
 
 vec_elems : [expr [',' expr]*] | [expr ',' ".." expr]
 ~~~~~~~~
index 58d1975c042b7bd3ebddf86d7aa83c02bb9caec9..61aabf1d881ccd7dd655ac73981e92fafde9247a 100755 (executable)
@@ -93,7 +93,11 @@ symnames = {
 
 "//": "linecomment",
 "/*": "openblockcomment",
-"*/": "closeblockcomment"
+"*/": "closeblockcomment",
+"macro_rules": "macro_rules",
+"=>" : "eg",
+".." : "dotdot",
+","  : "comma"
 }
 
 lines = []