[antlr-interest] Strange hangup in the Parser

David Smith david.smith at cc.gatech.edu
Thu Jun 16 08:38:36 PDT 2011


This seems to happen to me frequently, and I'm not sure what I change 
to fix it, but it consumes a considerable amount of time - I think 
the ultimate cure is rebooting my computer.

In the code generated by AtlrWorks, I find this:

         public ExprParser(TokenStream input, int port,
                           RecognizerSharedState state) {
             super(input, state);
             DebugEventSocketProxy proxy =
                 new DebugEventSocketProxy(this,port,adaptor);
             setDebugListener(proxy);
             setTokenStream(new DebugTokenStream(input,proxy));
             try {
                 proxy.handshake();  /****** hangs up here! **********/
             }
             catch (IOException ioe) {
                 reportError(ioe);
             }
             TreeAdaptor adap = new CommonTreeAdaptor();
             setTreeAdaptor(adap);
             proxy.setTreeAdaptor(adap);
         }
When I try to run in debug mode, the thing just hangs up at the line:
     proxy.handshake();

Any ideas?

                                 DMS

David M. Smith http://www.cc.gatech.edu/fac/David.Smith
Georgia Institute of Technology, College of Computing
Sent from my ASR-33 Teletype 



More information about the antlr-interest mailing list