'#' comments in config files are equivalent to end of line, therefore

also to implicit ';'.
This commit is contained in:
Martin Mares 1999-02-13 21:34:33 +00:00
parent 5996da6a1d
commit 726141746b
2 changed files with 5 additions and 12 deletions

2
TODO
View file

@ -20,8 +20,6 @@ Core
- default preferences of protocols: prefer BGP over OSPF/RIP external routes? - default preferences of protocols: prefer BGP over OSPF/RIP external routes?
- secondary addresses -> subinterfaces - secondary addresses -> subinterfaces
- config: comments at end of line -> explicit ';' needed?
- static: check validity of route destination? - static: check validity of route destination?
- static: device routes - static: device routes

View file

@ -120,24 +120,19 @@ WHITE [ \t]
{WHITE}+ {WHITE}+
\\\n { \\\n conf_lino++;
conf_lino++; \n { conf_lino++; return ';'; }
}
\n { # BEGIN(COMMENT);
conf_lino++;
return ';';
}
# { BEGIN(COMMENT); } \/\* BEGIN(CCOMM);
\/\* { BEGIN(CCOMM); }
. cf_error("Unknown character"); . cf_error("Unknown character");
<COMMENT>\n { <COMMENT>\n {
conf_lino++; conf_lino++;
BEGIN(INITIAL); BEGIN(INITIAL);
return ';';
} }
<COMMENT>. <COMMENT>.