[][src]Crate gcode

A gcode parsing library designed for no_std environments.

Feature Flags

To help reduce compilation times and overall code size, this crate puts extra functionality behind several cargo features.

  • std: Enables various features/optimisations which require allocation or implementing traits from std (e.g. std::error::Error).
  • transforms: Exposes the transformations API for manipulating Gcodes before executing or writing to a file.
  • large-buffers (on-by-default): Increases the number of commands, comments and arguments which can be added to a block (see Block::MAX_COMMENT_COUNT, Block::MAX_COMMAND_COUNT, and Gcode::MAX_ARGUMENT_COUNT for more).

Structs

Argument

A command argument, the X50.0 in G01 X50.0.

Block

A block containing Gcode commands and/or comments.

Comment

A comment.

Gcode

A single gcode command.

Nop

A no-op set of callbacks.

Parser

An error-resistent streaming gcode parser.

Span

The location of something within a string.

Enums

Mnemonic

The general category a Gcode belongs to.

TokenKind

The various token types that make up a gcode program.

Traits

Callbacks

Callback functions the Parser can use to notify the user of errors encountered while parsing.

Functions

parse

Convenience function for parsing a string of text into Gcodes, ignoring any errors which may occur.