Example #1
0
		private void  InitBlock()
		{
			fuzzyMinSim = FuzzyQuery.defaultMinSimilarity;
			fuzzyPrefixLength = FuzzyQuery.defaultPrefixLength;
			jj_2_rtns = new JJCalls[1];
			jj_ls = new LookaheadSuccess();
		}
Example #2
0
	private void  InitBlock() {
	    jjtree = new JJTParserState();
	    directives = new System.Collections.Hashtable(0);
	    jj_la1 = new int[53];
	    jj_2_rtns = new JJCalls[12];
	    jj_expentries = new System.Collections.ArrayList();
	    jj_lasttokens = new int[100];
	}
Example #3
0
 //UPGRADE_ISSUE: Class hierarchy differences between 'java.io.Reader' and 'System.IO.StreamReader' may cause compilation errors. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1186_3"'
 public SelectorParser(System.IO.StreamReader stream)
 {
     InitBlock();
     jj_input_stream = new SimpleCharStream(stream, 1, 1);
     token_source = new SelectorParserTokenManager(jj_input_stream);
     token = new Token();
     jj_ntk_Renamed_Field = - 1;
     jj_gen = 0;
     for (int i = 0; i < 0; i++)
         jj_la1[i] = - 1;
     for (int i = 0; i < jj_2_rtns.Length; i++)
         jj_2_rtns[i] = new JJCalls();
 }
Example #4
0
        private Token Jj_consume_token(int kind)
        {
            Token oldToken;

            if ((oldToken = token).next != null)
            {
                token = token.next;
            }
            else
            {
                token = token.next = token_source.GetNextToken();
            }
            jj_ntk = -1;
            if (token.kind == kind)
            {
                jj_gen++;
                if (++jj_gc > 100)
                {
                    jj_gc = 0;
                    for (int i = 0; i < jj_2_rtns.Length; i++)
                    {
                        JJCalls c = jj_2_rtns[i];
                        while (c != null)
                        {
                            if (c.gen < jj_gen)
                            {
                                c.first = null;
                            }
                            c = c.next;
                        }
                    }
                }
                return(token);
            }
            token   = oldToken;
            jj_kind = kind;
            throw GenerateParseException();
        }
Example #5
0
 public virtual void  ReInit(System.IO.Stream stream, System.String encoding)
 {
     try
     {
         jj_input_stream.ReInit(stream, encoding, 1, 1);
     }
     catch (System.IO.IOException e)
     {
         throw new System.Exception(e.Message, e);
     }
     token_source.ReInit(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();
     }
 }
Example #6
0
        private void  jj_rescan_token()
        {
            jj_rescan = true;
            for (int i = 0; i < 2; i++)
            {
                JJCalls p = jj_2_rtns[i];
                do
                {
                    if (p.gen > jj_gen)
                    {
                        jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
                        switch (i)
                        {
                        case 0:  jj_3_1(); break;

                        case 1:  jj_3_2(); break;
                        }
                    }
                    p = p.next;
                }while (p != null);
            }
            jj_rescan = false;
        }
Example #7
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();
     }
 }
Example #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();
		}
