Reaction cascades
A -> B -> C parses into a single ReactionCascade. Each step’s
products are the next step’s reactants. Mixed arrow kinds work.
See Reactions.
v0.2 adds the features identified during v0.1 implementation. Each ships with spec coverage and is documented in a dedicated page.
Reaction cascades
A -> B -> C parses into a single ReactionCascade. Each step’s
products are the next step’s reactants. Mixed arrow kinds work.
See Reactions.
Linter framework
asciichem lint -i "..." runs a growing suite of chemistry
checks: bracket balance, isotope sanity, stoichiometric balance,
valence. Adding a check is one new file plus one autoload entry.
See Round-trip conformance.
Stereochemistry
(R)-, (S)-, (E)-, (Z)-, (α)-, (β)- prefixes attach to
molecules. AsciiMath-style typed words (alpha, beta) are
accepted. See Stereochemistry.
All bond kinds
Single, double, triple, quadruple, wedge, hash, dative, wavy — eight kinds, all reachable from the grammar and round-tripping exactly. See Bonds in detail.
Greek dictionary
AsciiMath-style word → Unicode translation. 24 lowercase + 24
uppercase. Stereo accepts alpha/beta; the dictionary is
available for any future site (conditions text, spectroscopy
notation).
Fuzzing corpus + benchmarks
15 hand-curated .asciichem files assert every grammar production
parses cleanly. Benchmark suites measure parse, round-trip, and
MathML throughput for regressions.
gem install asciichemasciichem convert -i "(R)-CH_3" -t mathmlasciichem convert -i "Re##Re" -t latexasciichem lint -i "H_2 + O_2 -> H_2O"asciichem lint -i "^5C"The lint output:
[error] Reaction is not balanced: O: 2 vs 1[error] Isotope mass 5 is less than atomic number 6 for CThe gem now has 216 RSpec examples, 0 failures. Coverage spans:
What’s still pending for v0.3+: