Examples of RecognizerSharedState


Examples of org.antlr.runtime.RecognizerSharedState

    public ConstraintConnectiveDescr parse( final String text ) {
        ConstraintConnectiveDescr constraint = null;
        try {
            DRLLexer lexer = new DRLLexer( new ANTLRStringStream( text ) );
            CommonTokenStream input = new CommonTokenStream( lexer );
            RecognizerSharedState state = new RecognizerSharedState();
            helper = new ParserHelper( input,
                                       state );
            DRLExpressions parser = new DRLExpressions( input, state, helper );
            parser.setBuildDescr( true );
            parser.setLeftMostExpr( null ); // setting initial value just in case
View Full Code Here

Examples of org.antlr.runtime.RecognizerSharedState

    private ParserHelper          helper;
    private DRLExpressions        exprParser;

    public DRLParser(TokenStream input) {
        this.input = input;
        this.state = new RecognizerSharedState();
        this.helper = new ParserHelper( input,
                                        state );
        this.exprParser = new DRLExpressions( input,
                                              state,
                                              helper );
View Full Code Here

Examples of org.antlr.runtime.RecognizerSharedState

     *
     * @param input A valid character stream that contains the ruleSrc code you
     *              wish to compile (or lex at least)
     */
    public AbstractTLexer(CharStream input) {
        this(input, new RecognizerSharedState());
    }
View Full Code Here

Examples of org.antlr.runtime.RecognizerSharedState

    protected RecognizerSharedState state;
    protected ParserHelper          helper;

    public AbstractDRLParser(TokenStream input) {
        this.input = input;
        this.state = new RecognizerSharedState();
        this.helper = new ParserHelper( input, state, getLanguageLevel() );
    }
View Full Code Here

Examples of org.antlr.runtime.RecognizerSharedState

  public AbstractSqlLexer() {
  }

  public AbstractSqlLexer(CharStream input) {
    this(input, new RecognizerSharedState());
  }
View Full Code Here

Examples of org.antlr.runtime.RecognizerSharedState

    public void applyOnce(Object t, fptr whichRule) {
        if ( t==null ) return;
        try {
            // share TreeParser object but not parsing-related state
            state = new RecognizerSharedState();
            input = new CommonTreeNodeStream(originalAdaptor, t);
            ((CommonTreeNodeStream)input).setTokenStream(originalTokenStream);
            setBacktrackingLevel(1);
            whichRule.rule();
            setBacktrackingLevel(0);
View Full Code Here

Examples of org.antlr.runtime.RecognizerSharedState

    public Object applyOnce(Object t, fptr whichRule) {
        if ( t==null ) return null;
        try {
            // share TreeParser object but not parsing-related state
            state = new RecognizerSharedState();
            input = new CommonTreeNodeStream(originalAdaptor, t);
            ((CommonTreeNodeStream)input).setTokenStream(originalTokenStream);
            setBacktrackingLevel(1);
            TreeRuleReturnScope r = (TreeRuleReturnScope)whichRule.rule();
            setBacktrackingLevel(0);
View Full Code Here

Examples of org.antlr.runtime.RecognizerSharedState

    public ConstraintConnectiveDescr parse( final String text ) {
        ConstraintConnectiveDescr constraint = null;
        try {
            DRLLexer lexer = DRLFactory.getDRLLexer(new ANTLRStringStream(text), languageLevel);
            CommonTokenStream input = new CommonTokenStream( lexer );
            RecognizerSharedState state = new RecognizerSharedState();
            helper = new ParserHelper( input, state, languageLevel );
            DRLExpressions parser = DRLFactory.getDRLExpressions(input, state, helper, languageLevel);
            parser.setBuildDescr( true );
            parser.setLeftMostExpr( null ); // setting initial value just in case
            BaseDescr expr = parser.conditionalOrExpression();
View Full Code Here

Examples of org.antlr.runtime.RecognizerSharedState

    protected TokenStream originalTokenStream;
    protected TreeAdaptor originalAdaptor;

    public TreeFilter(TreeNodeStream input) {
        this(input, new RecognizerSharedState());
    }
View Full Code Here

Examples of org.antlr.runtime.RecognizerSharedState

    public void applyOnce(Object t, fptr whichRule) {
        if ( t==null ) return;
        try {
            // share TreeParser object but not parsing-related state
            state = new RecognizerSharedState();
            input = new CommonTreeNodeStream(originalAdaptor, t);
            ((CommonTreeNodeStream)input).setTokenStream(originalTokenStream);
            setBacktrackingLevel(1);
            whichRule.rule();
            setBacktrackingLevel(0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.