コード例 #1
0
 /// <summary>Reinitialise.</summary>
 public virtual void ReInit(SemgrexParserTokenManager tm)
 {
     token_source = tm;
     token        = new Token();
     jj_ntk       = -1;
     jj_gen       = 0;
     for (int i = 0; i < 27; i++)
     {
         jj_la1[i] = -1;
     }
 }
コード例 #2
0
 /// <summary>Constructor.</summary>
 public SemgrexParser(Reader stream)
 {
     jj_input_stream = new SimpleCharStream(stream, 1, 1);
     token_source    = new SemgrexParserTokenManager(jj_input_stream);
     token           = new Token();
     jj_ntk          = -1;
     jj_gen          = 0;
     for (int i = 0; i < 27; i++)
     {
         jj_la1[i] = -1;
     }
 }
コード例 #3
0
 /// <summary>Constructor with InputStream and supplied encoding</summary>
 public SemgrexParser(InputStream stream, string encoding)
 {
     try
     {
         jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1);
     }
     catch (UnsupportedEncodingException e)
     {
         throw new Exception(e);
     }
     token_source = new SemgrexParserTokenManager(jj_input_stream);
     token        = new Token();
     jj_ntk       = -1;
     jj_gen       = 0;
     for (int i = 0; i < 27; i++)
     {
         jj_la1[i] = -1;
     }
 }