compactp

a parser frontend for the compact language

FACTSv0.1.0-β1
COMPACT≥ 0.23
TESTED0.31.0
MSRV1.90
  1. 001LOSSLESS CONCRETE SYNTAX TREEROWAN
  2. 002TYPED ABSTRACT SYNTAX TREEZERO-ALLOC
  3. 003RESILIENT PARSING + RECOVERYERROR NODES
  4. 004RUSTC-STYLE HUMAN DIAGNOSTICSANSI
  5. 005STRUCTURED JSON ENVELOPESCHEMA v1
  6. 006LIBRARY API FOR RUST EMBEDDINGLIB
  7. 007WATCH MODEFSNOTIFY
$ cargo install compactp
$ compactp parse program.compact
$ compactp --format json --pretty diag program.compact
$ compactp watch parse src/

read full reference → GITHUB ↗

COMMANDDESCRIPTION
lexTokenize Compact source and print tokens with byte offsets
parseParse input and report diagnostics
cstDump the full lossless concrete syntax tree
astDump the typed abstract syntax tree
diagEmit diagnostics only
statsReport file size, token / node / error counts, parse time
watchRe-run any of the above when files change