-
Notifications
You must be signed in to change notification settings - Fork 0
tooling
mvx-basic prog.b -o prog # compile and link an executable
mvx-basic -c prog.b -o prog.o # compile only
mvx-basic -shared sub.b -o libsub # subroutine shared library
mvx-basic main.b sub1.b sub2.b -o prog # multi-source build
mvx-basic -O0|-O1|-O2 ... # optimisation (default -O2)
mvx-basic -g0 prog.b -o prog # no debug information
mvx-basic -s prog.b -o prog # no symbols in the linked output
mvx-basic --emit-llvm ... # also write textual IR
mvx-basic -D NAME[=value] ... define a preprocessor symbolErrors: item:line: message on stderr. DWARF debug info is emitted by
default — lldb prog, b prog.b:12, run steps BASIC source, even
optimised.
Shipping a program. -g0 compiles without debug information and -s
links without symbols; together they are the production build, and neither
changes what the program does. -s keeps the dynamic symbols, so a
stripped program still resolves CALL into a stripped subroutine library.
The same two are available from the BASIC and CATALOG verbs as the
keywords NODEBUG and STRIP:
> CATALOG BP INVOICE.RPT NODEBUG STRIP
[244] INVOICE.RPT cataloged
ninja -C build check # or scripts/test.sh (-q skips the sieve)
scripts/test.sh --bless # re-capture expected outputsLanguage tests diff compiled programs against tests/expected/;
system tests run scripted TCL sessions in a throwaway account
(queries, ED, packages, the gate, indexes, the daemon with its lock
lease); the sieve benchmark asserts correctness.
editors/vscode/mvx-basic — symlink it into ~/.vscode/extensions:
syntax highlighting (docblock @tags included), comment toggling,
auto-indent, snippets, and the $mvx problem matcher. The repo's
.vscode/tasks.json binds Cmd+Shift+B to compile the current file
with clickable errors. Files ending .b, or inside BP/, *.BP/,
or *_BP/ directories, open as MVX BASIC.
This documentation is the project's GitHub wiki:
one Markdown page per chapter, with _Sidebar.md driving the navigation.
Edit pages on GitHub, or clone the wiki and push:
git clone https://github.com/mvx-lang/mvx.wiki.gitThe main repo checks the wiki out under docs/ as a submodule (git submodule update --init), and a release tarball bundles a snapshot under
share/doc/mvx. The same Markdown can feed pandoc for a typeset PDF, or
mdBook for a static HTML site, when one is wanted.