Commit 72614174 authored by Martin Mares's avatar Martin Mares
Browse files

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

also to implicit ';'.
parent 5996da6a
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -20,8 +20,6 @@ Core
- default preferences of protocols: prefer BGP over OSPF/RIP external routes?
- secondary addresses -> subinterfaces

- config: comments at end of line -> explicit ';' needed?

- static: check validity of route destination?
- static: device routes

+5 −10
Original line number Diff line number Diff line
@@ -120,24 +120,19 @@ WHITE [ \t]

{WHITE}+

\\\n {
  conf_lino++;
}
\\\n	conf_lino++;
\n	{ conf_lino++; return ';'; }

\n {
  conf_lino++;
  return ';';
}

#	{ BEGIN(COMMENT); }
#	BEGIN(COMMENT);

\/\*	{ BEGIN(CCOMM); }
\/\*	BEGIN(CCOMM);

.	cf_error("Unknown character");

<COMMENT>\n {
  conf_lino++;
  BEGIN(INITIAL);
  return ';';
}

<COMMENT>.