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

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

Ansible warning on jinja2 braces on when -

html - How to custom Bootstrap grid height? -