Example #1
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();
     }
 }
Example #2
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();
     }
 }