Age | Commit message (Collapse) | Author |
|
Added `show symbols' command which dumps whole symbol table together
with symbol types etc.
|
|
used for automatic generation of instance names.
protocol->name is the official name
protocol->template is the name template (usually "name%d"),
should be all lowercase.
Updated all protocols to define the templates, checked that their configuration
grammar includes proto_name which generates the name and interns it in the
symbol table.
|
|
as a exception in protocol state machines. Introduced a `shutdown'
CLI command. Killed few reconfiguration bugs.
|
|
and problems to solve, but the hardest part works.
|
|
Added sysdep configuration hooks.
|
|
symbols from global config when parsing CLI commands.
cf_lex_init_tables() is now called automatically inside the lexer.
|
|
|
|
|
|
|
|
we want to allow filter and similar complex constructs to be used in commands
and we should avoid code duplication), only with CLI_MARKER token prepended
before the whole input.
Defined macro CF_CLI(cmd, args, help) for defining CLI commands in .Y files.
The first argument specifies the command itself, the remaining two arguments
are copied to the help file (er, will be copied after the help file starts
to exist). This macro automatically creates a skeleton rule for the command,
you only need to append arguments as in:
CF_CLI(STEAL MONEY, <$>, [[Steal <$> US dollars or equivalent in any other currency]]): NUM {
cli_msg(0, "%d$ stolen", $3);
} ;
Also don't forget to reset lexer state between inputs.
|
|
currently very ugly, beware. Variables are not really local - that
needs to be fixed.
|
|
o cf_define_symbol() -- it assigns a meaning to a symbol, bailing
out if it already has one.
o cf_find_symbol() -- finds symbol by name and creates it if not found.
Also modified filter/config.Y to make use of the first function.
|
|
|
|
|
|
|
|
state machines. Full explanation will follow soon.
|
|
(with exception of printing integers to screen), but they exist.
|
|
message. Also added extra kludge to get rid of collisions of REJECT
symbols.
|
|
- cfg_strcpy() -> cfg_strdup()
- mempool -> linpool, mp_* -> lp_* [to avoid confusion with memblock, mb_*]
Anyway, it might be better to stop ranting about names and do some *real* work.
|
|
o cfg_alloc(size) -- generic memory allocation
o cfg_allocu(size) -- unaligned memory allocation
o cfg_allocz(size) -- zeroed memory allocation
o cfg_strcpy(str) -- allocate a copy of a string
Also fixed a bug in lexing of string literals.
|
|
user-defined numeric symbols. Whenever possible, use `expr' instead
of `NUM' to get full express ion power :-)
|
|
|
|
|