57#define startlit() (literalbuf[0] = '\0', literallen = 0)
102#define MAX_NESTED_IF 128
static int state_before_str_start
static int state_before_str_stop
static bool isdefine(void)
static struct _yy_buffer * yy_buffer
static int process_integer_literal(const char *token, YYSTYPE *lval, int base)
static struct _if_value stacked_if_value[MAX_NESTED_IF]
static void parse_include(void)
static void addlitchar(unsigned char ychar)
static bool ecpg_isspace(char ch)
static void addlit(char *ytext, int yleng)
static bool isinformixdefine(void)
struct yy_buffer_state * YY_BUFFER_STATE
115%option never-interactive
121%option prefix="base_yy"
174%x C SQL incl def def_ident undef
195non_newline_space [ \t\f\v]
199comment ("--"{non_newline}*)
201whitespace ({space}+|{comment})
210non_newline_whitespace ({non_newline_space}|{comment})
211whitespace_with_newline ({non_newline_whitespace}*{newline}{whitespace}*)
215quotecontinue {whitespace_with_newline}{quote}
224quotecontinuefail {whitespace}*"-"?
242xeoctesc [\\][0-7]{1,3}
243xehexesc [\\]x[0-9A-Fa-f]{1,2}
244xeunicode [\\](u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})
250xqdouble {quote}{quote}
263dolq_start [A-Za-z\200-\377_]
264dolq_cont [A-Za-z\200-\377_0-9]
265dolqdelim \$({dolq_start}{dolq_cont}*)?\$
266dolqfailed \${dolq_start}{dolq_cont}*
275xddouble {dquote}{dquote}
279xuistart [uU]&{dquote}
288xdcinside ({xdcqq}|{xdcqdq}|{xdcother})
309xcstart \/\*{op_chars}*
313ident_start [A-Za-z\200-\377_]
314ident_cont [A-Za-z\200-\377_0-9\$]
316identifier {ident_start}{ident_cont}*
318array ({ident_cont}|{whitespace}|[\[\]\+\-\*\%\/\(\)>\.])*
351self [,()\[\].;\:\|\+\-\*\/\%\^<>\=]
352op_chars [\~\!\@\#\^\&\|\`\?\+\-\*\/\%<>\=]
371decinteger {decdigit}(_?{decdigit})*
372hexinteger 0[xX](_?{hexdigit})+
373octinteger 0[oO](_?{octdigit})+
374bininteger 0[bB](_?{bindigit})+
380numeric (({decinteger}\.{decinteger}?)|(\.{decinteger}))
381numericfail {decinteger}\.\.
383real ({decinteger}|{numeric})[Ee][-+]?{decinteger}
384realfail ({decinteger}|{numeric})[Ee][-+]
406integer_junk {decinteger}{identifier}
407numeric_junk {numeric}{identifier}
408real_junk {real}{identifier}
409param_junk \${decdigit}+{identifier}
433define [dD][eE][fF][iI][nN][eE]
434include [iI][nN][cC][lL][uU][dD][eE]
435include_next [iI][nN][cC][lL][uU][dD][eE]_[nN][eE][xX][tT]
436import [iI][mM][pP][oO][rR][tT]
437undef [uU][nN][dD][eE][fF]
442ifdef [iI][fF][dD][eE][fF]
443ifndef [iI][fF][nN][dD][eE][fF]
446endif [eE][nN][dD][iI][fF]
448struct [sS][tT][rR][uU][cC][tT]
450exec_sql {exec}{space}*{sql}{space}*
451ipdigit ({decdigit}|{decdigit}{decdigit}|{decdigit}{decdigit}{decdigit})
452ip {ipdigit}\.{ipdigit}\.{ipdigit}\.{ipdigit}
455cppinclude {space}*#{include}{space}*
456cppinclude_next {space}*#{include_next}{space}*
463cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+\/)|.|\\{space}*{newline})*{newline}
void pg_noreturn void mmfatal(int error_code, const char *error,...) pg_attribute_printf(2
610<xb,xh,xq,xqc,xe,xn,xus>{quote} {
622<xqs>{quotecontinue} {
630<xqs>{quotecontinuefail} |
void mmerror(int error_code, enum errortype type, const char *error,...) pg_attribute_printf(3
char * make3_str(const char *str1, const char *str2, const char *str3)
672<xq,xe,xn,xus>{xqdouble} {
678<xq,xqc,xn,xus>{xqinside} {
700<xq,xqc,xe,xn,xus><<EOF>> {
char * mm_strdup(const char *string)
char * loc_strdup(const char *string)
914 (
yytext[nchars - 1] ==
'+' ||
915 yytext[nchars - 1] ==
'-'))
919 for (
ic = nchars - 2;
ic >= 0;
ic--)
923 if (
c ==
'~' ||
c ==
'!' ||
c ==
'@' ||
924 c ==
'#' ||
c ==
'^' ||
c ==
'&' ||
925 c ==
'|' ||
c ==
'`' ||
c ==
'?' ||
938 }
while (nchars > 1 &&
939 (
yytext[nchars - 1] ==
'+' ||
940 yytext[nchars - 1] ==
'-'));
int strtoint(const char *pg_restrict str, char **pg_restrict endptr, int base)
1058:{identifier}((("->"|\.){identifier})|(\[{array}\]))* {
int ScanCKeywordLookup(const char *text)
int ScanECPGKeywordLookup(const char *text)
struct typedefs * get_typedef(const char *name, bool noerror)
1114<C>{informix_special} {
1139<C>{cppinclude_next} {
1186<C>":" {
return ':'; }
1187<C>";" {
return ';'; }
1188<C>"," {
return ','; }
1189<C>"*" {
return '*'; }
1190<C>"%" {
return '%'; }
1191<C>"/" {
return '/'; }
1192<C>"+" {
return '+'; }
1193<C>"-" {
return '-'; }
1196<C,xskip>{space} {
ECHO; }
1197<C>\{ {
return '{'; }
1198<C>\} {
return '}'; }
1199<C>\[ {
return '['; }
1200<C>\] {
return ']'; }
1201<C>\= {
return '='; }
1205<C>"||" {
return S_OR; }
1206<C>"&&" {
return S_AND; }
1207<C>"++" {
return S_INC; }
1208<C>"--" {
return S_DEC; }
1211<C>"+=" {
return S_ADD; }
1212<C>"-=" {
return S_SUB; }
1213<C>"*=" {
return S_MUL; }
1214<C>"/=" {
return S_DIV; }
1215<C>"%=" {
return S_MOD; }
1220<C>{informix_special}{define}{space}* {
1232<C>{exec_sql}{undef}{space}* {
1235<C>{informix_special}{undef}{space}* {
1247<undef>{identifier}{space}*";" {
1270 if (ptr->cmdvalue ==
NULL)
struct _defines * defines
1289<C>{exec_sql}{include}{space}* {
1292<C>{informix_special}{include}{space}* {
1304<C,xskip>{exec_sql}{ifdef}{space}* {
1314<C,xskip>{informix_special}{ifdef}{space}* {
1333<C,xskip>{exec_sql}{ifndef}{space}* {
1343<C,xskip>{informix_special}{ifndef}{space}* {
1362<C,xskip>{exec_sql}{elif}{space}* {
1370<C,xskip>{informix_special}{elif}{space}* {
1388<C,xskip>{exec_sql}{else}{space}*";" {
1408<C,xskip>{informix_special}{else}{space}*";" {
1436<C,xskip>{exec_sql}{endif}{space}*";" {
1447<C,xskip>{informix_special}{endif}{space}*";" {
1470<xcond>{identifier}{space}*";" {
1517<def_ident>{identifier} {
1522<def_ident>{other}|\n {
void * mm_alloc(size_t size)
1558<incl>{dquote}{xdinside}{dquote}{space}*";"? {
parse_include(); }
void output_line_number(void)
1615<INITIAL>{other}|\n {
1877 const char *
new =
NULL;
#define fprintf(file, fmt, msg)
struct _include_path * include_paths
@ ECPG_COMPAT_INFORMIX_SE
size_t strlcpy(char *dst, const char *src, size_t siz)
struct _include_path * next