A Pascal lexer implemented in C++11, using finite‐state machines (FSM) for token recognition and doctest for unit testing. PlexusCXX reads a .pas source file, breaks it into tokens (keywords, identifiers, numbers, literals, operators, comments, etc.), reports any lexing errors, and can output results in plain text, JSON or CSV.
- FSM‐based recognition of identifiers, numbers (with optional fractional and exponent parts), single‐quoted literals (strings & chars),
{...}comments - Error reporting for unterminated literals, invalid tokens, etc.
- Token table: collect and display unique lexemes by type
- CLI with options:
-f, --format [plain|json|csv]— choose output format (default:plain)--no-colors— disable ANSI colors in plain output-h, --help— show usage
- A C++11-capable compiler (e.g. GCC ≥ 4.8, Clang ≥ 3.3, MSVC 2015+)
- CMake ≥ 3.1
- Internet access for
FetchContent(to pull in doctest v2.4.12)
git clone https://github.com/poliukhovych/PlexusCXX.git
cd PlexusCXX
mkdir build && cd build
cmake ..
make