示例#1
0
        public BrainfuckerParser(ITokenStream input, int port, RecognizerSharedState state)
            : base(input, state)
        {
            this.state.ruleMemo = new System.Collections.Generic.Dictionary <int, int> [11 + 1];


            ITreeAdaptor treeAdaptor = default(ITreeAdaptor);

            CreateTreeAdaptor(ref treeAdaptor);
            TreeAdaptor = treeAdaptor ?? new CommonTreeAdaptor();
            DebugEventSocketProxy proxy = new DebugEventSocketProxy(this, port, adaptor);

            DebugListener = proxy;
            ITokenStream  = new DebugITokenStream(input, proxy);
            try
            {
                proxy.Handshake();
            }
            catch (IOException ioe)
            {
                ReportError(ioe);
            }
            ITreeAdaptor adap = new CommonTreeAdaptor();

            TreeAdaptor       = adap;
            proxy.TreeAdaptor = adap;
        }
    public antlr2020Parser(ITokenStream input, int port, RecognizerSharedState state)
        : base(input, state)
    {
        DebugEventSocketProxy proxy = new DebugEventSocketProxy(this, port, null);

        DebugListener = proxy;
        try
        {
            proxy.Handshake();
        }
        catch (IOException ioe)
        {
            ReportError(ioe);
        }
    }
示例#3
0
    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);
        }
    }