I have a parser rule which looks like below
nested_query: ~(LPARAN | RPARAN)+? LPARAN nested_query RPARAN ~(LPARAN | RPARAN)+?
| nested_query nested_query_op LPARAN nested_query RPARAN
| ~(LPARAN | RPARAN)+?
;
nested_query_op: binary_in | binary_not_in ;
binary_in: 'in';
binary_not_in: 'not' 'in';
LPARAN: '(';
RPARAN: ')';
This correctly matches the string list(srcVm) of flows where typeTag ="TAG_SRC_IP_VM" until timestamp
But when I try to parse a string having more than one matching brackets it does not get properly parsed for example list(srcVm) of flows where (typeTag ="TAG_SRC_IP_VM") until timestamp
Can someone let me know how can I modify the above rule to match a string with more than one matching braces under nested_query
rule like below
nested_query:1
|
---------------------------------------------------------
list ( nested_query:3 ) of flows where ( nested_query:4) until timestamp
| |
srcVM (typeTag ="TAG_SRC_IP_VM")