auto merge of #8585 : jankobler/rust/extract-grammar-01, r=catamorphism

This fixes some errors which extract_grammar.py reports, when called with

python2.7 src/etc/extract_grammar.py <doc/rust.md
This commit is contained in:
bors 2013-08-21 02:22:25 -07:00
commit c87d798fb0
2 changed files with 7 additions and 3 deletions

View 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]
~~~~~~~~

View File

@ -93,7 +93,11 @@ symnames = {
"//": "linecomment",
"/*": "openblockcomment",
"*/": "closeblockcomment"
"*/": "closeblockcomment",
"macro_rules": "macro_rules",
"=>" : "eg",
".." : "dotdot",
"," : "comma"
}
lines = []