Previous grammar led to incorrectly parsed logic
With the new logic, it should output the correct AST based on correctly parsing all of the parenthesis
Example output:
(country == "United States" OR country = "Canada" AND type="brewery") OR (type="beer" AND DATE(updated) >= DATE("2019-01-18"))
ND Entry:
( country = United States OR country = Canada AND type = brewery ) OR ( type = beer AND DATE( updated ) >= DATE( 2019-01-18 ) )
ND ActualOutput:
$doc.country = United States
OR
$doc.country = Canada
AND
$doc.type = brewery
OR
$doc.type = beer
AND
func:date($doc.updated) >= func:date(2019-01-18)
and
((country == "United States" OR country = "Canada") AND type="brewery") OR (type="beer" AND DATE(updated) >= DATE("2019-01-18"))
ND Entry:
( ( county = United States OR country = Canada ) AND type = brewery ) OR ( type = beer AND DATE( updated ) >= DATE( 2019-01-01 ) )
ND ActualOutput:
$doc.county = United States
OR
$doc.country = Canada
AND
$doc.type = brewery
OR
$doc.type = beer
AND
func:date($doc.updated) >= func:date(2019-01-01)
…ive parsing of parenthesis
Previous grammar led to incorrectly parsed logic With the new logic, it should output the correct AST based on correctly parsing all of the parenthesis
Example output:
and