Example #9
0
 /** Constructor. */
 public miniParser(java.io.Reader stream)
 {
     if (jj_initialized_once)
     {
         // System.out.println("ERROR: Second call to constructor of static parser. ");
         // System.out.println("       You must either use ReInit() or set the JavaCC option STATIC to false");
         // System.out.println("       during parser generation.");
         // throw new Error();
     }
     jj_initialized_once = true;
     jj_input_stream = new SimpleCharStream(stream, 1, 1);
     token_source = new miniParserTokenManager(jj_input_stream);
     token = new PsrToken();
     jj_ntk = -1;
     jj_gen = 0;
     for (int i = 0; i < 45; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
 }
Example #10
0
		public virtual void  ReInit(CharStream stream)
		{
			token_source.ReInit(stream);
			token = new Token();
			jj_ntk = - 1;
			jj_gen = 0;
			for (int i = 0; i < 22; i++)
				jj_la1[i] = - 1;
			for (int i = 0; i < jj_2_rtns.Length; i++)
				jj_2_rtns[i] = new JJCalls();
		}
Example #11
0
		/// <summary>Constructor with generated Token Manager. </summary>
		protected internal QueryParser(QueryParserTokenManager tm)
		{
			InitBlock();
			token_source = tm;
			token = new Token();
			jj_ntk = - 1;
			jj_gen = 0;
			for (int i = 0; i < 23; i++)
				jj_la1[i] = - 1;
			for (int i = 0; i < jj_2_rtns.Length; i++)
				jj_2_rtns[i] = new JJCalls();
		}
Example #12
0
 /// <summary>Constructor with user supplied CharStream. </summary>
 protected internal QueryParser(ICharStream stream)
 {
     token_source = new QueryParserTokenManager(stream);
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
     for (int i = 0; i < 21; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
 }
Example #13
0
 public void ReInit(System.IO.StreamReader stream) {
   jj_input_stream.ReInit(stream, 1, 1);
   token_source.ReInit(jj_input_stream);
   token = new Token();
   jj_ntk = -1;
   jjtree.reset();
   jj_gen = 0;
   for (int i = 0; i < 88; i++) jj_la1[i] = -1;
   for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
 }
Example #14
0
 public IDLParser(System.IO.StreamReader stream) {
   jj_input_stream = new SimpleCharStream(stream, 1, 1);
   token_source = new IDLParserTokenManager(jj_input_stream);
   token = new Token();
   jj_ntk = -1;
   jj_gen = 0;
   for (int i = 0; i < 88; i++) jj_la1[i] = -1;
   for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
 }
Example #15
0
 /** Reinitialise. */
 public static void ReInit(java.io.Reader stream)
 {
     jj_input_stream.ReInit(stream, 1, 1);
     token_source.ReInit(jj_input_stream);
     token = new PsrToken();
     jj_ntk = -1;
     jj_gen = 0;
     for (int i = 0; i < 45; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
 }
Example #16
0
 private void  InitBlock()
 {
     fuzzyMinSim = Monodoc.Lucene.Net.Search.FuzzyQuery.defaultMinSimilarity;
     jj_2_rtns = new JJCalls[1];
     jj_ls = new LookaheadSuccess();
 }
Example #17
0
 /// <summary>Reinitialize.</summary>
 public void ReInit(StandardSyntaxParserTokenManager tm)
 {
     token_source = tm;
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
     for (int i = 0; i < 28; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
 }
Example #18
0
 /// <summary>
 /// Constructor with user supplied <see cref="ICharStream"/>.
 /// </summary>
 public StandardSyntaxParser(ICharStream stream)
 {
     token_source = new StandardSyntaxParserTokenManager(stream);
     token = new Token();
     jj_ntk = -1;
     jj_gen = 0;
     for (int i = 0; i < 28; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
 }
Example #19
0
		public virtual void  ReInit(System.IO.Stream stream, System.String encoding)
		{
			try
			{
				jj_input_stream.ReInit(stream, encoding, 1, 1);
			}
			catch (System.IO.IOException e)
			{
				throw new System.Exception(e.Message, e);
			}
			token_source.ReInit(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();
		}
Example #20
0
 private void  InitBlock()
 {
     jj_2_rtns = new JJCalls[2];
     jj_ls     = new LookaheadSuccess();
 }
Example #21
0
 public void ReInit(IDLParserTokenManager tm) {
   token_source = tm;
   token = new Token();
   jj_ntk = -1;
   jjtree.reset();
   jj_gen = 0;
   for (int i = 0; i < 88; i++) jj_la1[i] = -1;
   for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
 }
Example #22
0
 public CLIPSParser_XXX(Stream stream)
 {
     InitBlock();
     jj_input_stream = new SimpleCharStream(stream, 1, 1);
     token_source = new CLIPSParserTokenManager(jj_input_stream);
     token = new Token();
     jj_ntk_Renamed_Field = - 1;
     jj_gen = 0;
     for (int i = 0; i < 61; i++)
         jj_la1[i] = - 1;
     for (int i = 0; i < jj_2_rtns.Length; i++)
         jj_2_rtns[i] = new JJCalls();
 }
Example #23
0
 /** Constructor with generated Token Manager. */
 public miniParser(miniParserTokenManager tm)
 {
     if (jj_initialized_once) {
     System.out.println("ERROR: Second call to constructor of static parser. ");
     System.out.println("       You must either use ReInit() or set the JavaCC option STATIC to false");
     System.out.println("       during parser generation.");
     throw new Error();
     }
     jj_initialized_once = true;
     token_source = tm;
     token = new PsrToken();
     jj_ntk = -1;
     jj_gen = 0;
     for (int i = 0; i < 45; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
 }
Example #24
0
		private void  InitBlock()
		{
			multiTermRewriteMethod = MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT;
			fuzzyMinSim = FuzzyQuery.defaultMinSimilarity;
			fuzzyPrefixLength = FuzzyQuery.defaultPrefixLength;
			jj_2_rtns = new JJCalls[1];
			jj_ls = new LookaheadSuccess();
		}
Example #25
0
		public HTMLParser(HTMLParserTokenManager tm)
		{
			InitBlock();
			token_source = tm;
			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();
		}
Example #26
0
		public QueryParser(CharStream stream)
		{
			InitBlock();
			token_source = new QueryParserTokenManager(stream);
			token = new Token();
			jj_ntk = - 1;
			jj_gen = 0;
			for (int i = 0; i < 22; i++)
				jj_la1[i] = - 1;
			for (int i = 0; i < jj_2_rtns.Length; i++)
				jj_2_rtns[i] = new JJCalls();
		}
Example #27
0
 public virtual void  ReInit(System.IO.StreamReader stream)
 {
     jj_input_stream.ReInit(stream, 1, 1);
     token_source.ReInit(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();
 }
Example #28
0
		public virtual void  ReInit(QueryParserTokenManager tm)
		{
			token_source = tm;
			token = new Token();
			jj_ntk = - 1;
			jj_gen = 0;
			for (int i = 0; i < 22; i++)
				jj_la1[i] = - 1;
			for (int i = 0; i < jj_2_rtns.Length; i++)
				jj_2_rtns[i] = new JJCalls();
		}
Example #29
0
 /** Reinitialise. */
 public void ReInit(miniParserTokenManager tm)
 {
     token_source = tm;
     token = new PsrToken();
     jj_ntk = -1;
     jj_gen = 0;
     for (int i = 0; i < 45; i++) jj_la1[i] = -1;
     for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
 }
Example #30
0
		public HTMLParser(System.IO.Stream 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();
		}
Example #31
0
	public virtual void  ReInit(CharStream stream) {
	    token_source.ReInit(stream);
	    token = new Token();
	    jj_ntk_Renamed_Field = - 1;
	    jjtree.reset();
	    jj_gen = 0;
	    for (int i = 0; i < 53; i++)
		jj_la1[i] = - 1;
	    for (int i = 0; i < jj_2_rtns.Length; i++)
		jj_2_rtns[i] = new JJCalls();
	}
Example #32
0
 private void  InitBlock()
 {
     jj_2_rtns = new JJCalls[2];
     jj_ls = new LookaheadSuccess();
 }
Example #33
0
	public Parser(ParserTokenManager tm) {
	    InitBlock();
	    token_source = tm;
	    token = new Token();
	    jj_ntk_Renamed_Field = - 1;
	    jj_gen = 0;
	    for (int i = 0; i < 53; i++)
		jj_la1[i] = - 1;
	    for (int i = 0; i < jj_2_rtns.Length; i++)
		jj_2_rtns[i] = new JJCalls();
	}
Example #34
0
 public virtual void  ReInit(HTMLParserTokenManager tm)
 {
     token_source = tm;
     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();
 }
Example #35
0
        /** Reinitialise. */
        public static void ReInit(Stream stream, Encoding encoding)
        {
            try
            {
                jj_input_stream.ReInit(stream, encoding, 1, 1);
            }
            catch(UnsupportedEncodingException e)
            {
                throw new RuntimeException(e);
            }

            MiniParserTokenManager.ReInit(jj_input_stream);
            token = new MiniToken();
            jj_ntk = MpRegExpId.UNDEFINED;
            jj_gen = 0;
            for (int i = 0; i < 45; i++) jj_la1[i] = -1;
            for (int i = 0; i < jj_2_rtns.Length; i++) jj_2_rtns[i] = new JJCalls();
        }