Understand Ohm's separation of grammars and semantic actions
mainOhm distinguishes itself by completely separating grammars from semantic actions.
- Grammars: Define the language structure (the syntax).
- Semantic Actions: Specify what to do with valid inputs (the meaning).
This separation allows you to use the same pure grammar for multiple purposes—such as parsing, syntax highlighting, and compiling—by applying different semantic actions independently. This improves readability, modularity, and portability across different language implementations (e.g., Ohm/JS vs Ohm/Scheme).