Skip to content
Snippets Groups Projects
Commit 2fabb993 authored by Michael Meskes's avatar Michael Meskes
Browse files

Fixed parser bug concerning octal numbers in single quotes.

parent e4cd7c31
No related branches found
No related tags found
No related merge requests found
...@@ -1265,6 +1265,11 @@ Wed Jun 12 14:04:11 CEST 2002 ...@@ -1265,6 +1265,11 @@ Wed Jun 12 14:04:11 CEST 2002
- Applied Lee Kindness' patch to fix one of memory allocation with - Applied Lee Kindness' patch to fix one of memory allocation with
floating point numbers. floating point numbers.
Mon Jun 17 15:23:51 CEST 2002
- Fixed parser bug in pgc.l. Octal numbers in single quotes are now
correctly handled.
- Set ecpg version to 2.10.0. - Set ecpg version to 2.10.0.
- Set library version to 3.4.0. - Set library version to 3.4.0.
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.92 2002/05/20 09:29:41 meskes Exp $ * $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.93 2002/06/17 13:23:27 meskes Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -372,13 +372,13 @@ cppline {space}*#(.*\\{space})*.* ...@@ -372,13 +372,13 @@ cppline {space}*#(.*\\{space})*.*
<xq>{xqstop} { <xq>{xqstop} {
BEGIN(state_before); BEGIN(state_before);
yylval.str = mm_strdup(literalbuf); yylval.str = mm_strdup(literalbuf);
printf("MM: %s\n", yylval.str);
return SCONST; return SCONST;
} }
<xq>{xqdouble} { addlitchar('\''); } <xq>{xqdouble} { addlitchar('\''); }
<xq>{xqinside} { addlit(yytext, yyleng); } <xq>{xqinside} { addlit(yytext, yyleng); }
<xq>{xqescape} { addlit(yytext, yyleng); } <xq>{xqescape} { addlit(yytext, yyleng); }
<xq>{xqoctesc} { unsigned char c = strtoul(yytext+1, NULL, 8); <xq>{xqoctesc} { addlit(yytext, yyleng); }
addlitchar(c); }
<xq>{xqcat} { /* ignore */ } <xq>{xqcat} { /* ignore */ }
<xq><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated quoted string"); } <xq><<EOF>> { mmerror(PARSE_ERROR, ET_ERROR, "Unterminated quoted string"); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment