Gcode.Parser (gcode v1.0.0)
A parser for G-code programs.
This parser converts G-code input (in UTF-8 encoding) into representations
with the contents of Gcode.Model
.
Link to this section Summary
Functions
Attempt to parse the G-code program at the given path.
Attempt to parse a G-code program from a string.
Parse and stream the G-code program at the given location.
Parse and stream the G-code program from a string.
Link to this section Functions
Link to this function
parse_file(path)
@spec parse_file(Path.t()) :: Gcode.Result.t( Gcode.Model.Program.t(), {:parse_error, String.t()} )
Attempt to parse the G-code program at the given path.
Link to this function
parse_string(input)
@spec parse_string(String.t()) :: Gcode.Result.t( Gcode.Model.Program.t(), {:parse_error, String.t()} )
Attempt to parse a G-code program from a string.
Link to this function
stream_file!(path)
@spec stream_file!(Path.t()) :: Enumerable.t() | no_return()
Parse and stream the G-code program at the given location.
Note that this function doesn't yield Program
objects, but blocks, comments,
etc.
Link to this function
stream_string!(input)
@spec stream_string!(String.t()) :: Enumerable.t() | no_return()
Parse and stream the G-code program from a string.
Note that this function doesn't yield Program
objects, but blocks, comments,
etc.