summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-08-12 17:34:26 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-08-12 17:37:14 +0200
commit8622d8625c12d3cc7ac248df8be5612519a59565 (patch)
treec6a22a6876405bf7d88b63ae58428d196f9e63b9
parent3831c232a80ca178b547c4f5db9b5b5d3182640e (diff)
downloadfastd-8622d8625c12d3cc7ac248df8be5612519a59565.tar
fastd-8622d8625c12d3cc7ac248df8be5612519a59565.zip
lexer: enter NEEDSPACE context after an IP address
-rw-r--r--src/config.l3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/config.l b/src/config.l
index 53b52d6..295352f 100644
--- a/src/config.l
+++ b/src/config.l
@@ -122,6 +122,7 @@ auto { TOKEN(TOK_AUTO); }
return -1;
}
+ BEGIN(NEEDSPACE);
return TOK_ADDR4;
}
@@ -180,7 +181,7 @@ auto { TOKEN(TOK_AUTO); }
return -1;
}
}
-<ADDR6>\] { yylloc->last_column++; BEGIN(INITIAL); return TOK_ADDR6; }
+<ADDR6>\] { yylloc->last_column++; BEGIN(NEEDSPACE); return TOK_ADDR6; }
<INITIAL,NEEDSPACE>#.* { yylloc->last_column += yyleng; }
<INITIAL,NEEDSPACE>\/\/.* { yylloc->last_column += yyleng; }