Skip to main content

Module parser

Module parser 

Source
Expand description

Position-based stack parser for .mps files.

Mirrors Ruby’s Engines::Parser.parse_mps_file_to_elements_hash exactly. Returns an IndexMap keyed by dotted ref-path ("20260501.1.2").

Functions§

parse_file
Parses a .mps file into a flat ordered map keyed by dotted ref-path (e.g. “1746000000.1.2”).
parse_str
Parse a raw .mps content string (without a surrounding @mps{} wrapper). Uses base_ref 0 so ref-paths are 0.1, 0.2, etc. Intended for unit tests.
parse_wrapped
Parse a pre-wrapped string. Exported for tests that supply in-memory content.