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 );
			}
		}
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public ParserDebugger( Parser parser, int port )
 {
     DebugEventSocketProxy proxy = new DebugEventSocketProxy( parser, port, null );
     DebugListener = proxy;
     parser.TokenStream = new DebugTokenStream( parser.TokenStream, proxy );
     try
     {
         proxy.handshake();
     }
     catch ( IOException e )
     {
         reportError( ioe );
     }
     ITreeAdaptor adap = new CommonTreeAdaptor();
     TreeAdaptor = adap;
     proxy.TreeAdaptor = adap;
 }
Exemplo n.º 4
0
        public ParserDebugger(Parser parser, int port)
        {
            DebugEventSocketProxy proxy = new DebugEventSocketProxy(parser, port, null);

            DebugListener      = proxy;
            parser.TokenStream = new DebugTokenStream(parser.TokenStream, proxy);
            try
            {
                proxy.handshake();
            }
            catch (IOException e)
            {
                reportError(ioe);
            }
            ITreeAdaptor adap = new CommonTreeAdaptor();

            TreeAdaptor       = adap;
            proxy.TreeAdaptor = adap;
        }
Exemplo n.º 5
0
		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;
		}
Exemplo n.º 6
0
        public TemplateParser(ITokenStream input, int port, RecognizerSharedState state)
            : base(input, state) {
            DebugEventSocketProxy dbg = new DebugEventSocketProxy(this, port, adaptor);
            DebugListener = dbg;
            TokenStream = new DebugTokenStream(input,dbg);
            try {
                dbg.Handshake();
            } catch (IOException ioe) {
                ReportError(ioe);
            }
            InitializeCyclicDFAs(dbg);

            ITreeAdaptor adap = new CommonTreeAdaptor();
            TreeAdaptor = adap;
            dbg.TreeAdaptor = adap;
        }
Exemplo n.º 7
0
		public mccarthyParser( ITokenStream input, int port, RecognizerSharedState state )
			: base( input, state )
		{
			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;
		}