parsing - How to identify the JAVACC parser unsuccessful programatically? -


in javacc, how check weather input file passed grammar or not? example, want print "filed parsed successfully" if whole file parsed parser, , if not want print "file parsing faild!"

i'm pretty newbie javacc. please help

try {     parser.start() ;     system.out.println("file parsed successfully.") ; } catch( parseexception ex ) {     // syntax error     system.out.println( ex.getmessage() ) ; } } catch( tokenmanagererror ex ) {     // lexical error     system.out.println( ex.getmessage() ) ; } } catch( throwable ex ) {     // other error     system.out.println( ex.getmessage() ) ; } 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -