Permalink
Browse files

Refactoring n2 grammar.

  • Loading branch information...
1 parent 8ff5022 commit 8d02b02b76ed08ab9f71a54ca62b5091538e6cf4 @VladD2 VladD2 committed Aug 10, 2012
Showing with 12 additions and 12 deletions.
  1. +12 −12 N2/N2.Grammar/GrammarParser2.n2
@@ -124,18 +124,18 @@ syntax module GrammarParser2
alias GrammarName = QIdentifier;
- syntax TokenRuleDecl is Declaration = RuleAttributes "token"S Name "="s TokenRule ";"s;
- syntax VoidRuleDecl is Declaration = RuleAttributes "void"S Name "="s Rule ";"s;
- syntax SimpleRuleDecl is Declaration = RuleAttributes "syntax"S Name "="s Rule BodyDeclaration;
- syntax ExtentionPointRuleDecl is Declaration = RuleAttributes "syntax"S Name ";"s;
- syntax Alias is Declaration = "alias"S Name "="s Rule ";"s;
- syntax TokenField is Declaration = "token"S "field"S Name "="s (StringLiteral; ","s)+ ";"s;
- syntax ExtentionRuleDecl is Declaration = RuleAttributes "syntax"S Name "is"S BaseName "="s Rule BodyDeclaration { alias BaseName = QIdentifier; }
- syntax SpanClassDecl is Declaration = "span"S "class"S Name MatchTokens ";"s { alias MatchTokens = ("="s TokenRule)?; }
- syntax BracePairDecl is Declaration = "braces"S Open ","s Close ";"s { alias Open = TokenRule; alias Close = TokenRule; }
- syntax ImportSyntaxModuleDecl is Declaration = "using"S GrammarName ";"s;
- syntax AliasSyntaxModuleDecl is Declaration = "using"S Alias "="s GrammarName ";"s { alias Alias = Identifier; }
- syntax OptionEmitDebugSources is Declaration = "option"S "EmitDebugSources"S "="s Value ";"s { alias Value = Identifier; }
+ syntax ExtentionRuleDecl is Declaration = RuleAttributes "syntax"S Name "is"S BaseName "="s Rule BodyDeclaration { alias BaseName = QIdentifier; }
+ syntax SimpleRuleDecl is Declaration = RuleAttributes "syntax"S Name "="s Rule BodyDeclaration;
+ syntax TokenRuleDecl is Declaration = RuleAttributes "token"S Name "="s TokenRule ";"s;
+ syntax VoidRuleDecl is Declaration = RuleAttributes "void"S Name "="s Rule ";"s;
+ syntax Alias is Declaration = "alias"S Name "="s Rule ";"s;
+ syntax TokenField is Declaration = "token"S "field"S Name "="s (StringLiteral; ","s)+ ";"s;
+ syntax AliasSyntaxModuleDecl is Declaration = "using"S Alias "="s GrammarName ";"s { alias Alias = Identifier; }
+ syntax ImportSyntaxModuleDecl is Declaration = "using"S GrammarName ";"s;
+ syntax ExtentionPointRuleDecl is Declaration = RuleAttributes "syntax"S Name ";"s;
+ syntax SpanClassDecl is Declaration = "span"S "class"S Name MatchTokens ";"s { alias MatchTokens = ("="s TokenRule)?; }
+ syntax BracePairDecl is Declaration = "braces"S Open ","s Close ";"s { alias Open = TokenRule; alias Close = TokenRule; }
+ syntax OptionEmitDebugSources is Declaration = "option"S "EmitDebugSources"S "="s Value ";"s { alias Value = Identifier; }
syntax BodyDeclaration;

0 comments on commit 8d02b02

Please sign in to comment.