Commit 5587a87c authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-data: Handle doubles before other numeric types

Otherwise there are greediness issues as the definition of DECIMAL
fits within DOUBLE and wins over it, leaving the exponential part
out of the match.

Closes: GNOME/tracker#84
parent c29c4fd4
......@@ -569,7 +569,7 @@ static const TrackerGrammarRule rule_BooleanLiteral[] = { OR(helper_BooleanLiter
* TRACKER EXTENSION:
* The terminal PARAMETERIZED_VAR is additionally accepted
*/
static const TrackerGrammarRule helper_NumericLiteralNegative_or[] = { T(DECIMAL_NEGATIVE), T(DOUBLE_NEGATIVE), T(INTEGER_NEGATIVE), T(PARAMETERIZED_VAR), NIL };
static const TrackerGrammarRule helper_NumericLiteralNegative_or[] = { T(DOUBLE_NEGATIVE), T(DECIMAL_NEGATIVE), T(INTEGER_NEGATIVE), T(PARAMETERIZED_VAR), NIL };
static const TrackerGrammarRule rule_NumericLiteralNegative[] = { OR(helper_NumericLiteralNegative_or), NIL };
/* NumericLiteralPositive ::= INTEGER_POSITIVE | DECIMAL_POSITIVE | DOUBLE_POSITIVE
......@@ -577,7 +577,7 @@ static const TrackerGrammarRule rule_NumericLiteralNegative[] = { OR(helper_Nume
* TRACKER EXTENSION:
* The terminal PARAMETERIZED_VAR is additionally accepted
*/
static const TrackerGrammarRule helper_NumericLiteralPositive_or[] = { T(DECIMAL_POSITIVE), T(DOUBLE_POSITIVE), T(INTEGER_POSITIVE), T(PARAMETERIZED_VAR), NIL };
static const TrackerGrammarRule helper_NumericLiteralPositive_or[] = { T(DOUBLE_POSITIVE), T(DECIMAL_POSITIVE), T(INTEGER_POSITIVE), T(PARAMETERIZED_VAR), NIL };
static const TrackerGrammarRule rule_NumericLiteralPositive[] = { OR(helper_NumericLiteralPositive_or), NIL };
/* NumericLiteralUnsigned ::= INTEGER | DECIMAL | DOUBLE
......@@ -585,7 +585,7 @@ static const TrackerGrammarRule rule_NumericLiteralPositive[] = { OR(helper_Nume
* TRACKER EXTENSION:
* The terminal PARAMETERIZED_VAR is additionally accepted
*/
static const TrackerGrammarRule helper_NumericLiteralUnsigned_or[] = { T(DECIMAL), T(DOUBLE), T(INTEGER), T(PARAMETERIZED_VAR), NIL };
static const TrackerGrammarRule helper_NumericLiteralUnsigned_or[] = { T(DOUBLE), T(DECIMAL), T(INTEGER), T(PARAMETERIZED_VAR), NIL };
static const TrackerGrammarRule rule_NumericLiteralUnsigned[] = { OR(helper_NumericLiteralUnsigned_or), NIL };
/* NumericLiteral ::= NumericLiteralUnsigned | NumericLiteralPositive | NumericLiteralNegative
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment