java - jsqlparser to evaluate a condition -


the following string:

x=92 , y=29 

produces valid output: x=92 , y=29 , works fine ccjsqlparserutil.parsecondexpression shouldn't throw exception following?

x=92 lasd y=29 

but output just: x=92

furthermore expression should use implement own visitor? i.e,

ccjsqlparser c= new ccjsqlparser(new stringreader(str)); expression e = c.expression(); // or simpleexpression, etc.. 

so when 'lasd' (anything other not,or,and) encountered can throw exception , not silently ignore rest of expression?

recently patch of jsqlparser (1.2-snapshot) published provide needed behaviour:

ccjsqlparserutil.parseexpression(string expression, boolean allowpartialparse) 

and

ccjsqlparserutil.parsecondexpression(string expression, boolean allowpartialparse) 

setting allowpartialparse false result in mentioned exception.

for on fly interpreted stuff existing behaviour still needed, e.g. provide expressions within text. (syntax coloring, context help, ...)


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -