1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-23 09:28:58 +02:00

cameo: fixed processing of omitted file names, documented file name usage

- README: document that file names can contain almost anything
- lang.l: reset the scanner state on \n, so that we stop looking for a
  file name if the file name has simply been omitted
This commit is contained in:
Werner Almesberger 2010-12-15 00:45:49 -03:00
parent 3ae3d6cdd3
commit 26dc02ea57
2 changed files with 15 additions and 1 deletions

View File

@ -48,6 +48,19 @@ File output:
Writes all loaded paths in gnuplot format to the specified file. If the Writes all loaded paths in gnuplot format to the specified file. If the
file name is omitted, "write" writes to standard output. 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: Units:

View File

@ -84,7 +84,8 @@ NUM -?[0-9]+\.?[0-9]*
return STRING; } return STRING; }
[ \t] ; [ \t] ;
\n lineno++; \n { BEGIN(INITIAL);
lineno++; }
^#\ [0-9]+\ \"[^"]*\"(\ [0-9]+)*\n { ^#\ [0-9]+\ \"[^"]*\"(\ [0-9]+)*\n {
lineno = strtol(yytext+2, NULL, 0); } lineno = strtol(yytext+2, NULL, 0); }