当前位置: 首页>>代码示例>>C#>>正文


C# IIntStream类代码示例

本文整理汇总了C#中IIntStream的典型用法代码示例。如果您正苦于以下问题:C# IIntStream类的具体用法?C# IIntStream怎么用?C# IIntStream使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IIntStream类属于命名空间,在下文中一共展示了IIntStream类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NoViableAltException

		public NoViableAltException(string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input)
			: base(input)
		{
			this.grammarDecisionDescription = grammarDecisionDescription;
			this.decisionNumber = decisionNumber;
			this.stateNumber = stateNumber;
		}
开发者ID:SmallMobile,项目名称:ranet-uilibrary-olap.latest-unstabilized,代码行数:7,代码来源:NoViableAltException.cs

示例2: NoViableAltException

 public NoViableAltException(string message, string grammarDecisionDescription, int decisionNumber, int stateNumber, IIntStream input, Exception innerException)
     : base(message, input, innerException)
 {
     this._grammarDecisionDescription = grammarDecisionDescription;
     this._decisionNumber = decisionNumber;
     this._stateNumber = stateNumber;
 }
开发者ID:joelmartinez,项目名称:Jint.Phone,代码行数:7,代码来源:NoViableAltException.cs

示例3: RecognitionException

 public RecognitionException(string message, IIntStream input, Exception innerException) : base(message, innerException)
 {
     this._input = input;
     if (input != null)
     {
         this._index = input.Index;
         if (input is ITokenStream)
         {
             this._token = ((ITokenStream) input).LT(1);
             this._line = this._token.Line;
             this._charPositionInLine = this._token.CharPositionInLine;
         }
         ITreeNodeStream stream = input as ITreeNodeStream;
         if (stream != null)
         {
             this.ExtractInformationFromTreeNodeStream(stream);
         }
         else if (input is ICharStream)
         {
             this._c = input.LA(1);
             this._line = ((ICharStream) input).Line;
             this._charPositionInLine = ((ICharStream) input).CharPositionInLine;
         }
         else
         {
             this._c = input.LA(1);
         }
     }
 }
开发者ID:brunolauze,项目名称:mysql-connector-net-6,代码行数:29,代码来源:RecognitionException.cs

示例4: MismatchedTokenException

        public MismatchedTokenException(string message, int expecting, IIntStream input, IList<string> tokenNames, Exception innerException)
            : base(message, input, innerException) {
            this._expecting = expecting;

            if (tokenNames != null)
                this._tokenNames = new ReadOnlyCollection<string>(new List<string>(tokenNames));
        }
开发者ID:EightPillars,项目名称:PathwayEditor,代码行数:7,代码来源:MismatchedTokenException.cs

示例5: MatchAny

        public override void MatchAny(IIntStream ignore)
        {
            base.state.errorRecovery = false;
            base.state.failed = false;
            this.input.Consume();
            if (this.input.LA(1) == 2)
            {
                this.input.Consume();
                int num2 = 1;
                while (num2 > 0)
                {
                    switch (this.input.LA(1))
                    {
                        case -1:
                            return;

                        case 2:
                            num2++;
                            break;

                        case 3:
                            num2--;
                            break;
                    }
                    this.input.Consume();
                }
            }
        }
开发者ID:brunolauze,项目名称:mysql-connector-net-6,代码行数:28,代码来源:TreeParser.cs

示例6: MismatchedTokenException

        public MismatchedTokenException(string message, int expecting, IIntStream input, IList<string> tokenNames)
            : base(message, input)
        {
            this._expecting = expecting;

            if (tokenNames != null)
                this._tokenNames = tokenNames.ToList().AsReadOnly();
        }
开发者ID:sklose,项目名称:NCalc2,代码行数:8,代码来源:MismatchedTokenException.cs

示例7: RecognitionException

 public RecognitionException(IRecognizer recognizer, IIntStream input, ParserRuleContext ctx)
 {
     this.recognizer = recognizer;
     this.input = input;
     this.ctx = ctx;
     if (recognizer != null)
     {
         this.offendingState = recognizer.State;
     }
 }
开发者ID:rharrisxtheta,项目名称:antlr4cs,代码行数:10,代码来源:RecognitionException.cs

示例8: NoViableAlt

 protected virtual void NoViableAlt(int s, IIntStream input)
 {
     if (this.recognizer.state.backtracking > 0)
     {
         this.recognizer.state.failed = true;
     }
     else
     {
         NoViableAltException nvae = new NoViableAltException(this.Description, this.decisionNumber, s, input);
         this.Error(nvae);
         throw nvae;
     }
 }
开发者ID:brunolauze,项目名称:mysql-connector-net-6,代码行数:13,代码来源:DFA.cs

