Home /Modules/compiler/README.md

README.md

lib/compiler/examples/Novice/README.md · 18 line(s) · markdown

<img align="right" src="https://github.com/mearvk/SLeeLa/blob/master/images/debian/debian-logo.png" width="75" height="75" alt="SLeeLa">

Novice — HelloCompiler

Goal: understand the smallest useful compiler pipeline.

Recognize a tiny source statement such as say "Hello, SLeeLa!". The grammar is statement := "say" string. Scan the keyword and quoted string, reject missing keywords or unterminated strings, and emit a normalized record only when parsing succeeds.

See HelloCompiler.sleela. It is a learning scaffold; verify its syntax against the current compiler version before compiling it.

Exercises

Done when: you can explain scanning, parsing, and emitting and show one passing and three failing cases.