465 {
466
468
470%}
471
472<SQL>{
473{whitespace} {
474
475 }
476} /* <SQL> */
477
478<C,SQL>{
479{xcstart} {
484
487 }
static int state_before_str_start
488} /* <C,SQL> */
489
490<xc>{
491{xcstart} {
493 {
495
498 }
500 {
502 }
503 }
504
505{xcstop} {
507 {
509 {
513 }
514 else
515 {
518 }
519 }
521 {
525 }
526 }
527
528{xcinside} {
530 }
531
532{op_chars} {
534 }
535
536\*+ {
538 }
539
540<<EOF>> {
542 }
543} /* <xc> */
544
545<SQL>{
546{xbstart} {
551 }
552} /* <SQL> */
553
554<xh>{xhinside} |
555<xb>{xbinside} {
557 }
static void addlit(char *ytext, int yleng)
558<xb><<EOF>> {
560 }
561
562<SQL>{xhstart} {
567 }
568<xh><<EOF>> {
570 }
571
572<C>{xqstart} {
577 }
578
579<SQL>{
580{xnstart} {
581
586 }
587
588{xqstart} {
593 }
594{xestart} {
599 }
600{xusstart} {
605 }
606} /* <SQL> */
607
608<xb,xh,xq,xqc,xe,xn,xus>{quote} {
609
610
611
612
613
614
615
616
619 }
static int state_before_str_stop
620<xqs>{quotecontinue} {
621
622
623
624
625
627 }
628<xqs>{quotecontinuefail} |
629<xqs>{other} |
630<xqs><<EOF>> {
631
632
633
634
635
638
640 {
652
665 default:
667 }
668 }
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)
669
670<xq,xe,xn,xus>{xqdouble} {
672 }
673<xqc>{xqcquote} {
675 }
676<xq,xqc,xn,xus>{xqinside} {
678 }
679<xe>{xeinside} {
681 }
682<xe>{xeunicode} {
684 }
685<xe>{xeescape} {
687 }
688<xe>{xeoctesc} {
690 }
691<xe>{xehexesc} {
693 }
694<xe>. {
695
697 }
static void addlitchar(unsigned char ychar)
698<xq,xqc,xe,xn,xus><<EOF>> {
700 }
701
702<SQL>{
703{dolqdelim} {
711 }
712{dolqfailed} {
713
715
717 }
718} /* <SQL> */
719
720<xdolq>{dolqdelim} {
722 {
729 }
730 else
731 {
732
733
734
735
736
739 }
740 }
741<xdolq>{dolqinside} {
743 }
744<xdolq>{dolqfailed} {
746 }
747<xdolq>. {
748
750 }
751<xdolq><<EOF>> {
753 }
754
755<SQL>{
756{xdstart} {
760 }
761{xuistart} {
765 }
766} /* <SQL> */
767
768<xd>{xdstop} {
772
773
774
775
776
777
778
779
780
783 }
784<xdc>{xdstop} {
788 }
789<xui>{dquote} {
793
794
795
796
797
800 }
801<xd,xui>{xddouble} {
803 }
804<xd,xui>{xdinside} {
806 }
807<xd,xui><<EOF>> {
809 }
810<C>{xdstart} {
814 }
815<xdc>{xdcinside} {
817 }
818<xdc><<EOF>> {
820 }
821
822<SQL>{
823{typecast} {
825 }
826
827{dot_dot} {
829 }
830
831{colon_equals} {
833 }
834
835{equals_greater} {
837 }
838
839{less_equals} {
841 }
842
843{greater_equals} {
845 }
846
847{less_greater} {
848
850 }
851
852{not_equals} {
853
855 }
856
857{informix_special} {
858
860 {
862 }
863 else
865 }
866
867{self} {
868
869
870
871
875 }
876
877{operator} {
878
879
880
881
882
883
887
889 {
890
893 }
898
899
900
901
902
903
904
905
906
907 if (nchars > 1 &&
908 (
yytext[nchars - 1] ==
'+' ||
909 yytext[nchars - 1] ==
'-'))
910 {
912
913 for (
ic = nchars - 2;
ic >= 0;
ic--)
914 {
916
917 if (
c ==
'~' ||
c ==
'!' ||
c ==
'@' ||
918 c ==
'#' ||
c ==
'^' ||
c ==
'&' ||
919 c ==
'|' ||
c ==
'`' ||
c ==
'?' ||
921 break;
922 }
924 {
925
926
927
928
929 do
930 {
931 nchars--;
932 } while (nchars > 1 &&
933 (
yytext[nchars - 1] ==
'+' ||
934 yytext[nchars - 1] ==
'-'));
935 }
936 }
937
939 {
940
942
943
944
945
946
947
948
949 if (nchars == 1 &&
952
953
954
955
956
957
958
959 if (nchars == 2)
960 {
971 }
972 }
973
976 }
977
978{param} {
980
987 }
988{param_junk} {
990 }
991
992{ip} {
995 }
996} /* <SQL> */
997
998<C,SQL>{
999{decinteger} {
1001 }
static int process_integer_literal(const char *token, YYSTYPE *lval, int base)
1002{hexinteger} {
1004 }
1005{numeric} {
1008 }
1009{numericfail} {
1010
1013 }
1014{real} {
1017 }
1018{realfail} {
1019
1020
1021
1022
1025 }
1026} /* <C,SQL> */
1027
1028<SQL>{
1029{octinteger} {
1031 }
1032{bininteger} {
1034 }
1035
1036
1037
1038
1039
1040{integer_junk} {
1042 }
1043{numeric_junk} {
1045 }
1046{real_junk} {
1048 }
1049
1050:{identifier}((("->"|\.){identifier})|(\[{array}\]))* {
1053 }
1054
1055{identifier} {
1056
1058 {
static bool isdefine(void)
1060
1061
1062
1063
1064
1065
1066
1068 {
1069
1073 }
int ScanECPGKeywordLookup(const char *text)
struct typedefs * get_typedef(const char *name, bool noerror)
1074
1075
int ScanCKeywordLookup(const char *text)
1079
1080
1081
1082
1083
1084
1085
1086
1087
1090 }
1091 }
1092
1093{other} {
1095 }
1096} /* <SQL> */
1097
1098
1099
1100
1101
1102<C>{exec_sql} {
1105 }
1106<C>{informix_special} {
1107
1109 {
1112 }
1113 else
1115 }
1116<C>{ccomment} {
1118 }
1119<C>{cppinclude} {
1121 {
1124 }
1125 else
1126 {
1129 }
1130 }
1131<C>{cppinclude_next} {
1133 {
1136 }
1137 else
1138 {
1141 }
1142 }
1143<C,SQL>{cppline} {
1146 }
1147<C>{identifier} {
1148
1149
1150
1151
1152
1154 {
1158 }
1159
1160
1162 {
static bool isinformixdefine(void)
1164
1168 else
1169 {
1172 }
1173 }
1174 }
1175<C>{xcstop} {
1177 }
1178<C>":" { return ':'; }
1179<C>";" { return ';'; }
1180<C>"," { return ','; }
1181<C>"*" { return '*'; }
1182<C>"%" { return '%'; }
1183<C>"/" { return '/'; }
1184<C>"+" { return '+'; }
1185<C>"-" { return '-'; }
1186<C>"(" { parenths_open++; return '('; }
1187<C>")" { parenths_open--; return ')'; }
1188<C,xskip>{space} { ECHO; }
1189<C>\{ { return '{'; }
1190<C>\} { return '}'; }
1191<C>\[ { return '['; }
1192<C>\] { return ']'; }
1193<C>\= { return '='; }
1194<C>"->" { return S_MEMBER; }
1195<C>">>" { return S_RSHIFT; }
1196<C>"<<" { return S_LSHIFT; }
1197<C>"||" { return S_OR; }
1198<C>"&&" { return S_AND; }
1199<C>"++" { return S_INC; }
1200<C>"--" { return S_DEC; }
1201<C>"==" { return S_EQUAL; }
1202<C>"!=" { return S_NEQUAL; }
1203<C>"+=" { return S_ADD; }
1204<C>"-=" { return S_SUB; }
1205<C>"*=" { return S_MUL; }
1206<C>"/=" { return S_DIV; }
1207<C>"%=" { return S_MOD; }
1208<C>"->*" { return S_MEMPOINT; }
1209<C>".*" { return S_DOTPOINT; }
1210<C>{other} { return S_ANYTHING; }
1211<C>{exec_sql}{define}{space}* { BEGIN(def_ident); }
1212<C>{informix_special}{define}{space}* {
1213
1215 {
1217 }
1218 else
1219 {
1222 }
1223 }
1224<C>{exec_sql}{undef}{space}* {
1226 }
1227<C>{informix_special}{undef}{space}* {
1228
1230 {
1232 }
1233 else
1234 {
1237 }
1238 }
1239<undef>{identifier}{space}*";" {
1243
1244
1245
1246
1247
1251 ;
1253
1254
1256 {
1258 {
1261
1262 if (ptr->cmdvalue ==
NULL)
1263 {
1266 else
1270 }
1271 break;
1272 }
1273 }
1274
1276 }
1277<undef>{other}|\n {
1280 }
1281<C>{exec_sql}{include}{space}* {
1283 }
1284<C>{informix_special}{include}{space}* {
1285
1287 {
1289 }
1290 else
1291 {
1294 }
1295 }
1296<C,xskip>{exec_sql}{ifdef}{space}* {
1305 }
1306<C,xskip>{informix_special}{ifdef}{space}* {
1307
1309 {
1318 }
1319 else
1320 {
1323 }
1324 }
1325<C,xskip>{exec_sql}{ifndef}{space}* {
1334 }
1335<C,xskip>{informix_special}{ifndef}{space}* {
1336
1338 {
1347 }
1348 else
1349 {
1352 }
1353 }
1354<C,xskip>{exec_sql}{elif}{space}* {
1361 }
1362<C,xskip>{informix_special}{elif}{space}* {
1363
1365 {
1372 }
1373 else
1374 {
1377 }
1378 }
1379
1380<C,xskip>{exec_sql}{else}{space}*";" {
1381
1386 else
1387 {
1393
1396 else
1398 }
1399 }
1400<C,xskip>{informix_special}{else}{space}*";" {
1401
1403 {
1408 else
1409 {
1415
1418 else
1420 }
1421 }
1422 else
1423 {
1426 }
1427 }
1428<C,xskip>{exec_sql}{endif}{space}*";" {
1431 else
1433
1436 else
1438 }
1439<C,xskip>{informix_special}{endif}{space}*";" {
1440
1442 {
1445 else
1447
1450 else
1452 }
1453 else
1454 {
1457 }
1458 }
1459
1460<xskip>{other} { /* ignore */ }
1461
1462<xcond>{identifier}{space}*";" {
1463 {
1467
1468
1469
1470
1471
1472
1476 ;
1478
1479
1481 {
1483 {
1484
1487 break;
1488 }
1489 }
1490
1497 }
1498
1501 else
1503 }
1504
1505<xcond>{other}|\n {
1508 }
1509<def_ident>{identifier} {
1513 }
1514<def_ident>{other}|\n {
1517 }
1518<def>{space}*";" {
1520
1521
1523 {
1525 {
1528
1530 break;
1531 }
1532 }
1534 {
1535
1537
1544 }
1545
1547 }
1548<def>[^;] { addlit(yytext, yyleng); }
1549<incl><[^>]+>{space}*";"? { parse_include(); }
1550<incl>{dquote}{xdinside}{dquote}{space}*";"? { parse_include(); }
1551<incl>[^;<>\"]+";" { parse_include(); }
1552<incl>{other}|\n {
1555 }
1556
1557<<EOF>> {
1559 {
1560
1562 {
1565 }
1567 }
1568 else
1569 {
1570
1574
1575
1577 {
1579 {
1581 break;
1582 }
1583 }
1584
1587
1590
1592
1593
1595
1598
1601
1604 }
1605 }
1606
1607<INITIAL>{other}|\n {
1609 }
1610
1611%%