示例9: AlreadyParsedRule

        public virtual bool AlreadyParsedRule(IIntStream input, int ruleIndex)
        {
            int ruleMemoization = this.GetRuleMemoization(ruleIndex, input.Index);
            switch (ruleMemoization)
            {
                case -1:
                    return false;

                case -2:
                    this.state.failed = true;
                    break;

                default:
                    input.Seek(ruleMemoization + 1);
                    break;
            }
            return true;
        }
开发者ID:brunolauze,项目名称:mysql-connector-net-6,代码行数:18,代码来源:BaseRecognizer.cs

示例10: GetMissingSymbol

		protected override object GetMissingSymbol(IIntStream input,
										  RecognitionException e,
										  int expectedTokenType,
										  BitSet follow)
		{
			String tokenText = null;
			if ( expectedTokenType==Token.EOF ) tokenText = "<missing EOF>";
			else tokenText = "<missing " + TokenNames[expectedTokenType] + ">";
			CommonToken t = new CommonToken(expectedTokenType, tokenText);
			IToken current = ((ITokenStream)input).LT(1);
			if (current.Type == Token.EOF) {
				current = ((ITokenStream)input).LT(-1);
			}
			t.line = current.Line;
			t.CharPositionInLine = current.CharPositionInLine;
			t.Channel = DEFAULT_TOKEN_CHANNEL;
			return t;
		}
开发者ID:Fedorm,项目名称:core-master,代码行数:18,代码来源:Parser.cs

示例11: Match

 public override object Match(IIntStream input, int ttype, BitSet follow)
 {
     object currentInputSymbol = this.GetCurrentInputSymbol(input);
     DumpSymbol(currentInputSymbol);
     if (input.LA(1) == ttype)
     {
         input.Consume();
         this.state.errorRecovery = false;
         this.state.failed = false;
         return currentInputSymbol;
     }
     else
     {
         if (this.state.backtracking <= 0)
             return this.RecoverFromMismatchedToken(input, ttype, follow);
         this.state.failed = true;
         return currentInputSymbol;
     }
 }
开发者ID:QAMichaelPeng,项目名称:CoolCompiler,代码行数:19,代码来源:CalculatorParser.cs

示例12: GetMissingSymbol

 protected override object GetMissingSymbol(IIntStream input, RecognitionException e, int expectedTokenType, BitSet follow)
 {
     string text = null;
     if (expectedTokenType == -1)
     {
         text = "<missing EOF>";
     }
     else
     {
         text = "<missing " + this.TokenNames[expectedTokenType] + ">";
     }
     CommonToken token = new CommonToken(expectedTokenType, text);
     IToken token2 = ((ITokenStream) input).LT(1);
     if (token2.Type == -1)
     {
         token2 = ((ITokenStream) input).LT(-1);
     }
     token.Line = token2.Line;
     token.CharPositionInLine = token2.CharPositionInLine;
     token.Channel = 0;
     return token;
 }
开发者ID:brunolauze,项目名称:mysql-connector-net-6,代码行数:22,代码来源:Parser.cs

示例13: GetMissingSymbol

 protected override object GetMissingSymbol( IIntStream input,
                                   RecognitionException e,
                                   int expectedTokenType,
                                   BitSet follow )
 {
     string tokenText = null;
     if ( expectedTokenType == TokenTypes.EndOfFile )
         tokenText = "<missing EOF>";
     else
         tokenText = "<missing " + TokenNames[expectedTokenType] + ">";
     CommonToken t = new CommonToken( expectedTokenType, tokenText );
     IToken current = ( (ITokenStream)input ).LT( 1 );
     if ( current.Type == TokenTypes.EndOfFile )
     {
         current = ( (ITokenStream)input ).LT( -1 );
     }
     t.Line = current.Line;
     t.CharPositionInLine = current.CharPositionInLine;
     t.Channel = DefaultTokenChannel;
     t.InputStream = current.InputStream;
     return t;
 }
开发者ID:biddyweb,项目名称:azfone-ios,代码行数:22,代码来源:Parser.cs

示例14: SpecialStateTransition5

	private int SpecialStateTransition5(DFA dfa, int s, IIntStream _input)
	{
		IIntStream input = _input;
		int _s = s;
		switch (s)
		{
			case 0:
				int LA5_31 = input.LA(1);

				s = -1;
				if ( ((LA5_31>='\u0000' && LA5_31<='\uFFFF')) ) {s = 63;}

				else s = 62;

				if ( s>=0 ) return s;
				break;
		}
		NoViableAltException nvae = new NoViableAltException(dfa.Description, 5, _s, input);
		dfa.Error(nvae);
		throw nvae;
	}
开发者ID:omederos,项目名称:TigerNET,代码行数:21,代码来源:TigerLexer.cs

示例15: DFA8_SpecialStateTransition

    protected internal int DFA8_SpecialStateTransition(DFA dfa, int s, IIntStream _input) //throws NoViableAltException
    {
            IIntStream input = _input;
    	int _s = s;
        switch ( s )
        {
               	case 0 : 
                   	int LA8_6 = input.LA(1);

                   	s = -1;
                   	if ( ((LA8_6 >= '\u0000' && LA8_6 <= '\uFFFF')) ) { s = 40; }

                   	else s = 39;

                   	if ( s >= 0 ) return s;
                   	break;
               	case 1 : 
                   	int LA8_7 = input.LA(1);

                   	s = -1;
                   	if ( ((LA8_7 >= '\u0000' && LA8_7 <= '\uFFFF')) ) { s = 42; }

                   	else s = 41;

                   	if ( s >= 0 ) return s;
                   	break;
               	case 2 : 
                   	int LA8_0 = input.LA(1);

                   	s = -1;
                   	if ( (LA8_0 == 'G') ) { s = 1; }

                   	else if ( (LA8_0 == 'S') ) { s = 2; }

                   	else if ( (LA8_0 == '[') ) { s = 3; }

                   	else if ( ((LA8_0 >= '\t' && LA8_0 <= '\n') || LA8_0 == '\r' || LA8_0 == ' ') ) { s = 4; }

                   	else if ( (LA8_0 == '%') ) { s = 5; }

                   	else if ( (LA8_0 == '\"') ) { s = 6; }

                   	else if ( (LA8_0 == '\'') ) { s = 7; }

                   	else if ( (LA8_0 == 'C') ) { s = 8; }

                   	else if ( (LA8_0 == 'D') ) { s = 9; }

                   	else if ( (LA8_0 == 'I') ) { s = 10; }

                   	else if ( (LA8_0 == 'P') ) { s = 11; }

                   	else if ( (LA8_0 == 'W') ) { s = 12; }

                   	else if ( (LA8_0 == 'B') ) { s = 13; }

                   	else if ( (LA8_0 == 'F') ) { s = 14; }

                   	else if ( (LA8_0 == 'U') ) { s = 15; }

                   	else if ( (LA8_0 == 'E') ) { s = 16; }

                   	else if ( (LA8_0 == 'M') ) { s = 17; }

                   	else if ( (LA8_0 == 'R') ) { s = 18; }

                   	else if ( (LA8_0 == 'T') ) { s = 19; }

                   	else if ( (LA8_0 == 'N') ) { s = 20; }

                   	else if ( (LA8_0 == 'L') ) { s = 21; }

                   	else if ( (LA8_0 == 'A' || LA8_0 == 'H' || (LA8_0 >= 'J' && LA8_0 <= 'K') || LA8_0 == 'O' || LA8_0 == 'Q' || LA8_0 == 'V' || (LA8_0 >= 'X' && LA8_0 <= 'Z') || LA8_0 == '_' || (LA8_0 >= 'a' && LA8_0 <= 'z')) ) { s = 22; }

                   	else if ( ((LA8_0 >= '0' && LA8_0 <= '9')) ) { s = 23; }

                   	else if ( (LA8_0 == '+') ) { s = 24; }

                   	else if ( (LA8_0 == '-') ) { s = 25; }

                   	else if ( (LA8_0 == '*') ) { s = 26; }

                   	else if ( (LA8_0 == '/') ) { s = 27; }

                   	else if ( (LA8_0 == '=') ) { s = 28; }

                   	else if ( ((LA8_0 >= '\u0000' && LA8_0 <= '\b') || (LA8_0 >= '\u000B' && LA8_0 <= '\f') || (LA8_0 >= '\u000E' && LA8_0 <= '\u001F') || LA8_0 == '!' || (LA8_0 >= '#' && LA8_0 <= '$') || LA8_0 == '&' || (LA8_0 >= '(' && LA8_0 <= ')') || LA8_0 == ',' || LA8_0 == '.' || (LA8_0 >= ':' && LA8_0 <= '<') || (LA8_0 >= '>' && LA8_0 <= '@') || (LA8_0 >= '\\' && LA8_0 <= '^') || LA8_0 == '`' || (LA8_0 >= '{' && LA8_0 <= '\uFFFF')) ) { s = 29; }

                   	if ( s >= 0 ) return s;
                   	break;
        }
        NoViableAltException nvae8 =
            new NoViableAltException(dfa.Description, 8, _s, input);
        dfa.Error(nvae8);
        throw nvae8;
    }
开发者ID:claco,项目名称:tt.net,代码行数:96,代码来源:TemplateLexer.cs


注:本文中的IIntStream类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。