(Urgh! there is a bug in markInputline, which would normally simplify this process - well until I ship a fix, you can use this method as a workaround.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
how do i parse a simple expression as below
<identifier> = ('<singlequotedstring>', literal,'<singlequotedstring>', literal,…) it can only end in '<singlequotedstring>'
Looks like:
Thanks Paul. This works.
Additionally is there a way that the parse exception can show little more information.
The message is clear but is there a way to add more information.
Existing: ParseException: Expected ")" (at char 48), (line:1, col:49)
Modified: ParseException: Expected ")" but found "OR" (at char 48), (line:1, col:49)
You can output your own diagnostics using properties of the ParseException that is raised:
(Urgh! there is a bug in markInputline, which would normally simplify this process - well until I ship a fix, you can use this method as a workaround.)