ManchesterSyntax#
This page summarizes the code structure for this directory and its immediate subdirectories. It focuses on the bin / axioms / manchesterSyntax area within the bin module. Use the table of contents below to navigate deeper.
Overview#
The manchesterSyntax directory contains the ANTLR4 grammar and auto-generated parser/lexer for OWL 2 Manchester Syntax. These files are used by manchesterSyntaxEngine.js to parse and validate axiom expressions.
Modules#
Grammar definition#
OWL2Manchester.g4 — ANTLR4 grammar file that defines the lexical and parser rules for parsing OWL 2 Manchester syntax expressions with keywords (
and,or,some,only,exactly,min,max, etc.) and class/property identifiers.OWL2Manchester copy.g4 — Backup copy of the grammar file.
Auto-generated parser (from ANTLR4)#
OWL2ManchesterLexer.js — Auto-generated ANTLR4 lexer implementation that tokenizes Manchester syntax input by recognizing keywords, identifiers, operators, and whitespace according to the grammar.
OWL2ManchesterParser.js — Auto-generated ANTLR4 parser implementation that parses tokenized input into an abstract syntax tree following the Manchester syntax grammar rules.
OWL2ManchesterListener.js — Auto-generated ANTLR4 listener interface that defines event hooks (enter/exit callbacks) for parse tree nodes during Manchester syntax parsing.
Support files#
util.js — Utility module containing token/literal name mappings and symbolic names used by the lexer/parser for OWL 2 Manchester syntax tokens.
OWL2Manchester.interp / OWL2Manchester.tokens / OWL2ManchesterLexer.interp / OWL2ManchesterLexer.tokens — ANTLR4 interpreter and token metadata files generated alongside the parser/lexer.
Usage#
These files are imported by
manchesterSyntaxEngine.jsin the parent directory.The grammar file (
OWL2Manchester.g4) is the source of truth; the.jsfiles are auto-generated viaantlr4and should not be edited manually.To regenerate the parser after grammar changes, run the ANTLR4 tool on
OWL2Manchester.g4.
Files in this directory#
OWL2Manchester copy.g4OWL2Manchester.g4OWL2Manchester.interpOWL2Manchester.tokensOWL2ManchesterLexer.interpOWL2ManchesterLexer.jsOWL2ManchesterLexer.tokensOWL2ManchesterListener.jsOWL2ManchesterParser.jsutil.js