
A .NET 9.0 class library and console application designed to parse complex chemical formulas (like CuSO4 or Fe2(SO4)3), balance chemical equations, and compute molecular mass. Leverages parser tokenizers and dictionary trees.
Correctly parsing nested brackets (e.g. Fe(NO3)3) and hydrates in chemical equations. Solved by implementing a stack-based token parser that recursively expands formula nodes and accumulates element atomic counts.