InvisibleXML Logo jωInvisibleXML Logo processor - HELP

A SaxonJS/JavaScript processor of Invisible XML - Version 0.9.8



For the runtime files and a sample jωiXML application see here.

This processor runs entirely within the browser client, using SaxonJS as the top-level program and the jwiXML JavaScript library. There is no server-side processing, apart from initial delivery of necessary files.

You can input and edit an iXML grammar either ab initio or by loading from a file on your computer or one of the test-case or sample grammars from the iXML GitHub repository. The input string can also be edited or loaded from file or, in the case of a test-case or sample grammar, by selecting from one of a number of provided input strings.

Editing grammars and inputs

iXML grammars are edited in the upper text-area,
where usual keystokes are supported,
but there is no 'syntax awareness':

Input strings to be parsed by that grammar are edited in the lower text-area:

Parsing an input against a grammar

With the grammar and potential input string edited, clicking on the GO! button causes the following actions:

Parsing and compiling the grammar

The grammar defined by the text in the Grammar window is parsed and compiled as an iXML grammar to produce an internal object representing the compiled grammar. Assuming the grammar has valid iXML syntax, this is then displayed in the 'Parse Grammar' section, where various projections of the grammar can be displayed either in XML format or an iXML textual serialisation. Either the original parsed grammar or the compilation (i.e. where the grammar has been reduced to a canonical form) thereof can be shown.:

If you want to copy the parsed XML-format grammar the 'select grammar' button will select the whole of the grammar XML, so a simple 'Copy' keystroke action can get it into the clipboard as text.

Parsing the input string against the grammar

Assuming the grammar has compiled and the input text string is not empty (or the 'Allow an empty string as input' option is checked), the text string is then parsed against the grammar, giving results in the Results section.

The following options are supported via checkboxes

Option Effect
Show Parser States Displays the internal state transitions of the Earley parser operating on the input. This is NOT recommended for large grammars and inputs as memory overflows can be encountered.
Show only one ambiguous solution When the parse is ambiguous, with multiple possible solutions, this forces only one to be returned, which will still be marked as ambiguous
Treat as records When checked, the input is assumed to be a sequence of records separated by character sequences which match a given regular expression (for which '\n' is the default). The separator can be edited in the displayed text input.
Show all processed marks If checked, marks for ignore (-), attribute (@) or insertion (+) serialisation are not honoured but rather placed on the full parse tree output either as an @ixml:mark attribute or an ixml:insert element. This ony applies to marks on the original grammar and not to artefactual marks, such as used for generated non-terminals for optionality or repetition.
Allow an empty string as input Normally if the input is an empty string, no attempt is made to parse - just the grammar is processed and displayed. Checking this allows processing of an empty string as input
Tover-Walsh rewrites When checked, f+ constructs are rewritten as f+ => f-plus. f-plus: f, f-plus| (). rather than the f-plus: f, f*. rewrite given in the spec. This is likely to become the default as it seems to perform significantly quicker

Loading grammars and inputs from external sources

Both grammar and input texts can be read from local filestore by using the appropriate 'Choose file' (or 'Browse') button, which permits a file to be read and its text loaded into the textarea.

Grammars can also be loaded from web-repositories, in particular from the InvisibleXML test-suites or sample grammars using the Grammar 'Test/sample' dropdown:

A browsable catalog of the test suite is also available.

When there are sample inputs available for one of these test or sample grammars, the 'Test/Sample' dropdown above the Input textarea will be populated.