From 655f3b2663b9909656b896cf47ad949b4e9644a8 Mon Sep 17 00:00:00 2001 From: biouman Date: Tue, 1 May 2001 11:27:52 +0000 Subject: *** empty log message *** --- lib/parser.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/parser.c') diff --git a/lib/parser.c b/lib/parser.c index 60e3dca..6d608b4 100644 --- a/lib/parser.c +++ b/lib/parser.c @@ -96,7 +96,7 @@ static void push_op(op_t op) if (pileop_pos != PILEOP_MAX) pile_operators[pileop_pos++] = op; else - exception(-1, _("Too many nested operators in expression.\n")); + exception(2, _("Too many nested operators in expression.\n")); } @@ -127,7 +127,7 @@ static void push_call(int call) if (pilecall_pos != PILECALL_MAX) pile_nestedcall[pilecall_pos++] = call; else - exception(-1, _("Too many nested functions calls in expression.\n")); + exception(2, _("Too many nested functions calls in expression.\n")); } /* Cette fonction lit un "mot" sur la chaine line et renvoit le nouveau pointeur */ @@ -204,9 +204,9 @@ void parse_line(char *line) } if (get_pri(buffer[0]) == -1) { if (got_unary) { - exception(-1, _("Invalid unary operator")); + exception(1, _("Invalid unary operator")); } else { - exception(-1, _("Invalid binary operator")); + exception(1, _("Invalid binary operator")); } } while (get_pri(get_last_op()) >= get_pri(buffer[0]) @@ -232,7 +232,7 @@ void parse_line(char *line) while (pileop_pos) { op = pop_op(); if (op == '(') - exception(-1, _("Parse error: too much left parenthesis")); + exception(1, _("Parse error: too much left parenthesis")); act_pile(get_func(op)); } popcontext(); @@ -242,12 +242,12 @@ void parse_line(char *line) /* Fin de parenthese (Appel de fonction ou expression mathématique) */ while (1) { if (!pileop_pos) - exception(-1, _("Parse error: too much right parenthesis")); + exception(1, _("Parse error: too much right parenthesis")); op = pop_op(); if (((op & 127) == '(')) break; if (((op & 127) == '[')) - exception(-1, _("Parse error: enclosure mismatch")); + exception(1, _("Parse error: enclosure mismatch")); act_pile(get_func(op)); } if (op == '(') { @@ -261,12 +261,12 @@ void parse_line(char *line) /* Fin d'opérateur de décalage */ while (1) { if (!pileop_pos) - exception(-1, _("Parse error: too much right parenthesis")); + exception(1, _("Parse error: too much right parenthesis")); op = pop_op(); if (((op & 127) == '[')) break; if (((op & 127) == '(')) - exception(-1, _("Parse error: enclosure mismatch")); + exception(1, _("Parse error: enclosure mismatch")); act_pile(get_func(op)); } act_pile(get_func(op)); @@ -285,7 +285,7 @@ void parse_line(char *line) if (!get_last_call()) increment_call(); } else if (buffer[0]) { - exception(-1, _("Invalid character")); + exception(1, _("Invalid character")); } popcontext(); } -- cgit v1.2.3