An implementation of interface CharStream, where the stream is assumed to contain only ASCII characters (without unicode processing).
示例#1
0
 public HTMLParser(System.IO.StreamReader stream)
 {
     InitBlock();
     jj_input_stream = new SimpleCharStream(stream, 1, 1);
     token_source    = new HTMLParserTokenManager(jj_input_stream);
     token           = new Token();
     jj_ntk          = -1;
     jj_gen          = 0;
     for (int i = 0; i < 14; i++)
     {
         jj_la1[i] = -1;
     }
     for (int i = 0; i < jj_2_rtns.Length; i++)
     {
         jj_2_rtns[i] = new JJCalls();
     }
 }
示例#2
0
 public HTMLParser(System.IO.Stream stream, System.String encoding)
 {
     InitBlock();
     try
     {
         jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1);
     }
     catch (System.IO.IOException e)
     {
         throw new System.Exception(e.Message, e);
     }
     token_source = new HTMLParserTokenManager(jj_input_stream);
     token        = new Token();
     jj_ntk       = -1;
     jj_gen       = 0;
     for (int i = 0; i < 14; i++)
     {
         jj_la1[i] = -1;
     }
     for (int i = 0; i < jj_2_rtns.Length; i++)
     {
         jj_2_rtns[i] = new JJCalls();
     }
 }
示例#3
0
 public HTMLParser(System.IO.StreamReader stream)
 {
     InitBlock();
     jj_input_stream = new SimpleCharStream(stream, 1, 1);
     token_source = new HTMLParserTokenManager(jj_input_stream);
     token = new Token();
     jj_ntk_Renamed_Field = -1;
     jj_gen = 0;
     for (int i = 0; i < 14; i++)
         jj_la1[i] = - 1;
     for (int i = 0; i < jj_2_rtns.Length; i++)
         jj_2_rtns[i] = new JJCalls();
 }
		public virtual void  ReInit(SimpleCharStream stream, int lexState)
		{
			ReInit(stream);
			SwitchTo(lexState);
		}
		public virtual void  ReInit(SimpleCharStream stream)
		{
			jjmatchedPos = jjnewStateCnt = 0;
			curLexState = defaultLexState;
			input_stream = stream;
			ReInitRounds();
		}
		public HTMLParserTokenManager(SimpleCharStream stream, int lexState):this(stream)
		{
			SwitchTo(lexState);
		}
		public HTMLParserTokenManager(SimpleCharStream stream)
		{
			InitBlock();
			if (SimpleCharStream.staticFlag)
				throw new System.ApplicationException("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
			input_stream = stream;
		}
示例#8
0
		public HTMLParser(System.IO.Stream stream, System.String encoding)
		{
			InitBlock();
			try
			{
				jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1);
			}
			catch (System.IO.IOException e)
			{
				throw new System.Exception(e.Message, e);
			}
			token_source = new HTMLParserTokenManager(jj_input_stream);
			token = new Token();
			jj_ntk = - 1;
			jj_gen = 0;
			for (int i = 0; i < 14; i++)
				jj_la1[i] = - 1;
			for (int i = 0; i < jj_2_rtns.Length; i++)
				jj_2_rtns[i] = new JJCalls();
		}