| Branch: | Revision:

iof-bird-daemon / conf / cf-lex.l @ c8cafc8e

History | View | Annotate | Download (16.3 KB)

# Date Author Comment
c8cafc8e 11/08/2016 04:46 PM Ondrej Zajicek (work)

Minor code cleanups

768d5e10 09/21/2016 11:35 AM Pavel Tvrdik

Add !~ operator to filter grammar

61e67253 08/16/2016 07:23 AM Ondřej Surý

Include <stdint.h> in cf-lex.l to avoid UINTx_MAX redefinition

8e433d6a 05/12/2016 01:49 PM Pavel Tvrdik

Prog Doc: Complete several missing parameters

9b9a7143 11/08/2015 11:42 PM Ondrej Zajicek (work)

Conf: Fixes bug in symbol lookup during reconfiguration

Symbol lookup by cf_find_symbol() not only did the lookup but also added
new void symbols allocated from cfg_mem linpool, which gets broken when
lookups are done outside of config parsing, which may lead to crashes...

bc7f4e0e 02/21/2015 11:42 AM Ondrej Zajicek

Bump max symbol length to 64.

And move the constant to conf.h header.

Thanks to Alexander Chernikov for the patch.

88a183c6 10/24/2014 09:11 AM Ondrej Zajicek

Integrated IP functions.

b2f00837 10/02/2014 10:52 AM Ondrej Zajicek

Allows more constants in set literals.

Thanks to Michael Fincham for the bugreport.

0c3d9dac 03/25/2014 01:58 PM Ondrej Zajicek

Fixes file descriptor leak when parser ends with error.

Thanks to MrBr for the bugreport.

1f64a487 08/15/2013 11:29 AM Ondrej Filip

Symbol names enclosed by apostrophes can contain colons.

1103b32e 07/25/2013 08:33 PM Ondrej Zajicek

Allows to define constants of all filter types.

8c4da7e0 02/10/2013 06:17 PM Ondrej Filip

Symbol names enclosed by apostrophes can contain DOTs.

4be266a9 07/18/2012 05:29 PM Ondrej Zajicek

Implements wildcard matching in config file include.

Also fixes some minor bugs in include.

Thanks Kelly Cochran for suggestion and draft patch.

af582c48 03/18/2012 04:32 PM Ondrej Zajicek

Route Origin Authorization basics.

- ROA tables, which are used as a basic part for RPKI.
- Commands for examining and modifying ROA tables.
- Filter operators based on ROA tables consistent with RFC 6483.
c32c3f88 12/22/2011 12:44 PM Ondrej Zajicek

Fixes parsing larger numbers on 64bit platforms.

60fd666b 11/10/2011 08:22 AM Ondrej Zajicek

Fixes missing header.

a7f23f58 11/06/2011 11:31 PM Ondrej Zajicek

Implements protocol templates.

Based on the patch from Alexander V. Chernikov.
Extended to support almost all protocols.
Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax.

9b7fdfc8 10/09/2011 11:41 PM Ondrej Zajicek

Fixes for include.

48ec367a 09/11/2011 07:21 PM Ondrej Filip

Configuration can include other files.

b8cc390e 05/06/2011 08:00 PM Ondrej Zajicek

Fixes several problems in filter syntax.

- Fixes several conflicts in the grammar.
- Fixes a bug in (a..b, c) pair patterns.
- Makes pair patterns orthogonal.
- Allows term expressions in pair patterns without additional ( ).
- Allows several comma separated values in switch cases.
26d92bb8 03/23/2011 11:49 AM Ondrej Zajicek

A hack to distinguish if..else from else: in case.

The old BIRD grammar needs two lookaheads to distinguish if..else from
else: in case, which caused the parser to fail on some combinations of
both expressions.

This patch replaces two tokens 'else' ':' by one token 'else:' to fix...

93e868c7 03/13/2011 10:33 AM Ondrej Zajicek

Implements Router Advertisement protocol.

506fa1a7 05/02/2010 08:41 PM Ondrej Zajicek

Merge several fixes suggested by Joakim Tjernlund.

e304fd4b 02/19/2010 11:08 PM Ondrej Zajicek

Implements pattern match for 'show protocols' command.

And generally consolidates protocol commands.

0efd6462 02/10/2010 11:30 AM Ondrej Filip

Define symbols as text between ''.

cf186034 03/14/2009 11:43 AM Ondrej Zajicek

New syntax for bgp_path

f9491630 01/27/2009 04:35 PM Ondrej Zajicek

New syntax for bgp_path

725270cb 06/08/2000 12:37 PM Martin Mares

Fixes for the programmer's manual.

58f7d004 06/07/2000 01:25 PM Martin Mares

Fixes to the progdoc.

2e9b2421 06/07/2000 12:29 PM Martin Mares

Spelling fixes to progdoc.

04dc62a0 06/04/2000 07:30 PM Martin Mares

Nested scopes could never have worked. My fault I wrote such a buggy code,
Pavel's fault that he's never tested shadowing of declarations in the filters.

cf_define_symbol() has been modified to check the scope of the symbol it's
given and it if it's an already defined symbol, but in a different scope,...

