Пример #1
0
 /** Reinitialize. */
 public void ReInit(JSGFParserTokenManager tm)
 {
     token_source = tm;
     token        = new Token();
     _jj_ntk      = -1;
     jj_gen       = 0;
     for (int i = 0; i < 26; i++)
     {
         jj_la1[i] = -1;
     }
     for (int i = 0; i < jj_2_rtns.Length; i++)
     {
         jj_2_rtns[i] = new JJCalls();
     }
 }
Пример #2
0
 /** Constructor. */
 public JSGFParser(TextReader stream)
 {
     jj_input_stream = new JavaCharStream(stream, 1, 1);
     token_source    = new JSGFParserTokenManager(jj_input_stream);
     token           = new Token();
     _jj_ntk         = -1;
     jj_gen          = 0;
     for (int i = 0; i < 26; i++)
     {
         jj_la1[i] = -1;
     }
     for (int i = 0; i < jj_2_rtns.Length; i++)
     {
         jj_2_rtns[i] = new JJCalls();
     }
 }
Пример #3
0
 /** Constructor with InputStream and supplied encoding */
 public JSGFParser(Stream stream, String encoding)
 {
     try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); }
     catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
     token_source = new JSGFParserTokenManager(jj_input_stream);
     token        = new Token();
     _jj_ntk      = -1;
     jj_gen       = 0;
     for (int i = 0; i < 26; i++)
     {
         jj_la1[i] = -1;
     }
     for (int i = 0; i < jj_2_rtns.Length; i++)
     {
         jj_2_rtns[i] = new JJCalls();
     }
 }