// Little version of Rust grammar augmented with grammar specifications. // Mainly for bootstrapping re_terminal!(FN,"fn");//1 re_terminal!(Mut,"mut");//2 re_terminal!(Match,"match");//3 re_terminal!(If,"if");//4 re_terminal!(Else,"else");//5 re_terminal!(While,"while");//6 re_terminal!(Loop,"loop");//7 re_terminal!(For,"for");//8 re_terminal!(In,"in");//9 re_terminal!(Terminal,"terminal");//10 re_terminal!(Nonterminal,"nonterminal");//11 re_terminal!(OuterDocComment,"\\\\\\[^\n]*\n");//12 re_terminal!(LiteralIdent(String),"[a-zA-Z\\x80-\\xff_][a-zA-Z0-9\\x80-\\xff_]*");//13 //re_terminal!(LitStr(String),"\"[^\"]*\"")//FIXME: Is this enough? NOPE, needs escaping ability terminal LitStr(String)//14 { fn _match(parser: &mut Parser, source:&str) -> Option<(usize,String)> { //let mut characters=source.chars(); //if characters.next()!=Some('"') //{ // return None; //} //let mut size=1; //let mut r=String::from("\""); //loop //{ // match characters.next() // { // None => return None, // Some('"') => return Some((size+1,r+&"\"")), // Some('\\') => // { // match characters.next() // { // None => return None, // Some(c) => r+=&String::from('\\')+&String::from(c), // }; // size+=2; // }, // Some(c) => // { // r+=&String::from(c); // size+=1; // }, // }; //} } } re_terminal!(LitChar(char),"'\\?.'");//15 re_terminal!(LitInteger(usize),"[0-9]+");//16 re_terminal!(RArrow,"-\\>");//17 re_terminal!(FatArrow,"=>");//18 //re_terminal!(AndAnd,"&&") re_terminal!(EqualEqual,"==");//19 re_terminal!(LPar,"\\(");//20 re_terminal!(RPar,"\\)");//21 re_terminal!(Dot,"\\.");//22 re_terminal!(Comma,",");//23 re_terminal!(Colon,":");//24 re_terminal!(Underscore,"_");//25 re_terminal!(Ampersand,"&");//26 re_terminal!(NumberSign,"#");//27 re_terminal!(Minus,"-");//28 re_terminal!(Bang,"!");//29 re_terminal!(Semicolon,";");//30 re_terminal!(LBrace,"\\{");//31 re_terminal!(RBrace,"\\}");//32 re_terminal!(LBracket,"\\[");//33 re_terminal!(RBracket,"\\]");//34 re_terminal!(Equal,"=");//35 re_terminal!(Star,"\\*");//36 re_terminal!(Plus,"\\+");//37 re_terminal!(_,"\\s+|\n|\\\\[^\n]*\n");//Otherwise skip spaces and normal comments #[start_symbol] nonterminal WholeCrate(())//38 { (MaybeModItems) => (),//rule1 } nonterminal MaybeModItems(())//39 { (ModItems) => (),//rule2 () => (),//rule3 } nonterminal ModItems(())//40 { (ModItem) => (),//rule4 (ModItems,ModItem) => (),//rule5 } nonterminal ModItem(())//41 { //(Item) => (),//rule6 (MaybeOuterAttrs,Item) => (),//rule6 } // items that can appear outside of a fn block nonterminal Item(())//42 { (StmtItem) => (),//rule7 (ItemMacro) => (),//rule8 } // items that can appear in "stmts" nonterminal StmtItem(())//43 { (BlockItem) => (),//rule9 } nonterminal BlockItem(())//44 { (ItemFn) => (),//rule10 //(ItemStruct) => (), //(ItemEnum) => (), //(ItemTrait) => (), //(ItemImpl) => (), (ItemTerminal) => (),//NEW rule193 (ItemNonterminal) => (),//NEW rule194 } nonterminal ItemMacro(())//45 { (PathExpr,Bang,MaybeIdent,ParensDelimitedTokenTrees,Semicolon) => (),//rule11 //(PathExpr,Bang,MaybeIdent,BracesDelimitedTokenTrees) => (), //(PathExpr,Bang,MaybeIdent,BracketsDelimitedTokenTrees,Semicolon) => (), } nonterminal PathExpr//46 { (PathGenericArgsWithColons) => (),//rule12 //(ModSep,PathGenericArgsWithColons) => (), //(LittleSelf,ModSep,PathGenericArgsWithColons) => (), } // A path with a lifetime and type parameters with double colons before // the type parameters; e.g. `foo::bar::<'a>::Baz::` // // These show up in expr context, in order to disambiguate from "less-than" // expressions. nonterminal PathGenericArgsWithColons//47 { (Ident) => (),//rule13 //(Super) => (), //(PathGenericArgsWithColons,ModSep,Ident) => (), //(PathGenericArgsWithColons,ModSep,Super) => (), //(PathGenericArgsWithColons,ModSep,GenericArgs) => (), } nonterminal Ident//48 { (LiteralIdent) => (),//rule14 // Weak keywords that can be used as identifiers //(Catch) => (), //(DEFAULT) => (), //(Union) => (), } nonterminal ItemFn//49 { //(FN,Ident,GenericParams,FnDecl,MaybeWhereClause,InnerAttrsAndBlock) => (), (FN,Ident,FnDecl,InnerAttrsAndBlock) => (),//rule15 } nonterminal FnDecl//50 { (FnParams,RetTy) => (),//rule16 } nonterminal FnParams//51 { (LPar,MaybeParams,RPar) => (),//rule17 } nonterminal MaybeParams//52 { (Params) => (),//rule18 (Params,Comma) => (),//rule19 () => (),//rule20 } nonterminal Params//53 { (Param) => (),//rule21 (Params,Comma,Param) => (),//rule22 } nonterminal Param//54 { (Pat,Colon,TySum) => (),//rule23 } nonterminal Pat//55 { (Underscore) => (),//rule24 (Ampersand,Pat) => (),//rule25 (Ampersand,Mut,Pat) => (),//rule26 //(AndAnd,Mut,Pat) => (), (LPar,RPar) => (),//rule27 (LPar,PatTup,RPar) => (),//XXX rule195 //(LBracket,PatVec,RBracket) => (), (LitOrPath) => (),//rule28 //(LitOrPath,DotDotDot,LitOrPath) => (), //(PathExpr,LBrace,PatStruct,RBrace) => (), (PathExpr,LPar,RPar) => (),//rule29 (PathExpr,LPar,PatTup,RPar) => (),//rule30 //(PathExpr,Bang,MaybeIdent,DelimitedTokenTrees) => (), //(BindingMode,Ident) => (), //(Ident,At,Pat) => (), //(BindingMode,Ident,At,Pat) => (), //(BOX,Pat) => (), //(LT,TySum,MaybeAsTraitRef,GT,ModSep,Ident) => (), //(SHL,TySum,MaybeAsTraitRef,GT,ModSep,Ident,MaybeAsTraitRef,GT,ModSep,Ident) => (), } nonterminal LitOrPath//56 { (PathExpr) => (),//rule31 (Lit) => (),//rule32 (Minus,Lit) => (),//rule33 } nonterminal Lit//57 { //(LitByte) => (), (LitChar) => (),//rule34 (LitInteger) => (),//rule35 //(LitFloat) => (), //(True) => (), //(False) => (), (Str) => (),//rule36 } nonterminal Str//58 { (LitStr) => (),//rule37 //(LitStrRaw) => (), //(LitByteStr) => (), //(LitByteStrRaw) => (), } nonterminal MaybeIdent//59 { () => (),//rule38 (Ident) => (),//rule39 } nonterminal DelimitedTokenTrees//60 { (ParensDelimitedTokenTrees) => (),//rule40 //(BracesDelimitedTokenTrees) => (), //(BracketsDelimitedTokenTrees) => (), } nonterminal ParensDelimitedTokenTrees//61 { (LPar,TokenTrees,RPar) => (),//rule41 } nonterminal TokenTrees//62 { () => (),//rule42 (TokenTrees,TokenTree) => (),//rule43 } nonterminal TokenTree//63 { (DelimitedTokenTrees) => (),//rule44 (UnpairedToken) => (),//rule45 } nonterminal UnpairedToken//64 { //(SHL) => (), //(SHR) => (), //(LE) => (), //(EqualEqual) => (), //(NE) => (), //(GE) => (), //(AndAnd) => (), //(OrOr) => (), //(LArrow) => (), //(SHLEQ) => (), //(SHREQ) => (), //(MinusEqual) => (), //(AndEqual) => (), //(OrEqual) => (), //(PlusEqual) => (), //(StarEqual) => (), //(SlashEqual) => (), //(CaretEqual) => (), //(PercentEqual) => (), //(DotDot) => (), //(DotDotDot) => (), //(ModSep) => (), //(RArrow) => (), //(FatArrow) => (), //(LitByte) => (), //(LitChar) => (), //(LitInteger) => (), //(LitFloat) => (), (LitStr) => (),//rule46 //(LitStrRaw) => (), //(LitByteStr) => (), //(LitByteStrRaw) => (), (LiteralIdent) => (),//rule47 //(Underscore) => (), //(LiteralLifetime) => (), //(LittleSelf) => (), //(Static) => (), //(As) => (), //(Break) => (), //(Catch) => (), //(Crate) => (), //(DEFAULT) => (), //(Else) => (), //(Enum) => (), //(Extern) => (), //(False) => (), //(FN) => (), //(For) => (), //(If) => (), //(Impl) => (), //(In) => (), //(LiteralLet) => (), //(Loop) => (), //(Match) => (), //(Mod) => (), //(Move) => (), //(Mut) => (), //(Pub) => (), //(Ref) => (), //(Return) => (), //(Struct) => (), //(Super) => (), //(True) => (), //(Trait) => (), //(Type) => (), //(Union) => (), //(Unsafe) => (), //(Use) => (), //(While) => (), //(Yield) => (), //(Continue) => (), //(BOX) => (), //(Const) => (), //(Where) => (), //(Typeof) => (), //(InnerDocComment) => (), //(OuterDocComment) => (), //(Shebang) => (), //(StaticLifetime) => (), //(Semicolon) => (), (Comma) => (),//rule48 //(Dot) => (), //(At) => (), //(NumberSign) => (), //(Colon) => (), //(Equal) => (), //(QuestionMark) => (), //(Bang) => (), //(LT) => (), //(GT) => (), //(Minus) => (), //(Ampersand) => (), //(Vertical) => (), //(Plus) => (), //(Star) => (), //(Slash) => (), //(Caret) => (), //(Percent) => (), } nonterminal InnerAttrsAndBlock//65 { //(LBrace,MaybeInnerAttrs,MaybeStmts,RBrace) => (), (LBrace,MaybeStmts,RBrace) => (),//rule49 } nonterminal MaybeStmts//66 { (Stmts) => (),//rule50 (Stmts,NonblockExpr) => (),//rule51 (NonblockExpr) => (),//rule52 () => (),//rule53 } nonterminal Stmts//67 { (Stmt) => (),//rule54 (Stmts,Stmt) => (),//rule55 } nonterminal Stmt//68 { (MaybeOuterAttrs,Let) => (),//rule56 : FIXME Let (StmtItem) => (),//rule57 //(Pub,StmtItem) => (), (OuterAttrs,StmtItem) => (),//rule58 //(OuterAttrs,Pub,StmtItem) => (), (FullBlockExpr) => (),//rule59 (MaybeOuterAttrs,Block) => (),//rule60 (NonblockExpr,Semicolon) => (),//rule61 (OuterAttrs,NonblockExpr,Semicolon) => (),//rule62 (Semicolon) => (),//rule63 } nonterminal MaybeOuterAttrs(())//69 { (OuterAttrs) => (),//rule64 () => (),//rule65 } nonterminal OuterAttrs(())//70 { (OuterAttr) => (),//rule66 (OuterAttrs,OuterAttr) => (),//rule67 } nonterminal OuterAttr(())//71 { (NumberSign,LBracket,MetaItem,RBracket) => (),//rule68 (OuterDocComment) => (),//rule69 } nonterminal MetaItem(())//72 { (Ident) => (),//rule70 (Ident,Equal,Lit) => (),//rule71 (Ident,LPar,MetaSeq,RPar) => (),//rule72 (Ident,LPar,MetaSeq,Comma,RPar) => (),//rule73 } nonterminal MetaSeq(())//73 { () => (),//rule74 (MetaItem) => (),//rule75 (MetaSeq,Comma,MetaItem) => (),//rule76 } nonterminal RetTy//74 { //(RArrow,Bang) => (), (RArrow,Ty) => (),//rule77 () => (), //in bison with IDENT precedence//rule78 } nonterminal Ty//75 { (TyPrim) => (),//rule79 //(TyClosure) => (), //(LT,TySum,MaybeAsTraitRef,GT,ModSep,Ident) => (), //(SHL,TySum,MaybeAsTraitRef,GT,ModSep,Ident,MaybeAsTraitRef,GT,ModSep,Ident) => (), //(LPar,TySums,RPar), //(LPar,TySums,Comma,RPar), (LPar,RPar) => (),//rule80 } nonterminal TyPrim//76 { (PathGenericArgsWithoutColons) => (),//rule81 //(ModSep,PathGenericArgsWithoutColons) => (), //(LittleSelf,ModSep,PathGenericArgsWithoutColons) => (), //(PathGenericArgsWithoutColons,Bang,MaybeIdent,DelimitedTokenTrees) => (), //(ModSep,PathGenericArgsWithoutColons,Bang,MaybeIdent,DelimitedTokenTrees) => (), //(BOX,Ty) => (), //(Star,MaybeMutOrConst,Ty) => (), (Ampersand,Ty) => (),//rule82 (Ampersand,Mut,Ty) => (),//rule83 //(AndAnd,Ty) => (), //(AndAnd,Mut,Ty) => (), //(Ampersand,Lifetime,MaybeMut,Ty) => (), //(LBracket,Ty,RBracket) => (), //(LBracket,Ty,Comma,DotDot,Expr,RBracket) => (), //(LBracket,Ty,Semicolon,Expr,RBracket) => (), //(Typeof,LPar,Expr,RPar) => (), (Underscore) => (),//rule84 //(TyBareFn) => (), //(ForInType) => (), } nonterminal PathGenericArgsWithoutColons//77 { (Ident) => (),//rule85 //(Ident,GenericArgs) => (), //(Ident,LPar,MaybeTySums,RPar,RetTy) => (), //(PathGenericArgsWithoutColons,ModSep,Ident) => (), //(PathGenericArgsWithoutColons,ModSep,Ident,GenericArgs) => (), //(PathGenericArgsWithoutColons,ModSep,Ident,LPar,MaybeTySums,RPar,RetTy) => (), } nonterminal TySum//78 { (TySumElt) => (),//rule86 //(TySum,Plus,TySumElt) => (), } nonterminal TySumElt//79 { (Ty) => (),//rule87 //(Lifetime) => (), } nonterminal PatTup//80 { (PatTupElts) => (),//rule88 (PatTupElts,Comma) => (),//rule89 //(PatTupElts,DotDot) => (), //(PatTupElts,Comma,DotDot) => (), //(PatTupElts,DotDot,Comma,PatTupElts) => (), //(PatTupElts,DotDot,Comma,PatTupElts,Comma) => (), //(PatTupElts,Comma,DotDot,Comma,PatTupElts) => (), //(PatTupElts,Comma,DotDot,Comma,PatTupElts,Comma) => (), //(DotDot,Comma,PatTupElts) => (), //(DotDot,Comma,PatTupElts,Comma) => (), //(DotDot) => (), } nonterminal PatTupElts//81 { (Pat) => (),//rule90 (PatTupElts,Comma,Pat) => (),//rule91 } nonterminal NonblockExpr//82 { (Lit) => (),//rule92 (PathExpr) => (),//rule93 //(LittleSelf) => (), (MacroExpr) => (),//rule94 //(PathExpr,LBrace,StructExprFields,RBrace) => (), //(NonblockExpr,QuestionMark) => (), (NonblockExpr,Dot,PathGenericArgsWithColons) => (),//rule95 //(NonblockExpr,Dot,LitInteger) => (), (NonblockExpr,LBracket,MaybeExpr,RBracket) => (),//rule96 (NonblockExpr,LPar,MaybeExprs,RPar) => (),//rule97 //(LBracket,VecExpr,RBracket) => (), (LPar,MaybeExprs,RPar) => (),//rule98 //(Continue) => (), //(Continue,Lifetime) => (), //(Return) => (), //(Return,Expr) => (), //(Break) => (), //(Break,Lifetime) => (), //(Yield) => (), //(Yield,Expr) => (), //(NonblockExpr,LArrow,Expr) => (), (NonblockExpr,Equal,Expr) => (),//rule99 //(NonblockExpr,SHLEQ,Expr) => (), //(NonblockExpr,SHREQ,Expr) => (), //(NonblockExpr,MinusEqual,Expr) => (), //(NonblockExpr,AndEqual,Expr) => (), //(NonblockExpr,OrEqual,Expr) => (), //(NonblockExpr,PlusEqual,Expr) => (), //(NonblockExpr,StarEqual,Expr) => (), //(NonblockExpr,SlashEqual,Expr) => (), //(NonblockExpr,CaretEqual,Expr) => (), //(NonblockExpr,PercentEqual,Expr) => (), //(NonblockExpr,OrOr,Expr) => (), //(NonblockExpr,AndAnd,Expr) => (), (NonblockExpr,EqualEqual,Expr) => (),//rule100 //(NonblockExpr,NE,Expr) => (), //(NonblockExpr,LT,Expr) => (), //(NonblockExpr,GT,Expr) => (), //(NonblockExpr,LE,Expr) => (), //(NonblockExpr,GE,Expr) => (), //(NonblockExpr,Vertical,Expr) => (), //(NonblockExpr,Caret,Expr) => (), (NonblockExpr,Ampersand,Expr) => (),//rule101 //(NonblockExpr,SHL,Expr) => (), //(NonblockExpr,SHR,Expr) => (), (NonblockExpr,Plus,Expr) => (),//rule102 (NonblockExpr,Minus,Expr) => (),//rule103 (NonblockExpr,Star,Expr) => (),//rule104 //(NonblockExpr,Slash,Expr) => (), //(NonblockExpr,Percent,Expr) => (), //(NonblockExpr,DotDot) => (), //(NonblockExpr,DotDot,Expr) => (), //(DotDot,Expr) => (), //(DotDot) => (), //(NonblockExpr,As,Ty) => (), //(NonblockExpr,Colon,Ty) => (), //(BOX,Expr) => (), //(ExprQualifiedPath) => (), (NonblockPrefixExpr) => (),//rule105 } nonterminal NonblockPrefixExpr//83 { (Minus,Expr) => (),//rule106 (Bang,Expr) => (),//rule107 (Star,Expr) => (),//rule108 (Ampersand,MaybeMut,Expr) => (),//rule109 //(AndAnd,MaybeMut,Expr) => (), //(LambdaExpr) => (), //(Move,LambdaExpr) => (), } nonterminal MaybeMut//84 { (Mut) => (),//rule110 () => (),//rule111 } nonterminal FullBlockExpr//85 { (BlockExpr) => (),//rule112 //(BlockExprDot) => (), } nonterminal BlockExpr//86 { (ExprMatch) => (),//rule113 (ExprIf) => (),//rule114 //(ExprIfLet) => (), (ExprWhile) => (),//rule115 //(ExprWhileLet) => (), (ExprLoop) => (),//rule116 (ExprFor) => (),//rule117 //(Unsafe,Block) => (), //(PathExpr,Bang,MaybeIdent,BracesDelimitedTokenTrees) => (), } nonterminal ExprMatch//87 { (Match,ExprNostruct,LBrace,RBrace) => (),//rule118 (Match,ExprNostruct,LBrace,MatchClauses,RBrace) => (),//rule119 (Match,ExprNostruct,LBrace,MatchClauses,NonblockMatchClause,RBrace) => (),//rule120 (Match,ExprNostruct,LBrace,NonblockMatchClause,RBrace) => (),//rule121 } nonterminal ExprNostruct//88 { (Lit) => (),//rule122 (PathExpr) => (),//rule123 //(LittleSelf) => (), (MacroExpr) => (),//rule124 //(ExprNostruct,QuestionMark) => (), (ExprNostruct,Dot,PathGenericArgsWithColons) => (),//rule125 //(ExprNostruct,Dot,LitInteger) => (), (ExprNostruct,LBracket,MaybeExpr,RBracket) => (),//rule126 (ExprNostruct,LPar,MaybeExprs,RPar) => (),//rule127 //(LBracket,VecExpr,RBracket) => (), (LPar,MaybeExprs,RPar) => (),//rule128 //(Continue) => (), //(Continue,Ident) => (), //(Return) => (), //(Return,Expr) => (), //(Break) => (), //(Break,Ident) => (), //(Yield) => (), //(Yield,Expr) => (), //(ExprNostruct,LArrow,ExprNostruct) => (), (ExprNostruct,Equal,ExprNostruct) => (),//rule129 //(ExprNostruct,SHLEQ,ExprNostruct) => (), //(ExprNostruct,SHREQ,ExprNostruct) => (), //(ExprNostruct,MinusEqual,ExprNostruct) => (), //(ExprNostruct,AndEqual,ExprNostruct) => (), //(ExprNostruct,OrEqual,ExprNostruct) => (), //(ExprNostruct,PlusEqual,ExprNostruct) => (), //(ExprNostruct,StarEqual,ExprNostruct) => (), //(ExprNostruct,SlashEqual,ExprNostruct) => (), //(ExprNostruct,CaretEqual,ExprNostruct) => (), //(ExprNostruct,PercentEqual,ExprNostruct) => (), //(ExprNostruct,OrOr,ExprNostruct) => (), //(ExprNostruct,AndAnd,ExprNostruct) => (), (ExprNostruct,EqualEqual,ExprNostruct) => (),//rule130 //(ExprNostruct,NE,ExprNostruct) => (), //(ExprNostruct,LT,ExprNostruct) => (), //(ExprNostruct,GT,ExprNostruct) => (), //(ExprNostruct,LE,ExprNostruct) => (), //(ExprNostruct,GE,ExprNostruct) => (), //(ExprNostruct,Vertical,ExprNostruct) => (), //(ExprNostruct,Caret,ExprNostruct) => (), (ExprNostruct,Ampersand,ExprNostruct) => (),//rule131 //(ExprNostruct,SHL,ExprNostruct) => (), //(ExprNostruct,SHR,ExprNostruct) => (), (ExprNostruct,Plus,ExprNostruct) => (),//rule132 (ExprNostruct,Minus,ExprNostruct) => (),//rule133 (ExprNostruct,Star,ExprNostruct) => (),//rule134 //(ExprNostruct,Slash,ExprNostruct) => (), //(ExprNostruct,Percent,ExprNostruct) => (), //(ExprNostruct,DotDot) => (), //(ExprNostruct,DotDot,ExprNostruct) => (), //(DotDot,ExprNostruct) => (), //(DotDot) => (), //(ExprNostruct,As,Ty) => (), //(ExprNostruct,Colon,Ty) => (), //(BOX,ExprNostruct) => (), //(ExprQualifiedPath) => (), (BlockExpr) => (),//rule135 (Block) => (),//rule136 (NonblockPrefixExprNostruct) => (),//rule137 } nonterminal Block//89 { (LBrace,MaybeStmts,RBrace) => (),//rule138 } nonterminal NonblockPrefixExprNostruct//90 { (Minus,ExprNostruct) => (),//rule139 (Bang,ExprNostruct) => (),//rule140 (Star,ExprNostruct) => (),//rule141 (Ampersand,MaybeMut,ExprNostruct) => (),//rule142 //(AndAnd,MaybeMut,ExprNostruct) => (), //(LambdaExprNostruct) => (), //(Move,LambdaExprNostruct) => (), } nonterminal MacroExpr//91 { (PathExpr,Bang,MaybeIdent,ParensDelimitedTokenTrees) => (),//rule143 //(PathExpr,Bang,MaybeIdent,BracketsDelimitedTokenTrees) => (), } nonterminal MaybeExpr//92 { (Expr) => (),//rule144 () => (),//rule145 } nonterminal Expr//93 { (Lit) => (),//rule146 (PathExpr) => (),//rule147 //(LittleSelf) => (), (MacroExpr) => (),//rule148 //(PathExpr,LBrace,StructExprFields,RBrace) => (), //(Expr,QuestionMark) => (), (Expr,Dot,PathGenericArgsWithColons) => (),//rule149 //(Expr,Dot,LitInteger) => (), (Expr,LBracket,MaybeExpr,RBracket) => (),//rule150 (Expr,LPar,MaybeExprs,RPar) => (),//rule151 (LPar,MaybeExprs,RPar) => (),//rule152 //(LBracket,VecExpr,RBracket) => (), //(Continue) => (), //(Continue,Ident) => (), //(Return) => (), //(Return,Expr) => (), //(Break) => (), //(Break,Ident) => (), //(Yield) => (), //(Yield,Expr) => (), //(Expr,LArrow,Expr) => (), (Expr,Equal,Expr) => (),//rule153 //(Expr,SHLEQ,Expr) => (), //(Expr,SHREQ,Expr) => (), //(Expr,MinusEqual,Expr) => (), //(Expr,AndEqual,Expr) => (), //(Expr,OrEqual,Expr) => (), //(Expr,PlusEqual,Expr) => (), //(Expr,StarEqual,Expr) => (), //(Expr,SlashEqual,Expr) => (), //(Expr,CaretEqual,Expr) => (), //(Expr,PercentEqual,Expr) => (), //(Expr,OrOr,Expr) => (), //(Expr,AndAnd,Expr) => (), (Expr,EqualEqual,Expr) => (),//rule154 //(Expr,NE,Expr) => (), //(Expr,LT,Expr) => (), //(Expr,GT,Expr) => (), //(Expr,LE,Expr) => (), //(Expr,GE,Expr) => (), //(Expr,Vertical,Expr) => (), //(Expr,Caret,Expr) => (), (Expr,Ampersand,Expr) => (),//rule155 //(Expr,SHL,Expr) => (), //(Expr,SHR,Expr) => (), (Expr,Plus,Expr) => (),//rule156 (Expr,Minus,Expr) => (),//rule157 (Expr,Star,Expr) => (),//rule158 //(Expr,Slash,Expr) => (), //(Expr,Percent,Expr) => (), //(Expr,DotDot) => (), //(Expr,DotDot,Expr) => (), //(DotDot,Expr) => (), //(DotDot) => (), //(Expr,As,Ty) => (), //(Expr,Colon,Ty) => (), //(BOX,Expr) => (), //(ExprQualifiedPath) => (), (BlockExpr) => (),//rule159 (Block) => (),//rule160 (NonblockPrefixExpr) => (),//rule161 } nonterminal MaybeExprs//94 { (Exprs) => (),//rule162 (Exprs,Comma) => (),//rule163 () => (),//rule164 } nonterminal Exprs//95 { (Expr) => (),//rule165 (Exprs,Comma,Expr) => (),//rule166 } nonterminal ExprIf//96 { (If,ExprNostruct,Block) => (),//rule167 (If,ExprNostruct,Block,Else,BlockOrIf) => (),//rule168 } nonterminal BlockOrIf//97 { (Block) => (),//rule169 (ExprIf) => (),//rule170 //(ExprIfLet) => (), } nonterminal ExprWhile//98 { //(MaybeLabel,While,ExprNostruct,Block) => (), (While,ExprNostruct,Block) => (),//rule171 } nonterminal ExprLoop//99 { //(MaybeLabel,Loop,Block) => (), (Loop,Block) => (),//rule172 } nonterminal ExprFor//100 { //(MaybeLabel,For,Pat,In,ExprNostruct,Block) => (), (For,Pat,In,ExprNostruct,Block) => (),//rule173 } nonterminal MatchClauses//101 { (MatchClause) => (),//rule174 (MatchClauses,MatchClause) => (),//rule175 } nonterminal MatchClause//102 { (NonblockMatchClause,Comma) => (),//rule176 (BlockMatchClause) => (),//rule177 (BlockMatchClause,Comma) => (),//rule178 } nonterminal NonblockMatchClause//103 { (MaybeOuterAttrs,PatsOr,MaybeGuard,FatArrow,NonblockExpr) => (),//rule179 //(MaybeOuterAttrs,PatsOr,MaybeGuard,FatArrow,BlockExprDot) => (), } nonterminal BlockMatchClause//104 { (MaybeOuterAttrs,PatsOr,MaybeGuard,FatArrow,Block) => (),//rule180 (MaybeOuterAttrs,PatsOr,MaybeGuard,FatArrow,BlockExpr) => (),//rule181 } nonterminal PatsOr//105 { (Pat) => (),//rule182 //(PatsOr,Vertical,Pat) => (), } nonterminal MaybeGuard//106 { //(If,ExprNostruct) => (), () => (),//rule183 } //New nonterminal ItemTerminal//107 { //(Struct,Ident,GenericParams,MaybeWhereClause,StructDeclArgs) => (), //(Struct,Ident,GenericParams,StructTupleArgs,MaybeWhereClause,Semicolon) => (), //(MaybeDefaultMaybeUnsafe,Impl,GenericParams,TyPrimSum,MaybeWhereClause,LBrace,MaybeInnerAttrs,MaybeImplItems,RBrace) => (), (Terminal,Ident,LBrace,MaybeTerminalItems,RBrace) => (),//rule184 //(Terminal,Ident,LPar,Ty,RPar,LBrace,MaybeTerminalItems,RBrace) => (),//rule185 (Terminal,Ident,LPar,MaybeTySums,RPar,LBrace,MaybeTerminalItems,RBrace) => (),//rule185 } //New nonterminal MaybeTerminalItems//108 { (TerminalItems) => (),//rule186 () => (),//rule187 } //New nonterminal TerminalItems//109 { (TerminalItem) => (),//rule188 (TerminalItem,TerminalItems) => (),//rule189 } //New nonterminal TerminalItem//110 { (ItemFn) => (),//rule190 //(AttrsAndVis,ItemMacro) => (), //(ImplConst) => (), //(ImplType) => (), } //New nonterminal ItemNonterminal//111 { (Nonterminal,Ident,LBrace,MatchClauses,RBrace) => (),//rule191 //(Nonterminal,Ident,LPar,Ty,RPar,LBrace,MatchClauses,RBrace) => (),//rule192 (Nonterminal,Ident,LPar,MaybeTySums,RPar,LBrace,MatchClauses,RBrace) => (),//rule192 } nonterminal MaybeTySums//112 { (TySums) => (),//rule196 (TySums,Comma) => (),//rule197 () => (),//rule198 } nonterminal TySums//113 { (TySum) => (),//rule199 (TySums,Comma,TySum) => (),//rule200 }