Preprocessor bug filtering out comments
Posted: Wed Dec 27, 2006 1:27 pm
There is a bug in the preprocessor with repspect to filtering out comments.
The following:
startshape MAKER
blah blah blah
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r 4}}
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r -4}}
...generates an error, as expected, on line 2.
The following:
startshape MAKER
// blah blah blah
# blah blah blah
/* blah blah blah */
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r 4}}
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r -4}}
...works as expected (all 3 "blah" lines are ignored)./
BUT, the following errors exit
ERROR #1:
The follwing will generate a syntax error if there is no line feed on the end of the last line:
startshape MAKER
// blah blah blah
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r 4}}
// rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r -4}}
ERROR #2:
The second rule will be active (i.e. not be ignored) if there is no line feed on the end of the last line:
startshape MAKER
// blah blah blah
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r 4}}
# rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r -4}}
I imagine both errors are related.
The following:
startshape MAKER
blah blah blah
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r 4}}
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r -4}}
...generates an error, as expected, on line 2.
The following:
startshape MAKER
// blah blah blah
# blah blah blah
/* blah blah blah */
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r 4}}
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r -4}}
...works as expected (all 3 "blah" lines are ignored)./
BUT, the following errors exit
ERROR #1:
The follwing will generate a syntax error if there is no line feed on the end of the last line:
startshape MAKER
// blah blah blah
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r 4}}
// rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r -4}}
ERROR #2:
The second rule will be active (i.e. not be ignored) if there is no line feed on the end of the last line:
startshape MAKER
// blah blah blah
rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r 4}}
# rule MAKER { TRIANGLE{} MAKER {s 0.9 y 1 r -4}}
I imagine both errors are related.