Ongoing Javascript rewrite of TML from C++.
tml.js is used in TML playground (source).
Can find us on ##idni @freenode
Run make or make all to build all .
Run make build to build library.
Command line usage: node cli < program.tml
Or use it as a library by requiring lib's index:
const tmljs_path = './lib/tml.js';
const { driver } = require(tmljs_path);
const program = 'agent id007 James Bond. greetings ?surname ?firstname ?surname :- agent id007 ?firstname ?surname.';
const d = new driver(program);
if (!d.pfp()) console.log('unsat');
else console.log(d.toString());
/*
Produces output:
agent id007 James Bond.
greetings Bond James Bond.
*/Choose one of these to build browser lib:
make tml.min.js- minifiedmake tml.js- not minifiedmake tml.wmap.js- not minified with source map
Usage:
<script src="tml.js"></script>
<script type="text/javascript">
	const { driver } = require('tml');
	// ...
</script>Run make debug to build version for debugging.
Specify debug workers by using DEBUG env: DEBUG=tml:parser,tml:dict node cli.debug < program.tml
Library's debug entrypoint is in ./debug.js:
const tmljs_path = './lib/tml.js/debug';
// ...- Debug workers are ',' separated.
 - '*' works as a wildcard.
 - '-' disables the worker.
 
See src/__debug.js for the complete list of workers.
Choose:
make tml.debug.min.js- minifiedmake tml.debug.js- not minifiedmake tml.debug.wmap.js- not minified with source map
And use browser's localStorage.debug for selecting workers.