diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-11-23 11:50:34 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-11-23 11:50:34 +0100 |
commit | 736e143fa50607fcd88132291e96089b899af979 (patch) | |
tree | c0fcd5fb3174bae8a39b3a32dfe582b2ccb6df17 /conf/cf-lex.l | |
parent | 094d2bdb79e1ffa0a02761fd651aa0f0b6b0c585 (diff) | |
parent | 2b3d52aa421ae1c31e30107beefd82fddbb42854 (diff) |
Merge branch 'master' into add-path
Conflicts:
filter/filter.c
nest/proto.c
nest/rt-table.c
proto/bgp/bgp.h
proto/bgp/config.Y
Diffstat (limited to 'conf/cf-lex.l')
-rw-r--r-- | conf/cf-lex.l | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l index c8eae0e8..b1bbeae2 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -15,10 +15,10 @@ * symbols and keywords. * * Each symbol is represented by a &symbol structure containing name - * of the symbol, its lexical scope, symbol class (%SYM_PROTO for a name of a protocol, - * %SYM_NUMBER for a numeric constant etc.) and class dependent data. - * When an unknown symbol is encountered, it's automatically added to the - * symbol table with class %SYM_VOID. + * of the symbol, its lexical scope, symbol class (%SYM_PROTO for a + * name of a protocol, %SYM_CONSTANT for a constant etc.) and class + * dependent data. When an unknown symbol is encountered, it's + * automatically added to the symbol table with class %SYM_VOID. * * The keyword tables are generated from the grammar templates * using the |gen_keywords.m4| script. @@ -172,7 +172,7 @@ else: { return ELSECOL; } -({ALPHA}{ALNUM}*|[']({ALNUM}|[-])*[']) { +({ALPHA}{ALNUM}*|[']({ALNUM}|[-]|[\.]|[:])*[']) { if(*yytext == '\'') { yytext[yyleng-1] = 0; yytext++; @@ -623,24 +623,23 @@ cf_walk_symbols(struct config *cf, struct symbol *sym, int *pos) char * cf_symbol_class_name(struct symbol *sym) { + if ((sym->class & 0xff00) == SYM_CONSTANT) + return "constant"; + switch (sym->class) { case SYM_VOID: return "undefined"; case SYM_PROTO: return "protocol"; - case SYM_NUMBER: - return "numeric constant"; + case SYM_TEMPLATE: + return "protocol template"; case SYM_FUNCTION: return "function"; case SYM_FILTER: return "filter"; case SYM_TABLE: return "routing table"; - case SYM_IPA: - return "network address"; - case SYM_TEMPLATE: - return "protocol template"; case SYM_ROA: return "ROA table"; default: |