Index: trunk/src_plugins/order/const_gram.c =================================================================== --- trunk/src_plugins/order/const_gram.c (revision 36857) +++ trunk/src_plugins/order/const_gram.c (revision 36858) @@ -15,47 +15,49 @@ #include "../src_plugins/order/const_gram.h" static const pcb_ordc_int_t pcb_ordc_lhs[] = { -1, 0, 0, 5, 5, 5, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 4, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 2, 3, }; static const pcb_ordc_int_t pcb_ordc_len[] = { 2, 0, 2, 1, 1, 1, 2, 3, 3, 3, 3, - 3, 3, 3, 1, 1, 1, 2, 3, 5, 7, + 3, 3, 3, 3, 3, 1, 1, 1, 2, 3, + 5, 7, }; static const pcb_ordc_int_t pcb_ordc_defred[] = { 0, 0, 0, 0, 0, 3, 4, 5, 0, 0, 0, - 0, 2, 14, 15, 16, 0, 0, 0, 0, 0, - 18, 0, 0, 17, 0, 0, 0, 0, 0, 0, - 0, 0, 7, 0, 0, 0, 0, 0, 19, 0, - 0, 0, 20, + 0, 2, 16, 17, 18, 0, 0, 0, 0, 0, + 20, 6, 0, 19, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, + 0, 14, 15, 21, 0, 0, 22, }; static const pcb_ordc_int_t pcb_ordc_dgoto[] = { 4, 19, 5, 6, 7, 8, }; -static const pcb_ordc_int_t pcb_ordc_sindex[] = { -118, - -31, -28, -118, 0, 0, 0, 0, -118, 2, -246, - -112, 0, 0, 0, 0, 2, 2, -242, -41, -27, - 0, -251, -35, 0, 2, 2, 2, 2, 2, -118, - 2, -231, 0, -42, -42, -42, -251, -251, 0, -29, - -10, -24, 0, +static const pcb_ordc_int_t pcb_ordc_sindex[] = { -122, + -29, -26, -122, 0, 0, 0, 0, -122, 14, -242, + -100, 0, 0, 0, 0, 14, 14, -230, -41, -16, + 0, 0, -38, 0, 14, 14, 14, 14, 14, 14, + 14, 14, -122, -229, 0, -33, -33, -33, -33, -33, + -33, 0, 0, 0, -11, -27, 0, }; -static const pcb_ordc_int_t pcb_ordc_rindex[] = { 32, - 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, +static const pcb_ordc_int_t pcb_ordc_rindex[] = { 33, + 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, -23, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, -14, -11, -8, -20, -17, 0, -5, - 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, -28, -25, -15, -12, -2, + 1, 0, 0, 0, 0, 0, 0, }; -static const pcb_ordc_int_t pcb_ordc_gindex[] = { 29, - 23, 0, 0, 0, 4, +static const pcb_ordc_int_t pcb_ordc_gindex[] = { 26, + -8, 0, 0, 0, 3, }; -#define pcb_ordc_TABLESIZE 262 -static const pcb_ordc_int_t pcb_ordc_table[] = { 30, - 28, 28, 29, 29, 3, 33, 11, 28, 9, 29, - 20, 10, 21, 28, 24, 29, 32, 6, 31, 6, - 12, 6, 12, 13, 12, 13, 8, 13, 41, 10, - 42, 1, 11, 39, 43, 9, 12, 18, 22, 23, - 0, 17, 0, 0, 0, 0, 16, 34, 35, 36, - 37, 38, 0, 40, 0, 0, 0, 0, 0, 0, +#define pcb_ordc_TABLESIZE 274 +static const pcb_ordc_int_t pcb_ordc_table[] = { 33, + 3, 31, 35, 32, 31, 11, 32, 22, 23, 31, + 9, 32, 8, 10, 20, 9, 36, 37, 38, 39, + 40, 41, 42, 43, 21, 10, 24, 34, 11, 46, + 45, 47, 1, 12, 0, 44, 0, 0, 12, 0, + 0, 13, 0, 0, 0, 0, 0, 0, 0, 18, + 0, 0, 0, 17, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -64,7 +66,7 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, + 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -71,20 +73,21 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 25, 26, 27, 0, 31, 31, 25, - 26, 27, 0, 0, 31, 25, 26, 27, 0, 0, - 31, 6, 6, 6, 12, 12, 12, 13, 13, 13, - 8, 8, 8, 10, 10, 10, 11, 11, 11, 13, - 14, 15, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, + 26, 27, 25, 26, 27, 0, 28, 29, 30, 28, + 29, 30, 8, 8, 8, 9, 9, 9, 0, 8, + 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, + 11, 0, 10, 10, 10, 11, 11, 11, 12, 12, + 12, 13, 13, 13, 0, 12, 12, 12, 13, 13, + 13, 13, 14, 15, }; static const pcb_ordc_int_t pcb_ordc_check[] = { 41, - 43, 43, 45, 45, 123, 41, 3, 43, 40, 45, - 257, 40, 125, 43, 257, 45, 44, 41, 270, 43, - 41, 45, 43, 41, 45, 43, 41, 45, 260, 41, - 41, 0, 41, 30, 59, 41, 8, 36, 16, 17, - -1, 40, -1, -1, -1, -1, 45, 25, 26, 27, - 28, 29, -1, 31, -1, -1, -1, -1, -1, -1, + 123, 43, 41, 45, 43, 3, 45, 16, 17, 43, + 40, 45, 41, 40, 257, 41, 25, 26, 27, 28, + 29, 30, 31, 32, 125, 41, 257, 44, 41, 41, + 260, 59, 0, 8, -1, 33, -1, -1, 41, -1, + -1, 41, -1, -1, -1, -1, -1, -1, -1, 36, + -1, -1, -1, 40, -1, -1, -1, -1, 45, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -93,7 +96,7 @@ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 261, 262, -1, -1, -1, -1, -1, -1, + -1, 264, 265, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -100,16 +103,17 @@ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 265, 266, 267, -1, 270, 270, 265, - 266, 267, -1, -1, 270, 265, 266, 267, -1, -1, - 270, 265, 266, 267, 265, 266, 267, 265, 266, 267, - 265, 266, 267, 265, 266, 267, 265, 266, 267, 258, - 259, 260, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 261, + 262, 263, 261, 262, 263, -1, 268, 269, 270, 268, + 269, 270, 261, 262, 263, 261, 262, 263, -1, 268, + 269, 270, 268, 269, 270, 261, 262, 263, 261, 262, + 263, -1, 268, 269, 270, 268, 269, 270, 261, 262, + 263, 261, 262, 263, -1, 268, 269, 270, 268, 269, + 270, 258, 259, 260, }; #define pcb_ordc_FINAL 4 -#define pcb_ordc_MAXTOKEN 270 -#define pcb_ordc_UNDFTOKEN 278 +#define pcb_ordc_MAXTOKEN 272 +#define pcb_ordc_UNDFTOKEN 280 #define pcb_ordc_TRANSLATE(a) ((a) > pcb_ordc_MAXTOKEN ? pcb_ordc_UNDFTOKEN : (a)) #if pcb_ordc_DEBUG static const char *const pcb_ordc_name[] = { @@ -116,14 +120,14 @@ "end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, "'!'",0,0,"'$'","'%'",0,0,"'('","')'","'*'","'+'","','","'-'",0,"'/'",0,0,0,0,0, -0,0,0,0,0,0,"';'","'<'",0,"'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0, -"'}'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,"';'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,"T_ID","T_INTEGER","T_FLOAT","T_QSTR","T_IF", -"T_ERROR","T_INTVAL","T_FLOATVAL","\"==\"","\">=\"","\"<=\"","\"||\"","\"&&\"", -"\"!=\"",0,0,0,0,0,0,0,"illegal-symbol", +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,"T_ID","T_INTEGER","T_FLOAT","T_QSTR","T_EQ","T_NEQ","T_GE", +"T_IF","T_ERROR","T_INTVAL","T_FLOATVAL","T_LE","T_GT","T_LT","\"||\"","\"&&\"", +0,0,0,0,0,0,0,"illegal-symbol", }; static const char *const pcb_ordc_rule[] = { "$accept : file", @@ -134,10 +138,12 @@ "statement : stmt_block", "expr : '-' expr", "expr : '(' expr ')'", -"expr : expr \"==\" expr", -"expr : expr \"!=\" expr", -"expr : expr \">=\" expr", -"expr : expr \"<=\" expr", +"expr : expr T_EQ expr", +"expr : expr T_NEQ expr", +"expr : expr T_GE expr", +"expr : expr T_LE expr", +"expr : expr T_GT expr", +"expr : expr T_LT expr", "expr : expr '+' expr", "expr : expr '-' expr", "expr : T_INTEGER", @@ -356,66 +362,74 @@ switch (yyctx->yyn) { case 6: -#line 95 "../src_plugins/order/const_gram.y" +#line 96 "../src_plugins/order/const_gram.y" { yyctx->val.un.tree = unop(PCB_ORDC_NEG, yyctx->stack.l_mark[0].un.tree); } break; case 7: -#line 96 "../src_plugins/order/const_gram.y" +#line 97 "../src_plugins/order/const_gram.y" { yyctx->val.un.tree = yyctx->stack.l_mark[-1].un.tree; } break; case 8: -#line 97 "../src_plugins/order/const_gram.y" +#line 98 "../src_plugins/order/const_gram.y" { yyctx->val.un.tree = binop(PCB_ORDC_EQ, yyctx->stack.l_mark[-2].un.tree, yyctx->stack.l_mark[0].un.tree); } break; case 9: -#line 98 "../src_plugins/order/const_gram.y" +#line 99 "../src_plugins/order/const_gram.y" { yyctx->val.un.tree = binop(PCB_ORDC_NEQ, yyctx->stack.l_mark[-2].un.tree, yyctx->stack.l_mark[0].un.tree); } break; case 10: -#line 99 "../src_plugins/order/const_gram.y" +#line 100 "../src_plugins/order/const_gram.y" { yyctx->val.un.tree = binop(PCB_ORDC_GE, yyctx->stack.l_mark[-2].un.tree, yyctx->stack.l_mark[0].un.tree); } break; case 11: -#line 100 "../src_plugins/order/const_gram.y" +#line 101 "../src_plugins/order/const_gram.y" { yyctx->val.un.tree = binop(PCB_ORDC_LE, yyctx->stack.l_mark[-2].un.tree, yyctx->stack.l_mark[0].un.tree); } break; case 12: #line 102 "../src_plugins/order/const_gram.y" - { yyctx->val.un.tree = binop(PCB_ORDC_ADD, yyctx->stack.l_mark[-2].un.tree, yyctx->stack.l_mark[0].un.tree); } + { yyctx->val.un.tree = binop(PCB_ORDC_GT, yyctx->stack.l_mark[-2].un.tree, yyctx->stack.l_mark[0].un.tree); } break; case 13: #line 103 "../src_plugins/order/const_gram.y" - { yyctx->val.un.tree = binop(PCB_ORDC_SUB, yyctx->stack.l_mark[-2].un.tree, yyctx->stack.l_mark[0].un.tree); } + { yyctx->val.un.tree = binop(PCB_ORDC_LT, yyctx->stack.l_mark[-2].un.tree, yyctx->stack.l_mark[0].un.tree); } break; case 14: #line 105 "../src_plugins/order/const_gram.y" - { yyctx->val.un.tree = NULL; } + { yyctx->val.un.tree = binop(PCB_ORDC_ADD, yyctx->stack.l_mark[-2].un.tree, yyctx->stack.l_mark[0].un.tree); } break; case 15: #line 106 "../src_plugins/order/const_gram.y" - { yyctx->val.un.tree = NULL; } + { yyctx->val.un.tree = binop(PCB_ORDC_SUB, yyctx->stack.l_mark[-2].un.tree, yyctx->stack.l_mark[0].un.tree); } break; case 16: -#line 107 "../src_plugins/order/const_gram.y" +#line 108 "../src_plugins/order/const_gram.y" { yyctx->val.un.tree = NULL; } break; case 17: -#line 108 "../src_plugins/order/const_gram.y" +#line 109 "../src_plugins/order/const_gram.y" { yyctx->val.un.tree = NULL; } break; case 18: -#line 113 "../src_plugins/order/const_gram.y" - { yyctx->val.un.tree = yyctx->stack.l_mark[-1].un.tree; } +#line 110 "../src_plugins/order/const_gram.y" + { yyctx->val.un.tree = NULL; } break; case 19: -#line 116 "../src_plugins/order/const_gram.y" +#line 111 "../src_plugins/order/const_gram.y" { yyctx->val.un.tree = NULL; } break; case 20: -#line 120 "../src_plugins/order/const_gram.y" +#line 116 "../src_plugins/order/const_gram.y" + { yyctx->val.un.tree = yyctx->stack.l_mark[-1].un.tree; } +break; +case 21: +#line 119 "../src_plugins/order/const_gram.y" { yyctx->val.un.tree = NULL; } break; -#line 431 "../src_plugins/order/const_gram.c" +case 22: +#line 123 "../src_plugins/order/const_gram.y" + { yyctx->val.un.tree = NULL; } +break; +#line 445 "../src_plugins/order/const_gram.c" } yyctx->stack.s_mark -= yyctx->yym; yyctx->state = *yyctx->stack.s_mark; Index: trunk/src_plugins/order/const_gram.h =================================================================== --- trunk/src_plugins/order/const_gram.h (revision 36857) +++ trunk/src_plugins/order/const_gram.h (revision 36858) @@ -69,10 +69,16 @@ #define T_INTEGER 258 #define T_FLOAT 259 #define T_QSTR 260 -#define T_IF 261 -#define T_ERROR 262 -#define T_INTVAL 263 -#define T_FLOATVAL 264 +#define T_EQ 261 +#define T_NEQ 262 +#define T_GE 263 +#define T_IF 264 +#define T_ERROR 265 +#define T_INTVAL 266 +#define T_FLOATVAL 267 +#define T_LE 268 +#define T_GT 269 +#define T_LT 270 #define pcb_ordc_ERRCODE 256 #ifndef pcb_ordc_INITSTACKSIZE Index: trunk/src_plugins/order/const_gram.y =================================================================== --- trunk/src_plugins/order/const_gram.y (revision 36857) +++ trunk/src_plugins/order/const_gram.y (revision 36858) @@ -53,12 +53,13 @@ /* Generic */ %token T_ID T_INTEGER T_FLOAT T_QSTR +%token T_EQ T_NEQ T_GE /* Keywords for builtin functions */ %token T_IF T_ERROR %token T_INTVAL T_FLOATVAL -%left "==" ">=" "<=" ">" "<" +%left T_EQ T_NEQ T_GE T_LE T_GT T_LT %left "||" %left "&&" %left '+' '-' @@ -94,10 +95,12 @@ expr: '-' expr { $$ = unop(PCB_ORDC_NEG, $2); } | '(' expr ')' { $$ = $2; } - | expr "==" expr { $$ = binop(PCB_ORDC_EQ, $1, $3); } - | expr "!=" expr { $$ = binop(PCB_ORDC_NEQ, $1, $3); } - | expr ">=" expr { $$ = binop(PCB_ORDC_GE, $1, $3); } - | expr "<=" expr { $$ = binop(PCB_ORDC_LE, $1, $3); } + | expr T_EQ expr { $$ = binop(PCB_ORDC_EQ, $1, $3); } + | expr T_NEQ expr { $$ = binop(PCB_ORDC_NEQ, $1, $3); } + | expr T_GE expr { $$ = binop(PCB_ORDC_GE, $1, $3); } + | expr T_LE expr { $$ = binop(PCB_ORDC_LE, $1, $3); } + | expr T_GT expr { $$ = binop(PCB_ORDC_GT, $1, $3); } + | expr T_LT expr { $$ = binop(PCB_ORDC_LT, $1, $3); } | expr '+' expr { $$ = binop(PCB_ORDC_ADD, $1, $3); } | expr '-' expr { $$ = binop(PCB_ORDC_SUB, $1, $3); } Index: trunk/src_plugins/order/const_lex.c =================================================================== --- trunk/src_plugins/order/const_lex.c (revision 36857) +++ trunk/src_plugins/order/const_lex.c (revision 36858) @@ -4,7 +4,7 @@ static const unsigned char pcb_ordc_nfa_1[] = {4,11,3,0,0,0,0,0,32,255,131,0,0,0,40,0,0,0,0,0,3,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,11,3,0,0,0,0,0,40,255,3,32,0,0,0,32,0,0,0,0,0,0,0}; static const unsigned char pcb_ordc_nfa_2[] = {4,3,0,0,0,0,0,0,0,0,254,255,255,7,254,255,255,7,11,3,0,0,0,0,0,32,255,3,254,255,255,135,254,255,255,7,0,0,0}; static const unsigned char pcb_ordc_nfa_3[] = {4,1,34,6,1,11,3,255,255,255,255,251,255,255,255,255,255,255,255,255,255,255,255,0,7,1,1,34,0,0}; -static const unsigned char pcb_ordc_nfa_4[] = {4,3,0,0,0,0,98,191,0,112,0,0,0,0,0,0,0,16,0}; +static const unsigned char pcb_ordc_nfa_4[] = {4,3,0,0,0,0,112,191,0,0,0,0,0,0,0,0,0,56,0}; static const unsigned char pcb_ordc_nfa_5[] = {4,3,0,38,0,0,1,0,0,0,0,0,0,0,0,0,0,0,11,3,0,38,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; /* strtree.h BEGIN { */ #ifndef UREGLEX_STRTREE_H @@ -18,7 +18,7 @@ #include #include "ureglex/exec.h" -int pcb_ordc_strings[] = {2,101,34,2,102,10,2,105,27,4,1,108,1,111,1,97,1,116,1,118,1,97,1,108,3,9,4,2,102,56,2,110,45,4,1,114,1,114,1,111,1,114,3,7,4,1,116,1,118,1,97,1,108,3,8,4,3,6,4}; +int pcb_ordc_strings[] = {2,33,69,2,60,57,2,61,74,2,62,63,2,101,46,2,102,22,2,105,39,4,1,108,1,111,1,97,1,116,1,118,1,97,1,108,3,15,4,2,102,96,2,110,85,4,1,114,1,114,1,111,1,114,3,13,4,2,61,79,3,11,4,2,61,82,3,10,4,1,61,3,7,4,1,61,3,6,4,3,9,4,3,8,4,1,116,1,118,1,97,1,108,3,14,4,3,12,4}; ureglex_precomp_t pcb_ordc_rules[] = { {pcb_ordc_nfa_0, pcb_ordc_bittab_0, pcb_ordc_chrtyp_0, 1.000000}, {pcb_ordc_nfa_1, pcb_ordc_bittab_0, pcb_ordc_chrtyp_0, 1.000000}, @@ -30,9 +30,15 @@ {ureglex_nfa_str, NULL, NULL, 1.000000}, {ureglex_nfa_str, NULL, NULL, 1.000000}, {ureglex_nfa_str, NULL, NULL, 1.000000}, + {ureglex_nfa_str, NULL, NULL, 1.000000}, + {ureglex_nfa_str, NULL, NULL, 1.000000}, + {ureglex_nfa_str, NULL, NULL, 1.000000}, + {ureglex_nfa_str, NULL, NULL, 1.000000}, + {ureglex_nfa_str, NULL, NULL, 1.000000}, + {ureglex_nfa_str, NULL, NULL, 1.000000}, {NULL, NULL, NULL, 0.0} }; -#define pcb_ordc_num_rules 10 +#define pcb_ordc_num_rules 16 typedef struct pcb_ordc_ureglex_s { ureglex_precomp_t *rules; char buff[256]; @@ -132,18 +138,42 @@ } return UREGLEX_NOP; case 6:{ + return T_EQ; + } + return UREGLEX_NOP; + case 7:{ + return T_NEQ; + } + return UREGLEX_NOP; + case 8:{ + return T_GE; + } + return UREGLEX_NOP; + case 9:{ + return T_LE; + } + return UREGLEX_NOP; + case 10:{ + return T_GT; + } + return UREGLEX_NOP; + case 11:{ + return T_LT; + } + return UREGLEX_NOP; + case 12:{ return T_IF; } return UREGLEX_NOP; - case 7:{ + case 13:{ return T_ERROR; } return UREGLEX_NOP; - case 8:{ + case 14:{ return T_INTVAL; } return UREGLEX_NOP; - case 9:{ + case 15:{ return T_FLOATVAL; } return UREGLEX_NOP; Index: trunk/src_plugins/order/const_lex.h =================================================================== --- trunk/src_plugins/order/const_lex.h (revision 36857) +++ trunk/src_plugins/order/const_lex.h (revision 36858) @@ -54,7 +54,7 @@ #endif /* exec.h END } */ -#define pcb_ordc_num_rules 10 +#define pcb_ordc_num_rules 16 typedef struct pcb_ordc_ureglex_s { ureglex_precomp_t *rules; char buff[256]; Index: trunk/src_plugins/order/const_lex.ul =================================================================== --- trunk/src_plugins/order/const_lex.ul (revision 36857) +++ trunk/src_plugins/order/const_lex.ul (revision 36858) @@ -60,7 +60,7 @@ return T_QSTR; rule chars -regex [()|&<>=!,*/+%-] +regex [(){}|$&,*/+%-] code return *ULX_BUF; @@ -69,6 +69,13 @@ code ULX_IGNORE; +rulestring == return T_EQ; +rulestring != return T_NEQ; +rulestring >= return T_GE; +rulestring <= return T_LE; +rulestring > return T_GT; +rulestring < return T_LT; + rulestring if return T_IF; rulestring error return T_ERROR; rulestring intval return T_INTVAL;