@choconao/tree-sitter-gcode
v0.1.1
Published
G-code grammar for tree-sitter
Maintainers
Readme
tree-sitter-gcode
G-code grammar for tree-sitter.
Features
- [x] General codes (like G, axes, parameters etc.)
- [x] Wide range of file extensions supported (see file-types)
- [x] Both inline and end-of-line comments (some G-code flavors support both)
- [x] Indexed axes words (as specified in ISO 6983-1)
- [x] Checksums
- [x] G-code expressions (specified in RS274NGC)
- [x] Named parameters (check named paramters for LinuxCNC)
- [x] M98 and M99 G-Code subprograms with parameter variables (check cnccookbook)
- [x] G-code subroutines with conditionals and loops support (extended O-codes in LinuxCNC)
- [x] Fanuc-style subprograms, conditionals and loops
Status
This parser was written using a list of references described in the References section. It should work with most cases. Due to wide range of G-code implementations, some unique features may not be supported in this grammar. However, I was trying my best to match common specifications as precise as possible.
Feel free to open an issue with a feature request or do a pull request to extend this grammar to support more features.