58f94537 06/04/2000 03:22 PM Martin Mares

Moved parser docs to cf-lex.l, so that the parser compiles.

06607335 06/03/2000 06:23 PM Martin Mares


c0b2f646 06/03/2000 04:56 PM Martin Mares

cf_symbol_class_name now recognizes SYM_IPA.

5f4aee76 06/01/2000 08:43 AM Pavel Machek

Added && and ||.

69a20d2e 05/30/2000 09:46 PM Martin Mares

Recognize `!'.

9a09a64b 05/25/2000 02:58 PM Pavel Machek

Use ? in path matching to avoid /* trap.

a412f01e 04/28/2000 03:12 PM Martin Mares

Include CF_HDR section in keywords.h as well, so that protocol symbols
can be used in definition of ENUM's.

221135d6 03/31/2000 11:30 PM Martin Mares

Include "lib/string.h" instead of <string.h>. It should give us bzero()
and other non-portable functions on all systems.

c8d5ffaf 03/10/2000 08:21 PM Pavel Machek

Fix <=, >=, !=

4b87e256 01/19/2000 12:30 PM Martin Mares

Split off general commands to cmds.c.

Added `show symbols' command which dumps whole symbol table together
with symbol types etc.

d272fe22 01/17/2000 11:52 AM Martin Mares

Separated `official protocol names' used in status dumps from name templates
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...

ca0edc53 01/16/2000 11:36 PM Martin Mares

When a quoted string is encountered, don't forget to copy it to the
config pool before passing it to the parser.

efe51e38 12/02/1999 12:04 PM Martin Mares

Avoid `default rule can be matched' warning in CLI state.

c9aae7f4 11/30/1999 02:03 PM Martin Mares

Lexer supports fallback symbol tables and uses them to recognize
symbols from global config when parsing CLI commands.

cf_lex_init_tables() is now called automatically inside the lexer.

944f008a 11/15/1999 11:35 AM Martin Mares

Defined CF_ENUM.

c8f61a01 11/04/1999 01:51 PM Martin Mares

Symbols are not scoped.

e5005be2 11/03/1999 10:21 PM Pavel Machek

You should not follow next two times.

bc2fb680 10/31/1999 05:47 PM Martin Mares

Parse CLI commands. We use the same parser as for configuration files (because
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....

dce26783 08/03/1999 07:36 PM Martin Mares

Basic support for IPv6. The system-dependent part doesn't work yet,
but the core routines are there and seem to be working.

o  lib/ipv6.[ch] written
o Lexical analyser recognizes IPv6 addresses and when in IPv6
mode, treats pure IPv4 addresses as router IDs....
4107df1d 05/17/1999 08:06 PM Martin Mares

Implemented two new symbol handling functions:

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.

38506f71 04/12/1999 07:58 PM Pavel Machek

Sets of integers now actually work. Sets of IP will work as soon as
compare function is ready.

23b1539b 04/07/1999 12:11 PM Pavel Machek

Filters upgraded - a bit. Moved code to filter.c because it is where
it belongs. (f-util.c stays there for auxiliary and non-important things.)

7f400d1c 03/29/1999 07:04 PM Martin Mares

After today's lengthy discussions about filter syntax, let's clean up
whitespace/semicolon rules for whole config file:

o  All non-zero amounts of whitespace are equivalent to single space
(aka `all the whitespace has been born equal' ;-)).
o Comments count as whitespace....
4ba84ebc 03/26/1999 09:37 PM Martin Mares

Slightly better generator of default protocol instance names.

72614174 02/13/1999 09:34 PM Martin Mares

'#' comments in config files are equivalent to end of line, therefore
also to implicit ';'.

31b3e1bb 02/05/1999 09:37 PM Martin Mares

Implemented new configuration/reconfiguration interface and defined protocol
state machines. Full explanation will follow soon.

489b6b5e 01/15/1999 04:13 PM Pavel Machek

#if 1 that creeped into cvs killed.

72380a34 01/15/1999 02:41 PM Pavel Machek

Filters added. They are unable to do anything interesting for now
(with exception of printing integers to screen), but they exist.

49e7e5ee 01/10/1999 12:18 AM Martin Mares

New makefiles. Includes support for out-of-source-tree builds.

cc12cf05 12/06/1998 11:10 PM Martin Mares

cf_error() now accepts any format strings instead of just an error
message. Also added extra kludge to get rid of collisions of REJECT

b35d72ac 12/06/1998 11:59 AM Martin Mares

Name cleanups as suggested by Pavel:

- 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.

49e4a4d1 11/29/1998 09:59 PM Martin Mares

Created new functions for allocating configuration data:

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...
0b62c3a7 11/27/1998 09:32 PM Martin Mares

Trivial 15-line bison excercise: Implemented expressions including
user-defined numeric symbols. Whenever possible, use `expr' instead
of `NUM' to get full express ion power :-)

8450be97 11/27/1998 09:07 PM Martin Mares

Added generator of default names.

82fc7be7 11/27/1998 07:35 PM Martin Mares

Lexical analyser.