cameo/lang.l: require all commands followed by file name to end with whitespace

This avoids embarrassment after typos like  write-gerber foo.g
This commit is contained in:
Werner Almesberger 2015-03-15 21:13:26 -03:00
parent c7ff028cc9
commit 096b91e93a
1 changed files with 5 additions and 5 deletions

View File

@ -62,19 +62,19 @@ NUM -?[0-9]+\.?[0-9]*
<INITIAL>y return TOK_Y;
<INITIAL>z return TOK_Z;
<INITIAL>append { BEGIN(FILENAME);
<INITIAL>append/[ \t\n] { BEGIN(FILENAME);
return TOK_APPEND; }
<INITIAL>gerber { file_name_follows = 1;
return TOK_GERBER; }
<INITIAL>gnuplot { file_name_follows = 1;
return TOK_GNUPLOT; }
<INITIAL>excellon { BEGIN(FILENAME);
<INITIAL>excellon/[ \t\n] { BEGIN(FILENAME);
return TOK_EXCELLON; }
<INITIAL>stl { BEGIN(FILENAME);
<INITIAL>stl/[ \t\n] { BEGIN(FILENAME);
return TOK_STL; }
<INITIAL>write { BEGIN(FILENAME);
<INITIAL>write/[ \t\n] { BEGIN(FILENAME);
return TOK_WRITE; }
<INITIAL>write_gerber { BEGIN(FILENAME);
<INITIAL>write_gerber/[ \t\n] { BEGIN(FILENAME);
return TOK_WRITE_GERBER; }
<INITIAL>dog return TOK_DOG;