Mercurial > hg > index.cgi
comparison lwlib/lw_expr.c @ 331:623b62ab774b
Allow ; as a delimiter for 6309 logic operations.
Allow ; to terminate expression evaluation. This is required to allow
the logic/memory operations on the 6309 to work using the ; as a delimiter.
The semicolon makes it clearer that it is two different operands.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 13 Apr 2014 20:25:04 -0600 |
parents | 346966cffeef |
children | 3b5a45c6ab92 |
comparison
equal
deleted
inserted
replaced
330:4f507fae9e71 | 331:623b62ab774b |
---|---|
1224 }; | 1224 }; |
1225 | 1225 |
1226 int opern, i; | 1226 int opern, i; |
1227 lw_expr_t term1, term2, term3; | 1227 lw_expr_t term1, term2, term3; |
1228 | 1228 |
1229 if (!**p || isspace(**p) || **p == ')' || **p == ',' || **p == ']') | 1229 if (!**p || isspace(**p) || **p == ')' || **p == ',' || **p == ']' || **p == ';') |
1230 return NULL; | 1230 return NULL; |
1231 | 1231 |
1232 term1 = lw_expr_parse_term(p, priv); | 1232 term1 = lw_expr_parse_term(p, priv); |
1233 if (!term1) | 1233 if (!term1) |
1234 return NULL; | 1234 return NULL; |
1235 | 1235 |
1236 eval_next: | 1236 eval_next: |
1237 if (!**p || isspace(**p) || **p == ')' || **p == ',' || **p == ']') | 1237 if (!**p || isspace(**p) || **p == ')' || **p == ',' || **p == ']' || **p == ';') |
1238 return term1; | 1238 return term1; |
1239 | 1239 |
1240 // expecting an operator here | 1240 // expecting an operator here |
1241 for (opern = 0; operators[opern].opernum != lw_expr_oper_none; opern++) | 1241 for (opern = 0; operators[opern].opernum != lw_expr_oper_none; opern++) |
1242 { | 1242 { |