Machine controller is fanuc.
There is a ";" comment in the program code.
There is currently an error in Simulation.
I want set ";" code block ignore.
the parser can be enhanced to handle that comments, but in Fanuc the comments are:
in Sinumerik comments are
So I wonder what is the real controller type, maybe a special Fanuc flavour?
I'm not sure if this is exactly Kimies case, but maybe also others may use this:
In case of some exotic controllers which are similar to Fanuc, but for some reason use ";" for a comment (been there, done that...), we can also handle it with CSEPreprocessLine method.
It can be also very simply enhanced to handle also comments which might start in the middle of NC block using findSubstr() and trim()
Development: C#, Tcl/Tk, CSE
kimies_saidas method is good enough.
But just to inform you, in newer cse simulations, you can use a python parser.
To make sure it is enabled go to machine configurator and make sure implementation is Python
Then in the CseFanuc_Lex.py, you can add :
t.type = "COMMENT"
The advantage of this way is that you can say for example
G0 G91 G28 X0 Y0 Z0 ;goto machine zero
The goto machine zero in this case will be ignored, while the movement will still be executed.