Re: [dev] [sbase][patch] new expr, take 2 (and makefile improvements)
On Thu, Nov 13, 2014 at 11:05 PM, Evan Gates <evan.gates_AT_gmail.com> wrote:
> After the troubles with yaac and the makefile last time around I wrote
> another expr, this time in C, using Dijkstra's shunting-yard
> algorithm[0]. The end result is still less than half the length of the
> existing recursive descent expr, and provides slightly better error
> messages than my last attempt. Included patch: sbase-new_expr2.diff
>
Cool, but a few notes. I sent patches for the previous yacc version
but some of these changes are not in this version namely:
- Don't crash on divide by zero (check for zero with divide and mod).
- Use regerror() when regcomp() fails for descriptive error messages
(and add the eregcomp() from my previous patch to util?)
- Use snprintf and add a size_t bufsiz argument to the valstr()
function. The current version is safe, but it's easy to mess these
things up.
Kind regards,
Hiltjo
Received on Fri Nov 14 2014 - 12:33:16 CET
This archive was generated by hypermail 2.3.0
: Fri Nov 14 2014 - 12:36:08 CET