Exemplo n.º 1
0
        /** Reinitialise. */
        /*public void ReInit(java.io.InputStream stream) {
             ReInit(stream, null);
          }*/
                /** Reinitialise. */
                /*public void ReInit(java.io.InputStream stream, string encoding) {
            try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new SystemException(e); }
            token_source.ReInit(jj_input_stream);
            token = new Token();
            jj_ntk = -1;
            jjtree.reset();
            jj_gen = 0;
            for (int i = 0; i < 10; i++) jj_la1[i] = -1;
            for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
          }*/

        /// <summary>Constructor with TextReader</summary>
        public TsurgeonParser(TextReader stream)
        {
            jj_input_stream = new SimpleCharStream(stream, 1, 1);
            token_source = new TsurgeonParserTokenManager(jj_input_stream);
            token = new Token();
            jj_ntk = -1;
            jj_gen = 0;
            for (int i = 0; i < 10; i++) jj_la1[i] = -1;
            for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JjCalls();
        }
Exemplo n.º 2
0
 /// <summary>Constructor with Stream</summary>
 public TsurgeonParser( /*java.io.InputStream*/ Stream stream, string encoding)
 {
     try
     {
         jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1);
     }
     catch ( /*java.io.UnsupportedEncodingException*/Exception e)
     {
         throw new SystemException(e.Message);
     }
     token_source = new TsurgeonParserTokenManager(jj_input_stream);
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
     for (int i = 0; i < 10; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JjCalls();
 }