Parse a UPF (IEEE 1801) power-intent file with an ANTLR4 grammar and write it back, optionally flattened with every sourced file inlined in execution order -- a front end and Java API for UPF tools.
Parses a UPF (IEEE 1801 power intent) file with an ANTLR4 grammar (UPF.g4) and writes it back out (default output.upf). Following source/load_upf is on by default, and -flatout also writes every command of every file the deck reads, in execution order (a followed source is written commented out, its commands inline after it, so the flattened file does not read the file twice; load_upf stays live). This is the grammar-layer front end: it does not execute Tcl or build the upf-shell data model (compareupf and upf-shell do that).
Usage
parseupf -in <file.upf> [-out <file>] [-flatout <file>] [-nofollowsource] [-user <email>]
Every option is listed by parseupf -help, and the complete reference is in the capability file that ships with the tool's AGENTS.md.
Exit status
- 0 on a normal finish, including runs that reported errors (syntax errors, missing input file, usage errors). 10 = no valid license file. 11 = protected Tcl layer of the enclosing bundle failed its check. 1 =
EDAUTILS_ROOTmissing/invalid (launcher). - Message format:
ParseUPF: <Severity>: <id>: <text>(the prefix isParseUPF, notparseupf);<id>is a 5-digit message number. Usage lines have no severity or id. - Key messages:
File '<f>' not found ...(Error), the ANTLR syntax error text (Error),Parsed N file(s), M command(s) ...,Written decompiled UPF in file : <out>,Written flattened UPF in file : <flatout>.
Requirements
Java 11 or newer on PATH (Java 21 recommended), Linux or Windows. Unpack the bundle, run source setup_env.sh and call parseupf. Install in one command with curl -fsSL https://edautils.com/install.sh | sh -s -- parseupf.