VSCode language support for Omron Adept eV+ / V+ robot programs (.pg, .v2):
syntax highlighting, hover reference, completion, snippets, diagnostics, and an
outline of the programs in each file.
From the marketplace (once published): search "eV+ Robot Language".
From source:
npm install
npm run package
./install.sh
install.sh symlinks the extension into ~/.vscode-server/extensions/ (WSL)
and copies it into Windows-side .vscode/extensions/ dirs, then reload VSCode.
- Grammar: control flow, program instructions, real/string/transformation
functions, system switches/parameters, word operators, radix numbers
(
^HFF,^B1010,^17), strings,#precision.points,$string.vars, statement labels,.PROGRAM/.ENDblocks with folding. Keywords match case-insensitively; dotted user variables (req.mb) never false-match keyword tails. - Hover: the manual's syntax line for the keyword under the cursor (all entries when a name is both instruction and function, e.g. SPEED).
- Completion: 260+ keywords with type and syntax, after any typed prefix.
- Snippets:
.PROGRAM, IF, IFELSE, WHILE, DO/UNTIL, FOR, CASE. - Auto-indent: indents after
.PROGRAM/THEN/DO/ELSE/OF/VALUE:/ANY, dedents on END/ELSE/UNTIL/ANY/.END. - Diagnostics: warns when code after a
;looks like a statement (in eV+ everything after;is a comment, soa = 1 ; b = 2only assignsa), when GOTO targets a label that doesn't exist in the program, and on unpaired.PROGRAM/.END. - Outline: every
.PROGRAMin the file appears in the Outline panel and breadcrumbs (jump with Ctrl+Shift+O).
data/keywords.json and the grammar's keyword alternations are generated by
tools/generate_data.py from an extraction of the eV+ Language Reference
Guide (one markdown file per keyword entry, produced with pdftotext -layout
from the manual PDF):
python3 tools/generate_data.py <path-to-docs> # or set EVPLUS_DOCS
The committed data carries each keyword's name, type, and syntax line. If you
own the manual, regenerate with --summaries for richer hover text from the
manual's Function descriptions (keep that copy local — don't commit it).
Grammar patterns marked "comment": "GEN:<class>" get their match rewritten;
the rest of the grammar is hand-maintained.
npm test # tokenization snapshots + scope assertions + unit tests
npm run test:update # refresh snapshots after intentional grammar changes
Visual check: node tools/preview.mjs tests/fixtures/all-constructs.pg out.html
renders a file with the real grammar, then
node tools/screenshot.mjs out.html out.png.
Icon and banner artwork lives in assets/ (SVG masters) and images/
(rasters); see assets/BRAND.md for palette and usage rules.
