* Declare dependencies in deterministic order (RT#102859)
* Multiple speedups of naive internal debugging mechanism (GH#54)
* Remove dependency on List::MoreUtils ( http://is.gd/lmu_cac_debacle )
+ * Fix parsing of strings with leading whitespace for MySQL, Oracle, PostgreSQL,
+ SQLServer and SQLite
0.11021 2015-01-29
# MySQL strings, unlike common SQL strings, can have the delmiters
# escaped either by doubling or by backslashing.
-BQSTRING: BACKTICK /(?:[^\\`]|``|\\.)*/ BACKTICK
- { ($return = $item[2]) =~ s/(\\[\\`]|``)/substr($1,1)/ge }
+BQSTRING: BACKTICK <skip: ''> /(?:[^\\`]|``|\\.)*/ BACKTICK
+ { ($return = $item[3]) =~ s/(\\[\\`]|``)/substr($1,1)/ge }
-DQSTRING: DOUBLE_QUOTE /(?:[^\\"]|""|\\.)*/ DOUBLE_QUOTE
- { ($return = $item[2]) =~ s/(\\[\\"]|"")/substr($1,1)/ge }
+DQSTRING: DOUBLE_QUOTE <skip: ''> /(?:[^\\"]|""|\\.)*/ DOUBLE_QUOTE
+ { ($return = $item[3]) =~ s/(\\[\\"]|"")/substr($1,1)/ge }
-SQSTRING: SINGLE_QUOTE /(?:[^\\']|''|\\.)*/ SINGLE_QUOTE
- { ($return = $item[2]) =~ s/(\\[\\']|'')/substr($1,1)/ge }
+SQSTRING: SINGLE_QUOTE <skip: ''> /(?:[^\\']|''|\\.)*/ SINGLE_QUOTE
+ { ($return = $item[3]) =~ s/(\\[\\']|'')/substr($1,1)/ge }
NAME: QUOTED_NAME
TABLE : /table/i
-DQSTRING : '"' /((?:[^"]|"")+)/ '"'
- { ($return = $item[2]) =~ s/""/"/g; }
+DQSTRING : '"' <skip: ''> /((?:[^"]|"")+)/ '"'
+ { ($return = $item[3]) =~ s/""/"/g; }
-SQSTRING : "'" /((?:[^']|'')*)/ "'"
- { ($return = $item[2]) =~ s/''/'/g }
+SQSTRING : "'" <skip: ''> /((?:[^']|'')*)/ "'"
+ { ($return = $item[3]) =~ s/''/'/g }
VALUE : /[-+]?\d*\.?\d+(?:[eE]\d+)?/
| SQSTRING
NAME : DQSTRING
| /\w+/
-DQSTRING : '"' /((?:[^"]|"")+)/ '"'
- { ($return = $item[2]) =~ s/""/"/g; }
+DQSTRING : '"' <skip: ''> /((?:[^"]|"")+)/ '"'
+ { ($return = $item[3]) =~ s/""/"/g; }
-SQSTRING : "'" /((?:[^']|'')*)/ "'"
- { ($return = $item[2]) =~ s/''/'/g }
+SQSTRING : "'" <skip: ''> /((?:[^']|'')*)/ "'"
+ { ($return = $item[3]) =~ s/''/'/g }
VALUE : /[-+]?\d*\.?\d+(?:[eE]\d+)?/
| SQSTRING
COMMA : ','
-SQSTRING : "'" /(?:[^']|'')*/ "'"
- { ($return = $item[2]) =~ s/''/'/g }
+SQSTRING : "'" <skip: ''> /(?:[^']|'')*/ "'"
+ { ($return = $item[3]) =~ s/''/'/g }
-DQSTRING : '"' /(?:[^"]|"")+/ '"'
- { ($return = $item[2]) =~ s/""/"/g }
+DQSTRING : '"' <skip: ''> /(?:[^"]|"")+/ '"'
+ { ($return = $item[3]) =~ s/""/"/g }
-BQSTRING : '[' /(?:[^]]|]])+/ ']'
- { ($return = $item[2]) =~ s/]]/]/g; }
+BQSTRING : '[' <skip: ''> /(?:[^]]|]])+/ ']'
+ { ($return = $item[3]) =~ s/]]/]/g; }
END_OF_GRAMMAR
| DQSTRING
| SQSTRING
-DQSTRING : '"' /((?:[^"]|"")+)/ '"'
- { ($return = $item[2]) =~ s/""/"/g }
+DQSTRING : '"' <skip: ''> /((?:[^"]|"")+)/ '"'
+ { ($return = $item[3]) =~ s/""/"/g }
-SQSTRING : "'" /((?:[^']|'')*)/ "'"
- { ($return = $item[2]) =~ s/''/'/g }
+SQSTRING : "'" <skip: ''> /((?:[^']|'')*)/ "'"
+ { ($return = $item[3]) =~ s/''/'/g }
VALUE : /[-+]?\d*\.?\d+(?:[eE]\d+)?/
{ $item[1] }
</field>
</fields>
</table>
+
+ <table order="1" name=" table with spaces ">
+ <fields>
+ <field
+ name=" field with spaces "
+ is_primary_key="1" data_type="text"
+ default_value=" value with spaces ">
+ </field>
+ </fields>
+ </table>
</tables>
<views>