public FastSimpleExpressionParser(ITokenStream input, RecognizerSharedState state) : base(input, state) { InitializeTreeAdaptor(); if ( TreeAdaptor == null ) TreeAdaptor = new CommonTreeAdaptor(); }
public AssemblerLexer(ICharStream input, RecognizerSharedState state) : base(input, state) { OnCreated(); }
public MessageContractsLexer(ICharStream input, RecognizerSharedState state) : base(input, state) { OnCreated(); }
public NCalcLexer(ICharStream input, RecognizerSharedState state) : base(input, state) { OnCreated(); }
public RecognizerSharedState(RecognizerSharedState state) { if (state == null) { throw new ArgumentNullException("state"); } following = (BitSet[])state.following.Clone(); _fsp = state._fsp; errorRecovery = state.errorRecovery; lastErrorIndex = state.lastErrorIndex; failed = state.failed; syntaxErrors = state.syntaxErrors; backtracking = state.backtracking; if (state.ruleMemo != null) { ruleMemo = (IDictionary <int, int>[])state.ruleMemo.Clone(); } token = state.token; tokenStartCharIndex = state.tokenStartCharIndex; tokenStartCharPositionInLine = state.tokenStartCharPositionInLine; channel = state.channel; type = state.type; text = state.text; }
public BaseRecognizer(RecognizerSharedState state) { if ( state==null ) { state = new RecognizerSharedState(); } this.state = state; }
public FuncProtoToShimLexer(ICharStream input, RecognizerSharedState state) : base(input, state) { OnCreated(); }
public UniAspectLexer(ICharStream input, RecognizerSharedState state) : base(input, state) { OnCreated(); }
public BaseRecognizer(RecognizerSharedState state) { if (state == null) { state = new RecognizerSharedState(); } this.state = state; }
public ExprParser(ITokenStream input, RecognizerSharedState state) : base(input, state) { ITreeAdaptor treeAdaptor = default(ITreeAdaptor); CreateTreeAdaptor(ref treeAdaptor); TreeAdaptor = treeAdaptor ?? new CommonTreeAdaptor(); OnCreated(); }
public ProfileGrammarParser( ITokenStream input, IDebugEventListener dbg, RecognizerSharedState state ) : base( input, dbg, state ) { Profiler p = (Profiler)dbg; p.setParser(this); ITreeAdaptor adap = new CommonTreeAdaptor(); TreeAdaptor = adap; proxy.TreeAdaptor = adap; }
// overcome bug in ANTLR 3.2 public TemplateParser(ITokenStream input, RecognizerSharedState state, ICodeGenerator gen, TemplateName enclosingTemplateName) : base(null, null) { this.input = input; this.state = state; if (gen != null) this.gen = gen; this._enclosingTemplateName = enclosingTemplateName; }
public BaseRecognizer( RecognizerSharedState state ) { if ( state == null ) { state = new RecognizerSharedState(); } this.state = state; Initialize(); InitDFAs(); }
public BaseRecognizer(RecognizerSharedState state) { if (state == null) { state = new RecognizerSharedState(); } this.state = state; Initialize(); InitDFAs(); }
public TestParser(ITokenStream input, RecognizerSharedState state) : base(input, state) { this.state.ruleMemo = new System.Collections.Generic.Dictionary<int, int>[12+1]; CstBuilderForAntlr3 treeAdaptor = default(CstBuilderForAntlr3); CreateTreeAdaptor(ref treeAdaptor); TreeAdaptor = treeAdaptor; OnCreated(); }
public DebugTreeGrammar( ITreeNodeStream input, int port, RecognizerSharedState state ) : base( input, state ) { DebugEventSocketProxy proxy = new DebugEventSocketProxy( this, port, input.TreeAdaptor ); DebugListener = proxy; try { proxy.Handshake(); } catch ( IOException ioe ) { ReportError( ioe ); } }
public InterpParser(ITokenStream input, int port, RecognizerSharedState state) : base(input, state) { InitializeCyclicDFAs(dbg); DebugEventSocketProxy proxy = new DebugEventSocketProxy(this, port, adaptor); DebugListener = proxy; TokenStream = new DebugTokenStream(input,proxy); try { proxy.Handshake(); } catch (IOException ioe) { ReportError(ioe); } ITreeAdaptor adap = new CommonTreeAdaptor(); TreeAdaptor = adap; proxy.TreeAdaptor = adap; }
public TreeRewriter(ITreeNodeStream input, RecognizerSharedState state) : base(input, state) { Func<IAstRuleReturnScope> func = null; Func<IAstRuleReturnScope> func2 = null; this.originalAdaptor = input.TreeAdaptor; this.originalTokenStream = input.TokenStream; if (func == null) { func = () => this.Topdown(); } this.topdown_func = func; if (func2 == null) { func2 = () => this.Bottomup(); } this.bottomup_func = func2; }
public DebugGrammarParser( ITokenStream input, int port, RecognizerSharedState state ) : base( input, state ) { DebugEventSocketProxy proxy = new DebugEventSocketProxy( this, port, adaptor ); DebugListener = proxy; // TODO: I had to manually correct this line from ITokenStream TokenStream = new DebugTokenStream( input, proxy ); try { proxy.Handshake(); } catch ( IOException ioe ) { ReportError( ioe ); } ITreeAdaptor adap = new CommonTreeAdaptor(); TreeAdaptor = adap; proxy.TreeAdaptor = adap; }
public RecognizerSharedState(RecognizerSharedState state) { if (state == null) { throw new ArgumentNullException("state"); } this.following = (BitSet[]) state.following.Clone(); this._fsp = state._fsp; this.errorRecovery = state.errorRecovery; this.lastErrorIndex = state.lastErrorIndex; this.failed = state.failed; this.syntaxErrors = state.syntaxErrors; this.backtracking = state.backtracking; if (state.ruleMemo != null) { this.ruleMemo = (IDictionary<int, int>[]) state.ruleMemo.Clone(); } this.token = state.token; this.tokenStartCharIndex = state.tokenStartCharIndex; this.tokenStartCharPositionInLine = state.tokenStartCharPositionInLine; this.channel = state.channel; this.type = state.type; this.text = state.text; }
public BonsaiTree(ITreeNodeStream input, RecognizerSharedState state) : base(input, state) { InitializeCyclicDFAs(); }
public BaseRecognizer() { state = new RecognizerSharedState(); Initialize(); InitDFAs(); }
public BaseRecognizer() { state = new RecognizerSharedState(); }
public CSharpNamesLexer(ICharStream input, RecognizerSharedState state) : base(input, state) { OnCreated(); }
public JavaParser(ITokenStream input, RecognizerSharedState state) : base(input, state) { this.state.ruleMemo = new System.Collections.Generic.Dictionary<int, int>[400+1]; ITreeAdaptor treeAdaptor = default(ITreeAdaptor); CreateTreeAdaptor(ref treeAdaptor); TreeAdaptor = treeAdaptor ?? new CommonTreeAdaptor(); OnCreated(); }
public SpecFlowLangLexer_en(ICharStream input, RecognizerSharedState state) : base(input, state) { InitializeCyclicDFAs(); }
public TemplateName CompileAnonTemplate(TemplateName enclosingTemplateName, ITokenStream input, IList<IToken> ids, RecognizerSharedState state) { TemplateCompiler c = new TemplateCompiler(); c.Compile(input, state); return null; }
public FlashTeaseScriptLexer(ICharStream input, RecognizerSharedState state) : base(input, state) { OnCreated(); }
public virtual void SetState(RecognizerSharedState value) { this.state = value; }
public Lexer(ICharStream input, RecognizerSharedState state) : base(state) { this.input = input; }
public InterpParser(ITokenStream input, RecognizerSharedState state) : base(input, state) { InitializeCyclicDFAs(); }
public virtual object ApplyOnce(object t, RuleDelegate whichRule) { originalAdaptor.ClearChanged(); if (t==null) return null; // Debug.Assert(this.BacktrackingLevel == 0); try { // Share TreeParser object but not parsing-related state // state = new RecognizerSharedState(); input = new CommonTreeNodeStream(originalAdaptor, t); ((CommonTreeNodeStream)input).TokenStream = originalTokenStream; // this.BacktrackingLevel = 1; // Debug.Assert(!this.Failed()); TreeRuleReturnScope r = whichRule((NadirAST)t); // return (r==null ? null : r.Tree); } catch (RecognitionException) { } finally { this.BacktrackingLevel = 0; } return t; }
public AntlrCalcEngineParser( ITokenStream input, RecognizerSharedState state ) : base( input, state ) { InitializeCyclicDFAs(); }
public NadirTreeFilter(ITreeNodeStream input, RecognizerSharedState state) : base(input, state) { }
public TemplateName CompileRegion(TemplateName enclosingTemplateName, string regionName, ITokenStream input, RecognizerSharedState state) { TemplateCompiler c = new TemplateCompiler(); c.Compile(input, state); return null; }
public Parser(ITokenStream input, RecognizerSharedState state) : base(state) { this.input = input; }
public TemplateLexer(ICharStream input, RecognizerSharedState state) : base(input, state) { InitializeCyclicDFAs(); }
public Parser(ITokenStream input, RecognizerSharedState state) : base(state) // share the state object with another parser { this.input = input; }