Skip to content

PlexusCXX is a fast and robust lexical analyzer (lexer) for the Pascal programming language, implemented entirely in C++

License

Notifications You must be signed in to change notification settings

poliukhovych/PlexusCXX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlexusCXX

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.

Features

  • 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

Requirements

  • 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)

Building

git clone https://github.com/poliukhovych/PlexusCXX.git
cd PlexusCXX
mkdir build && cd build
cmake ..
make

About

PlexusCXX is a fast and robust lexical analyzer (lexer) for the Pascal programming language, implemented entirely in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published