Nested "()" comments not parsed correctly #1

Closed
bobc opened this Issue Dec 22, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@bobc
Collaborator

bobc commented Dec 22, 2011

A comment such as

( fill Diaphragm_Period_(layers): 100 )

is parsed incorrectly, leading to incorrect commands being executed.

@triffid

This comment has been minimized.

Show comment Hide comment
@triffid

triffid Dec 23, 2011

Collaborator

so see what your C compiler thinks of /* this is a /* nested comment */ which "shouldn't" break things but will */

fwiw lines like that should use a ;semicolon comment so the firmware can skip the whole thing

Collaborator

triffid commented Dec 23, 2011

so see what your C compiler thinks of /* this is a /* nested comment */ which "shouldn't" break things but will */

fwiw lines like that should use a ;semicolon comment so the firmware can skip the whole thing

@bobc

This comment has been minimized.

Show comment Hide comment
@bobc

bobc Dec 23, 2011

Collaborator

You are quite right : I can't think of any language that does allow nested comments like that.

According to "The NIST RS274NGC Interpreter - Version 3"

3.3.4 Comments and Messages
Printable characters and white space inside parentheses is a comment. A left parenthesis always
starts a comment. The comment ends at the first right parenthesis found thereafter. Once a left
parenthesis is placed on a line, a matching right parenthesis must appear before the end of the line.
Comments may not be nested; it is an error if a left parenthesis is found after the start of a
comment and before the end of the comment.

So clearly it is a bug in the software generating the GCode. The generator was BfB Axon 2.0 beta 2. The previous version I used did not have this problem. I will raise the issue on the BfB forum.

Therefore I will close with "Not a bug".

Collaborator

bobc commented Dec 23, 2011

You are quite right : I can't think of any language that does allow nested comments like that.

According to "The NIST RS274NGC Interpreter - Version 3"

3.3.4 Comments and Messages
Printable characters and white space inside parentheses is a comment. A left parenthesis always
starts a comment. The comment ends at the first right parenthesis found thereafter. Once a left
parenthesis is placed on a line, a matching right parenthesis must appear before the end of the line.
Comments may not be nested; it is an error if a left parenthesis is found after the start of a
comment and before the end of the comment.

So clearly it is a bug in the software generating the GCode. The generator was BfB Axon 2.0 beta 2. The previous version I used did not have this problem. I will raise the issue on the BfB forum.

Therefore I will close with "Not a bug".

@bobc bobc closed this Dec 23, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment