#ident "@(#)strdata.c 1.6 93/06/08 SMI" /* From AT&T Toolchest */ /* * data for string evaluator library */ #include "streval.h" const struct Optable optable[] = /* opcode precedence,assignment opname */ { {DEFAULT, MAXPREC|NOASSIGN, 0177, 0 }, {DONE, 0|NOASSIGN, 0 , 0 }, {NEQ, 9|NOASSIGN, '!', '=' }, {NOT, MAXPREC|NOASSIGN, '!', 0 }, {MOD, 13|NOFLOAT, '%', 0 }, {ANDAND, 5|NOASSIGN|SEQPOINT, '&', '&' }, {AND, 8|NOFLOAT, '&', 0 }, {LPAREN, MAXPREC|NOASSIGN|SEQPOINT,'(', 0 }, {RPAREN, 1|NOASSIGN, ')', 0 }, {TIMES, 13, '*', 0 }, #ifdef future {PLUSPLUS, 14|NOASSIGN|NOFLOAT|SEQPOINT, '+', '+'}, #endif {PLUS, 12, '+', 0 }, #ifdef future {MINUSMINUS, 14|NOASSIGN|NOFLOAT|SEQPOINT, '-', '-'}, #endif {MINUS, 12, '-', 0 }, {DIVIDE, 13, '/', 0 }, #ifdef future {COLON, 2|NOASSIGN, ':', 0 }, #endif {LSHIFT, 11|NOFLOAT, '<', '<' }, {LE, 10|NOASSIGN, '<', '=' }, {LT, 10|NOASSIGN, '<', 0 }, {EQ, 9|NOASSIGN, '=', '=' }, {ASSIGNMENT, 2|RASSOC, '=', 0 }, {RSHIFT, 11|NOFLOAT, '>', '>' }, {GE, 10|NOASSIGN, '>', '=' }, {GT, 10|NOASSIGN, '>', 0 }, #ifdef future {QCOLON, 3|NOASSIGN|SEQPOINT, '?', ':' }, {QUEST, 3|NOASSIGN|SEQPOINT|RASSOC, '?', 0 }, #endif {XOR, 7|NOFLOAT, '^', 0 }, {OROR, 5|NOASSIGN|SEQPOINT, '|', '|' }, {OR, 6|NOFLOAT, '|', 0 } }; #ifndef KSHELL const char e_number[] = "bad number"; #endif /* KSHELL */ const char e_moretokens[] = "more tokens expected"; const char e_paren[] = "unbalanced parenthesis"; const char e_badcolon[] = "invalid use of :"; const char e_divzero[] = "divide by zero"; const char e_synbad[] = "syntax error"; const char e_notlvalue[] = "assignment requires lvalue"; const char e_recursive[] = "recursion too deep"; #ifdef future const char e_questcolon[] = ": expected for ? operator"; #endif #ifdef FLOAT const char e_incompatible[]= "operands have incompatible types"; #endif /* FLOAT */ const char e_hdigits[] = "00112233445566778899aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ";