grammar: Fix parsing of exotic column data types

This fixes two issues with unusual but valid data types for columns:

1) When having a data type that consists of more than one word these
wouldn't be separated anymore after parsing. This is fixed now. Example:
CREATE TABLE test(a long int);
would have become
CREATE TABLE test(a longint);

2) Some keywords are allowed to be used as data types. Parsing these
tables would have failed entire prior to this. This is fixed, too.
Example:
CREATE TABLE test(a no);
would fail.
This commit is contained in:
Martin Kleusberg
2017-01-14 14:46:04 +01:00
parent 09b679252e
commit 64fdd78105
3 changed files with 82 additions and 11 deletions
+1 -1
View File
@@ -348,7 +348,7 @@ name : ID | QUOTEDID | QUOTEDLITERAL | STRINGLITERAL;
type_name
:
(name)+
(name | keywordastablename)+
(LPAREN signednumber (COMMA signednumber)? RPAREN)?
{#type_name = #([TYPE_NAME, "TYPE_NAME"], #type_name);}
;