UniFormal / MMT

The MMT Language and System
https://uniformal.github.io/
Other
68 stars 23 forks source link

Customizing the KeywordBasedParser #181

Open florian-rabe opened 7 years ago

florian-rabe commented 7 years ago

The first line (alternatively: the file ending) of an .mmt file should allow adding configuration options. If present, they change the behavior of the parser in a fundamental way but only in the current file.

Example options:

Delimiters: changing the delimiters so that .mmt files can be written by people who don't want to or can't type the special delimiters

Unicode: adding the lexing rule UnicodeReplacer (which automatically turns, e.g., -> into a Unicode arrow) so that .mmt files can be written in editors that don't make it easy to type Unicode symbols.

florian-rabe commented 6 years ago

This could also subsume parsing files that are XML with interspersed MMT (e.g., to write HTML documents that contain MMT).