예제 #1
0
 static AttributeScope()
 {
     tokenScope.AddAttribute("text", null);
     tokenScope.AddAttribute("type", null);
     tokenScope.AddAttribute("line", null);
     tokenScope.AddAttribute("index", null);
     tokenScope.AddAttribute("pos", null);
     tokenScope.AddAttribute("channel", null);
     tokenScope.AddAttribute("tree", null);
     tokenScope.AddAttribute("int", null);
 }
예제 #2
0
        static RuleLabelScope()
        {
            predefinedRulePropertiesScope = new AttributeScope("RulePredefined", null);
            predefinedRulePropertiesScope.AddAttribute("text", null);
            predefinedRulePropertiesScope.AddAttribute("start", null);
            predefinedRulePropertiesScope.AddAttribute("stop", null);
            predefinedRulePropertiesScope.AddAttribute("tree", null);
            predefinedRulePropertiesScope.AddAttribute("st", null);
            predefinedRulePropertiesScope.IsPredefinedRuleScope = true;

            predefinedTreeRulePropertiesScope = new AttributeScope("RulePredefined", null);
            predefinedTreeRulePropertiesScope.AddAttribute("text", null);
            predefinedTreeRulePropertiesScope.AddAttribute("start", null);   // note: no stop; not meaningful
            predefinedTreeRulePropertiesScope.AddAttribute("tree", null);
            predefinedTreeRulePropertiesScope.AddAttribute("st", null);
            predefinedTreeRulePropertiesScope.IsPredefinedRuleScope = true;

            predefinedLexerRulePropertiesScope = new AttributeScope("LexerRulePredefined", null);
            predefinedLexerRulePropertiesScope.AddAttribute("text", null);
            predefinedLexerRulePropertiesScope.AddAttribute("type", null);
            predefinedLexerRulePropertiesScope.AddAttribute("line", null);
            predefinedLexerRulePropertiesScope.AddAttribute("index", null);
            predefinedLexerRulePropertiesScope.AddAttribute("pos", null);
            predefinedLexerRulePropertiesScope.AddAttribute("channel", null);
            predefinedLexerRulePropertiesScope.AddAttribute("start", null);
            predefinedLexerRulePropertiesScope.AddAttribute("stop", null);
            predefinedLexerRulePropertiesScope.AddAttribute("int", null);
            predefinedLexerRulePropertiesScope.IsPredefinedLexerRuleScope = true;

            grammarTypeToRulePropertiesScope =
                new AttributeScope[]
            {
                null,
                predefinedLexerRulePropertiesScope, // LEXER
                predefinedRulePropertiesScope,      // PARSER
                predefinedTreeRulePropertiesScope,  // TREE PARSER
                predefinedRulePropertiesScope       // COMBINED
            };
        }
예제 #3
0
        static RuleLabelScope()
        {
            predefinedRulePropertiesScope = new AttributeScope( "RulePredefined", null );
            predefinedRulePropertiesScope.AddAttribute( "text", null );
            predefinedRulePropertiesScope.AddAttribute( "start", null );
            predefinedRulePropertiesScope.AddAttribute( "stop", null );
            predefinedRulePropertiesScope.AddAttribute( "tree", null );
            predefinedRulePropertiesScope.AddAttribute( "st", null );
            predefinedRulePropertiesScope.isPredefinedRuleScope = true;

            predefinedTreeRulePropertiesScope = new AttributeScope( "RulePredefined", null );
            predefinedTreeRulePropertiesScope.AddAttribute( "text", null );
            predefinedTreeRulePropertiesScope.AddAttribute( "start", null ); // note: no stop; not meaningful
            predefinedTreeRulePropertiesScope.AddAttribute( "tree", null );
            predefinedTreeRulePropertiesScope.AddAttribute( "st", null );
            predefinedTreeRulePropertiesScope.isPredefinedRuleScope = true;

            predefinedLexerRulePropertiesScope = new AttributeScope( "LexerRulePredefined", null );
            predefinedLexerRulePropertiesScope.AddAttribute( "text", null );
            predefinedLexerRulePropertiesScope.AddAttribute( "type", null );
            predefinedLexerRulePropertiesScope.AddAttribute( "line", null );
            predefinedLexerRulePropertiesScope.AddAttribute( "index", null );
            predefinedLexerRulePropertiesScope.AddAttribute( "pos", null );
            predefinedLexerRulePropertiesScope.AddAttribute( "channel", null );
            predefinedLexerRulePropertiesScope.AddAttribute( "start", null );
            predefinedLexerRulePropertiesScope.AddAttribute( "stop", null );
            predefinedLexerRulePropertiesScope.AddAttribute( "int", null );
            predefinedLexerRulePropertiesScope.isPredefinedLexerRuleScope = true;

            grammarTypeToRulePropertiesScope =
                new AttributeScope[]
                {
                    null,
                    predefinedLexerRulePropertiesScope, // LEXER
                    predefinedRulePropertiesScope, // PARSER
                    predefinedTreeRulePropertiesScope, // TREE PARSER
                    predefinedRulePropertiesScope // COMBINED
                };
        }