467 {
468
470
472%}
473
474<SQL>{
475{whitespace} {
476
477 }
478} /* <SQL> */
479
480<C,SQL>{
481{xcstart} {
486
489 }
static int state_before_str_start
490} /* <C,SQL> */
491
492<xc>{
493{xcstart} {
495 {
497
500 }
502 {
504 }
505 }
506
507{xcstop} {
509 {
511 {
515 }
516 else
517 {
520 }
521 }
523 {
527 }
528 }
529
530{xcinside} {
532 }
533
534{op_chars} {
536 }
537
538\*+ {
540 }
541
542<<EOF>> {
544 }
545} /* <xc> */
546
547<SQL>{
548{xbstart} {
553 }
554} /* <SQL> */
555
556<xh>{xhinside} |
557<xb>{xbinside} {
559 }
static void addlit(char *ytext, int yleng)
560<xb><<EOF>> {
562 }
563
564<SQL>{xhstart} {
569 }
570<xh><<EOF>> {
572 }
573
574<C>{xqstart} {
579 }
580
581<SQL>{
582{xnstart} {
583
588 }
589
590{xqstart} {
595 }
596{xestart} {
601 }
602{xusstart} {
607 }
608} /* <SQL> */
609
610<xb,xh,xq,xqc,xe,xn,xus>{quote} {
611
612
613
614
615
616
617
618
621 }
static int state_before_str_stop
622<xqs>{quotecontinue} {
623
624
625
626
627
629 }
630<xqs>{quotecontinuefail} |
631<xqs>{other} |
632<xqs><<EOF>> {
633
634
635
636
637
640
642 {
654
667 default:
669 }
670 }
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)
671
672<xq,xe,xn,xus>{xqdouble} {
674 }
675<xqc>{xqcquote} {
677 }
678<xq,xqc,xn,xus>{xqinside} {
680 }
681<xe>{xeinside} {
683 }
684<xe>{xeunicode} {
686 }
687<xe>{xeescape} {
689 }
690<xe>{xeoctesc} {
692 }
693<xe>{xehexesc} {
695 }
696<xe>. {
697
699 }
static void addlitchar(unsigned char ychar)
700<xq,xqc,xe,xn,xus><<EOF>> {
702 }
703
704<SQL>{
705{dolqdelim} {
713 }
714{dolqfailed} {
715
717
719 }
720} /* <SQL> */
721
722<xdolq>{dolqdelim} {
724 {
731 }
732 else
733 {
734
735
736
737
738
741 }
742 }
743<xdolq>{dolqinside} {
745 }
746<xdolq>{dolqfailed} {
748 }
749<xdolq>. {
750
752 }
753<xdolq><<EOF>> {
755 }
756
757<SQL>{
758{xdstart} {
762 }
763{xuistart} {
767 }
768} /* <SQL> */
769
770<xd>{xdstop} {
774
775
776
777
778
779
780
781
782
785 }
786<xdc>{xdstop} {
790 }
791<xui>{dquote} {
795
796
797
798
799
802 }
803<xd,xui>{xddouble} {
805 }
806<xd,xui>{xdinside} {
808 }
809<xd,xui><<EOF>> {
811 }
812<C>{xdstart} {
816 }
817<xdc>{xdcinside} {
819 }
820<xdc><<EOF>> {
822 }
823
824<SQL>{
825{typecast} {
827 }
828
829{dot_dot} {
831 }
832
833{colon_equals} {
835 }
836
837{equals_greater} {
839 }
840
841{less_equals} {
843 }
844
845{greater_equals} {
847 }
848
849{less_greater} {
850
852 }
853
854{not_equals} {
855
857 }
858
859{right_arrow} {
861 }
862
863{informix_special} {
864
866 {
868 }
869 else
871 }
872
873{self} {
874
875
876
877
881 }
882
883{operator} {
884
885
886
887
888
889
893
895 {
896
899 }
904
905
906
907
908
909
910
911
912
913 if (nchars > 1 &&
914 (
yytext[nchars - 1] ==
'+' ||
915 yytext[nchars - 1] ==
'-'))
916 {
918
919 for (
ic = nchars - 2;
ic >= 0;
ic--)
920 {
922
923 if (
c ==
'~' ||
c ==
'!' ||
c ==
'@' ||
924 c ==
'#' ||
c ==
'^' ||
c ==
'&' ||
925 c ==
'|' ||
c ==
'`' ||
c ==
'?' ||
927 break;
928 }
930 {
931
932
933
934
935 do
936 {
937 nchars--;
938 } while (nchars > 1 &&
939 (
yytext[nchars - 1] ==
'+' ||
940 yytext[nchars - 1] ==
'-'));
941 }
942 }
943
945 {
946
948
949
950
951
952
953
954
955 if (nchars == 1 &&
958
959
960
961
962
963
964
965 if (nchars == 2)
966 {
979 }
980 }
981
984 }
985
986{param} {
988
995 }
996{param_junk} {
998 }
999
1000{ip} {
1003 }
1004} /* <SQL> */
1005
1006<C,SQL>{
1007{decinteger} {
1009 }
static int process_integer_literal(const char *token, YYSTYPE *lval, int base)
1010{hexinteger} {
1012 }
1013{numeric} {
1016 }
1017{numericfail} {
1018
1021 }
1022{real} {
1025 }
1026{realfail} {
1027
1028
1029
1030
1033 }
1034} /* <C,SQL> */
1035
1036<SQL>{
1037{octinteger} {
1039 }
1040{bininteger} {
1042 }
1043
1044
1045
1046
1047
1048{integer_junk} {
1050 }
1051{numeric_junk} {
1053 }
1054{real_junk} {
1056 }
1057
1058:{identifier}((("->"|\.){identifier})|(\[{array}\]))* {
1061 }
1062
1063{identifier} {
1064
1066 {
static bool isdefine(void)
1068
1069
1070
1071
1072
1073
1074
1076 {
1077
1081 }
int ScanECPGKeywordLookup(const char *text)
struct typedefs * get_typedef(const char *name, bool noerror)
1082
1083
int ScanCKeywordLookup(const char *text)
1087
1088
1089
1090
1091
1092
1093
1094
1095
1098 }
1099 }
1100
1101{other} {
1103 }
1104} /* <SQL> */
1105
1106
1107
1108
1109
1110<C>{exec_sql} {
1113 }
1114<C>{informix_special} {
1115
1117 {
1120 }
1121 else
1123 }
1124<C>{ccomment} {
1126 }
1127<C>{cppinclude} {
1129 {
1132 }
1133 else
1134 {
1137 }
1138 }
1139<C>{cppinclude_next} {
1141 {
1144 }
1145 else
1146 {
1149 }
1150 }
1151<C,SQL>{cppline} {
1154 }
1155<C>{identifier} {
1156
1157
1158
1159
1160
1162 {
1166 }
1167
1168
1170 {
static bool isinformixdefine(void)
1172
1176 else
1177 {
1180 }
1181 }
1182 }
1183<C>{xcstop} {
1185 }
1186<C>":" { return ':'; }
1187<C>";" { return ';'; }
1188<C>"," { return ','; }
1189<C>"*" { return '*'; }
1190<C>"%" { return '%'; }
1191<C>"/" { return '/'; }
1192<C>"+" { return '+'; }
1193<C>"-" { return '-'; }
1194<C>"(" { parenths_open++; return '('; }
1195<C>")" { parenths_open--; return ')'; }
1196<C,xskip>{space} { ECHO; }
1197<C>\{ { return '{'; }
1198<C>\} { return '}'; }
1199<C>\[ { return '['; }
1200<C>\] { return ']'; }
1201<C>\= { return '='; }
1202<C>"->" { return S_MEMBER; }
1203<C>">>" { return S_RSHIFT; }
1204<C>"<<" { return S_LSHIFT; }
1205<C>"||" { return S_OR; }
1206<C>"&&" { return S_AND; }
1207<C>"++" { return S_INC; }
1208<C>"--" { return S_DEC; }
1209<C>"==" { return S_EQUAL; }
1210<C>"!=" { return S_NEQUAL; }
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; }
1216<C>"->*" { return S_MEMPOINT; }
1217<C>".*" { return S_DOTPOINT; }
1218<C>{other} { return S_ANYTHING; }
1219<C>{exec_sql}{define}{space}* { BEGIN(def_ident); }
1220<C>{informix_special}{define}{space}* {
1221
1223 {
1225 }
1226 else
1227 {
1230 }
1231 }
1232<C>{exec_sql}{undef}{space}* {
1234 }
1235<C>{informix_special}{undef}{space}* {
1236
1238 {
1240 }
1241 else
1242 {
1245 }
1246 }
1247<undef>{identifier}{space}*";" {
1251
1252
1253
1254
1255
1259 ;
1261
1262
1264 {
1266 {
1269
1270 if (ptr->cmdvalue ==
NULL)
1271 {
1274 else
1278 }
1279 break;
1280 }
1281 }
1282
1284 }
1285<undef>{other}|\n {
1288 }
1289<C>{exec_sql}{include}{space}* {
1291 }
1292<C>{informix_special}{include}{space}* {
1293
1295 {
1297 }
1298 else
1299 {
1302 }
1303 }
1304<C,xskip>{exec_sql}{ifdef}{space}* {
1313 }
1314<C,xskip>{informix_special}{ifdef}{space}* {
1315
1317 {
1326 }
1327 else
1328 {
1331 }
1332 }
1333<C,xskip>{exec_sql}{ifndef}{space}* {
1342 }
1343<C,xskip>{informix_special}{ifndef}{space}* {
1344
1346 {
1355 }
1356 else
1357 {
1360 }
1361 }
1362<C,xskip>{exec_sql}{elif}{space}* {
1369 }
1370<C,xskip>{informix_special}{elif}{space}* {
1371
1373 {
1380 }
1381 else
1382 {
1385 }
1386 }
1387
1388<C,xskip>{exec_sql}{else}{space}*";" {
1389
1394 else
1395 {
1401
1404 else
1406 }
1407 }
1408<C,xskip>{informix_special}{else}{space}*";" {
1409
1411 {
1416 else
1417 {
1423
1426 else
1428 }
1429 }
1430 else
1431 {
1434 }
1435 }
1436<C,xskip>{exec_sql}{endif}{space}*";" {
1439 else
1441
1444 else
1446 }
1447<C,xskip>{informix_special}{endif}{space}*";" {
1448
1450 {
1453 else
1455
1458 else
1460 }
1461 else
1462 {
1465 }
1466 }
1467
1468<xskip>{other} { /* ignore */ }
1469
1470<xcond>{identifier}{space}*";" {
1471 {
1475
1476
1477
1478
1479
1480
1484 ;
1486
1487
1489 {
1491 {
1492
1495 break;
1496 }
1497 }
1498
1505 }
1506
1509 else
1511 }
1512
1513<xcond>{other}|\n {
1516 }
1517<def_ident>{identifier} {
1521 }
1522<def_ident>{other}|\n {
1525 }
1526<def>{space}*";" {
1528
1529
1531 {
1533 {
1536
1538 break;
1539 }
1540 }
1542 {
1543
1545
1552 }
1553
1555 }
1556<def>[^;] { addlit(yytext, yyleng); }
1557<incl><[^>]+>{space}*";"? { parse_include(); }
1558<incl>{dquote}{xdinside}{dquote}{space}*";"? { parse_include(); }
1559<incl>[^;<>\"]+";" { parse_include(); }
1560<incl>{other}|\n {
1563 }
1564
1565<<EOF>> {
1567 {
1568
1570 {
1573 }
1575 }
1576 else
1577 {
1578
1582
1583
1585 {
1587 {
1589 break;
1590 }
1591 }
1592
1595
1598
1600
1601
1603
1606
1609
1612 }
1613 }
1614
1615<INITIAL>{other}|\n {
1617 }
1618
1619%%