Create a programming language of your choice that will accomplish some computational task. Utilizing the C packages Flex and Bison, define a grammar for your language in the Backus-Naur form. Clearly define the tokens of your language and their types, as well as any rules your language will follow.
Implementation
For my programming language, I chose to create a preprocessor for Python called Hatch.
Hatch simplifies the syntax needed to define classes in Python.
Before being interpreted as Python code the .Hatch file is converted to a .py file, and in the process Hatch statements are replaced with valid Python code. In order to accomplish this task, regular expressions
are used to parse the language and are defined in the .l (Lex) file. A grammar tree for the language also needs to be defined in the .y (Yacc) file.