| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Gavin Howard <gavin@yzena.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes it to use a command-line option. This is best because if a
user encounters a problem; they *know* they are using my bc and can add
the command-line option.
This is also better because it allows the keyword to be used as variable
and array names as well as function names, without editing the script.
This has the double advantage that I can undo the change to the parser,
though I need to keep the one line change to the lexer.
The option is `-r` and `--redefine`, and they take an argument, which is
the keyword to redefine.
All docs and tests have been updated.
Signed-off-by: Gavin Howard <gavin@yzena.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was an idea from Stefan Esser of FreeBSD. At first, I did not like
it because it seemed like it would require a deep change to the parser,
to check everywhere a name could be used.
Fortunately, I came up with the idea of using an array of booleans in
BcVm to allow the parser to mark when a keyword has been redefined,
which can only happen in one place: defining functions. This made the
change to the parser simple at the expense of another simple change to
the bc lexer (literally only one line).
Because of the use of this feature in allowing users to make my bc parse
GNU bc-compatible scripts, as well as interoperate with scripts from
other bc's, I am putting this change in.
Signed-off-by: Gavin Howard <gavin@yzena.com>
|
|
|
|
|
|
| |
Yay! I finished commenting the code!
Signed-off-by: Gavin Howard <gavin@yzena.com>
|
|
|
|
| |
Signed-off-by: Gavin Howard <gavin@yzena.com>
|
|
|
|
|
|
|
|
|
| |
This bug fix also made things much simpler. What it does is allow the
lexers to ask for more data from stdin when needed, like when a string
or comment is not ended properly. The dc bug was that it just didn't
work well with register commands.
Signed-off-by: Gavin Howard <gavin@yzena.com>
|
|
|
|
| |
Signed-off-by: Gavin Howard <gavin@yzena.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
I am going to make a special header just for the library.
|
|
|