#stack #parser #maxima

stack_maxima_parser

Parser for the Modified Maxima syntax used in STACK

2 releases

new 0.1.1 Mar 10, 2025
0.1.0 Mar 7, 2025

#84 in Parser tooling

Download history 89/week @ 2025-03-02

89 downloads per month

MIT license

260KB
10K SLoC

stack_maxima_parser

This is a library for those of us that want to parse STACK-Maxima syntax, i.e. the logic parts of STACK-questions.

Currently this has no real error handling, but maybe the world changes.

Basically, this is a LALR(1) parser, built on exploratory work at the STACK side.

For who?

In particular, this will probably be of use to those building quick modification scripts working on their gitsync-clones of large question-banks. Probably combined with this another library related to question-XML processing.

Current state of development

Early days for this lib, expect new features as needs arise.

Changelog:

  • 0.1.0 the first release

Docs...

Check the tests, those should tell everything worth knowing. Or compile the rustdoc for a list of things.


lib.rs:

Parser for STACK-Maxima

For parsing STACK-logic.

Fully position tracking, all parse results will provide position data both in lines/columns as well as bytes in the source.

The lexer portion is tunable and can be adjusted to work with other decimal separators.

The parser itself has logic for inserting missing multiplication-signs or for those working with STACK keyvals, missing semicolons.

Dependencies

~1–1.5MB
~28K SLoC