Skip to content

Files

Latest commit

65670ee · Apr 5, 2025

History

History

1-omc

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 4, 2024
Aug 24, 2024
Apr 5, 2025

README.md

Onramp Preprocessor -- Second Stage

This is the implementation of the second stage preprocessor. It preprocesses Onramp Minimal C (omC).

It is implemented in omC, except that it can be preprocessed with the first stage directive-stripping preprocessor (cpp/0-strip).

Implementation

The preprocessor doesn't have a tokenizer. It has a character scanner that normalizes line endings and consumes comments. It otherwise provides characters directly to the parser.

The parser reads characters and forms them into tokens as needed by the grammar. In retrospect this was probably a bad idea but it works.