What is camxes.js?
camxes.js is a Lojban parser written in JavaScript. It is based on the camxes PEG.
The parser receives a Lojban text (string) and returns a parsed tree represented as a JavaScript object. It works completely offline!
Usage
Include camxes.js from the code base as the following:
<script type="text/javascript" src="/path/to/camxes.js"></script>
Then parse your input using the parsercamxes
:
var result = camxes.parse( "mi klama le zarci" );
the parse()
method throws an exception if the input is ungrammatical.
Demo
Type any Lojban text in the following textarea. The result will be parsed as you type:
Contributor:
Developed and maintained by Masato Hagiwara. github: @mhagiwara twitter @jbomasatos
camxes.js is generated using PEG.js by David Majda. I'm really greatful for his great work.