chemiTS
chemiTS provides a robust lexer and parser for chemical formulas, supporting elements, numbers (including Unicode subscripts), nested groups (parentheses, brackets, braces), and hydrates. It can generate both flat element compositions and structured Abstract Syntax Trees (AST).