diff --git a/cameo/README b/cameo/README index 1291851..281d763 100644 --- a/cameo/README +++ b/cameo/README @@ -48,6 +48,19 @@ File output: Writes all loaded paths in gnuplot format to the specified file. If the file name is omitted, "write" writes to standard output. +File names can contain spaces and any printable characters, but no leading +or trailing spaces. It is not possible to place a comment after a file +name or at a place where a file name could be. + +E.g., + + write foo.gp # wrong + +but + + write foo.gp + # right + Units: diff --git a/cameo/lang.l b/cameo/lang.l index 4672734..fedd1e8 100644 --- a/cameo/lang.l +++ b/cameo/lang.l @@ -84,7 +84,8 @@ NUM -?[0-9]+\.?[0-9]* return STRING; } [ \t] ; -\n lineno++; +\n { BEGIN(INITIAL); + lineno++; } ^#\ [0-9]+\ \"[^"]*\"(\ [0-9]+)*\n { lineno = strtol(yytext+2, NULL, 0); }