Skip to content

Commit 09ffffd

Browse files
Allow the file extension with EXEC SQL INCLUDE (#147)
* fix: scanner.l allow adding extension in EXEC SQL INCLUDE * test: EXEC SQL INCLUDE with extension * fix: tests/Makefile * fix: include.at * Add basic * fix scanner.l * test: add some cases EXEC SQL INCLUDE with extension
1 parent e8fba44 commit 09ffffd

File tree

4 files changed

+1136
-7
lines changed

4 files changed

+1136
-7
lines changed

ocesql/scanner.l

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ yyinput (char *buf, int max_size);
7575
JPNWORD [\xA0-\xDF]|([\x81-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC])
7676
DIGIT [0-9]
7777
WORD ([A-Za-z\+\-0-9_]|[(]|[)]|[\'])
78-
INCFILE [A-Za-z0-9_\+\-]+
79-
FILENAME [A-Za-z0-9_\+\-\.]+
78+
FILENAME [A-Za-z0-9_+\-]+(\.[A-Za-z0-9_+\-]+)*
8079
STRVALUE ("\""[^\"]*"\""|"\'"[^\']*"\'")
8180
HEXVALUE "X"("\""[^\"]+"\""|"\'"[^\']+"\'")
8281
NVALUE "N"("\""[^\"]+"\""|"\'"[^\']+"\'")
@@ -520,7 +519,7 @@ INT_CONSTANT {digit}+
520519
yy_pop_state();
521520
return END_EXEC;
522521
}
523-
{INCFILE} {
522+
{FILENAME} {
524523
memset(commandname,0,sizeof(commandname));
525524
com_strcpy(commandname,sizeof(commandname),"INCFILE");
526525
yylval.s = com_strdup (yytext);

tests/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ basic_DEPENDENCIES = \
1919
basic.src/declare.at \
2020
basic.src/delete.at \
2121
basic.src/fetch.at \
22+
basic.src/include.at \
2223
basic.src/insert.at \
2324
basic.src/open-close.at \
2425
basic.src/sample.at \

0 commit comments

Comments
 (0)