diff --git a/.gitignore b/.gitignore index 4ce71f8..176d847 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,8 @@ tptplus/server/out/ .env RemoteSot.py *.g4 +!tptplus/server/parser/vendor/tptp-antlr/original/TPTP.g4 +!tptplus/server/parser/vendor/tptp-antlr/optimized/TPTP.g4 SyntaxBNF .DS_Store diff --git a/README.md b/README.md index 4f85bba..9b65251 100644 --- a/README.md +++ b/README.md @@ -167,11 +167,15 @@ Added error handling for "Format TPTP File": display error message and jump to p ### 0.1.11 -Added title-menu button for "TPTP: Pretty-Print TPTP File"; improved error handling for pretty-printer. +Added title-menu button for command "TPTP: Pretty-Print TPTP File"; improved error handling for pretty-printer. ### 0.1.12 -Added title-menu button for "TPTP: Type-Check with LEO-III"; improved error handling for pretty-printer; retired legacy formatter. +Added command "TPTP: Type-Check with LEO-III" and a title-menu button for it; improved error handling for pretty-printer; retired legacy formatter. + +### 0.1.13 + +Added command "TPTP: Parse with ANTLR" and a title-menu button for it. It currently uses an unoptimized version of ANTLR grammar and can be slow. --- diff --git a/tptplus/CHANGELOG.md b/tptplus/CHANGELOG.md index b049fa6..b74f212 100644 --- a/tptplus/CHANGELOG.md +++ b/tptplus/CHANGELOG.md @@ -23,5 +23,6 @@ - v0.1.8 Fixed issue where some greater-than-signs are not handled correctly by command "Format TPTP File". - v0.1.9 Added local pretty-printer so that "Format TPTP File" works without Internet connection. The original remote pretty-printer is kept as a fallback. - v0.1.10 Added error handling for "Format TPTP File": display error message and jump to position of syntax error. -- v0.1.11 Added title-menu button for "TPTP: Pretty-Print TPTP File"; improved error handling for pretty-printer. -- v0.1.12 Added title-menu button for "TPTP: Type-Check with LEO-III"; improved error handling for pretty-printer; retired legacy formatter. +- v0.1.11 Added title-menu button for command "TPTP: Pretty-Print TPTP File"; improved error handling for pretty-printer. +- v0.1.12 Added command "TPTP: Type-Check with LEO-III" and a title-menu button for it; improved error handling for pretty-printer; retired legacy formatter. +- v0.1.13 Added command "TPTP: Parse with ANTLR" and a title-menu button for it. It currently uses an unoptimized version of ANTLR grammar and can be slow. diff --git a/tptplus/README.md b/tptplus/README.md index 5d7db80..4d6206b 100644 --- a/tptplus/README.md +++ b/tptplus/README.md @@ -166,11 +166,15 @@ Added error handling for "Format TPTP File": display error message and jump to p ### 0.1.11 -Added title-menu button for "TPTP: Pretty-Print TPTP File"; improved error handling for pretty-printer. +Added title-menu button for command "TPTP: Pretty-Print TPTP File"; improved error handling for pretty-printer. ### 0.1.12 -Added title-menu button for "TPTP: Type-Check with LEO-III"; improved error handling for pretty-printer; retired legacy formatter. +Added command "TPTP: Type-Check with LEO-III" and a title-menu button for it; improved error handling for pretty-printer; retired legacy formatter. + +### 0.1.13 + +Added command "TPTP: Parse with ANTLR" and a title-menu button for it. It currently uses an unoptimized version of ANTLR grammar and can be slow. --- diff --git a/tptplus/client/src/antlrParser/command.ts b/tptplus/client/src/antlrParser/command.ts new file mode 100644 index 0000000..843e7ba --- /dev/null +++ b/tptplus/client/src/antlrParser/command.ts @@ -0,0 +1,186 @@ +import * as path from 'path'; +import * as vscode from 'vscode'; +import type { LanguageClient } from 'vscode-languageclient/node'; + +import { revealFirstAntlrError, toVsCodeDiagnostic } from './diagnostics'; +import type { ParseWithAntlrResult } from './types'; + +// Set to false to use the original metagrammar-converted grammar; rebuild afterward. +const USE_OPTIMIZED_ANTLR_GRAMMAR = false; + +const ANTLR_PARSE_COMMAND = 'tptp.parseWithAntlr'; +const ANTLR_PARSE_REQUEST = 'tptp/parseWithAntlr'; +const ANTLR_PARSE_RUNNING_CONTEXT_KEY = 'tptp.antlrParseRunning'; + +/** Shows cancellable progress for startup and parsing, without imposing a deadline. */ +async function requestAntlrParse( + client: LanguageClient, + clientReady: Promise, + document: vscode.TextDocument +): Promise { + return vscode.window.withProgress( + { + location: vscode.ProgressLocation.Notification, + title: 'Parsing with ANTLR', + cancellable: true + }, + async (progress, token) => { + progress.report({ message: path.basename(document.fileName) }); + let cancellation: vscode.Disposable | undefined; + const cancelled = new Promise(resolve => { + cancellation = token.onCancellationRequested(() => resolve(undefined)); + if (token.isCancellationRequested) { + resolve(undefined); + } + }); + const request = async (): Promise => { + await clientReady; + if (token.isCancellationRequested) { + return undefined; + } + return client.sendRequest( + ANTLR_PARSE_REQUEST, + { + uri: document.uri.toString(), + useOptimizedGrammar: USE_OPTIMIZED_ANTLR_GRAMMAR + }, + token + ); + }; + + try { + // Close progress promptly even if cancellation happens during startup. + // The same token also forwards cancellation to the server's worker. + const result = await Promise.race([request(), cancelled]); + return token.isCancellationRequested ? undefined : result; + } catch (error: unknown) { + if (token.isCancellationRequested) { + return undefined; + } + throw error; + } finally { + cancellation?.dispose(); + } + } + ); +} + +function writeTptpAntlrParseLog( + output: vscode.OutputChannel, + document: vscode.TextDocument, + result: ParseWithAntlrResult +): void { + output.appendLine(`[${new Date().toISOString()}] ${document.uri.fsPath}`); + output.appendLine(`Grammar: ${USE_OPTIMIZED_ANTLR_GRAMMAR ? 'optimized' : 'original'}`); + output.appendLine(`Elapsed: ${result.summary.elapsedMs}ms`); + output.appendLine(`Syntax errors: ${result.summary.syntaxErrorCount}`); + + if (result.diagnostics.length === 0) { + output.appendLine('No ANTLR diagnostics.'); + } else { + result.diagnostics.forEach(diagnostic => { + output.appendLine( + `${diagnostic.range.start.line + 1}:${diagnostic.range.start.character + 1} ${diagnostic.message}` + ); + }); + } + + output.appendLine(''); +} + +function createAntlrParserCommandHandler( + client: LanguageClient, + clientReady: Promise, + diagnostics: vscode.DiagnosticCollection, + output: vscode.OutputChannel +): () => Promise { + let parseRunning = false; + + return async (): Promise => { + if (parseRunning) { + vscode.window.showInformationMessage('ANTLR is already parsing a TPTP file.'); + return; + } + + const editor = vscode.window.activeTextEditor; + if (!editor || editor.document.languageId !== 'tptp') { + vscode.window.showErrorMessage('No TPTP file is currently open.'); + return; + } + + if (editor.document.uri.scheme !== 'file') { + vscode.window.showErrorMessage( + 'The TPTP ANTLR parser currently supports file-backed TPTP documents only.' + ); + return; + } + + parseRunning = true; + try { + await vscode.commands.executeCommand('setContext', ANTLR_PARSE_RUNNING_CONTEXT_KEY, true); + + const document = editor.document; + const parsedDocumentVersion = document.version; + diagnostics.delete(document.uri); + const result = await requestAntlrParse(client, clientReady, document); + if (result === undefined) { + vscode.window.showInformationMessage('ANTLR parse cancelled.'); + return; + } + if (document.isClosed || document.version !== parsedDocumentVersion) { + vscode.window.showWarningMessage( + 'TPTP file changed or was closed while parsing. Please run the parser again.' + ); + return; + } + + const parseDiagnostics = result.diagnostics.map(toVsCodeDiagnostic); + diagnostics.set(document.uri, parseDiagnostics); + writeTptpAntlrParseLog(output, document, result); + + if (result.ok) { + vscode.window.showInformationMessage( + `ANTLR parse succeeded in ${result.summary.elapsedMs}ms.` + ); + } else { + vscode.window.showWarningMessage( + `ANTLR parse found ${result.summary.syntaxErrorCount} error(s).` + ); + await revealFirstAntlrError(document, parseDiagnostics); + } + } catch (error: unknown) { + const message = error instanceof Error ? error.message : String(error); + output.appendLine(`[${new Date().toISOString()}] TPTP ANTLR parser request failed`); + output.appendLine(message); + output.show(true); + vscode.window.showErrorMessage(`TPTP ANTLR parser request failed: ${message}`); + } finally { + parseRunning = false; + await vscode.commands.executeCommand('setContext', ANTLR_PARSE_RUNNING_CONTEXT_KEY, false); + } + }; +} + +/** Registers the ANTLR parser command and its diagnostic lifecycle. */ +export function registerAntlrParserCommand( + client: LanguageClient, + clientReady: Promise +): vscode.Disposable { + const diagnostics = vscode.languages.createDiagnosticCollection('tptpAntlr'); + const output = vscode.window.createOutputChannel('TPTP ANTLR Parser'); + const commandHandler = createAntlrParserCommandHandler( + client, + clientReady, + diagnostics, + output + ); + + return vscode.Disposable.from( + diagnostics, + output, + vscode.commands.registerCommand(ANTLR_PARSE_COMMAND, commandHandler), + vscode.workspace.onDidChangeTextDocument(event => { + diagnostics.delete(event.document.uri); + }) + ); +} diff --git a/tptplus/client/src/antlrParser/diagnostics.ts b/tptplus/client/src/antlrParser/diagnostics.ts new file mode 100644 index 0000000..cecf5cd --- /dev/null +++ b/tptplus/client/src/antlrParser/diagnostics.ts @@ -0,0 +1,54 @@ +import * as vscode from 'vscode'; + +import type { LspDiagnostic } from './types'; + +function toVsCodeSeverity(severity: number | undefined): vscode.DiagnosticSeverity { + switch (severity) { + case 2: + return vscode.DiagnosticSeverity.Warning; + case 3: + return vscode.DiagnosticSeverity.Information; + case 4: + return vscode.DiagnosticSeverity.Hint; + case 1: + default: + return vscode.DiagnosticSeverity.Error; + } +} + +/** Converts a language-server diagnostic into its VS Code client representation. */ +export function toVsCodeDiagnostic(diagnostic: LspDiagnostic): vscode.Diagnostic { + const range = new vscode.Range( + diagnostic.range.start.line, + diagnostic.range.start.character, + diagnostic.range.end.line, + diagnostic.range.end.character + ); + const result = new vscode.Diagnostic( + range, + diagnostic.message, + toVsCodeSeverity(diagnostic.severity) + ); + result.source = diagnostic.source; + return result; +} + +/** Opens Problems and highlights the first ANTLR error in the parsed document. */ +export async function revealFirstAntlrError( + document: vscode.TextDocument, + diagnostics: readonly vscode.Diagnostic[] +): Promise { + const firstError = diagnostics[0]; + if (!firstError) { + return; + } + + await vscode.commands.executeCommand('workbench.action.showErrorsWarnings'); + const range = firstError.range; + const editor = await vscode.window.showTextDocument(document, { + preview: false, + selection: range + }); + editor.selection = new vscode.Selection(range.start, range.end); + editor.revealRange(range, vscode.TextEditorRevealType.InCenterIfOutsideViewport); +} diff --git a/tptplus/client/src/antlrParser/types.ts b/tptplus/client/src/antlrParser/types.ts new file mode 100644 index 0000000..cce2783 --- /dev/null +++ b/tptplus/client/src/antlrParser/types.ts @@ -0,0 +1,25 @@ +export interface LspPosition { + line: number; + character: number; +} + +export interface LspRange { + start: LspPosition; + end: LspPosition; +} + +export interface LspDiagnostic { + range: LspRange; + message: string; + severity?: number; + source?: string; +} + +export interface ParseWithAntlrResult { + ok: boolean; + diagnostics: LspDiagnostic[]; + summary: { + elapsedMs: number; + syntaxErrorCount: number; + }; +} diff --git a/tptplus/client/src/extension.ts b/tptplus/client/src/extension.ts index d03f805..d186d61 100644 --- a/tptplus/client/src/extension.ts +++ b/tptplus/client/src/extension.ts @@ -13,6 +13,7 @@ import { import { errorMessage } from './errorMessage'; import { createSystemB4TptpForm } from './systemTptpForms'; +import { registerAntlrParserCommand } from './antlrParser/command'; import { registerPrettyPrintCommand } from './prettyPrint/command'; import { registerTypeCheckCommand } from './typeCheck/command'; @@ -2410,7 +2411,8 @@ export function activate(context: ExtensionContext) { ); // Start the client (and server) - client.start(); + const clientReady = client.start(); + context.subscriptions.push(registerAntlrParserCommand(client, clientReady)); } export function deactivate(): Thenable | undefined { diff --git a/tptplus/client/test/antlrParserCommand.test.js b/tptplus/client/test/antlrParserCommand.test.js new file mode 100644 index 0000000..80d888a --- /dev/null +++ b/tptplus/client/test/antlrParserCommand.test.js @@ -0,0 +1,318 @@ +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const test = require('node:test'); +const vm = require('node:vm'); + +function deferred() { + let resolve; + let reject; + const promise = new Promise((yes, no) => { resolve = yes; reject = no; }); + return { promise, resolve, reject }; +} + +function cancellationSource() { + const listeners = new Set(); + const token = { + isCancellationRequested: false, + onCancellationRequested(listener) { + listeners.add(listener); + return { dispose: () => listeners.delete(listener) }; + } + }; + return { + token, + cancel() { + token.isCancellationRequested = true; + for (const listener of [...listeners]) listener(); + } + }; +} + +const success = { + ok: true, + diagnostics: [], + summary: { elapsedMs: 25, syntaxErrorCount: 0 } +}; +const syntaxError = { + ok: false, + diagnostics: [{ + range: { start: { line: 0, character: 0 }, end: { line: 0, character: 1 } }, + message: 'Unexpected token', + severity: 1 + }], + summary: { elapsedMs: 30, syntaxErrorCount: 1 } +}; + +function setup(sendRequest, clientReady = Promise.resolve(), useOptimizedGrammar) { + const requestStarted = deferred(); + const progressStarted = deferred(); + const state = { + requests: [], contexts: [], messages: [], diagnostics: [], log: [], + progressOptions: [], progressSources: [], progressActive: false, + shownDocuments: [], revealedRanges: [], outputShows: 0, + }; + const document = { + languageId: 'tptp', version: 1, isClosed: false, fileName: '/tmp/command-test.p', + uri: { scheme: 'file', fsPath: '/tmp/command-test.p', toString: () => 'file:///tmp/command-test.p' } + }; + const disposable = { dispose() {} }; + const notify = kind => message => state.messages.push({ kind, message, progressActive: state.progressActive }); + const vscode = { + ProgressLocation: { Notification: 15 }, + DiagnosticSeverity: { Error: 0, Warning: 1, Information: 2, Hint: 3 }, + TextEditorRevealType: { InCenterIfOutsideViewport: 2 }, + Range: class { + constructor(startLine, startCharacter, endLine, endCharacter) { + this.start = { line: startLine, character: startCharacter }; + this.end = { line: endLine, character: endCharacter }; + } + }, + Diagnostic: class { + constructor(range, message, severity) { + Object.assign(this, { range, message, severity }); + } + }, + Selection: class { + constructor(anchor, active) { Object.assign(this, { anchor, active }); } + }, + Disposable: { from: (...items) => ({ dispose: () => items.forEach(item => item.dispose()) }) }, + window: { + activeTextEditor: { document }, + createOutputChannel: () => ({ + ...disposable, + appendLine: line => state.log.push(line), + show: () => state.outputShows++ + }), + async showTextDocument(document, options) { + state.shownDocuments.push({ document, options }); + const editor = { + revealRange: (range, revealType) => state.revealedRanges.push({ range, revealType }) + }; + state.revealedEditor = editor; + return editor; + }, + showInformationMessage: notify('info'), + showWarningMessage: notify('warning'), + showErrorMessage: notify('error'), + async withProgress(options, task) { + const source = cancellationSource(); + state.progressOptions.push(options); + state.progressSources.push(source); + state.progressActive = true; + progressStarted.resolve(source); + try { + return await task({ report() {} }, source.token); + } finally { + state.progressActive = false; + } + } + }, + languages: { + createDiagnosticCollection: () => ({ + ...disposable, + set: (uri, diagnostics) => state.diagnostics.push({ uri, diagnostics }), + delete() {} + }) + }, + commands: { + registerCommand(_id, handler) { state.command = handler; return disposable; }, + async executeCommand(...args) { state.contexts.push(args); } + }, + workspace: { + onDidChangeTextDocument(handler) { state.changed = handler; return disposable; } + } + }; + state.switchEditor = document => { vscode.window.activeTextEditor = { document }; }; + + // Load the compiled command with an isolated VS Code mock; other tests keep + // their normal require cache and modules. + const commandFilename = require.resolve('../out/antlrParser/command'); + function loadModule(filename) { + const module = { exports: {} }; + let source = fs.readFileSync(filename, 'utf8'); + if (filename === commandFilename && useOptimizedGrammar !== undefined) { + assert.match(source, /const USE_OPTIMIZED_ANTLR_GRAMMAR = (true|false);/); + source = source.replace( + /const USE_OPTIMIZED_ANTLR_GRAMMAR = (true|false);/, + `const USE_OPTIMIZED_ANTLR_GRAMMAR = ${useOptimizedGrammar};` + ); + } + vm.runInNewContext(source, { + exports: module.exports, + module, + require(id) { + if (id === 'vscode') return vscode; + if (id === './diagnostics') return loadModule(require.resolve('../out/antlrParser/diagnostics')); + return require(id); + }, + __dirname: path.dirname(filename), + __filename: filename + }, { filename }); + return module.exports; + } + const command = loadModule(commandFilename); + state.registration = command.registerAntlrParserCommand({ + sendRequest(...args) { + state.requests.push(args); + requestStarted.resolve(args); + return sendRequest(...args); + } + }, clientReady); + + return { state, document, requestStarted: requestStarted.promise, progressStarted: progressStarted.promise }; +} + +test('shows cancellable progress followed by a completion notification', async () => { + const response = deferred(); + const { state, requestStarted } = setup(() => response.promise); + const pending = state.command(); + const [method, params, token] = await requestStarted; + + assert.equal(method, 'tptp/parseWithAntlr'); + assert.equal(params.uri, 'file:///tmp/command-test.p'); + assert.equal(typeof params.useOptimizedGrammar, 'boolean'); + assert.equal(token, state.progressSources[0].token); + assert.equal(state.progressOptions[0].cancellable, true); + assert.equal(state.progressOptions[0].location, 15); + assert.equal(state.messages.length, 0); + await state.command(); + assert.equal(state.requests.length, 1, 'duplicate invocations must not start another worker'); + + response.resolve(success); + await pending; + assert.deepEqual(state.messages.at(-1), { + kind: 'info', message: 'ANTLR parse succeeded in 25ms.', progressActive: false + }); + assert.equal(state.diagnostics.length, 1); + assert.equal(state.outputShows, 0); + assert.equal(state.shownDocuments.length, 0); + assert.deepEqual(state.contexts.map(args => args[2]), [true, false]); +}); + +test('selects either grammar by changing the command constant', async t => { + for (const useOptimizedGrammar of [true, false]) { + await t.test(useOptimizedGrammar ? 'optimized' : 'original', async () => { + const { state } = setup(async () => success, Promise.resolve(), useOptimizedGrammar); + await state.command(); + + assert.equal(state.requests[0][1].useOptimizedGrammar, useOptimizedGrammar); + assert.ok(state.log.includes(`Grammar: ${useOptimizedGrammar ? 'optimized' : 'original'}`)); + }); + } +}); + +test('opens Problems and highlights the first ANTLR error in the requested file', async () => { + const response = deferred(); + const { state, document, requestStarted } = setup(() => response.promise); + const pending = state.command(); + await requestStarted; + // Completion must navigate back to the parsed file after the user switches tabs. + const otherDocument = { + ...document, + fileName: '/tmp/other.p', + uri: { scheme: 'file', fsPath: '/tmp/other.p', toString: () => 'file:///tmp/other.p' } + }; + state.switchEditor(otherDocument); + const firstError = { + ...syntaxError.diagnostics[0], + range: { start: { line: 4, character: 7 }, end: { line: 4, character: 10 } } + }; + response.resolve({ + ...syntaxError, + diagnostics: [firstError, { + ...syntaxError.diagnostics[0], + range: { start: { line: 8, character: 0 }, end: { line: 8, character: 1 } } + }], + summary: { elapsedMs: 30, syntaxErrorCount: 2 } + }); + await pending; + + assert.equal(state.diagnostics[0].uri, document.uri); + assert.equal(state.diagnostics[0].diagnostics.length, 2); + assert.equal(state.outputShows, 0); + assert.equal(state.contexts.filter(args => args[0] === 'workbench.action.showErrorsWarnings').length, 1); + assert.equal(state.shownDocuments.length, 1); + assert.equal(state.shownDocuments[0].document, document); + assert.equal(state.shownDocuments[0].options.preview, false); + assert.deepEqual(state.shownDocuments[0].options.selection.start, firstError.range.start); + assert.deepEqual(state.shownDocuments[0].options.selection.end, firstError.range.end); + assert.deepEqual(state.revealedEditor.selection.anchor, firstError.range.start); + assert.deepEqual(state.revealedEditor.selection.active, firstError.range.end); + assert.equal(state.revealedRanges[0].range, state.diagnostics[0].diagnostics[0].range); + assert.equal(state.revealedRanges[0].revealType, 2); + assert.deepEqual(state.messages.at(-1), { + kind: 'warning', message: 'ANTLR parse found 2 error(s).', progressActive: false + }); +}); + +test('cancellation closes progress, ignores late results, and permits another run', async () => { + const response = deferred(); + let calls = 0; + const { state, requestStarted } = setup(() => ++calls === 1 ? response.promise : Promise.resolve(success)); + const pending = state.command(); + const [, , token] = await requestStarted; + state.progressSources[0].cancel(); + await pending; + + assert.equal(token.isCancellationRequested, true); + assert.deepEqual(state.messages, [{ kind: 'info', message: 'ANTLR parse cancelled.', progressActive: false }]); + assert.equal(state.diagnostics.length, 0); + assert.equal(state.contexts.at(-1)[2], false); + + await state.command(); + response.resolve(syntaxError); + await response.promise; + assert.equal(state.requests.length, 2); + assert.equal(state.diagnostics.length, 1, 'the cancelled result must never publish diagnostics'); + assert.equal(state.messages.at(-1).message, 'ANTLR parse succeeded in 25ms.'); +}); + +test('can cancel while the language client is starting', async () => { + const ready = deferred(); + const { state, progressStarted } = setup(async () => success, ready.promise); + const pending = state.command(); + const source = await progressStarted; + source.cancel(); + await pending; + + assert.equal(state.requests.length, 0); + assert.equal(state.messages.at(-1).message, 'ANTLR parse cancelled.'); + ready.resolve(); + await state.command(); + assert.equal(state.requests.length, 1, 'the cancelled startup must not send a request later'); +}); + +for (const change of ['edited', 'closed']) { + test(`discards results when the document is ${change} during parsing`, async () => { + const response = deferred(); + const { state, document, requestStarted } = setup(() => response.promise); + const pending = state.command(); + await requestStarted; + if (change === 'edited') { + document.version++; + state.changed({ document }); + } else { + document.isClosed = true; + } + response.resolve(syntaxError); + await pending; + + assert.equal(state.diagnostics.length, 0); + assert.equal(state.messages.at(-1).kind, 'warning'); + assert.match(state.messages.at(-1).message, /Please run the parser again/); + }); +} + +test('reports request failures and resets the running state', async () => { + const { state } = setup(async () => { throw new Error('Worker failed'); }); + await state.command(); + + assert.equal(state.messages.at(-1).kind, 'error'); + assert.match(state.messages.at(-1).message, /Worker failed/); + assert.equal(state.messages.at(-1).progressActive, false); + assert.equal(state.contexts.at(-1)[2], false); + assert.equal(state.diagnostics.length, 0); + await state.command(); + assert.equal(state.requests.length, 2); +}); diff --git a/tptplus/images/icons/TPTPWorld.png b/tptplus/images/icons/TPTPWorld.png index 269d233..2f412f0 100644 Binary files a/tptplus/images/icons/TPTPWorld.png and b/tptplus/images/icons/TPTPWorld.png differ diff --git a/tptplus/package-lock.json b/tptplus/package-lock.json index eb5dcda..fe5aa8b 100644 --- a/tptplus/package-lock.json +++ b/tptplus/package-lock.json @@ -1,12 +1,12 @@ { "name": "tptp", - "version": "0.1.12", + "version": "0.1.13", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "tptp", - "version": "0.1.12", + "version": "0.1.13", "hasInstallScript": true, "devDependencies": { "@types/node": "^16.18.34", diff --git a/tptplus/package.json b/tptplus/package.json index 85441dc..27d4694 100644 --- a/tptplus/package.json +++ b/tptplus/package.json @@ -3,7 +3,7 @@ "displayName": "TPTP", "publisher": "TPTPWorld", "description": "Syntax highlighting, error detection, pretty-printing, and proving & processing theorems functions for TPTP language", - "version": "0.1.12", + "version": "0.1.13", "icon": "images/icons/TPTPWorld.png", "repository": { "type": "git", @@ -68,6 +68,15 @@ "dark": "./images/icons/Type.png" } }, + { + "command": "tptp.parseWithAntlr", + "title": "TPTP: Parse with ANTLR", + "enablement": "!tptp.antlrParseRunning", + "icon": { + "light": "./images/icons/Syntax.png", + "dark": "./images/icons/Syntax.png" + } + }, { "command": "tptp.proveProblem", "title": "TPTP: Prove Problem" @@ -101,9 +110,14 @@ "group": "navigation@1" }, { - "command": "tptp.typeCheck", + "command": "tptp.parseWithAntlr", "when": "editorLangId == tptp", "group": "navigation@2" + }, + { + "command": "tptp.typeCheck", + "when": "editorLangId == tptp", + "group": "navigation@3" } ], "editor/context": [ @@ -174,11 +188,12 @@ "scripts": { "build:wasm": "emcmake cmake -S native/tptp-pretty -B native/tptp-pretty/build-wasm && cmake --build native/tptp-pretty/build-wasm", "vscode:prepublish": "npm run compile", + "precompile": "npm install --prefix server --no-audit --no-fund", "compile": "tsc -b", "watch": "tsc -b -w", "postinstall": "cd client && npm install && cd ../server && npm install && cd ..", "pretest:unit": "npm run compile", - "test:unit": "node --test client/test/*.test.js" + "test:unit": "node --test client/test/*.test.js server/test/*.test.js" }, "devDependencies": { "@types/node": "^16.18.34", diff --git a/tptplus/server/package-lock.json b/tptplus/server/package-lock.json index 4bbf597..c68df37 100644 --- a/tptplus/server/package-lock.json +++ b/tptplus/server/package-lock.json @@ -8,6 +8,7 @@ "name": "tptp-server", "version": "1.0.0", "dependencies": { + "antlr4": "^4.13.2", "vscode-languageserver": "^8.1.0", "vscode-languageserver-textdocument": "^1.0.8" }, @@ -22,6 +23,15 @@ "integrity": "sha512-OTcgaiwfGFBKacvfwuHzzn1KLxH/er8mluiy8/uM3sGXHaRe73RrSIj01jow9t4kJEW633Ov+cOexXeiApTyAw==", "dev": true }, + "node_modules/antlr4": { + "version": "4.13.2", + "resolved": "https://registry.npmjs.org/antlr4/-/antlr4-4.13.2.tgz", + "integrity": "sha512-QiVbZhyy4xAZ17UPEuG3YTOt8ZaoeOR1CvEAqrEsDBsOqINslaB147i9xqljZqoyf5S+EUlGStaj+t22LT9MOg==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=16" + } + }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", diff --git a/tptplus/server/package.json b/tptplus/server/package.json index 77f8c5e..6052506 100644 --- a/tptplus/server/package.json +++ b/tptplus/server/package.json @@ -3,6 +3,7 @@ "description": "TPTP language server", "version": "1.0.0", "dependencies": { + "antlr4": "^4.13.2", "vscode-languageserver": "^8.1.0", "vscode-languageserver-textdocument": "^1.0.8" }, @@ -10,4 +11,4 @@ "@types/node": "^16.18.34", "typescript": "^5.1.3" } -} \ No newline at end of file +} diff --git a/tptplus/server/parser/vendor/tptp-antlr/VENDORED.md b/tptplus/server/parser/vendor/tptp-antlr/VENDORED.md new file mode 100644 index 0000000..ca45277 --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/VENDORED.md @@ -0,0 +1,142 @@ +# TPTP ANTLR Parser + +Both grammar variants and their generated JavaScript parsers are kept here: + +- `original/`: unmodified output of the metagrammar-based converter. +- `optimized/`: that output after applying the guarded Trash TFF postprocessor. + +Set `USE_OPTIMIZED_ANTLR_GRAMMAR` at the beginning of +[`client/src/antlrParser/command.ts`](../../../../client/src/antlrParser/command.ts) +to `true` for the optimized grammar or `false` for the original grammar. +Run `npm run compile` from `tptplus`, then reload the extension. The command passes +the choice to the server and parser worker; its output log names the selected +grammar. The server caches each variant separately. + +Both variants come from: + +- Repository: https://github.com/TPTPWorld/SyntaxBNF +- Branch: `master` +- Upstream commit: `22e70448b43609ed0a7b3f777d190407db2db2da` +- [Pinned BNF input](https://github.com/TPTPWorld/SyntaxBNF/blob/22e70448b43609ed0a7b3f777d190407db2db2da/SyntaxBNF-v10.0.0.1) +- [Pinned converter](https://github.com/TPTPWorld/SyntaxBNF/blob/22e70448b43609ed0a7b3f777d190407db2db2da/BNFMetaGrammar/BNF2ANTLR/bnf2antlr_meta.py) +- Raw grammar SHA-256: `1522eccb8b05167e45eede09a3718ba814496c87fa5cb330ba217fc78214abcd` +- Optimized grammar SHA-256: `ff867ebc49d564191381827273410092a92982ab239d5dccb07300a4dd144ece` +- Regenerated on: 2026-11-19 +- Generator: ANTLR 4.13.2, JavaScript target (default listener enabled) + +The postprocessor is the local experiment in the SyntaxBNF checkout at +`BNFMetaGrammar/BNF2ANTLR/experiments/trash412/`, described in its `README.md`. +These files are not part of the pinned upstream commit: + +- `factor.py` SHA-256: `6752c0c127cc884a77a207b56b752cda702e53b50cb99c5afb59f80710419f6c` +- `factor_tff.xq` SHA-256: `e376d64077859a1c3de5661ef8ee90366df10dd1a327c9fbf1f9bd580e9809f8` +- Postprocessor tools: Trash 4.12.0, local .NET 10.0.15 runtime + +The rewrite factors `tff_logic_formula` and `tff_unit_formula` and adds +`bnf2antlr_tff_formula_term` and `bnf2antlr_tff_infix_tail`. Its guards check the +dependent productions, helper-name collisions, and repeat application. The +wrapper verifies a byte-identical no-op roundtrip, reparses the optimized grammar, +preserves the lexer section, and validates the result with stock ANTLR. + +Only grammar generation needs Python, Java, Trash, and .NET. The extension +command loads the generated JavaScript below using `antlr4` 4.13.2; +postprocessing is not run during extension builds or document parsing. Parse +trees are disabled by the command. Factoring changes parse-tree structure and +may change syntax-error wording. + +Each variant directory contains: + +- `TPTP.g4` +- `TPTPLexer.js` +- `TPTPParser.js` +- `TPTPListener.js` + +The local `package.json` marks this folder and both variant directories as ESM so +the generated parsers can be loaded from the CommonJS language server through a +dynamic import boundary. + +## Updating the vendored parser + +1. Choose and record a full commit SHA from the upstream branch above. Check out + that revision, retaining the local experiment and its tools. Use the Python + environment with the converter's requirements installed (locally, + `/home/xiaji/miniconda3/envs/202610_SyntaxBNF/bin/python`). +2. Generate the raw grammar, run the postprocessor into a separate directory, + then generate JavaScript from both grammars. For example, in Bash: + + ```bash + syntax_bnf=/path/to/SyntaxBNF + bnf_python=/path/to/converter-environment/bin/python + antlr_jar="$syntax_bnf/ANTLRParsers/antlr-4.13.2-complete.jar" + antlr_build=$(mktemp -d) + + "$bnf_python" "$syntax_bnf/BNFMetaGrammar/BNF2ANTLR/bnf2antlr_meta.py" \ + "$syntax_bnf/SyntaxBNF-v10.0.0.1" -o "$antlr_build/raw/TPTP.g4" + "$bnf_python" "$syntax_bnf/BNFMetaGrammar/BNF2ANTLR/experiments/trash412/factor.py" \ + "$antlr_build/raw/TPTP.g4" -o "$antlr_build/factored/TPTP.g4" \ + --tools-dir "$syntax_bnf/BNFMetaGrammar/.tools/factoring" \ + --antlr-jar "$antlr_jar" --report "$antlr_build/factoring.json" + ( + cd "$antlr_build/raw" + java -jar "$antlr_jar" -Dlanguage=JavaScript -o generated TPTP.g4 + ) + ( + cd "$antlr_build/factored" + java -jar "$antlr_jar" -Dlanguage=JavaScript -o generated TPTP.g4 + ) + ``` + +3. Check the transformation report, grammar checksums, and generated-file headers. + Do not skip a failing transformation guard; review changes to the upstream + grammar and query together. Verify that the raw lexer is byte-identical to the + optimized lexer. +4. Copy the raw `TPTP.g4` and its three generated JavaScript files to `original/`. + Copy the factored `TPTP.g4` and its three generated JavaScript files to + `optimized/`. Keep the local `package.json`, which provides the required ESM + boundary for both directories. The root `.gitignore` has exceptions for the + two grammar paths so both grammars are versioned alongside their parsers. +5. Update the upstream commit, pinned source links, grammar and postprocessor + checksums, regeneration date, and tool versions at the top of this file. +6. If the generator version changed, update the matching JavaScript runtime and + lockfile from the extension root (`tptplus`): + + ```sh + npm install --prefix server --save-exact antlr4@ + ``` + +7. Review the generated-code diff, then compile and run the parser regression + tests from the extension root (`tptplus`). Also exercise the + ANTLR command with a valid document and a known syntax error for both values + of `USE_OPTIMIZED_ANTLR_GRAMMAR`: + + ```sh + npm run compile + npm run test:unit + ``` + +The root `precompile` lifecycle installs the dependencies recorded by +`server/package-lock.json` before compiling. The generated files themselves are +vendored source; `npm install` updates only the separate `antlr4` runtime. + +## Validation of this update + +The experiment's `run.py` was rerun against fresh converter output. All 371 TPTP +checks passed: 355 differential cases, 12 corpus files with independently counted +statements, and four malformed corpus edits. Three prefix examples and all three +negative transformation guards also passed. The raw generated JavaScript was +byte-identical to the previously vendored files, and the optimized lexer remains +byte-identical. + +Fresh-process measurements with Node v24.12.0, ANTLR 4.13.2, and parse trees +disabled (lexing and parsing included; module imports excluded): + +| Input | Raw parser | Optimized parser | +| --- | ---: | ---: | +| 16 nested implications | 478 ms | 24 ms | +| 32 nested implications | 894 ms | 25 ms | +| 64 nested implications | 1,829 ms | 26 ms | +| 107 nested implications | 3,988 ms | 27 ms | +| `ITP006_7.p` | Stopped at 10 s | 181 ms, 213 statements, no errors | + +These are single observations, not complexity guarantees. The corpus baseline +did not complete before its process deadline. Recursion-depth limits still apply. diff --git a/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTP.g4 b/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTP.g4 new file mode 100644 index 0000000..3789cbd --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTP.g4 @@ -0,0 +1,1467 @@ +grammar TPTP; + +// Generated from SyntaxBNF-v10.0.0.1 using BNFMetaParser.g4. +// ::= rules become parser rules; :== restrictions become comments; +// ::- rules become tokens; ::: rules become lexer fragments unless +// referenced directly by a parser rule. + +tptp_file + : tptp_input* EOF + ; + +tptp_input + : annotated_formula + | include + ; + +annotated_formula + : thf_annotated + | tff_annotated + | tcf_annotated + | fof_annotated + | cnf_annotated + | tpi_annotated + ; + +tpi_annotated + : 'tpi' '(' name ',' formula_role ',' tpi_formula annotations ')' '.' + ; + +tpi_formula + : fof_formula + ; + +thf_annotated + : 'thf' '(' name ',' formula_role ',' thf_formula annotations ')' '.' + ; + +tff_annotated + : 'tff' '(' name ',' formula_role ',' tff_formula annotations ')' '.' + ; + +tcf_annotated + : 'tcf' '(' name ',' formula_role ',' tcf_formula annotations ')' '.' + ; + +fof_annotated + : 'fof' '(' name ',' formula_role ',' fof_formula annotations ')' '.' + ; + +cnf_annotated + : 'cnf' '(' name ',' formula_role ',' cnf_formula annotations ')' '.' + ; + +annotations + : ',' source optional_info + | nothing + ; + +formula_role + : lower_word_token + | lower_word_token '-' general_term + ; + +thf_formula + : thf_logic_formula + | thf_atom_typing + | thf_subtype + ; + +thf_logic_formula + : thf_unitary_formula + | thf_unary_formula + | thf_binary_formula + | thf_defined_infix + | thf_definition + | thf_sequent + ; + +thf_binary_formula + : thf_binary_pair + | thf_binary_list + | thf_binary_type + ; + +thf_binary_pair + : thf_unit_formula nonassoc_connective thf_unit_formula + ; + +thf_binary_list + : thf_or_formula + | thf_and_formula + | thf_apply_formula + ; + +thf_or_formula + : thf_unit_formula Vline thf_unit_formula + | thf_or_formula Vline thf_unit_formula + ; + +thf_and_formula + : thf_unit_formula '&' thf_unit_formula + | thf_and_formula '&' thf_unit_formula + ; + +thf_apply_formula + : thf_unit_formula '@' thf_unit_formula + | thf_apply_formula '@' thf_unit_formula + ; + +thf_unit_formula + : thf_unitary_formula + | thf_unary_formula + | thf_defined_infix + ; + +thf_preunit_formula + : thf_unitary_formula + | thf_prefix_unary + ; + +thf_unitary_formula + : thf_quantified_formula + | thf_atomic_formula + | variable + | '(' thf_logic_formula ')' + ; + +thf_quantified_formula + : thf_quantification thf_unit_formula + ; + +thf_quantification + : thf_quantifier '[' thf_variable_list ']' ':' + ; + +thf_variable_list + : thf_typed_variable + | thf_typed_variable ',' thf_variable_list + ; + +thf_typed_variable + : variable ':' thf_top_level_type + ; + +thf_unary_formula + : thf_prefix_unary + | thf_infix_unary + ; + +thf_prefix_unary + : thf_unary_connective thf_preunit_formula + ; + +thf_infix_unary + : thf_unitary_term infix_inequality thf_unitary_term + ; + +thf_atomic_formula + : thf_plain_atomic + | thf_defined_atomic + | thf_system_atomic + | thf_fof_function + ; + +thf_plain_atomic + : constant + | thf_tuple + ; + +thf_defined_atomic + : defined_constant + | thf_defined_term + | '(' thf_conn_term ')' + | nhf_long_connective + | thf_let + ; + +thf_defined_term + : defined_term + | th1_defined_term + ; + +thf_defined_infix + : thf_unitary_term defined_infix_pred thf_unitary_term + ; + +thf_system_atomic + : system_constant + ; + +thf_let + : '$let' '(' thf_let_types ',' thf_let_defns ',' thf_logic_formula ')' + ; + +thf_let_types + : thf_atom_typing + | '[' thf_atom_typing_list ']' + ; + +thf_atom_typing_list + : thf_atom_typing + | thf_atom_typing ',' thf_atom_typing_list + ; + +thf_let_defns + : thf_let_defn + | '[' thf_let_defn_list ']' + ; + +thf_let_defn + : thf_logic_formula assignment thf_logic_formula + ; + +thf_let_defn_list + : thf_let_defn + | thf_let_defn ',' thf_let_defn_list + ; + +thf_unitary_term + : thf_atomic_formula + | variable + | '(' thf_logic_formula ')' + ; + +thf_conn_term + : nonassoc_connective + | assoc_connective + | infix_equality + | infix_inequality + | thf_unary_connective + ; + +thf_tuple + : '[' ']' + | '[' thf_formula_list ']' + ; + +thf_fof_function + : defined_functor '(' thf_arguments ')' + | system_functor '(' thf_arguments ')' + | functor '(' thf_arguments ')' + ; + +thf_arguments + : thf_formula_list + ; + +thf_formula_list + : thf_logic_formula comma_thf_logic_formula* + ; + +comma_thf_logic_formula + : ',' thf_logic_formula + ; + +thf_atom_typing + : typeable_atom ':' thf_top_level_type + | '(' thf_atom_typing ')' + ; + +thf_top_level_type + : thf_unitary_type + | thf_mapping_type + | thf_apply_type + ; + +thf_unitary_type + : thf_unitary_formula + ; + +thf_apply_type + : thf_apply_formula + ; + +thf_binary_type + : thf_mapping_type + | thf_xprod_type + | thf_union_type + ; + +thf_mapping_type + : thf_unitary_type Arrow thf_unitary_type + | thf_unitary_type Arrow thf_mapping_type + ; + +thf_xprod_type + : thf_unitary_type Star thf_unitary_type + | thf_xprod_type Star thf_unitary_type + ; + +thf_union_type + : thf_unitary_type Plus thf_unitary_type + | thf_union_type Plus thf_unitary_type + ; + +thf_subtype + : atomic_type subtype_sign atomic_type + ; + +thf_definition + : thf_atomic_formula identical thf_logic_formula + ; + +thf_sequent + : thf_tuple gentzen_arrow thf_tuple + ; + +tff_formula + : tff_logic_formula + | tff_atom_typing + | tff_subtype + ; + +tff_logic_formula + : tff_unit_formula + ( nonassoc_connective tff_unit_formula + | Vline tff_unit_formula ( Vline tff_unit_formula )* + | '&' tff_unit_formula ( '&' tff_unit_formula )* + )? + | txf_definition + | txf_sequent + ; + +tff_binary_formula + : tff_binary_pair + | tff_binary_list + ; + +tff_binary_pair + : tff_unit_formula nonassoc_connective tff_unit_formula + ; + +tff_binary_list + : tff_or_formula + | tff_and_formula + ; + +tff_or_formula + : tff_unit_formula Vline tff_unit_formula + | tff_or_formula Vline tff_unit_formula + ; + +tff_and_formula + : tff_unit_formula '&' tff_unit_formula + | tff_and_formula '&' tff_unit_formula + ; + +tff_unit_formula + : tff_quantified_formula + | tff_prefix_unary + | bnf2antlr_tff_formula_term bnf2antlr_tff_infix_tail? + | ( defined_term | txf_tuple ) bnf2antlr_tff_infix_tail + ; + +bnf2antlr_tff_formula_term + : tff_atomic_formula + | variable + | '(' tff_logic_formula ')' + ; + +bnf2antlr_tff_infix_tail + : ( defined_infix_pred | infix_inequality ) tff_unitary_term + ; + + +tff_preunit_formula + : tff_unitary_formula + | tff_prefix_unary + ; + +tff_unitary_formula + : tff_quantified_formula + | tff_atomic_formula + | txf_unitary_formula + | '(' tff_logic_formula ')' + ; + +txf_unitary_formula + : variable + ; + +tff_quantified_formula + : tff_quantifier '[' tff_variable_list ']' ':' tff_unit_formula + ; + +tff_variable_list + : tff_variable + | tff_variable ',' tff_variable_list + ; + +tff_variable + : tff_typed_variable + | variable + ; + +tff_typed_variable + : variable ':' tff_atomic_type + ; + +tff_unary_formula + : tff_prefix_unary + | tff_infix_unary + ; + +tff_prefix_unary + : tff_unary_connective tff_preunit_formula + ; + +tff_infix_unary + : tff_unitary_term infix_inequality tff_unitary_term + ; + +tff_atomic_formula + : tff_plain_atomic + | tff_defined_atomic + | tff_system_atomic + ; + +tff_plain_atomic + : constant + | functor '(' tff_arguments ')' + ; + +tff_defined_atomic + : tff_defined_plain + ; + +tff_defined_plain + : defined_constant + | defined_functor '(' tff_arguments ')' + | nxf_atom + | txf_let + ; + +tff_defined_infix + : tff_unitary_term defined_infix_pred tff_unitary_term + ; + +tff_system_atomic + : system_constant + | system_functor '(' tff_arguments ')' + ; + +txf_let + : '$let' '(' txf_let_types ',' txf_let_defns ',' tff_term ')' + ; + +txf_let_types + : tff_atom_typing + | '[' tff_atom_typing_list ']' + ; + +tff_atom_typing_list + : tff_atom_typing + | tff_atom_typing ',' tff_atom_typing_list + ; + +txf_let_defns + : txf_let_defn + | '[' txf_let_defn_list ']' + ; + +txf_let_defn + : txf_let_lhs assignment tff_term + ; + +txf_let_lhs + : tff_plain_atomic + | txf_tuple + ; + +txf_let_defn_list + : txf_let_defn + | txf_let_defn ',' txf_let_defn_list + ; + +nxf_atom + : nxf_long_connective '@' '(' tff_arguments ')' + ; + +tff_term + : tff_logic_formula + | defined_term + | txf_tuple + ; + +tff_unitary_term + : tff_atomic_formula + | defined_term + | txf_tuple + | variable + | '(' tff_logic_formula ')' + ; + +txf_tuple + : '[' ']' + | '[' tff_arguments ']' + ; + +tff_arguments + : tff_term comma_tff_term* + ; + +comma_tff_term + : ',' tff_term + ; + +tff_atom_typing + : typeable_atom ':' tff_top_level_type + | '(' tff_atom_typing ')' + ; + +tff_top_level_type + : tff_atomic_type + | tff_non_atomic_type + ; + +tff_non_atomic_type + : tff_mapping_type + | tf1_quantified_type + | '(' tff_non_atomic_type ')' + ; + +tf1_quantified_type + : type_quantifier '[' tff_variable_list ']' ':' tff_monotype + ; + +tff_monotype + : tff_atomic_type + | '(' tff_mapping_type ')' + | tf1_quantified_type + ; + +tff_unitary_type + : tff_atomic_type + | '(' tff_xprod_type ')' + ; + +tff_atomic_type + : type_constant + | defined_type + | variable + | type_functor '(' tff_type_arguments ')' + | '(' tff_atomic_type ')' + | txf_tuple_type + ; + +tff_type_arguments + : tff_atomic_type + | tff_atomic_type ',' tff_type_arguments + ; + +tff_mapping_type + : tff_unitary_type Arrow tff_atomic_type + ; + +tff_xprod_type + : tff_unitary_type Star tff_atomic_type + | tff_xprod_type Star tff_atomic_type + ; + +txf_tuple_type + : '[' tff_type_list ']' + ; + +tff_type_list + : tff_top_level_type + | tff_top_level_type ',' tff_type_list + ; + +tff_subtype + : atomic_type subtype_sign atomic_type + ; + +txf_definition + : tff_atomic_formula identical tff_term + ; + +txf_sequent + : txf_tuple gentzen_arrow txf_tuple + ; + +nhf_long_connective + : '{' ntf_connective_name '}' + | '{' ntf_connective_name '(' nhf_parameter_list ')' '}' + ; + +nhf_parameter_list + : nhf_parameter + | nhf_parameter ',' nhf_parameter_list + ; + +nhf_parameter + : ntf_index + | nhf_key_pair + ; + +nhf_key_pair + : thf_definition + ; + +nxf_long_connective + : '{' ntf_connective_name '}' + | '{' ntf_connective_name '(' nxf_parameter_list ')' '}' + ; + +nxf_parameter_list + : nxf_parameter + | nxf_parameter ',' nxf_parameter_list + ; + +nxf_parameter + : ntf_index + | nxf_key_pair + ; + +nxf_key_pair + : txf_definition + ; + +ntf_connective_name + : ntf_defined_connective + | atomic_system_word + ; + +ntf_defined_connective + : atomic_defined_word + ; + +ntf_index + : Hash tff_unitary_term + ; + +ntf_short_connective + : '[' '.' ']' + | Less_sign '.' Arrow + | '{' '.' '}' + | '(' '.' ')' + ; + +tcf_formula + : tcf_logic_formula + | tff_atom_typing + ; + +tcf_logic_formula + : tcf_quantified_formula + | cnf_formula + ; + +tcf_quantified_formula + : '!' '[' tff_variable_list ']' ':' tcf_logic_formula + ; + +fof_formula + : fof_logic_formula + | fof_sequent + ; + +fof_logic_formula + : fof_binary_formula + | fof_unary_formula + | fof_unitary_formula + ; + +fof_binary_formula + : fof_binary_pair + | fof_binary_list + ; + +fof_binary_pair + : fof_unit_formula nonassoc_connective fof_unit_formula + ; + +fof_binary_list + : fof_or_formula + | fof_and_formula + ; + +fof_or_formula + : fof_unit_formula Vline fof_unit_formula + | fof_or_formula Vline fof_unit_formula + ; + +fof_and_formula + : fof_unit_formula '&' fof_unit_formula + | fof_and_formula '&' fof_unit_formula + ; + +fof_unary_formula + : unary_connective fof_unit_formula + | fof_infix_unary + ; + +fof_infix_unary + : fof_term infix_inequality fof_term + ; + +fof_unit_formula + : fof_unitary_formula + | fof_unary_formula + ; + +fof_unitary_formula + : fof_quantified_formula + | fof_atomic_formula + | '(' fof_logic_formula ')' + ; + +fof_quantified_formula + : fof_quantifier '[' fof_variable_list ']' ':' fof_unit_formula + ; + +fof_variable_list + : variable + | variable ',' fof_variable_list + ; + +fof_atomic_formula + : fof_plain_atomic_formula + | fof_defined_atomic_formula + | fof_system_atomic_formula + ; + +fof_plain_atomic_formula + : fof_plain_term + ; + +fof_defined_atomic_formula + : fof_defined_plain_formula + | fof_defined_infix_formula + ; + +fof_defined_plain_formula + : fof_defined_plain_term + ; + +fof_defined_infix_formula + : fof_term defined_infix_pred fof_term + ; + +fof_system_atomic_formula + : fof_system_term + ; + +fof_plain_term + : constant + | functor '(' fof_arguments ')' + ; + +fof_defined_term + : defined_term + | fof_defined_atomic_term + ; + +fof_defined_atomic_term + : fof_defined_plain_term + ; + +fof_defined_plain_term + : defined_constant + | defined_functor '(' fof_arguments ')' + ; + +fof_system_term + : system_constant + | system_functor '(' fof_arguments ')' + ; + +fof_arguments + : fof_term + | fof_term ',' fof_arguments + ; + +fof_term + : fof_function_term + | variable + ; + +fof_function_term + : fof_plain_term + | fof_defined_term + | fof_system_term + ; + +fof_sequent + : fof_formula_tuple gentzen_arrow fof_formula_tuple + | '(' fof_sequent ')' + ; + +fof_formula_tuple + : '[' ']' + | '[' fof_formula_tuple_list ']' + ; + +fof_formula_tuple_list + : fof_logic_formula comma_fof_logic_formula* + ; + +comma_fof_logic_formula + : ',' fof_logic_formula + ; + +cnf_formula + : cnf_disjunction + | '(' cnf_formula ')' + ; + +cnf_disjunction + : cnf_literal + | cnf_disjunction Vline cnf_literal + ; + +cnf_literal + : fof_atomic_formula + | '~' fof_atomic_formula + | '~' '(' fof_atomic_formula ')' + | fof_infix_unary + ; + +thf_quantifier + : tff_quantifier + | th0_quantifier + | type_quantifier + ; + +thf_unary_connective + : unary_connective + | ntf_short_connective + ; + +th0_quantifier + : '^' + | '@+' + | '@-' + ; + +type_quantifier + : '!>' + | '?*' + ; + +subtype_sign + : '<<' + ; + +tff_unary_connective + : unary_connective + | ntf_short_connective + ; + +tff_quantifier + : fof_quantifier + | Hash + ; + +fof_quantifier + : '!' + | '?' + ; + +nonassoc_connective + : '<=>' + | '=>' + | '<=' + | '<~>' + | '~' Vline + | '~&' + ; + +assoc_connective + : Vline + | '&' + ; + +unary_connective + : '~' + ; + +gentzen_arrow + : '-->' + ; + +assignment + : ':=' + ; + +identical + : '==' + ; + +typeable_atom + : constant + | Distinct_object + ; + +atomic_type + : typeable_atom + | defined_constant + | system_type + ; + +type_constant + : type_functor + ; + +type_functor + : atomic_word + ; + +defined_type + : atomic_defined_word + ; + +system_type + : atomic_system_word + ; + +defined_infix_pred + : infix_equality + ; + +infix_equality + : '=' + ; + +infix_inequality + : '!=' + ; + +constant + : functor + ; + +functor + : atomic_word + ; + +defined_constant + : defined_functor + ; + +defined_functor + : atomic_defined_word + ; + +system_constant + : system_functor + ; + +system_functor + : atomic_system_word + ; + +th1_defined_term + : '!!' + | '??' + | '@@+' + | '@@-' + | '@=' + ; + +defined_term + : number + | Distinct_object + ; + +variable + : Upper_word + ; + +source + : dag_source + | internal_source + | external_source + | '[' sources ']' + ; + +sources + : source + | source ',' sources + ; + +dag_source + : name + | inference_record + ; + +inference_record + : 'inference' '(' inference_rule ',' useful_info ',' parents ')' + ; + +inference_rule + : atomic_word + ; + +internal_source + : 'introduced' '(' intro_type ',' useful_info ',' parents ')' + ; + +intro_type + : atomic_word + ; + +external_source + : file_source + ; + +file_source + : 'file' '(' file_name file_info ')' + ; + +file_info + : ',' name + | nothing + ; + +parents + : '[' ']' + | '[' parent_list ']' + ; + +parent_list + : parent_info comma_parent_info* + ; + +comma_parent_info + : ',' parent_info + ; + +parent_info + : source parent_details + ; + +parent_details + : ':' general_term + | nothing + ; + +optional_info + : ',' useful_info + | nothing + ; + +useful_info + : general_list + ; + +include + : 'include' '(' file_name include_optionals ')' '.' + ; + +include_optionals + : nothing + | ',' formula_selection + | ',' formula_selection ',' space_name + ; + +formula_selection + : '[' name_list ']' + | Star + ; + +name_list + : name + | name ',' name_list + ; + +space_name + : name + ; + +general_term + : general_data + | general_data ':' general_term + | general_list + ; + +general_data + : atomic_word + | general_function + | variable + | number + | Distinct_object + | formula_data + ; + +general_function + : atomic_word '(' general_terms ')' + ; + +formula_data + : '$thf' '(' thf_formula ')' + | '$tff' '(' tff_formula ')' + | '$fof' '(' fof_formula ')' + | '$cnf' '(' cnf_formula ')' + | '$fot' '(' fof_term ')' + ; + +general_list + : '[' ']' + | '[' general_terms ']' + ; + +general_terms + : general_term comma_general_term* + ; + +comma_general_term + : ',' general_term + ; + +name + : atomic_word + | Integer + ; + +atomic_word + : lower_word_token + | Single_quoted + | Back_quoted + ; + +atomic_defined_word + : Dollar_word + ; + +atomic_system_word + : Dollar_dollar_word + ; + +number + : Integer + | Rational + | Real + ; + +file_name + : atomic_word + ; + +nothing + : + ; + +// Preserve Lower_word spellings shadowed by implicit literal tokens. +lower_word_token + : Lower_word + | 'cnf' + | 'file' + | 'fof' + | 'include' + | 'inference' + | 'introduced' + | 'tcf' + | 'tff' + | 'thf' + | 'tpi' + ; + +// Semantic restrictions from SyntaxBNF. +// They constrain the language semantically and are intentionally +// not added as alternative context-free productions. +// line 54: :== axiom | hypothesis | definition | assumption | lemma | theorem | corollary | conjecture | negated_conjecture | plain | type | interpretation | logic | unknown +// line 156: :== | +// line 157: :== | | | | () +// line 159: :== [] : +// line 217: :== | () +// line 225: :== | () | | | +// line 233: :== | () +// line 235: :== $ite(,,) +// line 293: :== $box | $dia | {$necessary} | {$possible} | {$obligatory} | {$permissible} | {$knows} | {$canKnow} | {$believes} | {$canBelieve} +// line 303: :== [] +// line 304: :== $modal | $alethic_modal | $deontic_modal | $epistemic_modal | $doxastic_modal | $intuitionistic +// line 306: :== | , +// line 307: :== | | | | +// line 309: :== $domains +// line 310: :== | [] +// line 311: :== $constant | $varying | $cumulative | $decreasing | +// line 313: :== | , +// line 314: :== $designation +// line 315: :== | [] +// line 316: :== $rigid | $flexible | +// line 318: :== | , +// line 320: :== $terms +// line 321: :== | [] +// line 322: :== $local | $global | +// line 323: :== | , +// line 324: :== $modalities +// line 325: :== | [] +// line 326: :== | | +// line 328: :== | , +// line 330: :== $time +// line 331: :== | [] +// line 332: :== $reflexivity | $irreflexivity | $transitivity | $asymmetry | $anti_symmetry | $linearity | $forward_linearity | $backward_linearity | $beginning | $end | $no_beginning | $no_end | $density | $forward_discreteness | $backward_discreteness | +// line 337: :== | , +// line 339: :== $modal_system_K | $modal_system_KB | $modal_system_K4 | $modal_system_K5 | $modal_system_K45 | $modal_system_KB5 | $modal_system_D | $modal_system_DB | $modal_system_D4 | $modal_system_D5 | $modal_system_D45 | $modal_system_M | $modal_system_B | $modal_system_S4 | $modal_system_S5 | $modal_system_S5U +// line 345: :== $modal_axiom_K | $modal_axiom_M | $modal_axiom_B | $modal_axiom_D | $modal_axiom_4 | $modal_axiom_5 | $modal_axiom_CD | $modal_axiom_BoxM | $modal_axiom_C4 | $modal_axiom_C +// line 379: :== | () +// line 382: :== | () +// line 453: :== | | +// line 463: :== $oType | $o | $iType | $i | $tType | $real | $rat | $int +// line 471: :== +// line 472: :== +// line 473: :== +// line 474: :== $true | $false +// line 475: :== +// line 476: :== $distinct | $less | $lesseq | $greater | $greatereq | $is_int | $is_rat +// line 482: :== +// line 483: :== +// line 491: :== $uminus | $sum | $difference | $product | $quotient | $quotient_e | $quotient_t | $quotient_f | $remainder_e | $remainder_t | $remainder_f | $floor | $ceiling | $truncate | $round | $abs | $to_int | $to_rat | $to_real +// line 518: :== definition | tautology | assumption | theory +// line 535: :== [] | [] +// line 536: :== * +// line 537: :== , +// line 538: :== | | +// line 540: :== | +// line 541: :== description() +// line 542: :== iquote() +// line 547: :== | | | +// line 549: :== status() | +// line 565: :== (,) +// line 568: :== assumptions([]) +// line 571: :== refutation() +// line 573: :== new_symbols(,[]) +// line 574: :== | , +// line 576: :== | +// line 592: :== bind(,) | bind_type(,) +// line 593: :== $thf() | $tff() + +// Lexer rules derived from ::- and ::: definitions. +Single_quoted + : Single_quote Sq_char Sq_char* Single_quote + ; + +Back_quoted + : Back_quote Upper_word + ; + +Distinct_object + : Double_quote Do_char Do_char* Double_quote + ; + +Dollar_word + : Dollar Alpha_numeric* + ; + +Dollar_dollar_word + : Dollar Dollar Alpha_numeric* + ; + +Upper_word + : Upper_alpha Alpha_numeric* + ; + +Lower_word + : Lower_alpha Alpha_numeric* + ; + +Real + : Signed_real + | Unsigned_real + ; + +fragment Signed_real + : Sign Unsigned_real + ; + +fragment Unsigned_real + : Decimal_fraction + | Decimal_exponent + ; + +fragment Decimal_exponent + : ( Integer_digits | Decimal_fraction ) Exponent Exp_integer + ; + +fragment Decimal_fraction + : Unsigned_integer Dot Integer_digits + ; + +fragment Exp_integer + : Signed_exp_integer + | Integer_digits + ; + +fragment Signed_exp_integer + : Sign Integer_digits + ; + +Rational + : Signed_rational + | Unsigned_rational + ; + +fragment Signed_rational + : Sign Unsigned_rational + ; + +fragment Unsigned_rational + : Unsigned_integer Slash Positive_integer + ; + +Integer + : Signed_integer + | Unsigned_integer + ; + +fragment Signed_integer + : Sign Unsigned_integer + ; + +fragment Unsigned_integer + : Zero_numeric + | Positive_integer + ; + +fragment Positive_integer + : Non_zero_numeric Numeric* + ; + +fragment Integer_digits + : Numeric Numeric* + ; + +Slash + : Slash_char + ; + +Slosh + : Slosh_char + ; + +Vline + : [|] + ; + +Star + : [*] + ; + +Plus + : [+] + ; + +Arrow + : [>] + ; + +Less_sign + : [<] + ; + +Hash + : [#] + ; + +Comment + : ( Comment_line | Comment_block ) + -> channel(HIDDEN); + +Comment_line + : Percentage_sign Comment_char* + ; + +fragment Comment_block + : Slash_char Star Not_star_slash Star Star* Slash_char + ; + +fragment Not_star_slash + : ( ~[*]* [*] [*]* ~[/*] )* ~[*]* + ; + +fragment Percentage_sign + : [%] + ; + +fragment Double_quote + : ["] + ; + +fragment Do_char + : [\u0020-\u0021\u0023-\u005B\u005D-\u007E] + | [\\] ["\\] + ; + +fragment Single_quote + : ['] + ; + +fragment Back_quote + : [`] + ; + +fragment Sq_char + : [\u0020-\u0026\u0028-\u005B\u005D-\u007E] + | [\\] ['\\] + ; + +fragment Sign + : [+\-] + ; + +fragment Dot + : [.] + ; + +fragment Exponent + : [Ee] + ; + +fragment Slash_char + : [/] + ; + +fragment Slosh_char + : [\\] + ; + +fragment Zero_numeric + : [0] + ; + +fragment Non_zero_numeric + : [1-9] + ; + +fragment Numeric + : [0-9] + ; + +fragment Lower_alpha + : [a-z] + ; + +fragment Upper_alpha + : [A-Z] + ; + +fragment Underscore + : [_] + ; + +fragment Alpha + : Lower_alpha + | Upper_alpha + ; + +fragment Alpha_numeric + : Lower_alpha + | Upper_alpha + | Numeric + | Underscore + ; + +fragment Dollar + : [$] + ; + +fragment Comment_char + : ~[\r\n] + ; + +// SyntaxBNF permits whitespace between tokens. +WS + : [ \t\r\n]+ -> skip + ; diff --git a/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTPLexer.js b/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTPLexer.js new file mode 100644 index 0000000..0ba0927 --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTPLexer.js @@ -0,0 +1,350 @@ +// Generated from TPTP.g4 by ANTLR 4.13.2 +// jshint ignore: start +import antlr4 from 'antlr4'; + + +const serializedATN = [4,0,73,645,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2, +4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7, +12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19, +2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2, +27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34, +7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7, +41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48, +2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2, +56,7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63, +7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7, +70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77, +2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2, +85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91,7,91,2,92, +7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2,98,7,98,2,99,7, +99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103,2,104,7,104,2,105,7,105, +2,106,7,106,2,107,7,107,1,0,1,0,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4, +1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,9,1,9, +1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16, +1,16,1,16,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1, +22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26, +1,27,1,27,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,30,1,30,1,30,1,31,1,31,1, +31,1,31,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,35,1,35,1,35, +1,36,1,36,1,37,1,37,1,37,1,38,1,38,1,38,1,39,1,39,1,39,1,40,1,40,1,40,1, +40,1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,43,1,43,1,43, +1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1, +45,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,47,1,47, +1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,50,1, +50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1,52,5,52,405,8,52, +10,52,12,52,408,9,52,1,52,1,52,1,53,1,53,1,53,1,54,1,54,1,54,5,54,418,8, +54,10,54,12,54,421,9,54,1,54,1,54,1,55,1,55,5,55,427,8,55,10,55,12,55,430, +9,55,1,56,1,56,1,56,5,56,435,8,56,10,56,12,56,438,9,56,1,57,1,57,5,57,442, +8,57,10,57,12,57,445,9,57,1,58,1,58,5,58,449,8,58,10,58,12,58,452,9,58,1, +59,1,59,3,59,456,8,59,1,60,1,60,1,60,1,61,1,61,3,61,463,8,61,1,62,1,62,3, +62,467,8,62,1,62,1,62,1,62,1,63,1,63,1,63,1,63,1,64,1,64,3,64,478,8,64,1, +65,1,65,1,65,1,66,1,66,3,66,485,8,66,1,67,1,67,1,67,1,68,1,68,1,68,1,68, +1,69,1,69,3,69,496,8,69,1,70,1,70,1,70,1,71,1,71,3,71,503,8,71,1,72,1,72, +5,72,507,8,72,10,72,12,72,510,9,72,1,73,1,73,5,73,514,8,73,10,73,12,73,517, +9,73,1,74,1,74,1,75,1,75,1,76,1,76,1,77,1,77,1,78,1,78,1,79,1,79,1,80,1, +80,1,81,1,81,1,82,1,82,3,82,537,8,82,1,82,1,82,1,83,1,83,5,83,543,8,83,10, +83,12,83,546,9,83,1,84,1,84,1,84,1,84,1,84,5,84,553,8,84,10,84,12,84,556, +9,84,1,84,1,84,1,85,5,85,561,8,85,10,85,12,85,564,9,85,1,85,1,85,5,85,568, +8,85,10,85,12,85,571,9,85,1,85,5,85,574,8,85,10,85,12,85,577,9,85,1,85,5, +85,580,8,85,10,85,12,85,583,9,85,1,86,1,86,1,87,1,87,1,88,1,88,1,88,3,88, +592,8,88,1,89,1,89,1,90,1,90,1,91,1,91,1,91,3,91,601,8,91,1,92,1,92,1,93, +1,93,1,94,1,94,1,95,1,95,1,96,1,96,1,97,1,97,1,98,1,98,1,99,1,99,1,100,1, +100,1,101,1,101,1,102,1,102,1,103,1,103,3,103,627,8,103,1,104,1,104,1,104, +1,104,3,104,633,8,104,1,105,1,105,1,106,1,106,1,107,4,107,640,8,107,11,107, +12,107,641,1,107,1,107,0,0,108,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19, +10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43, +22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67, +34,69,35,71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91, +46,93,47,95,48,97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,113, +57,115,58,117,59,119,60,121,0,123,0,125,0,127,0,129,0,131,0,133,61,135,0, +137,0,139,62,141,0,143,0,145,0,147,0,149,63,151,64,153,65,155,66,157,67, +159,68,161,69,163,70,165,71,167,72,169,0,171,0,173,0,175,0,177,0,179,0,181, +0,183,0,185,0,187,0,189,0,191,0,193,0,195,0,197,0,199,0,201,0,203,0,205, +0,207,0,209,0,211,0,213,0,215,73,1,0,29,1,0,124,124,1,0,42,42,1,0,43,43, +1,0,62,62,1,0,60,60,1,0,35,35,2,0,42,42,47,47,1,0,37,37,1,0,34,34,3,0,32, +33,35,91,93,126,1,0,92,92,2,0,34,34,92,92,1,0,39,39,1,0,96,96,3,0,32,38, +40,91,93,126,2,0,39,39,92,92,2,0,43,43,45,45,1,0,46,46,2,0,69,69,101,101, +1,0,47,47,1,0,48,48,1,0,49,57,1,0,48,57,1,0,97,122,1,0,65,90,1,0,95,95,1, +0,36,36,2,0,10,10,13,13,3,0,9,10,13,13,32,32,638,0,1,1,0,0,0,0,3,1,0,0,0, +0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0, +0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27, +1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0, +0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1, +0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0, +61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0, +0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83, +1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0, +0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105, +1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1, +0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,133,1,0,0,0,0,139,1,0,0,0,0,149,1,0, +0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0, +0,0,161,1,0,0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,215,1,0,0,0, +1,217,1,0,0,0,3,221,1,0,0,0,5,223,1,0,0,0,7,225,1,0,0,0,9,227,1,0,0,0,11, +229,1,0,0,0,13,233,1,0,0,0,15,237,1,0,0,0,17,241,1,0,0,0,19,245,1,0,0,0, +21,249,1,0,0,0,23,251,1,0,0,0,25,253,1,0,0,0,27,255,1,0,0,0,29,257,1,0,0, +0,31,259,1,0,0,0,33,261,1,0,0,0,35,266,1,0,0,0,37,268,1,0,0,0,39,270,1,0, +0,0,41,272,1,0,0,0,43,274,1,0,0,0,45,276,1,0,0,0,47,279,1,0,0,0,49,282,1, +0,0,0,51,285,1,0,0,0,53,288,1,0,0,0,55,291,1,0,0,0,57,293,1,0,0,0,59,297, +1,0,0,0,61,300,1,0,0,0,63,303,1,0,0,0,65,307,1,0,0,0,67,310,1,0,0,0,69,314, +1,0,0,0,71,317,1,0,0,0,73,320,1,0,0,0,75,322,1,0,0,0,77,325,1,0,0,0,79,328, +1,0,0,0,81,331,1,0,0,0,83,335,1,0,0,0,85,339,1,0,0,0,87,342,1,0,0,0,89,352, +1,0,0,0,91,363,1,0,0,0,93,368,1,0,0,0,95,376,1,0,0,0,97,381,1,0,0,0,99,386, +1,0,0,0,101,391,1,0,0,0,103,396,1,0,0,0,105,401,1,0,0,0,107,411,1,0,0,0, +109,414,1,0,0,0,111,424,1,0,0,0,113,431,1,0,0,0,115,439,1,0,0,0,117,446, +1,0,0,0,119,455,1,0,0,0,121,457,1,0,0,0,123,462,1,0,0,0,125,466,1,0,0,0, +127,471,1,0,0,0,129,477,1,0,0,0,131,479,1,0,0,0,133,484,1,0,0,0,135,486, +1,0,0,0,137,489,1,0,0,0,139,495,1,0,0,0,141,497,1,0,0,0,143,502,1,0,0,0, +145,504,1,0,0,0,147,511,1,0,0,0,149,518,1,0,0,0,151,520,1,0,0,0,153,522, +1,0,0,0,155,524,1,0,0,0,157,526,1,0,0,0,159,528,1,0,0,0,161,530,1,0,0,0, +163,532,1,0,0,0,165,536,1,0,0,0,167,540,1,0,0,0,169,547,1,0,0,0,171,575, +1,0,0,0,173,584,1,0,0,0,175,586,1,0,0,0,177,591,1,0,0,0,179,593,1,0,0,0, +181,595,1,0,0,0,183,600,1,0,0,0,185,602,1,0,0,0,187,604,1,0,0,0,189,606, +1,0,0,0,191,608,1,0,0,0,193,610,1,0,0,0,195,612,1,0,0,0,197,614,1,0,0,0, +199,616,1,0,0,0,201,618,1,0,0,0,203,620,1,0,0,0,205,622,1,0,0,0,207,626, +1,0,0,0,209,632,1,0,0,0,211,634,1,0,0,0,213,636,1,0,0,0,215,639,1,0,0,0, +217,218,5,116,0,0,218,219,5,112,0,0,219,220,5,105,0,0,220,2,1,0,0,0,221, +222,5,40,0,0,222,4,1,0,0,0,223,224,5,44,0,0,224,6,1,0,0,0,225,226,5,41,0, +0,226,8,1,0,0,0,227,228,5,46,0,0,228,10,1,0,0,0,229,230,5,116,0,0,230,231, +5,104,0,0,231,232,5,102,0,0,232,12,1,0,0,0,233,234,5,116,0,0,234,235,5,102, +0,0,235,236,5,102,0,0,236,14,1,0,0,0,237,238,5,116,0,0,238,239,5,99,0,0, +239,240,5,102,0,0,240,16,1,0,0,0,241,242,5,102,0,0,242,243,5,111,0,0,243, +244,5,102,0,0,244,18,1,0,0,0,245,246,5,99,0,0,246,247,5,110,0,0,247,248, +5,102,0,0,248,20,1,0,0,0,249,250,5,45,0,0,250,22,1,0,0,0,251,252,5,38,0, +0,252,24,1,0,0,0,253,254,5,64,0,0,254,26,1,0,0,0,255,256,5,91,0,0,256,28, +1,0,0,0,257,258,5,93,0,0,258,30,1,0,0,0,259,260,5,58,0,0,260,32,1,0,0,0, +261,262,5,36,0,0,262,263,5,108,0,0,263,264,5,101,0,0,264,265,5,116,0,0,265, +34,1,0,0,0,266,267,5,123,0,0,267,36,1,0,0,0,268,269,5,125,0,0,269,38,1,0, +0,0,270,271,5,33,0,0,271,40,1,0,0,0,272,273,5,126,0,0,273,42,1,0,0,0,274, +275,5,94,0,0,275,44,1,0,0,0,276,277,5,64,0,0,277,278,5,43,0,0,278,46,1,0, +0,0,279,280,5,64,0,0,280,281,5,45,0,0,281,48,1,0,0,0,282,283,5,33,0,0,283, +284,5,62,0,0,284,50,1,0,0,0,285,286,5,63,0,0,286,287,5,42,0,0,287,52,1,0, +0,0,288,289,5,60,0,0,289,290,5,60,0,0,290,54,1,0,0,0,291,292,5,63,0,0,292, +56,1,0,0,0,293,294,5,60,0,0,294,295,5,61,0,0,295,296,5,62,0,0,296,58,1,0, +0,0,297,298,5,61,0,0,298,299,5,62,0,0,299,60,1,0,0,0,300,301,5,60,0,0,301, +302,5,61,0,0,302,62,1,0,0,0,303,304,5,60,0,0,304,305,5,126,0,0,305,306,5, +62,0,0,306,64,1,0,0,0,307,308,5,126,0,0,308,309,5,38,0,0,309,66,1,0,0,0, +310,311,5,45,0,0,311,312,5,45,0,0,312,313,5,62,0,0,313,68,1,0,0,0,314,315, +5,58,0,0,315,316,5,61,0,0,316,70,1,0,0,0,317,318,5,61,0,0,318,319,5,61,0, +0,319,72,1,0,0,0,320,321,5,61,0,0,321,74,1,0,0,0,322,323,5,33,0,0,323,324, +5,61,0,0,324,76,1,0,0,0,325,326,5,33,0,0,326,327,5,33,0,0,327,78,1,0,0,0, +328,329,5,63,0,0,329,330,5,63,0,0,330,80,1,0,0,0,331,332,5,64,0,0,332,333, +5,64,0,0,333,334,5,43,0,0,334,82,1,0,0,0,335,336,5,64,0,0,336,337,5,64,0, +0,337,338,5,45,0,0,338,84,1,0,0,0,339,340,5,64,0,0,340,341,5,61,0,0,341, +86,1,0,0,0,342,343,5,105,0,0,343,344,5,110,0,0,344,345,5,102,0,0,345,346, +5,101,0,0,346,347,5,114,0,0,347,348,5,101,0,0,348,349,5,110,0,0,349,350, +5,99,0,0,350,351,5,101,0,0,351,88,1,0,0,0,352,353,5,105,0,0,353,354,5,110, +0,0,354,355,5,116,0,0,355,356,5,114,0,0,356,357,5,111,0,0,357,358,5,100, +0,0,358,359,5,117,0,0,359,360,5,99,0,0,360,361,5,101,0,0,361,362,5,100,0, +0,362,90,1,0,0,0,363,364,5,102,0,0,364,365,5,105,0,0,365,366,5,108,0,0,366, +367,5,101,0,0,367,92,1,0,0,0,368,369,5,105,0,0,369,370,5,110,0,0,370,371, +5,99,0,0,371,372,5,108,0,0,372,373,5,117,0,0,373,374,5,100,0,0,374,375,5, +101,0,0,375,94,1,0,0,0,376,377,5,36,0,0,377,378,5,116,0,0,378,379,5,104, +0,0,379,380,5,102,0,0,380,96,1,0,0,0,381,382,5,36,0,0,382,383,5,116,0,0, +383,384,5,102,0,0,384,385,5,102,0,0,385,98,1,0,0,0,386,387,5,36,0,0,387, +388,5,102,0,0,388,389,5,111,0,0,389,390,5,102,0,0,390,100,1,0,0,0,391,392, +5,36,0,0,392,393,5,99,0,0,393,394,5,110,0,0,394,395,5,102,0,0,395,102,1, +0,0,0,396,397,5,36,0,0,397,398,5,102,0,0,398,399,5,111,0,0,399,400,5,116, +0,0,400,104,1,0,0,0,401,402,3,179,89,0,402,406,3,183,91,0,403,405,3,183, +91,0,404,403,1,0,0,0,405,408,1,0,0,0,406,404,1,0,0,0,406,407,1,0,0,0,407, +409,1,0,0,0,408,406,1,0,0,0,409,410,3,179,89,0,410,106,1,0,0,0,411,412,3, +181,90,0,412,413,3,115,57,0,413,108,1,0,0,0,414,415,3,175,87,0,415,419,3, +177,88,0,416,418,3,177,88,0,417,416,1,0,0,0,418,421,1,0,0,0,419,417,1,0, +0,0,419,420,1,0,0,0,420,422,1,0,0,0,421,419,1,0,0,0,422,423,3,175,87,0,423, +110,1,0,0,0,424,428,3,211,105,0,425,427,3,209,104,0,426,425,1,0,0,0,427, +430,1,0,0,0,428,426,1,0,0,0,428,429,1,0,0,0,429,112,1,0,0,0,430,428,1,0, +0,0,431,432,3,211,105,0,432,436,3,211,105,0,433,435,3,209,104,0,434,433, +1,0,0,0,435,438,1,0,0,0,436,434,1,0,0,0,436,437,1,0,0,0,437,114,1,0,0,0, +438,436,1,0,0,0,439,443,3,203,101,0,440,442,3,209,104,0,441,440,1,0,0,0, +442,445,1,0,0,0,443,441,1,0,0,0,443,444,1,0,0,0,444,116,1,0,0,0,445,443, +1,0,0,0,446,450,3,201,100,0,447,449,3,209,104,0,448,447,1,0,0,0,449,452, +1,0,0,0,450,448,1,0,0,0,450,451,1,0,0,0,451,118,1,0,0,0,452,450,1,0,0,0, +453,456,3,121,60,0,454,456,3,123,61,0,455,453,1,0,0,0,455,454,1,0,0,0,456, +120,1,0,0,0,457,458,3,185,92,0,458,459,3,123,61,0,459,122,1,0,0,0,460,463, +3,127,63,0,461,463,3,125,62,0,462,460,1,0,0,0,462,461,1,0,0,0,463,124,1, +0,0,0,464,467,3,147,73,0,465,467,3,127,63,0,466,464,1,0,0,0,466,465,1,0, +0,0,467,468,1,0,0,0,468,469,3,189,94,0,469,470,3,129,64,0,470,126,1,0,0, +0,471,472,3,143,71,0,472,473,3,187,93,0,473,474,3,147,73,0,474,128,1,0,0, +0,475,478,3,131,65,0,476,478,3,147,73,0,477,475,1,0,0,0,477,476,1,0,0,0, +478,130,1,0,0,0,479,480,3,185,92,0,480,481,3,147,73,0,481,132,1,0,0,0,482, +485,3,135,67,0,483,485,3,137,68,0,484,482,1,0,0,0,484,483,1,0,0,0,485,134, +1,0,0,0,486,487,3,185,92,0,487,488,3,137,68,0,488,136,1,0,0,0,489,490,3, +143,71,0,490,491,3,149,74,0,491,492,3,145,72,0,492,138,1,0,0,0,493,496,3, +141,70,0,494,496,3,143,71,0,495,493,1,0,0,0,495,494,1,0,0,0,496,140,1,0, +0,0,497,498,3,185,92,0,498,499,3,143,71,0,499,142,1,0,0,0,500,503,3,195, +97,0,501,503,3,145,72,0,502,500,1,0,0,0,502,501,1,0,0,0,503,144,1,0,0,0, +504,508,3,197,98,0,505,507,3,199,99,0,506,505,1,0,0,0,507,510,1,0,0,0,508, +506,1,0,0,0,508,509,1,0,0,0,509,146,1,0,0,0,510,508,1,0,0,0,511,515,3,199, +99,0,512,514,3,199,99,0,513,512,1,0,0,0,514,517,1,0,0,0,515,513,1,0,0,0, +515,516,1,0,0,0,516,148,1,0,0,0,517,515,1,0,0,0,518,519,3,191,95,0,519,150, +1,0,0,0,520,521,3,193,96,0,521,152,1,0,0,0,522,523,7,0,0,0,523,154,1,0,0, +0,524,525,7,1,0,0,525,156,1,0,0,0,526,527,7,2,0,0,527,158,1,0,0,0,528,529, +7,3,0,0,529,160,1,0,0,0,530,531,7,4,0,0,531,162,1,0,0,0,532,533,7,5,0,0, +533,164,1,0,0,0,534,537,3,167,83,0,535,537,3,169,84,0,536,534,1,0,0,0,536, +535,1,0,0,0,537,538,1,0,0,0,538,539,6,82,0,0,539,166,1,0,0,0,540,544,3,173, +86,0,541,543,3,213,106,0,542,541,1,0,0,0,543,546,1,0,0,0,544,542,1,0,0,0, +544,545,1,0,0,0,545,168,1,0,0,0,546,544,1,0,0,0,547,548,3,191,95,0,548,549, +3,155,77,0,549,550,3,171,85,0,550,554,3,155,77,0,551,553,3,155,77,0,552, +551,1,0,0,0,553,556,1,0,0,0,554,552,1,0,0,0,554,555,1,0,0,0,555,557,1,0, +0,0,556,554,1,0,0,0,557,558,3,191,95,0,558,170,1,0,0,0,559,561,8,1,0,0,560, +559,1,0,0,0,561,564,1,0,0,0,562,560,1,0,0,0,562,563,1,0,0,0,563,565,1,0, +0,0,564,562,1,0,0,0,565,569,7,1,0,0,566,568,7,1,0,0,567,566,1,0,0,0,568, +571,1,0,0,0,569,567,1,0,0,0,569,570,1,0,0,0,570,572,1,0,0,0,571,569,1,0, +0,0,572,574,8,6,0,0,573,562,1,0,0,0,574,577,1,0,0,0,575,573,1,0,0,0,575, +576,1,0,0,0,576,581,1,0,0,0,577,575,1,0,0,0,578,580,8,1,0,0,579,578,1,0, +0,0,580,583,1,0,0,0,581,579,1,0,0,0,581,582,1,0,0,0,582,172,1,0,0,0,583, +581,1,0,0,0,584,585,7,7,0,0,585,174,1,0,0,0,586,587,7,8,0,0,587,176,1,0, +0,0,588,592,7,9,0,0,589,590,7,10,0,0,590,592,7,11,0,0,591,588,1,0,0,0,591, +589,1,0,0,0,592,178,1,0,0,0,593,594,7,12,0,0,594,180,1,0,0,0,595,596,7,13, +0,0,596,182,1,0,0,0,597,601,7,14,0,0,598,599,7,10,0,0,599,601,7,15,0,0,600, +597,1,0,0,0,600,598,1,0,0,0,601,184,1,0,0,0,602,603,7,16,0,0,603,186,1,0, +0,0,604,605,7,17,0,0,605,188,1,0,0,0,606,607,7,18,0,0,607,190,1,0,0,0,608, +609,7,19,0,0,609,192,1,0,0,0,610,611,7,10,0,0,611,194,1,0,0,0,612,613,7, +20,0,0,613,196,1,0,0,0,614,615,7,21,0,0,615,198,1,0,0,0,616,617,7,22,0,0, +617,200,1,0,0,0,618,619,7,23,0,0,619,202,1,0,0,0,620,621,7,24,0,0,621,204, +1,0,0,0,622,623,7,25,0,0,623,206,1,0,0,0,624,627,3,201,100,0,625,627,3,203, +101,0,626,624,1,0,0,0,626,625,1,0,0,0,627,208,1,0,0,0,628,633,3,201,100, +0,629,633,3,203,101,0,630,633,3,199,99,0,631,633,3,205,102,0,632,628,1,0, +0,0,632,629,1,0,0,0,632,630,1,0,0,0,632,631,1,0,0,0,633,210,1,0,0,0,634, +635,7,26,0,0,635,212,1,0,0,0,636,637,8,27,0,0,637,214,1,0,0,0,638,640,7, +28,0,0,639,638,1,0,0,0,640,641,1,0,0,0,641,639,1,0,0,0,641,642,1,0,0,0,642, +643,1,0,0,0,643,644,6,107,1,0,644,216,1,0,0,0,28,0,406,419,428,436,443,450, +455,462,466,477,484,495,502,508,515,536,544,554,562,569,575,581,591,600, +626,632,641,2,0,1,0,6,0,0]; + + +const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN); + +const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) ); + +export default class TPTPLexer extends antlr4.Lexer { + + static grammarFileName = "TPTP.g4"; + static channelNames = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ]; + static modeNames = [ "DEFAULT_MODE" ]; + static literalNames = [ null, "'tpi'", "'('", "','", "')'", "'.'", "'thf'", + "'tff'", "'tcf'", "'fof'", "'cnf'", "'-'", "'&'", + "'@'", "'['", "']'", "':'", "'$let'", "'{'", "'}'", + "'!'", "'~'", "'^'", "'@+'", "'@-'", "'!>'", "'?*'", + "'<<'", "'?'", "'<=>'", "'=>'", "'<='", "'<~>'", + "'~&'", "'-->'", "':='", "'=='", "'='", "'!='", + "'!!'", "'??'", "'@@+'", "'@@-'", "'@='", "'inference'", + "'introduced'", "'file'", "'include'", "'$thf'", + "'$tff'", "'$fof'", "'$cnf'", "'$fot'" ]; + static symbolicNames = [ null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, "Single_quoted", + "Back_quoted", "Distinct_object", "Dollar_word", + "Dollar_dollar_word", "Upper_word", "Lower_word", + "Real", "Rational", "Integer", "Slash", "Slosh", + "Vline", "Star", "Plus", "Arrow", "Less_sign", + "Hash", "Comment", "Comment_line", "WS" ]; + static ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", + "T__7", "T__8", "T__9", "T__10", "T__11", "T__12", + "T__13", "T__14", "T__15", "T__16", "T__17", "T__18", + "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", + "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", + "T__31", "T__32", "T__33", "T__34", "T__35", "T__36", + "T__37", "T__38", "T__39", "T__40", "T__41", "T__42", + "T__43", "T__44", "T__45", "T__46", "T__47", "T__48", + "T__49", "T__50", "T__51", "Single_quoted", "Back_quoted", + "Distinct_object", "Dollar_word", "Dollar_dollar_word", + "Upper_word", "Lower_word", "Real", "Signed_real", + "Unsigned_real", "Decimal_exponent", "Decimal_fraction", + "Exp_integer", "Signed_exp_integer", "Rational", "Signed_rational", + "Unsigned_rational", "Integer", "Signed_integer", + "Unsigned_integer", "Positive_integer", "Integer_digits", + "Slash", "Slosh", "Vline", "Star", "Plus", "Arrow", + "Less_sign", "Hash", "Comment", "Comment_line", "Comment_block", + "Not_star_slash", "Percentage_sign", "Double_quote", + "Do_char", "Single_quote", "Back_quote", "Sq_char", + "Sign", "Dot", "Exponent", "Slash_char", "Slosh_char", + "Zero_numeric", "Non_zero_numeric", "Numeric", "Lower_alpha", + "Upper_alpha", "Underscore", "Alpha", "Alpha_numeric", + "Dollar", "Comment_char", "WS" ]; + + constructor(input) { + super(input) + this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.atn.PredictionContextCache()); + } +} + +TPTPLexer.EOF = antlr4.Token.EOF; +TPTPLexer.T__0 = 1; +TPTPLexer.T__1 = 2; +TPTPLexer.T__2 = 3; +TPTPLexer.T__3 = 4; +TPTPLexer.T__4 = 5; +TPTPLexer.T__5 = 6; +TPTPLexer.T__6 = 7; +TPTPLexer.T__7 = 8; +TPTPLexer.T__8 = 9; +TPTPLexer.T__9 = 10; +TPTPLexer.T__10 = 11; +TPTPLexer.T__11 = 12; +TPTPLexer.T__12 = 13; +TPTPLexer.T__13 = 14; +TPTPLexer.T__14 = 15; +TPTPLexer.T__15 = 16; +TPTPLexer.T__16 = 17; +TPTPLexer.T__17 = 18; +TPTPLexer.T__18 = 19; +TPTPLexer.T__19 = 20; +TPTPLexer.T__20 = 21; +TPTPLexer.T__21 = 22; +TPTPLexer.T__22 = 23; +TPTPLexer.T__23 = 24; +TPTPLexer.T__24 = 25; +TPTPLexer.T__25 = 26; +TPTPLexer.T__26 = 27; +TPTPLexer.T__27 = 28; +TPTPLexer.T__28 = 29; +TPTPLexer.T__29 = 30; +TPTPLexer.T__30 = 31; +TPTPLexer.T__31 = 32; +TPTPLexer.T__32 = 33; +TPTPLexer.T__33 = 34; +TPTPLexer.T__34 = 35; +TPTPLexer.T__35 = 36; +TPTPLexer.T__36 = 37; +TPTPLexer.T__37 = 38; +TPTPLexer.T__38 = 39; +TPTPLexer.T__39 = 40; +TPTPLexer.T__40 = 41; +TPTPLexer.T__41 = 42; +TPTPLexer.T__42 = 43; +TPTPLexer.T__43 = 44; +TPTPLexer.T__44 = 45; +TPTPLexer.T__45 = 46; +TPTPLexer.T__46 = 47; +TPTPLexer.T__47 = 48; +TPTPLexer.T__48 = 49; +TPTPLexer.T__49 = 50; +TPTPLexer.T__50 = 51; +TPTPLexer.T__51 = 52; +TPTPLexer.Single_quoted = 53; +TPTPLexer.Back_quoted = 54; +TPTPLexer.Distinct_object = 55; +TPTPLexer.Dollar_word = 56; +TPTPLexer.Dollar_dollar_word = 57; +TPTPLexer.Upper_word = 58; +TPTPLexer.Lower_word = 59; +TPTPLexer.Real = 60; +TPTPLexer.Rational = 61; +TPTPLexer.Integer = 62; +TPTPLexer.Slash = 63; +TPTPLexer.Slosh = 64; +TPTPLexer.Vline = 65; +TPTPLexer.Star = 66; +TPTPLexer.Plus = 67; +TPTPLexer.Arrow = 68; +TPTPLexer.Less_sign = 69; +TPTPLexer.Hash = 70; +TPTPLexer.Comment = 71; +TPTPLexer.Comment_line = 72; +TPTPLexer.WS = 73; + + + diff --git a/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTPListener.js b/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTPListener.js new file mode 100644 index 0000000..8ac956e --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTPListener.js @@ -0,0 +1,2097 @@ +// Generated from TPTP.g4 by ANTLR 4.13.2 +// jshint ignore: start +import antlr4 from 'antlr4'; + +// This class defines a complete listener for a parse tree produced by TPTPParser. +export default class TPTPListener extends antlr4.tree.ParseTreeListener { + + // Enter a parse tree produced by TPTPParser#tptp_file. + enterTptp_file(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tptp_file. + exitTptp_file(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tptp_input. + enterTptp_input(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tptp_input. + exitTptp_input(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#annotated_formula. + enterAnnotated_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#annotated_formula. + exitAnnotated_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tpi_annotated. + enterTpi_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tpi_annotated. + exitTpi_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tpi_formula. + enterTpi_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tpi_formula. + exitTpi_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_annotated. + enterThf_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_annotated. + exitThf_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_annotated. + enterTff_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_annotated. + exitTff_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tcf_annotated. + enterTcf_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tcf_annotated. + exitTcf_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_annotated. + enterFof_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_annotated. + exitFof_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#cnf_annotated. + enterCnf_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#cnf_annotated. + exitCnf_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#annotations. + enterAnnotations(ctx) { + } + + // Exit a parse tree produced by TPTPParser#annotations. + exitAnnotations(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#formula_role. + enterFormula_role(ctx) { + } + + // Exit a parse tree produced by TPTPParser#formula_role. + exitFormula_role(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_formula. + enterThf_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_formula. + exitThf_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_logic_formula. + enterThf_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_logic_formula. + exitThf_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_binary_formula. + enterThf_binary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_binary_formula. + exitThf_binary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_binary_pair. + enterThf_binary_pair(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_binary_pair. + exitThf_binary_pair(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_binary_list. + enterThf_binary_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_binary_list. + exitThf_binary_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_or_formula. + enterThf_or_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_or_formula. + exitThf_or_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_and_formula. + enterThf_and_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_and_formula. + exitThf_and_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_apply_formula. + enterThf_apply_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_apply_formula. + exitThf_apply_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unit_formula. + enterThf_unit_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unit_formula. + exitThf_unit_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_preunit_formula. + enterThf_preunit_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_preunit_formula. + exitThf_preunit_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unitary_formula. + enterThf_unitary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unitary_formula. + exitThf_unitary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_quantified_formula. + enterThf_quantified_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_quantified_formula. + exitThf_quantified_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_quantification. + enterThf_quantification(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_quantification. + exitThf_quantification(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_variable_list. + enterThf_variable_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_variable_list. + exitThf_variable_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_typed_variable. + enterThf_typed_variable(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_typed_variable. + exitThf_typed_variable(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unary_formula. + enterThf_unary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unary_formula. + exitThf_unary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_prefix_unary. + enterThf_prefix_unary(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_prefix_unary. + exitThf_prefix_unary(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_infix_unary. + enterThf_infix_unary(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_infix_unary. + exitThf_infix_unary(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_atomic_formula. + enterThf_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_atomic_formula. + exitThf_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_plain_atomic. + enterThf_plain_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_plain_atomic. + exitThf_plain_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_defined_atomic. + enterThf_defined_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_defined_atomic. + exitThf_defined_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_defined_term. + enterThf_defined_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_defined_term. + exitThf_defined_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_defined_infix. + enterThf_defined_infix(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_defined_infix. + exitThf_defined_infix(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_system_atomic. + enterThf_system_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_system_atomic. + exitThf_system_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_let. + enterThf_let(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_let. + exitThf_let(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_let_types. + enterThf_let_types(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_let_types. + exitThf_let_types(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_atom_typing_list. + enterThf_atom_typing_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_atom_typing_list. + exitThf_atom_typing_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_let_defns. + enterThf_let_defns(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_let_defns. + exitThf_let_defns(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_let_defn. + enterThf_let_defn(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_let_defn. + exitThf_let_defn(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_let_defn_list. + enterThf_let_defn_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_let_defn_list. + exitThf_let_defn_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unitary_term. + enterThf_unitary_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unitary_term. + exitThf_unitary_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_conn_term. + enterThf_conn_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_conn_term. + exitThf_conn_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_tuple. + enterThf_tuple(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_tuple. + exitThf_tuple(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_fof_function. + enterThf_fof_function(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_fof_function. + exitThf_fof_function(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_arguments. + enterThf_arguments(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_arguments. + exitThf_arguments(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_formula_list. + enterThf_formula_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_formula_list. + exitThf_formula_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#comma_thf_logic_formula. + enterComma_thf_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#comma_thf_logic_formula. + exitComma_thf_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_atom_typing. + enterThf_atom_typing(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_atom_typing. + exitThf_atom_typing(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_top_level_type. + enterThf_top_level_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_top_level_type. + exitThf_top_level_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unitary_type. + enterThf_unitary_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unitary_type. + exitThf_unitary_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_apply_type. + enterThf_apply_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_apply_type. + exitThf_apply_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_binary_type. + enterThf_binary_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_binary_type. + exitThf_binary_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_mapping_type. + enterThf_mapping_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_mapping_type. + exitThf_mapping_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_xprod_type. + enterThf_xprod_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_xprod_type. + exitThf_xprod_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_union_type. + enterThf_union_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_union_type. + exitThf_union_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_subtype. + enterThf_subtype(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_subtype. + exitThf_subtype(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_definition. + enterThf_definition(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_definition. + exitThf_definition(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_sequent. + enterThf_sequent(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_sequent. + exitThf_sequent(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_formula. + enterTff_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_formula. + exitTff_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_logic_formula. + enterTff_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_logic_formula. + exitTff_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_binary_formula. + enterTff_binary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_binary_formula. + exitTff_binary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_binary_pair. + enterTff_binary_pair(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_binary_pair. + exitTff_binary_pair(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_binary_list. + enterTff_binary_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_binary_list. + exitTff_binary_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_or_formula. + enterTff_or_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_or_formula. + exitTff_or_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_and_formula. + enterTff_and_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_and_formula. + exitTff_and_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unit_formula. + enterTff_unit_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unit_formula. + exitTff_unit_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#bnf2antlr_tff_formula_term. + enterBnf2antlr_tff_formula_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#bnf2antlr_tff_formula_term. + exitBnf2antlr_tff_formula_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#bnf2antlr_tff_infix_tail. + enterBnf2antlr_tff_infix_tail(ctx) { + } + + // Exit a parse tree produced by TPTPParser#bnf2antlr_tff_infix_tail. + exitBnf2antlr_tff_infix_tail(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_preunit_formula. + enterTff_preunit_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_preunit_formula. + exitTff_preunit_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unitary_formula. + enterTff_unitary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unitary_formula. + exitTff_unitary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_unitary_formula. + enterTxf_unitary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_unitary_formula. + exitTxf_unitary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_quantified_formula. + enterTff_quantified_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_quantified_formula. + exitTff_quantified_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_variable_list. + enterTff_variable_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_variable_list. + exitTff_variable_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_variable. + enterTff_variable(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_variable. + exitTff_variable(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_typed_variable. + enterTff_typed_variable(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_typed_variable. + exitTff_typed_variable(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unary_formula. + enterTff_unary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unary_formula. + exitTff_unary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_prefix_unary. + enterTff_prefix_unary(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_prefix_unary. + exitTff_prefix_unary(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_infix_unary. + enterTff_infix_unary(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_infix_unary. + exitTff_infix_unary(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_atomic_formula. + enterTff_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_atomic_formula. + exitTff_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_plain_atomic. + enterTff_plain_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_plain_atomic. + exitTff_plain_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_defined_atomic. + enterTff_defined_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_defined_atomic. + exitTff_defined_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_defined_plain. + enterTff_defined_plain(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_defined_plain. + exitTff_defined_plain(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_defined_infix. + enterTff_defined_infix(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_defined_infix. + exitTff_defined_infix(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_system_atomic. + enterTff_system_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_system_atomic. + exitTff_system_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let. + enterTxf_let(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let. + exitTxf_let(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let_types. + enterTxf_let_types(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let_types. + exitTxf_let_types(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_atom_typing_list. + enterTff_atom_typing_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_atom_typing_list. + exitTff_atom_typing_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let_defns. + enterTxf_let_defns(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let_defns. + exitTxf_let_defns(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let_defn. + enterTxf_let_defn(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let_defn. + exitTxf_let_defn(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let_lhs. + enterTxf_let_lhs(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let_lhs. + exitTxf_let_lhs(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let_defn_list. + enterTxf_let_defn_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let_defn_list. + exitTxf_let_defn_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nxf_atom. + enterNxf_atom(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nxf_atom. + exitNxf_atom(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_term. + enterTff_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_term. + exitTff_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unitary_term. + enterTff_unitary_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unitary_term. + exitTff_unitary_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_tuple. + enterTxf_tuple(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_tuple. + exitTxf_tuple(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_arguments. + enterTff_arguments(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_arguments. + exitTff_arguments(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#comma_tff_term. + enterComma_tff_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#comma_tff_term. + exitComma_tff_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_atom_typing. + enterTff_atom_typing(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_atom_typing. + exitTff_atom_typing(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_top_level_type. + enterTff_top_level_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_top_level_type. + exitTff_top_level_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_non_atomic_type. + enterTff_non_atomic_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_non_atomic_type. + exitTff_non_atomic_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tf1_quantified_type. + enterTf1_quantified_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tf1_quantified_type. + exitTf1_quantified_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_monotype. + enterTff_monotype(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_monotype. + exitTff_monotype(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unitary_type. + enterTff_unitary_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unitary_type. + exitTff_unitary_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_atomic_type. + enterTff_atomic_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_atomic_type. + exitTff_atomic_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_type_arguments. + enterTff_type_arguments(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_type_arguments. + exitTff_type_arguments(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_mapping_type. + enterTff_mapping_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_mapping_type. + exitTff_mapping_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_xprod_type. + enterTff_xprod_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_xprod_type. + exitTff_xprod_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_tuple_type. + enterTxf_tuple_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_tuple_type. + exitTxf_tuple_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_type_list. + enterTff_type_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_type_list. + exitTff_type_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_subtype. + enterTff_subtype(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_subtype. + exitTff_subtype(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_definition. + enterTxf_definition(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_definition. + exitTxf_definition(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_sequent. + enterTxf_sequent(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_sequent. + exitTxf_sequent(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nhf_long_connective. + enterNhf_long_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nhf_long_connective. + exitNhf_long_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nhf_parameter_list. + enterNhf_parameter_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nhf_parameter_list. + exitNhf_parameter_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nhf_parameter. + enterNhf_parameter(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nhf_parameter. + exitNhf_parameter(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nhf_key_pair. + enterNhf_key_pair(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nhf_key_pair. + exitNhf_key_pair(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nxf_long_connective. + enterNxf_long_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nxf_long_connective. + exitNxf_long_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nxf_parameter_list. + enterNxf_parameter_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nxf_parameter_list. + exitNxf_parameter_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nxf_parameter. + enterNxf_parameter(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nxf_parameter. + exitNxf_parameter(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nxf_key_pair. + enterNxf_key_pair(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nxf_key_pair. + exitNxf_key_pair(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#ntf_connective_name. + enterNtf_connective_name(ctx) { + } + + // Exit a parse tree produced by TPTPParser#ntf_connective_name. + exitNtf_connective_name(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#ntf_defined_connective. + enterNtf_defined_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#ntf_defined_connective. + exitNtf_defined_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#ntf_index. + enterNtf_index(ctx) { + } + + // Exit a parse tree produced by TPTPParser#ntf_index. + exitNtf_index(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#ntf_short_connective. + enterNtf_short_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#ntf_short_connective. + exitNtf_short_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tcf_formula. + enterTcf_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tcf_formula. + exitTcf_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tcf_logic_formula. + enterTcf_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tcf_logic_formula. + exitTcf_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tcf_quantified_formula. + enterTcf_quantified_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tcf_quantified_formula. + exitTcf_quantified_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_formula. + enterFof_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_formula. + exitFof_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_logic_formula. + enterFof_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_logic_formula. + exitFof_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_binary_formula. + enterFof_binary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_binary_formula. + exitFof_binary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_binary_pair. + enterFof_binary_pair(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_binary_pair. + exitFof_binary_pair(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_binary_list. + enterFof_binary_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_binary_list. + exitFof_binary_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_or_formula. + enterFof_or_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_or_formula. + exitFof_or_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_and_formula. + enterFof_and_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_and_formula. + exitFof_and_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_unary_formula. + enterFof_unary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_unary_formula. + exitFof_unary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_infix_unary. + enterFof_infix_unary(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_infix_unary. + exitFof_infix_unary(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_unit_formula. + enterFof_unit_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_unit_formula. + exitFof_unit_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_unitary_formula. + enterFof_unitary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_unitary_formula. + exitFof_unitary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_quantified_formula. + enterFof_quantified_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_quantified_formula. + exitFof_quantified_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_variable_list. + enterFof_variable_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_variable_list. + exitFof_variable_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_atomic_formula. + enterFof_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_atomic_formula. + exitFof_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_plain_atomic_formula. + enterFof_plain_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_plain_atomic_formula. + exitFof_plain_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_atomic_formula. + enterFof_defined_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_atomic_formula. + exitFof_defined_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_plain_formula. + enterFof_defined_plain_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_plain_formula. + exitFof_defined_plain_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_infix_formula. + enterFof_defined_infix_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_infix_formula. + exitFof_defined_infix_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_system_atomic_formula. + enterFof_system_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_system_atomic_formula. + exitFof_system_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_plain_term. + enterFof_plain_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_plain_term. + exitFof_plain_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_term. + enterFof_defined_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_term. + exitFof_defined_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_atomic_term. + enterFof_defined_atomic_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_atomic_term. + exitFof_defined_atomic_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_plain_term. + enterFof_defined_plain_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_plain_term. + exitFof_defined_plain_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_system_term. + enterFof_system_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_system_term. + exitFof_system_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_arguments. + enterFof_arguments(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_arguments. + exitFof_arguments(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_term. + enterFof_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_term. + exitFof_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_function_term. + enterFof_function_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_function_term. + exitFof_function_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_sequent. + enterFof_sequent(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_sequent. + exitFof_sequent(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_formula_tuple. + enterFof_formula_tuple(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_formula_tuple. + exitFof_formula_tuple(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_formula_tuple_list. + enterFof_formula_tuple_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_formula_tuple_list. + exitFof_formula_tuple_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#comma_fof_logic_formula. + enterComma_fof_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#comma_fof_logic_formula. + exitComma_fof_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#cnf_formula. + enterCnf_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#cnf_formula. + exitCnf_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#cnf_disjunction. + enterCnf_disjunction(ctx) { + } + + // Exit a parse tree produced by TPTPParser#cnf_disjunction. + exitCnf_disjunction(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#cnf_literal. + enterCnf_literal(ctx) { + } + + // Exit a parse tree produced by TPTPParser#cnf_literal. + exitCnf_literal(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_quantifier. + enterThf_quantifier(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_quantifier. + exitThf_quantifier(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unary_connective. + enterThf_unary_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unary_connective. + exitThf_unary_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#th0_quantifier. + enterTh0_quantifier(ctx) { + } + + // Exit a parse tree produced by TPTPParser#th0_quantifier. + exitTh0_quantifier(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#type_quantifier. + enterType_quantifier(ctx) { + } + + // Exit a parse tree produced by TPTPParser#type_quantifier. + exitType_quantifier(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#subtype_sign. + enterSubtype_sign(ctx) { + } + + // Exit a parse tree produced by TPTPParser#subtype_sign. + exitSubtype_sign(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unary_connective. + enterTff_unary_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unary_connective. + exitTff_unary_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_quantifier. + enterTff_quantifier(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_quantifier. + exitTff_quantifier(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_quantifier. + enterFof_quantifier(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_quantifier. + exitFof_quantifier(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nonassoc_connective. + enterNonassoc_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nonassoc_connective. + exitNonassoc_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#assoc_connective. + enterAssoc_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#assoc_connective. + exitAssoc_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#unary_connective. + enterUnary_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#unary_connective. + exitUnary_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#gentzen_arrow. + enterGentzen_arrow(ctx) { + } + + // Exit a parse tree produced by TPTPParser#gentzen_arrow. + exitGentzen_arrow(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#assignment. + enterAssignment(ctx) { + } + + // Exit a parse tree produced by TPTPParser#assignment. + exitAssignment(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#identical. + enterIdentical(ctx) { + } + + // Exit a parse tree produced by TPTPParser#identical. + exitIdentical(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#typeable_atom. + enterTypeable_atom(ctx) { + } + + // Exit a parse tree produced by TPTPParser#typeable_atom. + exitTypeable_atom(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#atomic_type. + enterAtomic_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#atomic_type. + exitAtomic_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#type_constant. + enterType_constant(ctx) { + } + + // Exit a parse tree produced by TPTPParser#type_constant. + exitType_constant(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#type_functor. + enterType_functor(ctx) { + } + + // Exit a parse tree produced by TPTPParser#type_functor. + exitType_functor(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#defined_type. + enterDefined_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#defined_type. + exitDefined_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#system_type. + enterSystem_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#system_type. + exitSystem_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#defined_infix_pred. + enterDefined_infix_pred(ctx) { + } + + // Exit a parse tree produced by TPTPParser#defined_infix_pred. + exitDefined_infix_pred(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#infix_equality. + enterInfix_equality(ctx) { + } + + // Exit a parse tree produced by TPTPParser#infix_equality. + exitInfix_equality(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#infix_inequality. + enterInfix_inequality(ctx) { + } + + // Exit a parse tree produced by TPTPParser#infix_inequality. + exitInfix_inequality(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#constant. + enterConstant(ctx) { + } + + // Exit a parse tree produced by TPTPParser#constant. + exitConstant(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#functor. + enterFunctor(ctx) { + } + + // Exit a parse tree produced by TPTPParser#functor. + exitFunctor(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#defined_constant. + enterDefined_constant(ctx) { + } + + // Exit a parse tree produced by TPTPParser#defined_constant. + exitDefined_constant(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#defined_functor. + enterDefined_functor(ctx) { + } + + // Exit a parse tree produced by TPTPParser#defined_functor. + exitDefined_functor(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#system_constant. + enterSystem_constant(ctx) { + } + + // Exit a parse tree produced by TPTPParser#system_constant. + exitSystem_constant(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#system_functor. + enterSystem_functor(ctx) { + } + + // Exit a parse tree produced by TPTPParser#system_functor. + exitSystem_functor(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#th1_defined_term. + enterTh1_defined_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#th1_defined_term. + exitTh1_defined_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#defined_term. + enterDefined_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#defined_term. + exitDefined_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#variable. + enterVariable(ctx) { + } + + // Exit a parse tree produced by TPTPParser#variable. + exitVariable(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#source. + enterSource(ctx) { + } + + // Exit a parse tree produced by TPTPParser#source. + exitSource(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#sources. + enterSources(ctx) { + } + + // Exit a parse tree produced by TPTPParser#sources. + exitSources(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#dag_source. + enterDag_source(ctx) { + } + + // Exit a parse tree produced by TPTPParser#dag_source. + exitDag_source(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#inference_record. + enterInference_record(ctx) { + } + + // Exit a parse tree produced by TPTPParser#inference_record. + exitInference_record(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#inference_rule. + enterInference_rule(ctx) { + } + + // Exit a parse tree produced by TPTPParser#inference_rule. + exitInference_rule(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#internal_source. + enterInternal_source(ctx) { + } + + // Exit a parse tree produced by TPTPParser#internal_source. + exitInternal_source(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#intro_type. + enterIntro_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#intro_type. + exitIntro_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#external_source. + enterExternal_source(ctx) { + } + + // Exit a parse tree produced by TPTPParser#external_source. + exitExternal_source(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#file_source. + enterFile_source(ctx) { + } + + // Exit a parse tree produced by TPTPParser#file_source. + exitFile_source(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#file_info. + enterFile_info(ctx) { + } + + // Exit a parse tree produced by TPTPParser#file_info. + exitFile_info(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#parents. + enterParents(ctx) { + } + + // Exit a parse tree produced by TPTPParser#parents. + exitParents(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#parent_list. + enterParent_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#parent_list. + exitParent_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#comma_parent_info. + enterComma_parent_info(ctx) { + } + + // Exit a parse tree produced by TPTPParser#comma_parent_info. + exitComma_parent_info(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#parent_info. + enterParent_info(ctx) { + } + + // Exit a parse tree produced by TPTPParser#parent_info. + exitParent_info(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#parent_details. + enterParent_details(ctx) { + } + + // Exit a parse tree produced by TPTPParser#parent_details. + exitParent_details(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#optional_info. + enterOptional_info(ctx) { + } + + // Exit a parse tree produced by TPTPParser#optional_info. + exitOptional_info(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#useful_info. + enterUseful_info(ctx) { + } + + // Exit a parse tree produced by TPTPParser#useful_info. + exitUseful_info(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#include. + enterInclude(ctx) { + } + + // Exit a parse tree produced by TPTPParser#include. + exitInclude(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#include_optionals. + enterInclude_optionals(ctx) { + } + + // Exit a parse tree produced by TPTPParser#include_optionals. + exitInclude_optionals(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#formula_selection. + enterFormula_selection(ctx) { + } + + // Exit a parse tree produced by TPTPParser#formula_selection. + exitFormula_selection(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#name_list. + enterName_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#name_list. + exitName_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#space_name. + enterSpace_name(ctx) { + } + + // Exit a parse tree produced by TPTPParser#space_name. + exitSpace_name(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#general_term. + enterGeneral_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#general_term. + exitGeneral_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#general_data. + enterGeneral_data(ctx) { + } + + // Exit a parse tree produced by TPTPParser#general_data. + exitGeneral_data(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#general_function. + enterGeneral_function(ctx) { + } + + // Exit a parse tree produced by TPTPParser#general_function. + exitGeneral_function(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#formula_data. + enterFormula_data(ctx) { + } + + // Exit a parse tree produced by TPTPParser#formula_data. + exitFormula_data(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#general_list. + enterGeneral_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#general_list. + exitGeneral_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#general_terms. + enterGeneral_terms(ctx) { + } + + // Exit a parse tree produced by TPTPParser#general_terms. + exitGeneral_terms(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#comma_general_term. + enterComma_general_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#comma_general_term. + exitComma_general_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#name. + enterName(ctx) { + } + + // Exit a parse tree produced by TPTPParser#name. + exitName(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#atomic_word. + enterAtomic_word(ctx) { + } + + // Exit a parse tree produced by TPTPParser#atomic_word. + exitAtomic_word(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#atomic_defined_word. + enterAtomic_defined_word(ctx) { + } + + // Exit a parse tree produced by TPTPParser#atomic_defined_word. + exitAtomic_defined_word(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#atomic_system_word. + enterAtomic_system_word(ctx) { + } + + // Exit a parse tree produced by TPTPParser#atomic_system_word. + exitAtomic_system_word(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#number. + enterNumber(ctx) { + } + + // Exit a parse tree produced by TPTPParser#number. + exitNumber(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#file_name. + enterFile_name(ctx) { + } + + // Exit a parse tree produced by TPTPParser#file_name. + exitFile_name(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nothing. + enterNothing(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nothing. + exitNothing(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#lower_word_token. + enterLower_word_token(ctx) { + } + + // Exit a parse tree produced by TPTPParser#lower_word_token. + exitLower_word_token(ctx) { + } + + + +} \ No newline at end of file diff --git a/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTPParser.js b/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTPParser.js new file mode 100644 index 0000000..a4965c9 --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/optimized/TPTPParser.js @@ -0,0 +1,19906 @@ +// Generated from TPTP.g4 by ANTLR 4.13.2 +// jshint ignore: start +import antlr4 from 'antlr4'; +import TPTPListener from './TPTPListener.js'; +const serializedATN = [4,1,73,1841,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7, +4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12, +2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2, +20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27, +7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7, +34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41, +2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2, +49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56, +7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7, +63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70, +2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2, +78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2,85, +7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91,7,91,2,92,7, +92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2,98,7,98,2,99,7,99, +2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103,2,104,7,104,2,105,7,105, +2,106,7,106,2,107,7,107,2,108,7,108,2,109,7,109,2,110,7,110,2,111,7,111, +2,112,7,112,2,113,7,113,2,114,7,114,2,115,7,115,2,116,7,116,2,117,7,117, +2,118,7,118,2,119,7,119,2,120,7,120,2,121,7,121,2,122,7,122,2,123,7,123, +2,124,7,124,2,125,7,125,2,126,7,126,2,127,7,127,2,128,7,128,2,129,7,129, +2,130,7,130,2,131,7,131,2,132,7,132,2,133,7,133,2,134,7,134,2,135,7,135, +2,136,7,136,2,137,7,137,2,138,7,138,2,139,7,139,2,140,7,140,2,141,7,141, +2,142,7,142,2,143,7,143,2,144,7,144,2,145,7,145,2,146,7,146,2,147,7,147, +2,148,7,148,2,149,7,149,2,150,7,150,2,151,7,151,2,152,7,152,2,153,7,153, +2,154,7,154,2,155,7,155,2,156,7,156,2,157,7,157,2,158,7,158,2,159,7,159, +2,160,7,160,2,161,7,161,2,162,7,162,2,163,7,163,2,164,7,164,2,165,7,165, +2,166,7,166,2,167,7,167,2,168,7,168,2,169,7,169,2,170,7,170,2,171,7,171, +2,172,7,172,2,173,7,173,2,174,7,174,2,175,7,175,2,176,7,176,2,177,7,177, +2,178,7,178,2,179,7,179,2,180,7,180,2,181,7,181,2,182,7,182,2,183,7,183, +2,184,7,184,2,185,7,185,2,186,7,186,2,187,7,187,2,188,7,188,2,189,7,189, +2,190,7,190,2,191,7,191,2,192,7,192,2,193,7,193,2,194,7,194,2,195,7,195, +2,196,7,196,2,197,7,197,2,198,7,198,2,199,7,199,2,200,7,200,2,201,7,201, +2,202,7,202,2,203,7,203,2,204,7,204,2,205,7,205,2,206,7,206,2,207,7,207, +2,208,7,208,2,209,7,209,2,210,7,210,2,211,7,211,2,212,7,212,2,213,7,213, +2,214,7,214,2,215,7,215,2,216,7,216,2,217,7,217,2,218,7,218,2,219,7,219, +2,220,7,220,2,221,7,221,2,222,7,222,2,223,7,223,2,224,7,224,2,225,7,225, +2,226,7,226,2,227,7,227,2,228,7,228,2,229,7,229,2,230,7,230,2,231,7,231, +1,0,5,0,466,8,0,10,0,12,0,469,9,0,1,0,1,0,1,1,1,1,3,1,475,8,1,1,2,1,2,1, +2,1,2,1,2,1,2,3,2,483,8,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1, +4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1, +6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1, +8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1, +9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,3,10,558,8,10,1,11,1,11,1,11,1,11,1,11, +3,11,565,8,11,1,12,1,12,1,12,3,12,570,8,12,1,13,1,13,1,13,1,13,1,13,1,13, +3,13,578,8,13,1,14,1,14,1,14,3,14,583,8,14,1,15,1,15,1,15,1,15,1,16,1,16, +1,16,3,16,592,8,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,5,17,602,8,17, +10,17,12,17,605,9,17,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,5,18,615,8, +18,10,18,12,18,618,9,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,5,19,628, +8,19,10,19,12,19,631,9,19,1,20,1,20,1,20,3,20,636,8,20,1,21,1,21,3,21,640, +8,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,649,8,22,1,23,1,23,1,23,1,24, +1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,3,25,665,8,25,1,26,1,26, +1,26,1,26,1,27,1,27,3,27,673,8,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,30, +1,30,1,30,1,30,3,30,686,8,30,1,31,1,31,3,31,690,8,31,1,32,1,32,1,32,1,32, +1,32,1,32,1,32,1,32,3,32,700,8,32,1,33,1,33,3,33,704,8,33,1,34,1,34,1,34, +1,34,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1, +37,1,37,1,37,3,37,726,8,37,1,38,1,38,1,38,1,38,1,38,3,38,733,8,38,1,39,1, +39,1,39,1,39,1,39,3,39,740,8,39,1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41, +1,41,3,41,751,8,41,1,42,1,42,1,42,1,42,1,42,1,42,3,42,759,8,42,1,43,1,43, +1,43,1,43,1,43,3,43,766,8,43,1,44,1,44,1,44,1,44,1,44,1,44,3,44,774,8,44, +1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1, +45,3,45,791,8,45,1,46,1,46,1,47,1,47,5,47,797,8,47,10,47,12,47,800,9,47, +1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,3,49,813,8,49,1,50, +1,50,1,50,3,50,818,8,50,1,51,1,51,1,52,1,52,1,53,1,53,1,53,3,53,827,8,53, +1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,3,54,837,8,54,1,55,1,55,1,55,1,55, +1,55,1,55,1,55,1,55,5,55,847,8,55,10,55,12,55,850,9,55,1,56,1,56,1,56,1, +56,1,56,1,56,1,56,1,56,5,56,860,8,56,10,56,12,56,863,9,56,1,57,1,57,1,57, +1,57,1,58,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,60,1,60,1,60,3,60,880,8,60, +1,61,1,61,1,61,1,61,1,61,1,61,1,61,1,61,5,61,890,8,61,10,61,12,61,893,9, +61,1,61,1,61,1,61,1,61,5,61,899,8,61,10,61,12,61,902,9,61,3,61,904,8,61, +1,61,1,61,3,61,908,8,61,1,62,1,62,3,62,912,8,62,1,63,1,63,1,63,1,63,1,64, +1,64,3,64,920,8,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,5,65,930,8,65, +10,65,12,65,933,9,65,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,5,66,943,8, +66,10,66,12,66,946,9,66,1,67,1,67,1,67,1,67,3,67,952,8,67,1,67,1,67,3,67, +956,8,67,1,67,1,67,3,67,960,8,67,1,68,1,68,1,68,1,68,1,68,1,68,3,68,968, +8,68,1,69,1,69,3,69,972,8,69,1,69,1,69,1,70,1,70,3,70,978,8,70,1,71,1,71, +1,71,1,71,1,71,1,71,1,71,3,71,987,8,71,1,72,1,72,1,73,1,73,1,73,1,73,1,73, +1,73,1,73,1,74,1,74,1,74,1,74,1,74,3,74,1003,8,74,1,75,1,75,3,75,1007,8, +75,1,76,1,76,1,76,1,76,1,77,1,77,3,77,1015,8,77,1,78,1,78,1,78,1,79,1,79, +1,79,1,79,1,80,1,80,1,80,3,80,1027,8,80,1,81,1,81,1,81,1,81,1,81,1,81,3, +81,1035,8,81,1,82,1,82,1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,83,3,83,1047, +8,83,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85,1,85,1,85,3,85,1059,8,85,1, +86,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,3,87, +1075,8,87,1,88,1,88,1,88,1,88,1,88,3,88,1082,8,88,1,89,1,89,1,89,1,89,1, +89,3,89,1089,8,89,1,90,1,90,1,90,1,90,1,91,1,91,3,91,1097,8,91,1,92,1,92, +1,92,1,92,1,92,3,92,1104,8,92,1,93,1,93,1,93,1,93,1,93,1,93,1,94,1,94,1, +94,3,94,1115,8,94,1,95,1,95,1,95,1,95,1,95,1,95,1,95,1,95,3,95,1125,8,95, +1,96,1,96,1,96,1,96,1,96,1,96,3,96,1133,8,96,1,97,1,97,5,97,1137,8,97,10, +97,12,97,1140,9,97,1,98,1,98,1,98,1,99,1,99,1,99,1,99,1,99,1,99,1,99,1,99, +3,99,1153,8,99,1,100,1,100,3,100,1157,8,100,1,101,1,101,1,101,1,101,1,101, +1,101,3,101,1165,8,101,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,103,1, +103,1,103,1,103,1,103,1,103,3,103,1180,8,103,1,104,1,104,1,104,1,104,1,104, +3,104,1187,8,104,1,105,1,105,1,105,1,105,1,105,1,105,1,105,1,105,1,105,1, +105,1,105,1,105,1,105,3,105,1202,8,105,1,106,1,106,1,106,1,106,1,106,3,106, +1209,8,106,1,107,1,107,1,107,1,107,1,108,1,108,1,108,1,108,1,108,1,108,1, +108,1,108,5,108,1223,8,108,10,108,12,108,1226,9,108,1,109,1,109,1,109,1, +109,1,110,1,110,1,110,1,110,1,110,3,110,1237,8,110,1,111,1,111,1,111,1,111, +1,112,1,112,1,112,1,112,1,113,1,113,1,113,1,113,1,114,1,114,1,114,1,114, +1,114,1,114,1,114,1,114,1,114,1,114,1,114,3,114,1262,8,114,1,115,1,115,1, +115,1,115,1,115,3,115,1269,8,115,1,116,1,116,3,116,1273,8,116,1,117,1,117, +1,118,1,118,1,118,1,118,1,118,1,118,1,118,1,118,1,118,1,118,1,118,3,118, +1288,8,118,1,119,1,119,1,119,1,119,1,119,3,119,1295,8,119,1,120,1,120,3, +120,1299,8,120,1,121,1,121,1,122,1,122,3,122,1305,8,122,1,123,1,123,1,124, +1,124,1,124,1,125,1,125,1,125,1,125,1,125,1,125,1,125,1,125,1,125,1,125, +1,125,1,125,3,125,1324,8,125,1,126,1,126,3,126,1328,8,126,1,127,1,127,3, +127,1332,8,127,1,128,1,128,1,128,1,128,1,128,1,128,1,128,1,129,1,129,3,129, +1343,8,129,1,130,1,130,1,130,3,130,1348,8,130,1,131,1,131,3,131,1352,8,131, +1,132,1,132,1,132,1,132,1,133,1,133,3,133,1360,8,133,1,134,1,134,1,134,1, +134,1,134,1,134,1,134,1,134,5,134,1370,8,134,10,134,12,134,1373,9,134,1, +135,1,135,1,135,1,135,1,135,1,135,1,135,1,135,5,135,1383,8,135,10,135,12, +135,1386,9,135,1,136,1,136,1,136,1,136,3,136,1392,8,136,1,137,1,137,1,137, +1,137,1,138,1,138,3,138,1400,8,138,1,139,1,139,1,139,1,139,1,139,1,139,3, +139,1408,8,139,1,140,1,140,1,140,1,140,1,140,1,140,1,140,1,141,1,141,1,141, +1,141,1,141,3,141,1422,8,141,1,142,1,142,1,142,3,142,1427,8,142,1,143,1, +143,1,144,1,144,3,144,1433,8,144,1,145,1,145,1,146,1,146,1,146,1,146,1,147, +1,147,1,148,1,148,1,148,1,148,1,148,1,148,3,148,1449,8,148,1,149,1,149,3, +149,1453,8,149,1,150,1,150,1,151,1,151,1,151,1,151,1,151,1,151,3,151,1463, +8,151,1,152,1,152,1,152,1,152,1,152,1,152,3,152,1471,8,152,1,153,1,153,1, +153,1,153,1,153,3,153,1478,8,153,1,154,1,154,3,154,1482,8,154,1,155,1,155, +1,155,3,155,1487,8,155,1,156,1,156,1,156,1,156,1,156,1,156,1,156,1,156,3, +156,1497,8,156,1,157,1,157,1,157,1,157,1,157,1,157,3,157,1505,8,157,1,158, +1,158,5,158,1509,8,158,10,158,12,158,1512,9,158,1,159,1,159,1,159,1,160, +1,160,1,160,1,160,1,160,3,160,1522,8,160,1,161,1,161,1,161,1,161,1,161,1, +161,5,161,1530,8,161,10,161,12,161,1533,9,161,1,162,1,162,1,162,1,162,1, +162,1,162,1,162,1,162,1,162,3,162,1544,8,162,1,163,1,163,1,163,3,163,1549, +8,163,1,164,1,164,3,164,1553,8,164,1,165,1,165,1,166,1,166,1,167,1,167,1, +168,1,168,3,168,1563,8,168,1,169,1,169,3,169,1567,8,169,1,170,1,170,1,171, +1,171,1,171,1,171,1,171,1,171,1,171,3,171,1578,8,171,1,172,1,172,1,173,1, +173,1,174,1,174,1,175,1,175,1,176,1,176,1,177,1,177,3,177,1592,8,177,1,178, +1,178,1,178,3,178,1597,8,178,1,179,1,179,1,180,1,180,1,181,1,181,1,182,1, +182,1,183,1,183,1,184,1,184,1,185,1,185,1,186,1,186,1,187,1,187,1,188,1, +188,1,189,1,189,1,190,1,190,1,191,1,191,1,192,1,192,1,193,1,193,3,193,1629, +8,193,1,194,1,194,1,195,1,195,1,195,1,195,1,195,1,195,1,195,3,195,1640,8, +195,1,196,1,196,1,196,1,196,1,196,3,196,1647,8,196,1,197,1,197,3,197,1651, +8,197,1,198,1,198,1,198,1,198,1,198,1,198,1,198,1,198,1,198,1,199,1,199, +1,200,1,200,1,200,1,200,1,200,1,200,1,200,1,200,1,200,1,201,1,201,1,202, +1,202,1,203,1,203,1,203,1,203,1,203,1,203,1,204,1,204,1,204,3,204,1686,8, +204,1,205,1,205,1,205,1,205,1,205,1,205,3,205,1694,8,205,1,206,1,206,5,206, +1698,8,206,10,206,12,206,1701,9,206,1,207,1,207,1,207,1,208,1,208,1,208, +1,209,1,209,1,209,3,209,1712,8,209,1,210,1,210,1,210,3,210,1717,8,210,1, +211,1,211,1,212,1,212,1,212,1,212,1,212,1,212,1,212,1,213,1,213,1,213,1, +213,1,213,1,213,1,213,1,213,3,213,1736,8,213,1,214,1,214,1,214,1,214,1,214, +3,214,1743,8,214,1,215,1,215,1,215,1,215,1,215,3,215,1750,8,215,1,216,1, +216,1,217,1,217,1,217,1,217,1,217,1,217,3,217,1760,8,217,1,218,1,218,1,218, +1,218,1,218,1,218,3,218,1768,8,218,1,219,1,219,1,219,1,219,1,219,1,220,1, +220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1, +220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,1,220,3, +220,1800,8,220,1,221,1,221,1,221,1,221,1,221,1,221,3,221,1808,8,221,1,222, +1,222,5,222,1812,8,222,10,222,12,222,1815,9,222,1,223,1,223,1,223,1,224, +1,224,3,224,1822,8,224,1,225,1,225,1,225,3,225,1827,8,225,1,226,1,226,1, +227,1,227,1,228,1,228,1,229,1,229,1,230,1,230,1,231,1,231,1,231,0,11,34, +36,38,110,112,130,132,216,268,270,322,232,0,2,4,6,8,10,12,14,16,18,20,22, +24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70, +72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114, +116,118,120,122,124,126,128,130,132,134,136,138,140,142,144,146,148,150, +152,154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184,186, +188,190,192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222, +224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,256,258, +260,262,264,266,268,270,272,274,276,278,280,282,284,286,288,290,292,294, +296,298,300,302,304,306,308,310,312,314,316,318,320,322,324,326,328,330, +332,334,336,338,340,342,344,346,348,350,352,354,356,358,360,362,364,366, +368,370,372,374,376,378,380,382,384,386,388,390,392,394,396,398,400,402, +404,406,408,410,412,414,416,418,420,422,424,426,428,430,432,434,436,438, +440,442,444,446,448,450,452,454,456,458,460,462,0,7,1,0,22,24,1,0,25,26, +2,0,20,20,28,28,2,0,12,12,65,65,1,0,39,43,1,0,60,62,4,0,1,1,6,10,44,47,59, +59,1820,0,467,1,0,0,0,2,474,1,0,0,0,4,482,1,0,0,0,6,484,1,0,0,0,8,495,1, +0,0,0,10,497,1,0,0,0,12,508,1,0,0,0,14,519,1,0,0,0,16,530,1,0,0,0,18,541, +1,0,0,0,20,557,1,0,0,0,22,564,1,0,0,0,24,569,1,0,0,0,26,577,1,0,0,0,28,582, +1,0,0,0,30,584,1,0,0,0,32,591,1,0,0,0,34,593,1,0,0,0,36,606,1,0,0,0,38,619, +1,0,0,0,40,635,1,0,0,0,42,639,1,0,0,0,44,648,1,0,0,0,46,650,1,0,0,0,48,653, +1,0,0,0,50,664,1,0,0,0,52,666,1,0,0,0,54,672,1,0,0,0,56,674,1,0,0,0,58,677, +1,0,0,0,60,685,1,0,0,0,62,689,1,0,0,0,64,699,1,0,0,0,66,703,1,0,0,0,68,705, +1,0,0,0,70,709,1,0,0,0,72,711,1,0,0,0,74,725,1,0,0,0,76,732,1,0,0,0,78,739, +1,0,0,0,80,741,1,0,0,0,82,750,1,0,0,0,84,758,1,0,0,0,86,765,1,0,0,0,88,773, +1,0,0,0,90,790,1,0,0,0,92,792,1,0,0,0,94,794,1,0,0,0,96,801,1,0,0,0,98,812, +1,0,0,0,100,817,1,0,0,0,102,819,1,0,0,0,104,821,1,0,0,0,106,826,1,0,0,0, +108,836,1,0,0,0,110,838,1,0,0,0,112,851,1,0,0,0,114,864,1,0,0,0,116,868, +1,0,0,0,118,872,1,0,0,0,120,879,1,0,0,0,122,907,1,0,0,0,124,911,1,0,0,0, +126,913,1,0,0,0,128,919,1,0,0,0,130,921,1,0,0,0,132,934,1,0,0,0,134,959, +1,0,0,0,136,967,1,0,0,0,138,971,1,0,0,0,140,977,1,0,0,0,142,986,1,0,0,0, +144,988,1,0,0,0,146,990,1,0,0,0,148,1002,1,0,0,0,150,1006,1,0,0,0,152,1008, +1,0,0,0,154,1014,1,0,0,0,156,1016,1,0,0,0,158,1019,1,0,0,0,160,1026,1,0, +0,0,162,1034,1,0,0,0,164,1036,1,0,0,0,166,1046,1,0,0,0,168,1048,1,0,0,0, +170,1058,1,0,0,0,172,1060,1,0,0,0,174,1074,1,0,0,0,176,1081,1,0,0,0,178, +1088,1,0,0,0,180,1090,1,0,0,0,182,1096,1,0,0,0,184,1103,1,0,0,0,186,1105, +1,0,0,0,188,1114,1,0,0,0,190,1124,1,0,0,0,192,1132,1,0,0,0,194,1134,1,0, +0,0,196,1141,1,0,0,0,198,1152,1,0,0,0,200,1156,1,0,0,0,202,1164,1,0,0,0, +204,1166,1,0,0,0,206,1179,1,0,0,0,208,1186,1,0,0,0,210,1201,1,0,0,0,212, +1208,1,0,0,0,214,1210,1,0,0,0,216,1214,1,0,0,0,218,1227,1,0,0,0,220,1236, +1,0,0,0,222,1238,1,0,0,0,224,1242,1,0,0,0,226,1246,1,0,0,0,228,1261,1,0, +0,0,230,1268,1,0,0,0,232,1272,1,0,0,0,234,1274,1,0,0,0,236,1287,1,0,0,0, +238,1294,1,0,0,0,240,1298,1,0,0,0,242,1300,1,0,0,0,244,1304,1,0,0,0,246, +1306,1,0,0,0,248,1308,1,0,0,0,250,1323,1,0,0,0,252,1327,1,0,0,0,254,1331, +1,0,0,0,256,1333,1,0,0,0,258,1342,1,0,0,0,260,1347,1,0,0,0,262,1351,1,0, +0,0,264,1353,1,0,0,0,266,1359,1,0,0,0,268,1361,1,0,0,0,270,1374,1,0,0,0, +272,1391,1,0,0,0,274,1393,1,0,0,0,276,1399,1,0,0,0,278,1407,1,0,0,0,280, +1409,1,0,0,0,282,1421,1,0,0,0,284,1426,1,0,0,0,286,1428,1,0,0,0,288,1432, +1,0,0,0,290,1434,1,0,0,0,292,1436,1,0,0,0,294,1440,1,0,0,0,296,1448,1,0, +0,0,298,1452,1,0,0,0,300,1454,1,0,0,0,302,1462,1,0,0,0,304,1470,1,0,0,0, +306,1477,1,0,0,0,308,1481,1,0,0,0,310,1486,1,0,0,0,312,1496,1,0,0,0,314, +1504,1,0,0,0,316,1506,1,0,0,0,318,1513,1,0,0,0,320,1521,1,0,0,0,322,1523, +1,0,0,0,324,1543,1,0,0,0,326,1548,1,0,0,0,328,1552,1,0,0,0,330,1554,1,0, +0,0,332,1556,1,0,0,0,334,1558,1,0,0,0,336,1562,1,0,0,0,338,1566,1,0,0,0, +340,1568,1,0,0,0,342,1577,1,0,0,0,344,1579,1,0,0,0,346,1581,1,0,0,0,348, +1583,1,0,0,0,350,1585,1,0,0,0,352,1587,1,0,0,0,354,1591,1,0,0,0,356,1596, +1,0,0,0,358,1598,1,0,0,0,360,1600,1,0,0,0,362,1602,1,0,0,0,364,1604,1,0, +0,0,366,1606,1,0,0,0,368,1608,1,0,0,0,370,1610,1,0,0,0,372,1612,1,0,0,0, +374,1614,1,0,0,0,376,1616,1,0,0,0,378,1618,1,0,0,0,380,1620,1,0,0,0,382, +1622,1,0,0,0,384,1624,1,0,0,0,386,1628,1,0,0,0,388,1630,1,0,0,0,390,1639, +1,0,0,0,392,1646,1,0,0,0,394,1650,1,0,0,0,396,1652,1,0,0,0,398,1661,1,0, +0,0,400,1663,1,0,0,0,402,1672,1,0,0,0,404,1674,1,0,0,0,406,1676,1,0,0,0, +408,1685,1,0,0,0,410,1693,1,0,0,0,412,1695,1,0,0,0,414,1702,1,0,0,0,416, +1705,1,0,0,0,418,1711,1,0,0,0,420,1716,1,0,0,0,422,1718,1,0,0,0,424,1720, +1,0,0,0,426,1735,1,0,0,0,428,1742,1,0,0,0,430,1749,1,0,0,0,432,1751,1,0, +0,0,434,1759,1,0,0,0,436,1767,1,0,0,0,438,1769,1,0,0,0,440,1799,1,0,0,0, +442,1807,1,0,0,0,444,1809,1,0,0,0,446,1816,1,0,0,0,448,1821,1,0,0,0,450, +1826,1,0,0,0,452,1828,1,0,0,0,454,1830,1,0,0,0,456,1832,1,0,0,0,458,1834, +1,0,0,0,460,1836,1,0,0,0,462,1838,1,0,0,0,464,466,3,2,1,0,465,464,1,0,0, +0,466,469,1,0,0,0,467,465,1,0,0,0,467,468,1,0,0,0,468,470,1,0,0,0,469,467, +1,0,0,0,470,471,5,0,0,1,471,1,1,0,0,0,472,475,3,4,2,0,473,475,3,424,212, +0,474,472,1,0,0,0,474,473,1,0,0,0,475,3,1,0,0,0,476,483,3,10,5,0,477,483, +3,12,6,0,478,483,3,14,7,0,479,483,3,16,8,0,480,483,3,18,9,0,481,483,3,6, +3,0,482,476,1,0,0,0,482,477,1,0,0,0,482,478,1,0,0,0,482,479,1,0,0,0,482, +480,1,0,0,0,482,481,1,0,0,0,483,5,1,0,0,0,484,485,5,1,0,0,485,486,5,2,0, +0,486,487,3,448,224,0,487,488,5,3,0,0,488,489,3,22,11,0,489,490,5,3,0,0, +490,491,3,8,4,0,491,492,3,20,10,0,492,493,5,4,0,0,493,494,5,5,0,0,494,7, +1,0,0,0,495,496,3,258,129,0,496,9,1,0,0,0,497,498,5,6,0,0,498,499,5,2,0, +0,499,500,3,448,224,0,500,501,5,3,0,0,501,502,3,22,11,0,502,503,5,3,0,0, +503,504,3,24,12,0,504,505,3,20,10,0,505,506,5,4,0,0,506,507,5,5,0,0,507, +11,1,0,0,0,508,509,5,7,0,0,509,510,5,2,0,0,510,511,3,448,224,0,511,512,5, +3,0,0,512,513,3,22,11,0,513,514,5,3,0,0,514,515,3,120,60,0,515,516,3,20, +10,0,516,517,5,4,0,0,517,518,5,5,0,0,518,13,1,0,0,0,519,520,5,8,0,0,520, +521,5,2,0,0,521,522,3,448,224,0,522,523,5,3,0,0,523,524,3,22,11,0,524,525, +5,3,0,0,525,526,3,252,126,0,526,527,3,20,10,0,527,528,5,4,0,0,528,529,5, +5,0,0,529,15,1,0,0,0,530,531,5,9,0,0,531,532,5,2,0,0,532,533,3,448,224,0, +533,534,5,3,0,0,534,535,3,22,11,0,535,536,5,3,0,0,536,537,3,258,129,0,537, +538,3,20,10,0,538,539,5,4,0,0,539,540,5,5,0,0,540,17,1,0,0,0,541,542,5,10, +0,0,542,543,5,2,0,0,543,544,3,448,224,0,544,545,5,3,0,0,545,546,3,22,11, +0,546,547,5,3,0,0,547,548,3,320,160,0,548,549,3,20,10,0,549,550,5,4,0,0, +550,551,5,5,0,0,551,19,1,0,0,0,552,553,5,3,0,0,553,554,3,390,195,0,554,555, +3,420,210,0,555,558,1,0,0,0,556,558,3,460,230,0,557,552,1,0,0,0,557,556, +1,0,0,0,558,21,1,0,0,0,559,565,3,462,231,0,560,561,3,462,231,0,561,562,5, +11,0,0,562,563,3,434,217,0,563,565,1,0,0,0,564,559,1,0,0,0,564,560,1,0,0, +0,565,23,1,0,0,0,566,570,3,26,13,0,567,570,3,98,49,0,568,570,3,114,57,0, +569,566,1,0,0,0,569,567,1,0,0,0,569,568,1,0,0,0,570,25,1,0,0,0,571,578,3, +44,22,0,572,578,3,54,27,0,573,578,3,28,14,0,574,578,3,68,34,0,575,578,3, +116,58,0,576,578,3,118,59,0,577,571,1,0,0,0,577,572,1,0,0,0,577,573,1,0, +0,0,577,574,1,0,0,0,577,575,1,0,0,0,577,576,1,0,0,0,578,27,1,0,0,0,579,583, +3,30,15,0,580,583,3,32,16,0,581,583,3,106,53,0,582,579,1,0,0,0,582,580,1, +0,0,0,582,581,1,0,0,0,583,29,1,0,0,0,584,585,3,40,20,0,585,586,3,342,171, +0,586,587,3,40,20,0,587,31,1,0,0,0,588,592,3,34,17,0,589,592,3,36,18,0,590, +592,3,38,19,0,591,588,1,0,0,0,591,589,1,0,0,0,591,590,1,0,0,0,592,33,1,0, +0,0,593,594,6,17,-1,0,594,595,3,40,20,0,595,596,5,65,0,0,596,597,3,40,20, +0,597,603,1,0,0,0,598,599,10,1,0,0,599,600,5,65,0,0,600,602,3,40,20,0,601, +598,1,0,0,0,602,605,1,0,0,0,603,601,1,0,0,0,603,604,1,0,0,0,604,35,1,0,0, +0,605,603,1,0,0,0,606,607,6,18,-1,0,607,608,3,40,20,0,608,609,5,12,0,0,609, +610,3,40,20,0,610,616,1,0,0,0,611,612,10,1,0,0,612,613,5,12,0,0,613,615, +3,40,20,0,614,611,1,0,0,0,615,618,1,0,0,0,616,614,1,0,0,0,616,617,1,0,0, +0,617,37,1,0,0,0,618,616,1,0,0,0,619,620,6,19,-1,0,620,621,3,40,20,0,621, +622,5,13,0,0,622,623,3,40,20,0,623,629,1,0,0,0,624,625,10,1,0,0,625,626, +5,13,0,0,626,628,3,40,20,0,627,624,1,0,0,0,628,631,1,0,0,0,629,627,1,0,0, +0,629,630,1,0,0,0,630,39,1,0,0,0,631,629,1,0,0,0,632,636,3,44,22,0,633,636, +3,54,27,0,634,636,3,68,34,0,635,632,1,0,0,0,635,633,1,0,0,0,635,634,1,0, +0,0,636,41,1,0,0,0,637,640,3,44,22,0,638,640,3,56,28,0,639,637,1,0,0,0,639, +638,1,0,0,0,640,43,1,0,0,0,641,649,3,46,23,0,642,649,3,60,30,0,643,649,3, +388,194,0,644,645,5,2,0,0,645,646,3,26,13,0,646,647,5,4,0,0,647,649,1,0, +0,0,648,641,1,0,0,0,648,642,1,0,0,0,648,643,1,0,0,0,648,644,1,0,0,0,649, +45,1,0,0,0,650,651,3,48,24,0,651,652,3,40,20,0,652,47,1,0,0,0,653,654,3, +326,163,0,654,655,5,14,0,0,655,656,3,50,25,0,656,657,5,15,0,0,657,658,5, +16,0,0,658,49,1,0,0,0,659,665,3,52,26,0,660,661,3,52,26,0,661,662,5,3,0, +0,662,663,3,50,25,0,663,665,1,0,0,0,664,659,1,0,0,0,664,660,1,0,0,0,665, +51,1,0,0,0,666,667,3,388,194,0,667,668,5,16,0,0,668,669,3,100,50,0,669,53, +1,0,0,0,670,673,3,56,28,0,671,673,3,58,29,0,672,670,1,0,0,0,672,671,1,0, +0,0,673,55,1,0,0,0,674,675,3,328,164,0,675,676,3,42,21,0,676,57,1,0,0,0, +677,678,3,84,42,0,678,679,3,370,185,0,679,680,3,84,42,0,680,59,1,0,0,0,681, +686,3,62,31,0,682,686,3,64,32,0,683,686,3,70,35,0,684,686,3,90,45,0,685, +681,1,0,0,0,685,682,1,0,0,0,685,683,1,0,0,0,685,684,1,0,0,0,686,61,1,0,0, +0,687,690,3,372,186,0,688,690,3,88,44,0,689,687,1,0,0,0,689,688,1,0,0,0, +690,63,1,0,0,0,691,700,3,376,188,0,692,700,3,66,33,0,693,694,5,2,0,0,694, +695,3,86,43,0,695,696,5,4,0,0,696,700,1,0,0,0,697,700,3,228,114,0,698,700, +3,72,36,0,699,691,1,0,0,0,699,692,1,0,0,0,699,693,1,0,0,0,699,697,1,0,0, +0,699,698,1,0,0,0,700,65,1,0,0,0,701,704,3,386,193,0,702,704,3,384,192,0, +703,701,1,0,0,0,703,702,1,0,0,0,704,67,1,0,0,0,705,706,3,84,42,0,706,707, +3,366,183,0,707,708,3,84,42,0,708,69,1,0,0,0,709,710,3,380,190,0,710,71, +1,0,0,0,711,712,5,17,0,0,712,713,5,2,0,0,713,714,3,74,37,0,714,715,5,3,0, +0,715,716,3,78,39,0,716,717,5,3,0,0,717,718,3,26,13,0,718,719,5,4,0,0,719, +73,1,0,0,0,720,726,3,98,49,0,721,722,5,14,0,0,722,723,3,76,38,0,723,724, +5,15,0,0,724,726,1,0,0,0,725,720,1,0,0,0,725,721,1,0,0,0,726,75,1,0,0,0, +727,733,3,98,49,0,728,729,3,98,49,0,729,730,5,3,0,0,730,731,3,76,38,0,731, +733,1,0,0,0,732,727,1,0,0,0,732,728,1,0,0,0,733,77,1,0,0,0,734,740,3,80, +40,0,735,736,5,14,0,0,736,737,3,82,41,0,737,738,5,15,0,0,738,740,1,0,0,0, +739,734,1,0,0,0,739,735,1,0,0,0,740,79,1,0,0,0,741,742,3,26,13,0,742,743, +3,350,175,0,743,744,3,26,13,0,744,81,1,0,0,0,745,751,3,80,40,0,746,747,3, +80,40,0,747,748,5,3,0,0,748,749,3,82,41,0,749,751,1,0,0,0,750,745,1,0,0, +0,750,746,1,0,0,0,751,83,1,0,0,0,752,759,3,60,30,0,753,759,3,388,194,0,754, +755,5,2,0,0,755,756,3,26,13,0,756,757,5,4,0,0,757,759,1,0,0,0,758,752,1, +0,0,0,758,753,1,0,0,0,758,754,1,0,0,0,759,85,1,0,0,0,760,766,3,342,171,0, +761,766,3,344,172,0,762,766,3,368,184,0,763,766,3,370,185,0,764,766,3,328, +164,0,765,760,1,0,0,0,765,761,1,0,0,0,765,762,1,0,0,0,765,763,1,0,0,0,765, +764,1,0,0,0,766,87,1,0,0,0,767,768,5,14,0,0,768,774,5,15,0,0,769,770,5,14, +0,0,770,771,3,94,47,0,771,772,5,15,0,0,772,774,1,0,0,0,773,767,1,0,0,0,773, +769,1,0,0,0,774,89,1,0,0,0,775,776,3,378,189,0,776,777,5,2,0,0,777,778,3, +92,46,0,778,779,5,4,0,0,779,791,1,0,0,0,780,781,3,382,191,0,781,782,5,2, +0,0,782,783,3,92,46,0,783,784,5,4,0,0,784,791,1,0,0,0,785,786,3,374,187, +0,786,787,5,2,0,0,787,788,3,92,46,0,788,789,5,4,0,0,789,791,1,0,0,0,790, +775,1,0,0,0,790,780,1,0,0,0,790,785,1,0,0,0,791,91,1,0,0,0,792,793,3,94, +47,0,793,93,1,0,0,0,794,798,3,26,13,0,795,797,3,96,48,0,796,795,1,0,0,0, +797,800,1,0,0,0,798,796,1,0,0,0,798,799,1,0,0,0,799,95,1,0,0,0,800,798,1, +0,0,0,801,802,5,3,0,0,802,803,3,26,13,0,803,97,1,0,0,0,804,805,3,354,177, +0,805,806,5,16,0,0,806,807,3,100,50,0,807,813,1,0,0,0,808,809,5,2,0,0,809, +810,3,98,49,0,810,811,5,4,0,0,811,813,1,0,0,0,812,804,1,0,0,0,812,808,1, +0,0,0,813,99,1,0,0,0,814,818,3,102,51,0,815,818,3,108,54,0,816,818,3,104, +52,0,817,814,1,0,0,0,817,815,1,0,0,0,817,816,1,0,0,0,818,101,1,0,0,0,819, +820,3,44,22,0,820,103,1,0,0,0,821,822,3,38,19,0,822,105,1,0,0,0,823,827, +3,108,54,0,824,827,3,110,55,0,825,827,3,112,56,0,826,823,1,0,0,0,826,824, +1,0,0,0,826,825,1,0,0,0,827,107,1,0,0,0,828,829,3,102,51,0,829,830,5,68, +0,0,830,831,3,102,51,0,831,837,1,0,0,0,832,833,3,102,51,0,833,834,5,68,0, +0,834,835,3,108,54,0,835,837,1,0,0,0,836,828,1,0,0,0,836,832,1,0,0,0,837, +109,1,0,0,0,838,839,6,55,-1,0,839,840,3,102,51,0,840,841,5,66,0,0,841,842, +3,102,51,0,842,848,1,0,0,0,843,844,10,1,0,0,844,845,5,66,0,0,845,847,3,102, +51,0,846,843,1,0,0,0,847,850,1,0,0,0,848,846,1,0,0,0,848,849,1,0,0,0,849, +111,1,0,0,0,850,848,1,0,0,0,851,852,6,56,-1,0,852,853,3,102,51,0,853,854, +5,67,0,0,854,855,3,102,51,0,855,861,1,0,0,0,856,857,10,1,0,0,857,858,5,67, +0,0,858,860,3,102,51,0,859,856,1,0,0,0,860,863,1,0,0,0,861,859,1,0,0,0,861, +862,1,0,0,0,862,113,1,0,0,0,863,861,1,0,0,0,864,865,3,356,178,0,865,866, +3,334,167,0,866,867,3,356,178,0,867,115,1,0,0,0,868,869,3,60,30,0,869,870, +3,352,176,0,870,871,3,26,13,0,871,117,1,0,0,0,872,873,3,88,44,0,873,874, +3,348,174,0,874,875,3,88,44,0,875,119,1,0,0,0,876,880,3,122,61,0,877,880, +3,198,99,0,878,880,3,222,111,0,879,876,1,0,0,0,879,877,1,0,0,0,879,878,1, +0,0,0,880,121,1,0,0,0,881,903,3,134,67,0,882,883,3,342,171,0,883,884,3,134, +67,0,884,904,1,0,0,0,885,886,5,65,0,0,886,891,3,134,67,0,887,888,5,65,0, +0,888,890,3,134,67,0,889,887,1,0,0,0,890,893,1,0,0,0,891,889,1,0,0,0,891, +892,1,0,0,0,892,904,1,0,0,0,893,891,1,0,0,0,894,895,5,12,0,0,895,900,3,134, +67,0,896,897,5,12,0,0,897,899,3,134,67,0,898,896,1,0,0,0,899,902,1,0,0,0, +900,898,1,0,0,0,900,901,1,0,0,0,901,904,1,0,0,0,902,900,1,0,0,0,903,882, +1,0,0,0,903,885,1,0,0,0,903,894,1,0,0,0,903,904,1,0,0,0,904,908,1,0,0,0, +905,908,3,224,112,0,906,908,3,226,113,0,907,881,1,0,0,0,907,905,1,0,0,0, +907,906,1,0,0,0,908,123,1,0,0,0,909,912,3,126,63,0,910,912,3,128,64,0,911, +909,1,0,0,0,911,910,1,0,0,0,912,125,1,0,0,0,913,914,3,134,67,0,914,915,3, +342,171,0,915,916,3,134,67,0,916,127,1,0,0,0,917,920,3,130,65,0,918,920, +3,132,66,0,919,917,1,0,0,0,919,918,1,0,0,0,920,129,1,0,0,0,921,922,6,65, +-1,0,922,923,3,134,67,0,923,924,5,65,0,0,924,925,3,134,67,0,925,931,1,0, +0,0,926,927,10,1,0,0,927,928,5,65,0,0,928,930,3,134,67,0,929,926,1,0,0,0, +930,933,1,0,0,0,931,929,1,0,0,0,931,932,1,0,0,0,932,131,1,0,0,0,933,931, +1,0,0,0,934,935,6,66,-1,0,935,936,3,134,67,0,936,937,5,12,0,0,937,938,3, +134,67,0,938,944,1,0,0,0,939,940,10,1,0,0,940,941,5,12,0,0,941,943,3,134, +67,0,942,939,1,0,0,0,943,946,1,0,0,0,944,942,1,0,0,0,944,945,1,0,0,0,945, +133,1,0,0,0,946,944,1,0,0,0,947,960,3,146,73,0,948,960,3,156,78,0,949,951, +3,136,68,0,950,952,3,138,69,0,951,950,1,0,0,0,951,952,1,0,0,0,952,960,1, +0,0,0,953,956,3,386,193,0,954,956,3,192,96,0,955,953,1,0,0,0,955,954,1,0, +0,0,956,957,1,0,0,0,957,958,3,138,69,0,958,960,1,0,0,0,959,947,1,0,0,0,959, +948,1,0,0,0,959,949,1,0,0,0,959,955,1,0,0,0,960,135,1,0,0,0,961,968,3,160, +80,0,962,968,3,388,194,0,963,964,5,2,0,0,964,965,3,122,61,0,965,966,5,4, +0,0,966,968,1,0,0,0,967,961,1,0,0,0,967,962,1,0,0,0,967,963,1,0,0,0,968, +137,1,0,0,0,969,972,3,366,183,0,970,972,3,370,185,0,971,969,1,0,0,0,971, +970,1,0,0,0,972,973,1,0,0,0,973,974,3,190,95,0,974,139,1,0,0,0,975,978,3, +142,71,0,976,978,3,156,78,0,977,975,1,0,0,0,977,976,1,0,0,0,978,141,1,0, +0,0,979,987,3,146,73,0,980,987,3,160,80,0,981,987,3,144,72,0,982,983,5,2, +0,0,983,984,3,122,61,0,984,985,5,4,0,0,985,987,1,0,0,0,986,979,1,0,0,0,986, +980,1,0,0,0,986,981,1,0,0,0,986,982,1,0,0,0,987,143,1,0,0,0,988,989,3,388, +194,0,989,145,1,0,0,0,990,991,3,338,169,0,991,992,5,14,0,0,992,993,3,148, +74,0,993,994,5,15,0,0,994,995,5,16,0,0,995,996,3,134,67,0,996,147,1,0,0, +0,997,1003,3,150,75,0,998,999,3,150,75,0,999,1000,5,3,0,0,1000,1001,3,148, +74,0,1001,1003,1,0,0,0,1002,997,1,0,0,0,1002,998,1,0,0,0,1003,149,1,0,0, +0,1004,1007,3,152,76,0,1005,1007,3,388,194,0,1006,1004,1,0,0,0,1006,1005, +1,0,0,0,1007,151,1,0,0,0,1008,1009,3,388,194,0,1009,1010,5,16,0,0,1010,1011, +3,210,105,0,1011,153,1,0,0,0,1012,1015,3,156,78,0,1013,1015,3,158,79,0,1014, +1012,1,0,0,0,1014,1013,1,0,0,0,1015,155,1,0,0,0,1016,1017,3,336,168,0,1017, +1018,3,140,70,0,1018,157,1,0,0,0,1019,1020,3,190,95,0,1020,1021,3,370,185, +0,1021,1022,3,190,95,0,1022,159,1,0,0,0,1023,1027,3,162,81,0,1024,1027,3, +164,82,0,1025,1027,3,170,85,0,1026,1023,1,0,0,0,1026,1024,1,0,0,0,1026,1025, +1,0,0,0,1027,161,1,0,0,0,1028,1035,3,372,186,0,1029,1030,3,374,187,0,1030, +1031,5,2,0,0,1031,1032,3,194,97,0,1032,1033,5,4,0,0,1033,1035,1,0,0,0,1034, +1028,1,0,0,0,1034,1029,1,0,0,0,1035,163,1,0,0,0,1036,1037,3,166,83,0,1037, +165,1,0,0,0,1038,1047,3,376,188,0,1039,1040,3,378,189,0,1040,1041,5,2,0, +0,1041,1042,3,194,97,0,1042,1043,5,4,0,0,1043,1047,1,0,0,0,1044,1047,3,186, +93,0,1045,1047,3,172,86,0,1046,1038,1,0,0,0,1046,1039,1,0,0,0,1046,1044, +1,0,0,0,1046,1045,1,0,0,0,1047,167,1,0,0,0,1048,1049,3,190,95,0,1049,1050, +3,366,183,0,1050,1051,3,190,95,0,1051,169,1,0,0,0,1052,1059,3,380,190,0, +1053,1054,3,382,191,0,1054,1055,5,2,0,0,1055,1056,3,194,97,0,1056,1057,5, +4,0,0,1057,1059,1,0,0,0,1058,1052,1,0,0,0,1058,1053,1,0,0,0,1059,171,1,0, +0,0,1060,1061,5,17,0,0,1061,1062,5,2,0,0,1062,1063,3,174,87,0,1063,1064, +5,3,0,0,1064,1065,3,178,89,0,1065,1066,5,3,0,0,1066,1067,3,188,94,0,1067, +1068,5,4,0,0,1068,173,1,0,0,0,1069,1075,3,198,99,0,1070,1071,5,14,0,0,1071, +1072,3,176,88,0,1072,1073,5,15,0,0,1073,1075,1,0,0,0,1074,1069,1,0,0,0,1074, +1070,1,0,0,0,1075,175,1,0,0,0,1076,1082,3,198,99,0,1077,1078,3,198,99,0, +1078,1079,5,3,0,0,1079,1080,3,176,88,0,1080,1082,1,0,0,0,1081,1076,1,0,0, +0,1081,1077,1,0,0,0,1082,177,1,0,0,0,1083,1089,3,180,90,0,1084,1085,5,14, +0,0,1085,1086,3,184,92,0,1086,1087,5,15,0,0,1087,1089,1,0,0,0,1088,1083, +1,0,0,0,1088,1084,1,0,0,0,1089,179,1,0,0,0,1090,1091,3,182,91,0,1091,1092, +3,350,175,0,1092,1093,3,188,94,0,1093,181,1,0,0,0,1094,1097,3,162,81,0,1095, +1097,3,192,96,0,1096,1094,1,0,0,0,1096,1095,1,0,0,0,1097,183,1,0,0,0,1098, +1104,3,180,90,0,1099,1100,3,180,90,0,1100,1101,5,3,0,0,1101,1102,3,184,92, +0,1102,1104,1,0,0,0,1103,1098,1,0,0,0,1103,1099,1,0,0,0,1104,185,1,0,0,0, +1105,1106,3,236,118,0,1106,1107,5,13,0,0,1107,1108,5,2,0,0,1108,1109,3,194, +97,0,1109,1110,5,4,0,0,1110,187,1,0,0,0,1111,1115,3,122,61,0,1112,1115,3, +386,193,0,1113,1115,3,192,96,0,1114,1111,1,0,0,0,1114,1112,1,0,0,0,1114, +1113,1,0,0,0,1115,189,1,0,0,0,1116,1125,3,160,80,0,1117,1125,3,386,193,0, +1118,1125,3,192,96,0,1119,1125,3,388,194,0,1120,1121,5,2,0,0,1121,1122,3, +122,61,0,1122,1123,5,4,0,0,1123,1125,1,0,0,0,1124,1116,1,0,0,0,1124,1117, +1,0,0,0,1124,1118,1,0,0,0,1124,1119,1,0,0,0,1124,1120,1,0,0,0,1125,191,1, +0,0,0,1126,1127,5,14,0,0,1127,1133,5,15,0,0,1128,1129,5,14,0,0,1129,1130, +3,194,97,0,1130,1131,5,15,0,0,1131,1133,1,0,0,0,1132,1126,1,0,0,0,1132,1128, +1,0,0,0,1133,193,1,0,0,0,1134,1138,3,188,94,0,1135,1137,3,196,98,0,1136, +1135,1,0,0,0,1137,1140,1,0,0,0,1138,1136,1,0,0,0,1138,1139,1,0,0,0,1139, +195,1,0,0,0,1140,1138,1,0,0,0,1141,1142,5,3,0,0,1142,1143,3,188,94,0,1143, +197,1,0,0,0,1144,1145,3,354,177,0,1145,1146,5,16,0,0,1146,1147,3,200,100, +0,1147,1153,1,0,0,0,1148,1149,5,2,0,0,1149,1150,3,198,99,0,1150,1151,5,4, +0,0,1151,1153,1,0,0,0,1152,1144,1,0,0,0,1152,1148,1,0,0,0,1153,199,1,0,0, +0,1154,1157,3,210,105,0,1155,1157,3,202,101,0,1156,1154,1,0,0,0,1156,1155, +1,0,0,0,1157,201,1,0,0,0,1158,1165,3,214,107,0,1159,1165,3,204,102,0,1160, +1161,5,2,0,0,1161,1162,3,202,101,0,1162,1163,5,4,0,0,1163,1165,1,0,0,0,1164, +1158,1,0,0,0,1164,1159,1,0,0,0,1164,1160,1,0,0,0,1165,203,1,0,0,0,1166,1167, +3,332,166,0,1167,1168,5,14,0,0,1168,1169,3,148,74,0,1169,1170,5,15,0,0,1170, +1171,5,16,0,0,1171,1172,3,206,103,0,1172,205,1,0,0,0,1173,1180,3,210,105, +0,1174,1175,5,2,0,0,1175,1176,3,214,107,0,1176,1177,5,4,0,0,1177,1180,1, +0,0,0,1178,1180,3,204,102,0,1179,1173,1,0,0,0,1179,1174,1,0,0,0,1179,1178, +1,0,0,0,1180,207,1,0,0,0,1181,1187,3,210,105,0,1182,1183,5,2,0,0,1183,1184, +3,216,108,0,1184,1185,5,4,0,0,1185,1187,1,0,0,0,1186,1181,1,0,0,0,1186,1182, +1,0,0,0,1187,209,1,0,0,0,1188,1202,3,358,179,0,1189,1202,3,362,181,0,1190, +1202,3,388,194,0,1191,1192,3,360,180,0,1192,1193,5,2,0,0,1193,1194,3,212, +106,0,1194,1195,5,4,0,0,1195,1202,1,0,0,0,1196,1197,5,2,0,0,1197,1198,3, +210,105,0,1198,1199,5,4,0,0,1199,1202,1,0,0,0,1200,1202,3,218,109,0,1201, +1188,1,0,0,0,1201,1189,1,0,0,0,1201,1190,1,0,0,0,1201,1191,1,0,0,0,1201, +1196,1,0,0,0,1201,1200,1,0,0,0,1202,211,1,0,0,0,1203,1209,3,210,105,0,1204, +1205,3,210,105,0,1205,1206,5,3,0,0,1206,1207,3,212,106,0,1207,1209,1,0,0, +0,1208,1203,1,0,0,0,1208,1204,1,0,0,0,1209,213,1,0,0,0,1210,1211,3,208,104, +0,1211,1212,5,68,0,0,1212,1213,3,210,105,0,1213,215,1,0,0,0,1214,1215,6, +108,-1,0,1215,1216,3,208,104,0,1216,1217,5,66,0,0,1217,1218,3,210,105,0, +1218,1224,1,0,0,0,1219,1220,10,1,0,0,1220,1221,5,66,0,0,1221,1223,3,210, +105,0,1222,1219,1,0,0,0,1223,1226,1,0,0,0,1224,1222,1,0,0,0,1224,1225,1, +0,0,0,1225,217,1,0,0,0,1226,1224,1,0,0,0,1227,1228,5,14,0,0,1228,1229,3, +220,110,0,1229,1230,5,15,0,0,1230,219,1,0,0,0,1231,1237,3,200,100,0,1232, +1233,3,200,100,0,1233,1234,5,3,0,0,1234,1235,3,220,110,0,1235,1237,1,0,0, +0,1236,1231,1,0,0,0,1236,1232,1,0,0,0,1237,221,1,0,0,0,1238,1239,3,356,178, +0,1239,1240,3,334,167,0,1240,1241,3,356,178,0,1241,223,1,0,0,0,1242,1243, +3,160,80,0,1243,1244,3,352,176,0,1244,1245,3,188,94,0,1245,225,1,0,0,0,1246, +1247,3,192,96,0,1247,1248,3,348,174,0,1248,1249,3,192,96,0,1249,227,1,0, +0,0,1250,1251,5,18,0,0,1251,1252,3,244,122,0,1252,1253,5,19,0,0,1253,1262, +1,0,0,0,1254,1255,5,18,0,0,1255,1256,3,244,122,0,1256,1257,5,2,0,0,1257, +1258,3,230,115,0,1258,1259,5,4,0,0,1259,1260,5,19,0,0,1260,1262,1,0,0,0, +1261,1250,1,0,0,0,1261,1254,1,0,0,0,1262,229,1,0,0,0,1263,1269,3,232,116, +0,1264,1265,3,232,116,0,1265,1266,5,3,0,0,1266,1267,3,230,115,0,1267,1269, +1,0,0,0,1268,1263,1,0,0,0,1268,1264,1,0,0,0,1269,231,1,0,0,0,1270,1273,3, +248,124,0,1271,1273,3,234,117,0,1272,1270,1,0,0,0,1272,1271,1,0,0,0,1273, +233,1,0,0,0,1274,1275,3,116,58,0,1275,235,1,0,0,0,1276,1277,5,18,0,0,1277, +1278,3,244,122,0,1278,1279,5,19,0,0,1279,1288,1,0,0,0,1280,1281,5,18,0,0, +1281,1282,3,244,122,0,1282,1283,5,2,0,0,1283,1284,3,238,119,0,1284,1285, +5,4,0,0,1285,1286,5,19,0,0,1286,1288,1,0,0,0,1287,1276,1,0,0,0,1287,1280, +1,0,0,0,1288,237,1,0,0,0,1289,1295,3,240,120,0,1290,1291,3,240,120,0,1291, +1292,5,3,0,0,1292,1293,3,238,119,0,1293,1295,1,0,0,0,1294,1289,1,0,0,0,1294, +1290,1,0,0,0,1295,239,1,0,0,0,1296,1299,3,248,124,0,1297,1299,3,242,121, +0,1298,1296,1,0,0,0,1298,1297,1,0,0,0,1299,241,1,0,0,0,1300,1301,3,224,112, +0,1301,243,1,0,0,0,1302,1305,3,246,123,0,1303,1305,3,454,227,0,1304,1302, +1,0,0,0,1304,1303,1,0,0,0,1305,245,1,0,0,0,1306,1307,3,452,226,0,1307,247, +1,0,0,0,1308,1309,5,70,0,0,1309,1310,3,190,95,0,1310,249,1,0,0,0,1311,1312, +5,14,0,0,1312,1313,5,5,0,0,1313,1324,5,15,0,0,1314,1315,5,69,0,0,1315,1316, +5,5,0,0,1316,1324,5,68,0,0,1317,1318,5,18,0,0,1318,1319,5,5,0,0,1319,1324, +5,19,0,0,1320,1321,5,2,0,0,1321,1322,5,5,0,0,1322,1324,5,4,0,0,1323,1311, +1,0,0,0,1323,1314,1,0,0,0,1323,1317,1,0,0,0,1323,1320,1,0,0,0,1324,251,1, +0,0,0,1325,1328,3,254,127,0,1326,1328,3,198,99,0,1327,1325,1,0,0,0,1327, +1326,1,0,0,0,1328,253,1,0,0,0,1329,1332,3,256,128,0,1330,1332,3,320,160, +0,1331,1329,1,0,0,0,1331,1330,1,0,0,0,1332,255,1,0,0,0,1333,1334,5,20,0, +0,1334,1335,5,14,0,0,1335,1336,3,148,74,0,1336,1337,5,15,0,0,1337,1338,5, +16,0,0,1338,1339,3,254,127,0,1339,257,1,0,0,0,1340,1343,3,260,130,0,1341, +1343,3,312,156,0,1342,1340,1,0,0,0,1342,1341,1,0,0,0,1343,259,1,0,0,0,1344, +1348,3,262,131,0,1345,1348,3,272,136,0,1346,1348,3,278,139,0,1347,1344,1, +0,0,0,1347,1345,1,0,0,0,1347,1346,1,0,0,0,1348,261,1,0,0,0,1349,1352,3,264, +132,0,1350,1352,3,266,133,0,1351,1349,1,0,0,0,1351,1350,1,0,0,0,1352,263, +1,0,0,0,1353,1354,3,276,138,0,1354,1355,3,342,171,0,1355,1356,3,276,138, +0,1356,265,1,0,0,0,1357,1360,3,268,134,0,1358,1360,3,270,135,0,1359,1357, +1,0,0,0,1359,1358,1,0,0,0,1360,267,1,0,0,0,1361,1362,6,134,-1,0,1362,1363, +3,276,138,0,1363,1364,5,65,0,0,1364,1365,3,276,138,0,1365,1371,1,0,0,0,1366, +1367,10,1,0,0,1367,1368,5,65,0,0,1368,1370,3,276,138,0,1369,1366,1,0,0,0, +1370,1373,1,0,0,0,1371,1369,1,0,0,0,1371,1372,1,0,0,0,1372,269,1,0,0,0,1373, +1371,1,0,0,0,1374,1375,6,135,-1,0,1375,1376,3,276,138,0,1376,1377,5,12,0, +0,1377,1378,3,276,138,0,1378,1384,1,0,0,0,1379,1380,10,1,0,0,1380,1381,5, +12,0,0,1381,1383,3,276,138,0,1382,1379,1,0,0,0,1383,1386,1,0,0,0,1384,1382, +1,0,0,0,1384,1385,1,0,0,0,1385,271,1,0,0,0,1386,1384,1,0,0,0,1387,1388,3, +346,173,0,1388,1389,3,276,138,0,1389,1392,1,0,0,0,1390,1392,3,274,137,0, +1391,1387,1,0,0,0,1391,1390,1,0,0,0,1392,273,1,0,0,0,1393,1394,3,308,154, +0,1394,1395,3,370,185,0,1395,1396,3,308,154,0,1396,275,1,0,0,0,1397,1400, +3,278,139,0,1398,1400,3,272,136,0,1399,1397,1,0,0,0,1399,1398,1,0,0,0,1400, +277,1,0,0,0,1401,1408,3,280,140,0,1402,1408,3,284,142,0,1403,1404,5,2,0, +0,1404,1405,3,260,130,0,1405,1406,5,4,0,0,1406,1408,1,0,0,0,1407,1401,1, +0,0,0,1407,1402,1,0,0,0,1407,1403,1,0,0,0,1408,279,1,0,0,0,1409,1410,3,340, +170,0,1410,1411,5,14,0,0,1411,1412,3,282,141,0,1412,1413,5,15,0,0,1413,1414, +5,16,0,0,1414,1415,3,276,138,0,1415,281,1,0,0,0,1416,1422,3,388,194,0,1417, +1418,3,388,194,0,1418,1419,5,3,0,0,1419,1420,3,282,141,0,1420,1422,1,0,0, +0,1421,1416,1,0,0,0,1421,1417,1,0,0,0,1422,283,1,0,0,0,1423,1427,3,286,143, +0,1424,1427,3,288,144,0,1425,1427,3,294,147,0,1426,1423,1,0,0,0,1426,1424, +1,0,0,0,1426,1425,1,0,0,0,1427,285,1,0,0,0,1428,1429,3,296,148,0,1429,287, +1,0,0,0,1430,1433,3,290,145,0,1431,1433,3,292,146,0,1432,1430,1,0,0,0,1432, +1431,1,0,0,0,1433,289,1,0,0,0,1434,1435,3,302,151,0,1435,291,1,0,0,0,1436, +1437,3,308,154,0,1437,1438,3,366,183,0,1438,1439,3,308,154,0,1439,293,1, +0,0,0,1440,1441,3,304,152,0,1441,295,1,0,0,0,1442,1449,3,372,186,0,1443, +1444,3,374,187,0,1444,1445,5,2,0,0,1445,1446,3,306,153,0,1446,1447,5,4,0, +0,1447,1449,1,0,0,0,1448,1442,1,0,0,0,1448,1443,1,0,0,0,1449,297,1,0,0,0, +1450,1453,3,386,193,0,1451,1453,3,300,150,0,1452,1450,1,0,0,0,1452,1451, +1,0,0,0,1453,299,1,0,0,0,1454,1455,3,302,151,0,1455,301,1,0,0,0,1456,1463, +3,376,188,0,1457,1458,3,378,189,0,1458,1459,5,2,0,0,1459,1460,3,306,153, +0,1460,1461,5,4,0,0,1461,1463,1,0,0,0,1462,1456,1,0,0,0,1462,1457,1,0,0, +0,1463,303,1,0,0,0,1464,1471,3,380,190,0,1465,1466,3,382,191,0,1466,1467, +5,2,0,0,1467,1468,3,306,153,0,1468,1469,5,4,0,0,1469,1471,1,0,0,0,1470,1464, +1,0,0,0,1470,1465,1,0,0,0,1471,305,1,0,0,0,1472,1478,3,308,154,0,1473,1474, +3,308,154,0,1474,1475,5,3,0,0,1475,1476,3,306,153,0,1476,1478,1,0,0,0,1477, +1472,1,0,0,0,1477,1473,1,0,0,0,1478,307,1,0,0,0,1479,1482,3,310,155,0,1480, +1482,3,388,194,0,1481,1479,1,0,0,0,1481,1480,1,0,0,0,1482,309,1,0,0,0,1483, +1487,3,296,148,0,1484,1487,3,298,149,0,1485,1487,3,304,152,0,1486,1483,1, +0,0,0,1486,1484,1,0,0,0,1486,1485,1,0,0,0,1487,311,1,0,0,0,1488,1489,3,314, +157,0,1489,1490,3,348,174,0,1490,1491,3,314,157,0,1491,1497,1,0,0,0,1492, +1493,5,2,0,0,1493,1494,3,312,156,0,1494,1495,5,4,0,0,1495,1497,1,0,0,0,1496, +1488,1,0,0,0,1496,1492,1,0,0,0,1497,313,1,0,0,0,1498,1499,5,14,0,0,1499, +1505,5,15,0,0,1500,1501,5,14,0,0,1501,1502,3,316,158,0,1502,1503,5,15,0, +0,1503,1505,1,0,0,0,1504,1498,1,0,0,0,1504,1500,1,0,0,0,1505,315,1,0,0,0, +1506,1510,3,260,130,0,1507,1509,3,318,159,0,1508,1507,1,0,0,0,1509,1512, +1,0,0,0,1510,1508,1,0,0,0,1510,1511,1,0,0,0,1511,317,1,0,0,0,1512,1510,1, +0,0,0,1513,1514,5,3,0,0,1514,1515,3,260,130,0,1515,319,1,0,0,0,1516,1522, +3,322,161,0,1517,1518,5,2,0,0,1518,1519,3,320,160,0,1519,1520,5,4,0,0,1520, +1522,1,0,0,0,1521,1516,1,0,0,0,1521,1517,1,0,0,0,1522,321,1,0,0,0,1523,1524, +6,161,-1,0,1524,1525,3,324,162,0,1525,1531,1,0,0,0,1526,1527,10,1,0,0,1527, +1528,5,65,0,0,1528,1530,3,324,162,0,1529,1526,1,0,0,0,1530,1533,1,0,0,0, +1531,1529,1,0,0,0,1531,1532,1,0,0,0,1532,323,1,0,0,0,1533,1531,1,0,0,0,1534, +1544,3,284,142,0,1535,1536,5,21,0,0,1536,1544,3,284,142,0,1537,1538,5,21, +0,0,1538,1539,5,2,0,0,1539,1540,3,284,142,0,1540,1541,5,4,0,0,1541,1544, +1,0,0,0,1542,1544,3,274,137,0,1543,1534,1,0,0,0,1543,1535,1,0,0,0,1543,1537, +1,0,0,0,1543,1542,1,0,0,0,1544,325,1,0,0,0,1545,1549,3,338,169,0,1546,1549, +3,330,165,0,1547,1549,3,332,166,0,1548,1545,1,0,0,0,1548,1546,1,0,0,0,1548, +1547,1,0,0,0,1549,327,1,0,0,0,1550,1553,3,346,173,0,1551,1553,3,250,125, +0,1552,1550,1,0,0,0,1552,1551,1,0,0,0,1553,329,1,0,0,0,1554,1555,7,0,0,0, +1555,331,1,0,0,0,1556,1557,7,1,0,0,1557,333,1,0,0,0,1558,1559,5,27,0,0,1559, +335,1,0,0,0,1560,1563,3,346,173,0,1561,1563,3,250,125,0,1562,1560,1,0,0, +0,1562,1561,1,0,0,0,1563,337,1,0,0,0,1564,1567,3,340,170,0,1565,1567,5,70, +0,0,1566,1564,1,0,0,0,1566,1565,1,0,0,0,1567,339,1,0,0,0,1568,1569,7,2,0, +0,1569,341,1,0,0,0,1570,1578,5,29,0,0,1571,1578,5,30,0,0,1572,1578,5,31, +0,0,1573,1578,5,32,0,0,1574,1575,5,21,0,0,1575,1578,5,65,0,0,1576,1578,5, +33,0,0,1577,1570,1,0,0,0,1577,1571,1,0,0,0,1577,1572,1,0,0,0,1577,1573,1, +0,0,0,1577,1574,1,0,0,0,1577,1576,1,0,0,0,1578,343,1,0,0,0,1579,1580,7,3, +0,0,1580,345,1,0,0,0,1581,1582,5,21,0,0,1582,347,1,0,0,0,1583,1584,5,34, +0,0,1584,349,1,0,0,0,1585,1586,5,35,0,0,1586,351,1,0,0,0,1587,1588,5,36, +0,0,1588,353,1,0,0,0,1589,1592,3,372,186,0,1590,1592,5,55,0,0,1591,1589, +1,0,0,0,1591,1590,1,0,0,0,1592,355,1,0,0,0,1593,1597,3,354,177,0,1594,1597, +3,376,188,0,1595,1597,3,364,182,0,1596,1593,1,0,0,0,1596,1594,1,0,0,0,1596, +1595,1,0,0,0,1597,357,1,0,0,0,1598,1599,3,360,180,0,1599,359,1,0,0,0,1600, +1601,3,450,225,0,1601,361,1,0,0,0,1602,1603,3,452,226,0,1603,363,1,0,0,0, +1604,1605,3,454,227,0,1605,365,1,0,0,0,1606,1607,3,368,184,0,1607,367,1, +0,0,0,1608,1609,5,37,0,0,1609,369,1,0,0,0,1610,1611,5,38,0,0,1611,371,1, +0,0,0,1612,1613,3,374,187,0,1613,373,1,0,0,0,1614,1615,3,450,225,0,1615, +375,1,0,0,0,1616,1617,3,378,189,0,1617,377,1,0,0,0,1618,1619,3,452,226,0, +1619,379,1,0,0,0,1620,1621,3,382,191,0,1621,381,1,0,0,0,1622,1623,3,454, +227,0,1623,383,1,0,0,0,1624,1625,7,4,0,0,1625,385,1,0,0,0,1626,1629,3,456, +228,0,1627,1629,5,55,0,0,1628,1626,1,0,0,0,1628,1627,1,0,0,0,1629,387,1, +0,0,0,1630,1631,5,58,0,0,1631,389,1,0,0,0,1632,1640,3,394,197,0,1633,1640, +3,400,200,0,1634,1640,3,404,202,0,1635,1636,5,14,0,0,1636,1637,3,392,196, +0,1637,1638,5,15,0,0,1638,1640,1,0,0,0,1639,1632,1,0,0,0,1639,1633,1,0,0, +0,1639,1634,1,0,0,0,1639,1635,1,0,0,0,1640,391,1,0,0,0,1641,1647,3,390,195, +0,1642,1643,3,390,195,0,1643,1644,5,3,0,0,1644,1645,3,392,196,0,1645,1647, +1,0,0,0,1646,1641,1,0,0,0,1646,1642,1,0,0,0,1647,393,1,0,0,0,1648,1651,3, +448,224,0,1649,1651,3,396,198,0,1650,1648,1,0,0,0,1650,1649,1,0,0,0,1651, +395,1,0,0,0,1652,1653,5,44,0,0,1653,1654,5,2,0,0,1654,1655,3,398,199,0,1655, +1656,5,3,0,0,1656,1657,3,422,211,0,1657,1658,5,3,0,0,1658,1659,3,410,205, +0,1659,1660,5,4,0,0,1660,397,1,0,0,0,1661,1662,3,450,225,0,1662,399,1,0, +0,0,1663,1664,5,45,0,0,1664,1665,5,2,0,0,1665,1666,3,402,201,0,1666,1667, +5,3,0,0,1667,1668,3,422,211,0,1668,1669,5,3,0,0,1669,1670,3,410,205,0,1670, +1671,5,4,0,0,1671,401,1,0,0,0,1672,1673,3,450,225,0,1673,403,1,0,0,0,1674, +1675,3,406,203,0,1675,405,1,0,0,0,1676,1677,5,46,0,0,1677,1678,5,2,0,0,1678, +1679,3,458,229,0,1679,1680,3,408,204,0,1680,1681,5,4,0,0,1681,407,1,0,0, +0,1682,1683,5,3,0,0,1683,1686,3,448,224,0,1684,1686,3,460,230,0,1685,1682, +1,0,0,0,1685,1684,1,0,0,0,1686,409,1,0,0,0,1687,1688,5,14,0,0,1688,1694, +5,15,0,0,1689,1690,5,14,0,0,1690,1691,3,412,206,0,1691,1692,5,15,0,0,1692, +1694,1,0,0,0,1693,1687,1,0,0,0,1693,1689,1,0,0,0,1694,411,1,0,0,0,1695,1699, +3,416,208,0,1696,1698,3,414,207,0,1697,1696,1,0,0,0,1698,1701,1,0,0,0,1699, +1697,1,0,0,0,1699,1700,1,0,0,0,1700,413,1,0,0,0,1701,1699,1,0,0,0,1702,1703, +5,3,0,0,1703,1704,3,416,208,0,1704,415,1,0,0,0,1705,1706,3,390,195,0,1706, +1707,3,418,209,0,1707,417,1,0,0,0,1708,1709,5,16,0,0,1709,1712,3,434,217, +0,1710,1712,3,460,230,0,1711,1708,1,0,0,0,1711,1710,1,0,0,0,1712,419,1,0, +0,0,1713,1714,5,3,0,0,1714,1717,3,422,211,0,1715,1717,3,460,230,0,1716,1713, +1,0,0,0,1716,1715,1,0,0,0,1717,421,1,0,0,0,1718,1719,3,442,221,0,1719,423, +1,0,0,0,1720,1721,5,47,0,0,1721,1722,5,2,0,0,1722,1723,3,458,229,0,1723, +1724,3,426,213,0,1724,1725,5,4,0,0,1725,1726,5,5,0,0,1726,425,1,0,0,0,1727, +1736,3,460,230,0,1728,1729,5,3,0,0,1729,1736,3,428,214,0,1730,1731,5,3,0, +0,1731,1732,3,428,214,0,1732,1733,5,3,0,0,1733,1734,3,432,216,0,1734,1736, +1,0,0,0,1735,1727,1,0,0,0,1735,1728,1,0,0,0,1735,1730,1,0,0,0,1736,427,1, +0,0,0,1737,1738,5,14,0,0,1738,1739,3,430,215,0,1739,1740,5,15,0,0,1740,1743, +1,0,0,0,1741,1743,5,66,0,0,1742,1737,1,0,0,0,1742,1741,1,0,0,0,1743,429, +1,0,0,0,1744,1750,3,448,224,0,1745,1746,3,448,224,0,1746,1747,5,3,0,0,1747, +1748,3,430,215,0,1748,1750,1,0,0,0,1749,1744,1,0,0,0,1749,1745,1,0,0,0,1750, +431,1,0,0,0,1751,1752,3,448,224,0,1752,433,1,0,0,0,1753,1760,3,436,218,0, +1754,1755,3,436,218,0,1755,1756,5,16,0,0,1756,1757,3,434,217,0,1757,1760, +1,0,0,0,1758,1760,3,442,221,0,1759,1753,1,0,0,0,1759,1754,1,0,0,0,1759,1758, +1,0,0,0,1760,435,1,0,0,0,1761,1768,3,450,225,0,1762,1768,3,438,219,0,1763, +1768,3,388,194,0,1764,1768,3,456,228,0,1765,1768,5,55,0,0,1766,1768,3,440, +220,0,1767,1761,1,0,0,0,1767,1762,1,0,0,0,1767,1763,1,0,0,0,1767,1764,1, +0,0,0,1767,1765,1,0,0,0,1767,1766,1,0,0,0,1768,437,1,0,0,0,1769,1770,3,450, +225,0,1770,1771,5,2,0,0,1771,1772,3,444,222,0,1772,1773,5,4,0,0,1773,439, +1,0,0,0,1774,1775,5,48,0,0,1775,1776,5,2,0,0,1776,1777,3,24,12,0,1777,1778, +5,4,0,0,1778,1800,1,0,0,0,1779,1780,5,49,0,0,1780,1781,5,2,0,0,1781,1782, +3,120,60,0,1782,1783,5,4,0,0,1783,1800,1,0,0,0,1784,1785,5,50,0,0,1785,1786, +5,2,0,0,1786,1787,3,258,129,0,1787,1788,5,4,0,0,1788,1800,1,0,0,0,1789,1790, +5,51,0,0,1790,1791,5,2,0,0,1791,1792,3,320,160,0,1792,1793,5,4,0,0,1793, +1800,1,0,0,0,1794,1795,5,52,0,0,1795,1796,5,2,0,0,1796,1797,3,308,154,0, +1797,1798,5,4,0,0,1798,1800,1,0,0,0,1799,1774,1,0,0,0,1799,1779,1,0,0,0, +1799,1784,1,0,0,0,1799,1789,1,0,0,0,1799,1794,1,0,0,0,1800,441,1,0,0,0,1801, +1802,5,14,0,0,1802,1808,5,15,0,0,1803,1804,5,14,0,0,1804,1805,3,444,222, +0,1805,1806,5,15,0,0,1806,1808,1,0,0,0,1807,1801,1,0,0,0,1807,1803,1,0,0, +0,1808,443,1,0,0,0,1809,1813,3,434,217,0,1810,1812,3,446,223,0,1811,1810, +1,0,0,0,1812,1815,1,0,0,0,1813,1811,1,0,0,0,1813,1814,1,0,0,0,1814,445,1, +0,0,0,1815,1813,1,0,0,0,1816,1817,5,3,0,0,1817,1818,3,434,217,0,1818,447, +1,0,0,0,1819,1822,3,450,225,0,1820,1822,5,62,0,0,1821,1819,1,0,0,0,1821, +1820,1,0,0,0,1822,449,1,0,0,0,1823,1827,3,462,231,0,1824,1827,5,53,0,0,1825, +1827,5,54,0,0,1826,1823,1,0,0,0,1826,1824,1,0,0,0,1826,1825,1,0,0,0,1827, +451,1,0,0,0,1828,1829,5,56,0,0,1829,453,1,0,0,0,1830,1831,5,57,0,0,1831, +455,1,0,0,0,1832,1833,7,5,0,0,1833,457,1,0,0,0,1834,1835,3,450,225,0,1835, +459,1,0,0,0,1836,1837,1,0,0,0,1837,461,1,0,0,0,1838,1839,7,6,0,0,1839,463, +1,0,0,0,138,467,474,482,557,564,569,577,582,591,603,616,629,635,639,648, +664,672,685,689,699,703,725,732,739,750,758,765,773,790,798,812,817,826, +836,848,861,879,891,900,903,907,911,919,931,944,951,955,959,967,971,977, +986,1002,1006,1014,1026,1034,1046,1058,1074,1081,1088,1096,1103,1114,1124, +1132,1138,1152,1156,1164,1179,1186,1201,1208,1224,1236,1261,1268,1272,1287, +1294,1298,1304,1323,1327,1331,1342,1347,1351,1359,1371,1384,1391,1399,1407, +1421,1426,1432,1448,1452,1462,1470,1477,1481,1486,1496,1504,1510,1521,1531, +1543,1548,1552,1562,1566,1577,1591,1596,1628,1639,1646,1650,1685,1693,1699, +1711,1716,1735,1742,1749,1759,1767,1799,1807,1813,1821,1826]; + + +const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN); + +const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) ); + +const sharedContextCache = new antlr4.atn.PredictionContextCache(); + +export default class TPTPParser extends antlr4.Parser { + + static grammarFileName = "TPTP.g4"; + static literalNames = [ null, "'tpi'", "'('", "','", "')'", "'.'", "'thf'", + "'tff'", "'tcf'", "'fof'", "'cnf'", "'-'", "'&'", + "'@'", "'['", "']'", "':'", "'$let'", "'{'", + "'}'", "'!'", "'~'", "'^'", "'@+'", "'@-'", + "'!>'", "'?*'", "'<<'", "'?'", "'<=>'", "'=>'", + "'<='", "'<~>'", "'~&'", "'-->'", "':='", "'=='", + "'='", "'!='", "'!!'", "'??'", "'@@+'", "'@@-'", + "'@='", "'inference'", "'introduced'", "'file'", + "'include'", "'$thf'", "'$tff'", "'$fof'", "'$cnf'", + "'$fot'" ]; + static symbolicNames = [ null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, "Single_quoted", + "Back_quoted", "Distinct_object", "Dollar_word", + "Dollar_dollar_word", "Upper_word", "Lower_word", + "Real", "Rational", "Integer", "Slash", "Slosh", + "Vline", "Star", "Plus", "Arrow", "Less_sign", + "Hash", "Comment", "Comment_line", "WS" ]; + static ruleNames = [ "tptp_file", "tptp_input", "annotated_formula", + "tpi_annotated", "tpi_formula", "thf_annotated", + "tff_annotated", "tcf_annotated", "fof_annotated", + "cnf_annotated", "annotations", "formula_role", + "thf_formula", "thf_logic_formula", "thf_binary_formula", + "thf_binary_pair", "thf_binary_list", "thf_or_formula", + "thf_and_formula", "thf_apply_formula", "thf_unit_formula", + "thf_preunit_formula", "thf_unitary_formula", "thf_quantified_formula", + "thf_quantification", "thf_variable_list", "thf_typed_variable", + "thf_unary_formula", "thf_prefix_unary", "thf_infix_unary", + "thf_atomic_formula", "thf_plain_atomic", "thf_defined_atomic", + "thf_defined_term", "thf_defined_infix", "thf_system_atomic", + "thf_let", "thf_let_types", "thf_atom_typing_list", + "thf_let_defns", "thf_let_defn", "thf_let_defn_list", + "thf_unitary_term", "thf_conn_term", "thf_tuple", + "thf_fof_function", "thf_arguments", "thf_formula_list", + "comma_thf_logic_formula", "thf_atom_typing", "thf_top_level_type", + "thf_unitary_type", "thf_apply_type", "thf_binary_type", + "thf_mapping_type", "thf_xprod_type", "thf_union_type", + "thf_subtype", "thf_definition", "thf_sequent", + "tff_formula", "tff_logic_formula", "tff_binary_formula", + "tff_binary_pair", "tff_binary_list", "tff_or_formula", + "tff_and_formula", "tff_unit_formula", "bnf2antlr_tff_formula_term", + "bnf2antlr_tff_infix_tail", "tff_preunit_formula", + "tff_unitary_formula", "txf_unitary_formula", "tff_quantified_formula", + "tff_variable_list", "tff_variable", "tff_typed_variable", + "tff_unary_formula", "tff_prefix_unary", "tff_infix_unary", + "tff_atomic_formula", "tff_plain_atomic", "tff_defined_atomic", + "tff_defined_plain", "tff_defined_infix", "tff_system_atomic", + "txf_let", "txf_let_types", "tff_atom_typing_list", + "txf_let_defns", "txf_let_defn", "txf_let_lhs", + "txf_let_defn_list", "nxf_atom", "tff_term", "tff_unitary_term", + "txf_tuple", "tff_arguments", "comma_tff_term", + "tff_atom_typing", "tff_top_level_type", "tff_non_atomic_type", + "tf1_quantified_type", "tff_monotype", "tff_unitary_type", + "tff_atomic_type", "tff_type_arguments", "tff_mapping_type", + "tff_xprod_type", "txf_tuple_type", "tff_type_list", + "tff_subtype", "txf_definition", "txf_sequent", + "nhf_long_connective", "nhf_parameter_list", "nhf_parameter", + "nhf_key_pair", "nxf_long_connective", "nxf_parameter_list", + "nxf_parameter", "nxf_key_pair", "ntf_connective_name", + "ntf_defined_connective", "ntf_index", "ntf_short_connective", + "tcf_formula", "tcf_logic_formula", "tcf_quantified_formula", + "fof_formula", "fof_logic_formula", "fof_binary_formula", + "fof_binary_pair", "fof_binary_list", "fof_or_formula", + "fof_and_formula", "fof_unary_formula", "fof_infix_unary", + "fof_unit_formula", "fof_unitary_formula", "fof_quantified_formula", + "fof_variable_list", "fof_atomic_formula", "fof_plain_atomic_formula", + "fof_defined_atomic_formula", "fof_defined_plain_formula", + "fof_defined_infix_formula", "fof_system_atomic_formula", + "fof_plain_term", "fof_defined_term", "fof_defined_atomic_term", + "fof_defined_plain_term", "fof_system_term", "fof_arguments", + "fof_term", "fof_function_term", "fof_sequent", + "fof_formula_tuple", "fof_formula_tuple_list", + "comma_fof_logic_formula", "cnf_formula", "cnf_disjunction", + "cnf_literal", "thf_quantifier", "thf_unary_connective", + "th0_quantifier", "type_quantifier", "subtype_sign", + "tff_unary_connective", "tff_quantifier", "fof_quantifier", + "nonassoc_connective", "assoc_connective", "unary_connective", + "gentzen_arrow", "assignment", "identical", "typeable_atom", + "atomic_type", "type_constant", "type_functor", + "defined_type", "system_type", "defined_infix_pred", + "infix_equality", "infix_inequality", "constant", + "functor", "defined_constant", "defined_functor", + "system_constant", "system_functor", "th1_defined_term", + "defined_term", "variable", "source", "sources", + "dag_source", "inference_record", "inference_rule", + "internal_source", "intro_type", "external_source", + "file_source", "file_info", "parents", "parent_list", + "comma_parent_info", "parent_info", "parent_details", + "optional_info", "useful_info", "include", "include_optionals", + "formula_selection", "name_list", "space_name", + "general_term", "general_data", "general_function", + "formula_data", "general_list", "general_terms", + "comma_general_term", "name", "atomic_word", "atomic_defined_word", + "atomic_system_word", "number", "file_name", "nothing", + "lower_word_token" ]; + + constructor(input) { + super(input); + this._interp = new antlr4.atn.ParserATNSimulator(this, atn, decisionsToDFA, sharedContextCache); + this.ruleNames = TPTPParser.ruleNames; + this.literalNames = TPTPParser.literalNames; + this.symbolicNames = TPTPParser.symbolicNames; + } + + sempred(localctx, ruleIndex, predIndex) { + switch(ruleIndex) { + case 17: + return this.thf_or_formula_sempred(localctx, predIndex); + case 18: + return this.thf_and_formula_sempred(localctx, predIndex); + case 19: + return this.thf_apply_formula_sempred(localctx, predIndex); + case 55: + return this.thf_xprod_type_sempred(localctx, predIndex); + case 56: + return this.thf_union_type_sempred(localctx, predIndex); + case 65: + return this.tff_or_formula_sempred(localctx, predIndex); + case 66: + return this.tff_and_formula_sempred(localctx, predIndex); + case 108: + return this.tff_xprod_type_sempred(localctx, predIndex); + case 134: + return this.fof_or_formula_sempred(localctx, predIndex); + case 135: + return this.fof_and_formula_sempred(localctx, predIndex); + case 161: + return this.cnf_disjunction_sempred(localctx, predIndex); + default: + throw "No predicate with index:" + ruleIndex; + } + } + + thf_or_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 0: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + thf_and_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 1: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + thf_apply_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 2: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + thf_xprod_type_sempred(localctx, predIndex) { + switch(predIndex) { + case 3: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + thf_union_type_sempred(localctx, predIndex) { + switch(predIndex) { + case 4: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + tff_or_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 5: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + tff_and_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 6: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + tff_xprod_type_sempred(localctx, predIndex) { + switch(predIndex) { + case 7: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + fof_or_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 8: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + fof_and_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 9: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + cnf_disjunction_sempred(localctx, predIndex) { + switch(predIndex) { + case 10: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + + + + tptp_file() { + let localctx = new Tptp_fileContext(this, this._ctx, this.state); + this.enterRule(localctx, 0, TPTPParser.RULE_tptp_file); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 467; + this._errHandler.sync(this); + _la = this._input.LA(1); + while((((_la) & ~0x1f) === 0 && ((1 << _la) & 1986) !== 0) || _la===47) { + this.state = 464; + this.tptp_input(); + this.state = 469; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 470; + this.match(TPTPParser.EOF); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tptp_input() { + let localctx = new Tptp_inputContext(this, this._ctx, this.state); + this.enterRule(localctx, 2, TPTPParser.RULE_tptp_input); + try { + this.state = 474; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + this.enterOuterAlt(localctx, 1); + this.state = 472; + this.annotated_formula(); + break; + case 47: + this.enterOuterAlt(localctx, 2); + this.state = 473; + this.include(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + annotated_formula() { + let localctx = new Annotated_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 4, TPTPParser.RULE_annotated_formula); + try { + this.state = 482; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 6: + this.enterOuterAlt(localctx, 1); + this.state = 476; + this.thf_annotated(); + break; + case 7: + this.enterOuterAlt(localctx, 2); + this.state = 477; + this.tff_annotated(); + break; + case 8: + this.enterOuterAlt(localctx, 3); + this.state = 478; + this.tcf_annotated(); + break; + case 9: + this.enterOuterAlt(localctx, 4); + this.state = 479; + this.fof_annotated(); + break; + case 10: + this.enterOuterAlt(localctx, 5); + this.state = 480; + this.cnf_annotated(); + break; + case 1: + this.enterOuterAlt(localctx, 6); + this.state = 481; + this.tpi_annotated(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tpi_annotated() { + let localctx = new Tpi_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 6, TPTPParser.RULE_tpi_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 484; + this.match(TPTPParser.T__0); + this.state = 485; + this.match(TPTPParser.T__1); + this.state = 486; + this.name(); + this.state = 487; + this.match(TPTPParser.T__2); + this.state = 488; + this.formula_role(); + this.state = 489; + this.match(TPTPParser.T__2); + this.state = 490; + this.tpi_formula(); + this.state = 491; + this.annotations(); + this.state = 492; + this.match(TPTPParser.T__3); + this.state = 493; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tpi_formula() { + let localctx = new Tpi_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 8, TPTPParser.RULE_tpi_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 495; + this.fof_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_annotated() { + let localctx = new Thf_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 10, TPTPParser.RULE_thf_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 497; + this.match(TPTPParser.T__5); + this.state = 498; + this.match(TPTPParser.T__1); + this.state = 499; + this.name(); + this.state = 500; + this.match(TPTPParser.T__2); + this.state = 501; + this.formula_role(); + this.state = 502; + this.match(TPTPParser.T__2); + this.state = 503; + this.thf_formula(); + this.state = 504; + this.annotations(); + this.state = 505; + this.match(TPTPParser.T__3); + this.state = 506; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_annotated() { + let localctx = new Tff_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 12, TPTPParser.RULE_tff_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 508; + this.match(TPTPParser.T__6); + this.state = 509; + this.match(TPTPParser.T__1); + this.state = 510; + this.name(); + this.state = 511; + this.match(TPTPParser.T__2); + this.state = 512; + this.formula_role(); + this.state = 513; + this.match(TPTPParser.T__2); + this.state = 514; + this.tff_formula(); + this.state = 515; + this.annotations(); + this.state = 516; + this.match(TPTPParser.T__3); + this.state = 517; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tcf_annotated() { + let localctx = new Tcf_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 14, TPTPParser.RULE_tcf_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 519; + this.match(TPTPParser.T__7); + this.state = 520; + this.match(TPTPParser.T__1); + this.state = 521; + this.name(); + this.state = 522; + this.match(TPTPParser.T__2); + this.state = 523; + this.formula_role(); + this.state = 524; + this.match(TPTPParser.T__2); + this.state = 525; + this.tcf_formula(); + this.state = 526; + this.annotations(); + this.state = 527; + this.match(TPTPParser.T__3); + this.state = 528; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_annotated() { + let localctx = new Fof_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 16, TPTPParser.RULE_fof_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 530; + this.match(TPTPParser.T__8); + this.state = 531; + this.match(TPTPParser.T__1); + this.state = 532; + this.name(); + this.state = 533; + this.match(TPTPParser.T__2); + this.state = 534; + this.formula_role(); + this.state = 535; + this.match(TPTPParser.T__2); + this.state = 536; + this.fof_formula(); + this.state = 537; + this.annotations(); + this.state = 538; + this.match(TPTPParser.T__3); + this.state = 539; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + cnf_annotated() { + let localctx = new Cnf_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 18, TPTPParser.RULE_cnf_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 541; + this.match(TPTPParser.T__9); + this.state = 542; + this.match(TPTPParser.T__1); + this.state = 543; + this.name(); + this.state = 544; + this.match(TPTPParser.T__2); + this.state = 545; + this.formula_role(); + this.state = 546; + this.match(TPTPParser.T__2); + this.state = 547; + this.cnf_formula(); + this.state = 548; + this.annotations(); + this.state = 549; + this.match(TPTPParser.T__3); + this.state = 550; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + annotations() { + let localctx = new AnnotationsContext(this, this._ctx, this.state); + this.enterRule(localctx, 20, TPTPParser.RULE_annotations); + try { + this.state = 557; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 3: + this.enterOuterAlt(localctx, 1); + this.state = 552; + this.match(TPTPParser.T__2); + this.state = 553; + this.source(); + this.state = 554; + this.optional_info(); + break; + case 4: + this.enterOuterAlt(localctx, 2); + this.state = 556; + this.nothing(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + formula_role() { + let localctx = new Formula_roleContext(this, this._ctx, this.state); + this.enterRule(localctx, 22, TPTPParser.RULE_formula_role); + try { + this.state = 564; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,4,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 559; + this.lower_word_token(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 560; + this.lower_word_token(); + this.state = 561; + this.match(TPTPParser.T__10); + this.state = 562; + this.general_term(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_formula() { + let localctx = new Thf_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 24, TPTPParser.RULE_thf_formula); + try { + this.state = 569; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,5,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 566; + this.thf_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 567; + this.thf_atom_typing(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 568; + this.thf_subtype(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_logic_formula() { + let localctx = new Thf_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 26, TPTPParser.RULE_thf_logic_formula); + try { + this.state = 577; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,6,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 571; + this.thf_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 572; + this.thf_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 573; + this.thf_binary_formula(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 574; + this.thf_defined_infix(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 575; + this.thf_definition(); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 576; + this.thf_sequent(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_binary_formula() { + let localctx = new Thf_binary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 28, TPTPParser.RULE_thf_binary_formula); + try { + this.state = 582; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,7,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 579; + this.thf_binary_pair(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 580; + this.thf_binary_list(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 581; + this.thf_binary_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_binary_pair() { + let localctx = new Thf_binary_pairContext(this, this._ctx, this.state); + this.enterRule(localctx, 30, TPTPParser.RULE_thf_binary_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 584; + this.thf_unit_formula(); + this.state = 585; + this.nonassoc_connective(); + this.state = 586; + this.thf_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_binary_list() { + let localctx = new Thf_binary_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 32, TPTPParser.RULE_thf_binary_list); + try { + this.state = 591; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,8,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 588; + this.thf_or_formula(0); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 589; + this.thf_and_formula(0); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 590; + this.thf_apply_formula(0); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + thf_or_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Thf_or_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 34; + this.enterRecursionRule(localctx, 34, TPTPParser.RULE_thf_or_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 594; + this.thf_unit_formula(); + this.state = 595; + this.match(TPTPParser.Vline); + this.state = 596; + this.thf_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 603; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,9,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Thf_or_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_or_formula); + this.state = 598; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 599; + this.match(TPTPParser.Vline); + this.state = 600; + this.thf_unit_formula(); + } + this.state = 605; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,9,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + thf_and_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Thf_and_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 36; + this.enterRecursionRule(localctx, 36, TPTPParser.RULE_thf_and_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 607; + this.thf_unit_formula(); + this.state = 608; + this.match(TPTPParser.T__11); + this.state = 609; + this.thf_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 616; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,10,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Thf_and_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_and_formula); + this.state = 611; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 612; + this.match(TPTPParser.T__11); + this.state = 613; + this.thf_unit_formula(); + } + this.state = 618; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,10,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + thf_apply_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Thf_apply_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 38; + this.enterRecursionRule(localctx, 38, TPTPParser.RULE_thf_apply_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 620; + this.thf_unit_formula(); + this.state = 621; + this.match(TPTPParser.T__12); + this.state = 622; + this.thf_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 629; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,11,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Thf_apply_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_apply_formula); + this.state = 624; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 625; + this.match(TPTPParser.T__12); + this.state = 626; + this.thf_unit_formula(); + } + this.state = 631; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,11,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + thf_unit_formula() { + let localctx = new Thf_unit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 40, TPTPParser.RULE_thf_unit_formula); + try { + this.state = 635; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,12,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 632; + this.thf_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 633; + this.thf_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 634; + this.thf_defined_infix(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_preunit_formula() { + let localctx = new Thf_preunit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 42, TPTPParser.RULE_thf_preunit_formula); + try { + this.state = 639; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,13,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 637; + this.thf_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 638; + this.thf_prefix_unary(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_unitary_formula() { + let localctx = new Thf_unitary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 44, TPTPParser.RULE_thf_unitary_formula); + try { + this.state = 648; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,14,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 641; + this.thf_quantified_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 642; + this.thf_atomic_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 643; + this.variable(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 644; + this.match(TPTPParser.T__1); + this.state = 645; + this.thf_logic_formula(); + this.state = 646; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_quantified_formula() { + let localctx = new Thf_quantified_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 46, TPTPParser.RULE_thf_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 650; + this.thf_quantification(); + this.state = 651; + this.thf_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_quantification() { + let localctx = new Thf_quantificationContext(this, this._ctx, this.state); + this.enterRule(localctx, 48, TPTPParser.RULE_thf_quantification); + try { + this.enterOuterAlt(localctx, 1); + this.state = 653; + this.thf_quantifier(); + this.state = 654; + this.match(TPTPParser.T__13); + this.state = 655; + this.thf_variable_list(); + this.state = 656; + this.match(TPTPParser.T__14); + this.state = 657; + this.match(TPTPParser.T__15); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_variable_list() { + let localctx = new Thf_variable_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 50, TPTPParser.RULE_thf_variable_list); + try { + this.state = 664; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,15,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 659; + this.thf_typed_variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 660; + this.thf_typed_variable(); + this.state = 661; + this.match(TPTPParser.T__2); + this.state = 662; + this.thf_variable_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_typed_variable() { + let localctx = new Thf_typed_variableContext(this, this._ctx, this.state); + this.enterRule(localctx, 52, TPTPParser.RULE_thf_typed_variable); + try { + this.enterOuterAlt(localctx, 1); + this.state = 666; + this.variable(); + this.state = 667; + this.match(TPTPParser.T__15); + this.state = 668; + this.thf_top_level_type(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_unary_formula() { + let localctx = new Thf_unary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 54, TPTPParser.RULE_thf_unary_formula); + try { + this.state = 672; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,16,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 670; + this.thf_prefix_unary(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 671; + this.thf_infix_unary(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_prefix_unary() { + let localctx = new Thf_prefix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 56, TPTPParser.RULE_thf_prefix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 674; + this.thf_unary_connective(); + this.state = 675; + this.thf_preunit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_infix_unary() { + let localctx = new Thf_infix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 58, TPTPParser.RULE_thf_infix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 677; + this.thf_unitary_term(); + this.state = 678; + this.infix_inequality(); + this.state = 679; + this.thf_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_atomic_formula() { + let localctx = new Thf_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 60, TPTPParser.RULE_thf_atomic_formula); + try { + this.state = 685; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,17,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 681; + this.thf_plain_atomic(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 682; + this.thf_defined_atomic(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 683; + this.thf_system_atomic(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 684; + this.thf_fof_function(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_plain_atomic() { + let localctx = new Thf_plain_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 62, TPTPParser.RULE_thf_plain_atomic); + try { + this.state = 689; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 687; + this.constant(); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 688; + this.thf_tuple(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_defined_atomic() { + let localctx = new Thf_defined_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 64, TPTPParser.RULE_thf_defined_atomic); + try { + this.state = 699; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 56: + this.enterOuterAlt(localctx, 1); + this.state = 691; + this.defined_constant(); + break; + case 39: + case 40: + case 41: + case 42: + case 43: + case 55: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 692; + this.thf_defined_term(); + break; + case 2: + this.enterOuterAlt(localctx, 3); + this.state = 693; + this.match(TPTPParser.T__1); + this.state = 694; + this.thf_conn_term(); + this.state = 695; + this.match(TPTPParser.T__3); + break; + case 18: + this.enterOuterAlt(localctx, 4); + this.state = 697; + this.nhf_long_connective(); + break; + case 17: + this.enterOuterAlt(localctx, 5); + this.state = 698; + this.thf_let(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_defined_term() { + let localctx = new Thf_defined_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 66, TPTPParser.RULE_thf_defined_term); + try { + this.state = 703; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 55: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 1); + this.state = 701; + this.defined_term(); + break; + case 39: + case 40: + case 41: + case 42: + case 43: + this.enterOuterAlt(localctx, 2); + this.state = 702; + this.th1_defined_term(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_defined_infix() { + let localctx = new Thf_defined_infixContext(this, this._ctx, this.state); + this.enterRule(localctx, 68, TPTPParser.RULE_thf_defined_infix); + try { + this.enterOuterAlt(localctx, 1); + this.state = 705; + this.thf_unitary_term(); + this.state = 706; + this.defined_infix_pred(); + this.state = 707; + this.thf_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_system_atomic() { + let localctx = new Thf_system_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 70, TPTPParser.RULE_thf_system_atomic); + try { + this.enterOuterAlt(localctx, 1); + this.state = 709; + this.system_constant(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_let() { + let localctx = new Thf_letContext(this, this._ctx, this.state); + this.enterRule(localctx, 72, TPTPParser.RULE_thf_let); + try { + this.enterOuterAlt(localctx, 1); + this.state = 711; + this.match(TPTPParser.T__16); + this.state = 712; + this.match(TPTPParser.T__1); + this.state = 713; + this.thf_let_types(); + this.state = 714; + this.match(TPTPParser.T__2); + this.state = 715; + this.thf_let_defns(); + this.state = 716; + this.match(TPTPParser.T__2); + this.state = 717; + this.thf_logic_formula(); + this.state = 718; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_let_types() { + let localctx = new Thf_let_typesContext(this, this._ctx, this.state); + this.enterRule(localctx, 74, TPTPParser.RULE_thf_let_types); + try { + this.state = 725; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 720; + this.thf_atom_typing(); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 721; + this.match(TPTPParser.T__13); + this.state = 722; + this.thf_atom_typing_list(); + this.state = 723; + this.match(TPTPParser.T__14); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_atom_typing_list() { + let localctx = new Thf_atom_typing_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 76, TPTPParser.RULE_thf_atom_typing_list); + try { + this.state = 732; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,22,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 727; + this.thf_atom_typing(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 728; + this.thf_atom_typing(); + this.state = 729; + this.match(TPTPParser.T__2); + this.state = 730; + this.thf_atom_typing_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_let_defns() { + let localctx = new Thf_let_defnsContext(this, this._ctx, this.state); + this.enterRule(localctx, 78, TPTPParser.RULE_thf_let_defns); + try { + this.state = 739; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,23,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 734; + this.thf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 735; + this.match(TPTPParser.T__13); + this.state = 736; + this.thf_let_defn_list(); + this.state = 737; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_let_defn() { + let localctx = new Thf_let_defnContext(this, this._ctx, this.state); + this.enterRule(localctx, 80, TPTPParser.RULE_thf_let_defn); + try { + this.enterOuterAlt(localctx, 1); + this.state = 741; + this.thf_logic_formula(); + this.state = 742; + this.assignment(); + this.state = 743; + this.thf_logic_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_let_defn_list() { + let localctx = new Thf_let_defn_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 82, TPTPParser.RULE_thf_let_defn_list); + try { + this.state = 750; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,24,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 745; + this.thf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 746; + this.thf_let_defn(); + this.state = 747; + this.match(TPTPParser.T__2); + this.state = 748; + this.thf_let_defn_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_unitary_term() { + let localctx = new Thf_unitary_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 84, TPTPParser.RULE_thf_unitary_term); + try { + this.state = 758; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,25,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 752; + this.thf_atomic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 753; + this.variable(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 754; + this.match(TPTPParser.T__1); + this.state = 755; + this.thf_logic_formula(); + this.state = 756; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_conn_term() { + let localctx = new Thf_conn_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 86, TPTPParser.RULE_thf_conn_term); + try { + this.state = 765; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,26,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 760; + this.nonassoc_connective(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 761; + this.assoc_connective(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 762; + this.infix_equality(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 763; + this.infix_inequality(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 764; + this.thf_unary_connective(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_tuple() { + let localctx = new Thf_tupleContext(this, this._ctx, this.state); + this.enterRule(localctx, 88, TPTPParser.RULE_thf_tuple); + try { + this.state = 773; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,27,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 767; + this.match(TPTPParser.T__13); + this.state = 768; + this.match(TPTPParser.T__14); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 769; + this.match(TPTPParser.T__13); + this.state = 770; + this.thf_formula_list(); + this.state = 771; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_fof_function() { + let localctx = new Thf_fof_functionContext(this, this._ctx, this.state); + this.enterRule(localctx, 90, TPTPParser.RULE_thf_fof_function); + try { + this.state = 790; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 56: + this.enterOuterAlt(localctx, 1); + this.state = 775; + this.defined_functor(); + this.state = 776; + this.match(TPTPParser.T__1); + this.state = 777; + this.thf_arguments(); + this.state = 778; + this.match(TPTPParser.T__3); + break; + case 57: + this.enterOuterAlt(localctx, 2); + this.state = 780; + this.system_functor(); + this.state = 781; + this.match(TPTPParser.T__1); + this.state = 782; + this.thf_arguments(); + this.state = 783; + this.match(TPTPParser.T__3); + break; + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 3); + this.state = 785; + this.functor(); + this.state = 786; + this.match(TPTPParser.T__1); + this.state = 787; + this.thf_arguments(); + this.state = 788; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_arguments() { + let localctx = new Thf_argumentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 92, TPTPParser.RULE_thf_arguments); + try { + this.enterOuterAlt(localctx, 1); + this.state = 792; + this.thf_formula_list(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_formula_list() { + let localctx = new Thf_formula_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 94, TPTPParser.RULE_thf_formula_list); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 794; + this.thf_logic_formula(); + this.state = 798; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===3) { + this.state = 795; + this.comma_thf_logic_formula(); + this.state = 800; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + comma_thf_logic_formula() { + let localctx = new Comma_thf_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 96, TPTPParser.RULE_comma_thf_logic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 801; + this.match(TPTPParser.T__2); + this.state = 802; + this.thf_logic_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_atom_typing() { + let localctx = new Thf_atom_typingContext(this, this._ctx, this.state); + this.enterRule(localctx, 98, TPTPParser.RULE_thf_atom_typing); + try { + this.state = 812; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 804; + this.typeable_atom(); + this.state = 805; + this.match(TPTPParser.T__15); + this.state = 806; + this.thf_top_level_type(); + break; + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 808; + this.match(TPTPParser.T__1); + this.state = 809; + this.thf_atom_typing(); + this.state = 810; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_top_level_type() { + let localctx = new Thf_top_level_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 100, TPTPParser.RULE_thf_top_level_type); + try { + this.state = 817; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,31,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 814; + this.thf_unitary_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 815; + this.thf_mapping_type(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 816; + this.thf_apply_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_unitary_type() { + let localctx = new Thf_unitary_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 102, TPTPParser.RULE_thf_unitary_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 819; + this.thf_unitary_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_apply_type() { + let localctx = new Thf_apply_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 104, TPTPParser.RULE_thf_apply_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 821; + this.thf_apply_formula(0); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_binary_type() { + let localctx = new Thf_binary_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 106, TPTPParser.RULE_thf_binary_type); + try { + this.state = 826; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,32,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 823; + this.thf_mapping_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 824; + this.thf_xprod_type(0); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 825; + this.thf_union_type(0); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_mapping_type() { + let localctx = new Thf_mapping_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 108, TPTPParser.RULE_thf_mapping_type); + try { + this.state = 836; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,33,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 828; + this.thf_unitary_type(); + this.state = 829; + this.match(TPTPParser.Arrow); + this.state = 830; + this.thf_unitary_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 832; + this.thf_unitary_type(); + this.state = 833; + this.match(TPTPParser.Arrow); + this.state = 834; + this.thf_mapping_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + thf_xprod_type(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Thf_xprod_typeContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 110; + this.enterRecursionRule(localctx, 110, TPTPParser.RULE_thf_xprod_type, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 839; + this.thf_unitary_type(); + this.state = 840; + this.match(TPTPParser.Star); + this.state = 841; + this.thf_unitary_type(); + this._ctx.stop = this._input.LT(-1); + this.state = 848; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,34,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Thf_xprod_typeContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_xprod_type); + this.state = 843; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 844; + this.match(TPTPParser.Star); + this.state = 845; + this.thf_unitary_type(); + } + this.state = 850; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,34,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + thf_union_type(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Thf_union_typeContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 112; + this.enterRecursionRule(localctx, 112, TPTPParser.RULE_thf_union_type, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 852; + this.thf_unitary_type(); + this.state = 853; + this.match(TPTPParser.Plus); + this.state = 854; + this.thf_unitary_type(); + this._ctx.stop = this._input.LT(-1); + this.state = 861; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,35,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Thf_union_typeContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_union_type); + this.state = 856; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 857; + this.match(TPTPParser.Plus); + this.state = 858; + this.thf_unitary_type(); + } + this.state = 863; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,35,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + thf_subtype() { + let localctx = new Thf_subtypeContext(this, this._ctx, this.state); + this.enterRule(localctx, 114, TPTPParser.RULE_thf_subtype); + try { + this.enterOuterAlt(localctx, 1); + this.state = 864; + this.atomic_type(); + this.state = 865; + this.subtype_sign(); + this.state = 866; + this.atomic_type(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_definition() { + let localctx = new Thf_definitionContext(this, this._ctx, this.state); + this.enterRule(localctx, 116, TPTPParser.RULE_thf_definition); + try { + this.enterOuterAlt(localctx, 1); + this.state = 868; + this.thf_atomic_formula(); + this.state = 869; + this.identical(); + this.state = 870; + this.thf_logic_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_sequent() { + let localctx = new Thf_sequentContext(this, this._ctx, this.state); + this.enterRule(localctx, 118, TPTPParser.RULE_thf_sequent); + try { + this.enterOuterAlt(localctx, 1); + this.state = 872; + this.thf_tuple(); + this.state = 873; + this.gentzen_arrow(); + this.state = 874; + this.thf_tuple(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_formula() { + let localctx = new Tff_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 120, TPTPParser.RULE_tff_formula); + try { + this.state = 879; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,36,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 876; + this.tff_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 877; + this.tff_atom_typing(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 878; + this.tff_subtype(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_logic_formula() { + let localctx = new Tff_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 122, TPTPParser.RULE_tff_logic_formula); + var _la = 0; + try { + this.state = 907; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,40,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 881; + this.tff_unit_formula(); + this.state = 903; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case 21: + case 29: + case 30: + case 31: + case 32: + case 33: + this.state = 882; + this.nonassoc_connective(); + this.state = 883; + this.tff_unit_formula(); + break; + case 65: + this.state = 885; + this.match(TPTPParser.Vline); + this.state = 886; + this.tff_unit_formula(); + this.state = 891; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===65) { + this.state = 887; + this.match(TPTPParser.Vline); + this.state = 888; + this.tff_unit_formula(); + this.state = 893; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + break; + case 12: + this.state = 894; + this.match(TPTPParser.T__11); + this.state = 895; + this.tff_unit_formula(); + this.state = 900; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===12) { + this.state = 896; + this.match(TPTPParser.T__11); + this.state = 897; + this.tff_unit_formula(); + this.state = 902; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + break; + case 3: + case 4: + case 15: + break; + default: + break; + } + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 905; + this.txf_definition(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 906; + this.txf_sequent(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_binary_formula() { + let localctx = new Tff_binary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 124, TPTPParser.RULE_tff_binary_formula); + try { + this.state = 911; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,41,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 909; + this.tff_binary_pair(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 910; + this.tff_binary_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_binary_pair() { + let localctx = new Tff_binary_pairContext(this, this._ctx, this.state); + this.enterRule(localctx, 126, TPTPParser.RULE_tff_binary_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 913; + this.tff_unit_formula(); + this.state = 914; + this.nonassoc_connective(); + this.state = 915; + this.tff_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_binary_list() { + let localctx = new Tff_binary_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 128, TPTPParser.RULE_tff_binary_list); + try { + this.state = 919; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,42,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 917; + this.tff_or_formula(0); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 918; + this.tff_and_formula(0); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + tff_or_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Tff_or_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 130; + this.enterRecursionRule(localctx, 130, TPTPParser.RULE_tff_or_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 922; + this.tff_unit_formula(); + this.state = 923; + this.match(TPTPParser.Vline); + this.state = 924; + this.tff_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 931; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,43,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Tff_or_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_tff_or_formula); + this.state = 926; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 927; + this.match(TPTPParser.Vline); + this.state = 928; + this.tff_unit_formula(); + } + this.state = 933; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,43,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + tff_and_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Tff_and_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 132; + this.enterRecursionRule(localctx, 132, TPTPParser.RULE_tff_and_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 935; + this.tff_unit_formula(); + this.state = 936; + this.match(TPTPParser.T__11); + this.state = 937; + this.tff_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 944; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,44,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Tff_and_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_tff_and_formula); + this.state = 939; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 940; + this.match(TPTPParser.T__11); + this.state = 941; + this.tff_unit_formula(); + } + this.state = 946; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,44,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + tff_unit_formula() { + let localctx = new Tff_unit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 134, TPTPParser.RULE_tff_unit_formula); + try { + this.state = 959; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,47,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 947; + this.tff_quantified_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 948; + this.tff_prefix_unary(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 949; + this.bnf2antlr_tff_formula_term(); + this.state = 951; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,45,this._ctx); + if(la_===1) { + this.state = 950; + this.bnf2antlr_tff_infix_tail(); + + } + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 955; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 55: + case 60: + case 61: + case 62: + this.state = 953; + this.defined_term(); + break; + case 14: + this.state = 954; + this.txf_tuple(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + this.state = 957; + this.bnf2antlr_tff_infix_tail(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + bnf2antlr_tff_formula_term() { + let localctx = new Bnf2antlr_tff_formula_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 136, TPTPParser.RULE_bnf2antlr_tff_formula_term); + try { + this.state = 967; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 17: + case 18: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 56: + case 57: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 961; + this.tff_atomic_formula(); + break; + case 58: + this.enterOuterAlt(localctx, 2); + this.state = 962; + this.variable(); + break; + case 2: + this.enterOuterAlt(localctx, 3); + this.state = 963; + this.match(TPTPParser.T__1); + this.state = 964; + this.tff_logic_formula(); + this.state = 965; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + bnf2antlr_tff_infix_tail() { + let localctx = new Bnf2antlr_tff_infix_tailContext(this, this._ctx, this.state); + this.enterRule(localctx, 138, TPTPParser.RULE_bnf2antlr_tff_infix_tail); + try { + this.enterOuterAlt(localctx, 1); + this.state = 971; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 37: + this.state = 969; + this.defined_infix_pred(); + break; + case 38: + this.state = 970; + this.infix_inequality(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + this.state = 973; + this.tff_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_preunit_formula() { + let localctx = new Tff_preunit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 140, TPTPParser.RULE_tff_preunit_formula); + try { + this.state = 977; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,50,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 975; + this.tff_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 976; + this.tff_prefix_unary(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_unitary_formula() { + let localctx = new Tff_unitary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 142, TPTPParser.RULE_tff_unitary_formula); + try { + this.state = 986; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 20: + case 28: + case 70: + this.enterOuterAlt(localctx, 1); + this.state = 979; + this.tff_quantified_formula(); + break; + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 17: + case 18: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 56: + case 57: + case 59: + this.enterOuterAlt(localctx, 2); + this.state = 980; + this.tff_atomic_formula(); + break; + case 58: + this.enterOuterAlt(localctx, 3); + this.state = 981; + this.txf_unitary_formula(); + break; + case 2: + this.enterOuterAlt(localctx, 4); + this.state = 982; + this.match(TPTPParser.T__1); + this.state = 983; + this.tff_logic_formula(); + this.state = 984; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_unitary_formula() { + let localctx = new Txf_unitary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 144, TPTPParser.RULE_txf_unitary_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 988; + this.variable(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_quantified_formula() { + let localctx = new Tff_quantified_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 146, TPTPParser.RULE_tff_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 990; + this.tff_quantifier(); + this.state = 991; + this.match(TPTPParser.T__13); + this.state = 992; + this.tff_variable_list(); + this.state = 993; + this.match(TPTPParser.T__14); + this.state = 994; + this.match(TPTPParser.T__15); + this.state = 995; + this.tff_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_variable_list() { + let localctx = new Tff_variable_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 148, TPTPParser.RULE_tff_variable_list); + try { + this.state = 1002; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,52,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 997; + this.tff_variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 998; + this.tff_variable(); + this.state = 999; + this.match(TPTPParser.T__2); + this.state = 1000; + this.tff_variable_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_variable() { + let localctx = new Tff_variableContext(this, this._ctx, this.state); + this.enterRule(localctx, 150, TPTPParser.RULE_tff_variable); + try { + this.state = 1006; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,53,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1004; + this.tff_typed_variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1005; + this.variable(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_typed_variable() { + let localctx = new Tff_typed_variableContext(this, this._ctx, this.state); + this.enterRule(localctx, 152, TPTPParser.RULE_tff_typed_variable); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1008; + this.variable(); + this.state = 1009; + this.match(TPTPParser.T__15); + this.state = 1010; + this.tff_atomic_type(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_unary_formula() { + let localctx = new Tff_unary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 154, TPTPParser.RULE_tff_unary_formula); + try { + this.state = 1014; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,54,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1012; + this.tff_prefix_unary(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1013; + this.tff_infix_unary(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_prefix_unary() { + let localctx = new Tff_prefix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 156, TPTPParser.RULE_tff_prefix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1016; + this.tff_unary_connective(); + this.state = 1017; + this.tff_preunit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_infix_unary() { + let localctx = new Tff_infix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 158, TPTPParser.RULE_tff_infix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1019; + this.tff_unitary_term(); + this.state = 1020; + this.infix_inequality(); + this.state = 1021; + this.tff_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_atomic_formula() { + let localctx = new Tff_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 160, TPTPParser.RULE_tff_atomic_formula); + try { + this.state = 1026; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1023; + this.tff_plain_atomic(); + break; + case 17: + case 18: + case 56: + this.enterOuterAlt(localctx, 2); + this.state = 1024; + this.tff_defined_atomic(); + break; + case 57: + this.enterOuterAlt(localctx, 3); + this.state = 1025; + this.tff_system_atomic(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_plain_atomic() { + let localctx = new Tff_plain_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 162, TPTPParser.RULE_tff_plain_atomic); + try { + this.state = 1034; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,56,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1028; + this.constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1029; + this.functor(); + this.state = 1030; + this.match(TPTPParser.T__1); + this.state = 1031; + this.tff_arguments(); + this.state = 1032; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_defined_atomic() { + let localctx = new Tff_defined_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 164, TPTPParser.RULE_tff_defined_atomic); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1036; + this.tff_defined_plain(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_defined_plain() { + let localctx = new Tff_defined_plainContext(this, this._ctx, this.state); + this.enterRule(localctx, 166, TPTPParser.RULE_tff_defined_plain); + try { + this.state = 1046; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,57,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1038; + this.defined_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1039; + this.defined_functor(); + this.state = 1040; + this.match(TPTPParser.T__1); + this.state = 1041; + this.tff_arguments(); + this.state = 1042; + this.match(TPTPParser.T__3); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1044; + this.nxf_atom(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1045; + this.txf_let(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_defined_infix() { + let localctx = new Tff_defined_infixContext(this, this._ctx, this.state); + this.enterRule(localctx, 168, TPTPParser.RULE_tff_defined_infix); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1048; + this.tff_unitary_term(); + this.state = 1049; + this.defined_infix_pred(); + this.state = 1050; + this.tff_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_system_atomic() { + let localctx = new Tff_system_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 170, TPTPParser.RULE_tff_system_atomic); + try { + this.state = 1058; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,58,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1052; + this.system_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1053; + this.system_functor(); + this.state = 1054; + this.match(TPTPParser.T__1); + this.state = 1055; + this.tff_arguments(); + this.state = 1056; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let() { + let localctx = new Txf_letContext(this, this._ctx, this.state); + this.enterRule(localctx, 172, TPTPParser.RULE_txf_let); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1060; + this.match(TPTPParser.T__16); + this.state = 1061; + this.match(TPTPParser.T__1); + this.state = 1062; + this.txf_let_types(); + this.state = 1063; + this.match(TPTPParser.T__2); + this.state = 1064; + this.txf_let_defns(); + this.state = 1065; + this.match(TPTPParser.T__2); + this.state = 1066; + this.tff_term(); + this.state = 1067; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let_types() { + let localctx = new Txf_let_typesContext(this, this._ctx, this.state); + this.enterRule(localctx, 174, TPTPParser.RULE_txf_let_types); + try { + this.state = 1074; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1069; + this.tff_atom_typing(); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 1070; + this.match(TPTPParser.T__13); + this.state = 1071; + this.tff_atom_typing_list(); + this.state = 1072; + this.match(TPTPParser.T__14); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_atom_typing_list() { + let localctx = new Tff_atom_typing_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 176, TPTPParser.RULE_tff_atom_typing_list); + try { + this.state = 1081; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,60,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1076; + this.tff_atom_typing(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1077; + this.tff_atom_typing(); + this.state = 1078; + this.match(TPTPParser.T__2); + this.state = 1079; + this.tff_atom_typing_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let_defns() { + let localctx = new Txf_let_defnsContext(this, this._ctx, this.state); + this.enterRule(localctx, 178, TPTPParser.RULE_txf_let_defns); + try { + this.state = 1088; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,61,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1083; + this.txf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1084; + this.match(TPTPParser.T__13); + this.state = 1085; + this.txf_let_defn_list(); + this.state = 1086; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let_defn() { + let localctx = new Txf_let_defnContext(this, this._ctx, this.state); + this.enterRule(localctx, 180, TPTPParser.RULE_txf_let_defn); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1090; + this.txf_let_lhs(); + this.state = 1091; + this.assignment(); + this.state = 1092; + this.tff_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let_lhs() { + let localctx = new Txf_let_lhsContext(this, this._ctx, this.state); + this.enterRule(localctx, 182, TPTPParser.RULE_txf_let_lhs); + try { + this.state = 1096; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1094; + this.tff_plain_atomic(); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 1095; + this.txf_tuple(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let_defn_list() { + let localctx = new Txf_let_defn_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 184, TPTPParser.RULE_txf_let_defn_list); + try { + this.state = 1103; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,63,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1098; + this.txf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1099; + this.txf_let_defn(); + this.state = 1100; + this.match(TPTPParser.T__2); + this.state = 1101; + this.txf_let_defn_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nxf_atom() { + let localctx = new Nxf_atomContext(this, this._ctx, this.state); + this.enterRule(localctx, 186, TPTPParser.RULE_nxf_atom); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1105; + this.nxf_long_connective(); + this.state = 1106; + this.match(TPTPParser.T__12); + this.state = 1107; + this.match(TPTPParser.T__1); + this.state = 1108; + this.tff_arguments(); + this.state = 1109; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_term() { + let localctx = new Tff_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 188, TPTPParser.RULE_tff_term); + try { + this.state = 1114; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,64,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1111; + this.tff_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1112; + this.defined_term(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1113; + this.txf_tuple(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_unitary_term() { + let localctx = new Tff_unitary_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 190, TPTPParser.RULE_tff_unitary_term); + try { + this.state = 1124; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 17: + case 18: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 56: + case 57: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1116; + this.tff_atomic_formula(); + break; + case 55: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1117; + this.defined_term(); + break; + case 14: + this.enterOuterAlt(localctx, 3); + this.state = 1118; + this.txf_tuple(); + break; + case 58: + this.enterOuterAlt(localctx, 4); + this.state = 1119; + this.variable(); + break; + case 2: + this.enterOuterAlt(localctx, 5); + this.state = 1120; + this.match(TPTPParser.T__1); + this.state = 1121; + this.tff_logic_formula(); + this.state = 1122; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_tuple() { + let localctx = new Txf_tupleContext(this, this._ctx, this.state); + this.enterRule(localctx, 192, TPTPParser.RULE_txf_tuple); + try { + this.state = 1132; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,66,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1126; + this.match(TPTPParser.T__13); + this.state = 1127; + this.match(TPTPParser.T__14); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1128; + this.match(TPTPParser.T__13); + this.state = 1129; + this.tff_arguments(); + this.state = 1130; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_arguments() { + let localctx = new Tff_argumentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 194, TPTPParser.RULE_tff_arguments); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1134; + this.tff_term(); + this.state = 1138; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===3) { + this.state = 1135; + this.comma_tff_term(); + this.state = 1140; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + comma_tff_term() { + let localctx = new Comma_tff_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 196, TPTPParser.RULE_comma_tff_term); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1141; + this.match(TPTPParser.T__2); + this.state = 1142; + this.tff_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_atom_typing() { + let localctx = new Tff_atom_typingContext(this, this._ctx, this.state); + this.enterRule(localctx, 198, TPTPParser.RULE_tff_atom_typing); + try { + this.state = 1152; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1144; + this.typeable_atom(); + this.state = 1145; + this.match(TPTPParser.T__15); + this.state = 1146; + this.tff_top_level_type(); + break; + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1148; + this.match(TPTPParser.T__1); + this.state = 1149; + this.tff_atom_typing(); + this.state = 1150; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_top_level_type() { + let localctx = new Tff_top_level_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 200, TPTPParser.RULE_tff_top_level_type); + try { + this.state = 1156; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,69,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1154; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1155; + this.tff_non_atomic_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_non_atomic_type() { + let localctx = new Tff_non_atomic_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 202, TPTPParser.RULE_tff_non_atomic_type); + try { + this.state = 1164; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,70,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1158; + this.tff_mapping_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1159; + this.tf1_quantified_type(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1160; + this.match(TPTPParser.T__1); + this.state = 1161; + this.tff_non_atomic_type(); + this.state = 1162; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tf1_quantified_type() { + let localctx = new Tf1_quantified_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 204, TPTPParser.RULE_tf1_quantified_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1166; + this.type_quantifier(); + this.state = 1167; + this.match(TPTPParser.T__13); + this.state = 1168; + this.tff_variable_list(); + this.state = 1169; + this.match(TPTPParser.T__14); + this.state = 1170; + this.match(TPTPParser.T__15); + this.state = 1171; + this.tff_monotype(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_monotype() { + let localctx = new Tff_monotypeContext(this, this._ctx, this.state); + this.enterRule(localctx, 206, TPTPParser.RULE_tff_monotype); + try { + this.state = 1179; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,71,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1173; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1174; + this.match(TPTPParser.T__1); + this.state = 1175; + this.tff_mapping_type(); + this.state = 1176; + this.match(TPTPParser.T__3); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1178; + this.tf1_quantified_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_unitary_type() { + let localctx = new Tff_unitary_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 208, TPTPParser.RULE_tff_unitary_type); + try { + this.state = 1186; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,72,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1181; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1182; + this.match(TPTPParser.T__1); + this.state = 1183; + this.tff_xprod_type(0); + this.state = 1184; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_atomic_type() { + let localctx = new Tff_atomic_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 210, TPTPParser.RULE_tff_atomic_type); + try { + this.state = 1201; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,73,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1188; + this.type_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1189; + this.defined_type(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1190; + this.variable(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1191; + this.type_functor(); + this.state = 1192; + this.match(TPTPParser.T__1); + this.state = 1193; + this.tff_type_arguments(); + this.state = 1194; + this.match(TPTPParser.T__3); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 1196; + this.match(TPTPParser.T__1); + this.state = 1197; + this.tff_atomic_type(); + this.state = 1198; + this.match(TPTPParser.T__3); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 1200; + this.txf_tuple_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_type_arguments() { + let localctx = new Tff_type_argumentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 212, TPTPParser.RULE_tff_type_arguments); + try { + this.state = 1208; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,74,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1203; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1204; + this.tff_atomic_type(); + this.state = 1205; + this.match(TPTPParser.T__2); + this.state = 1206; + this.tff_type_arguments(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_mapping_type() { + let localctx = new Tff_mapping_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 214, TPTPParser.RULE_tff_mapping_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1210; + this.tff_unitary_type(); + this.state = 1211; + this.match(TPTPParser.Arrow); + this.state = 1212; + this.tff_atomic_type(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + tff_xprod_type(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Tff_xprod_typeContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 216; + this.enterRecursionRule(localctx, 216, TPTPParser.RULE_tff_xprod_type, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1215; + this.tff_unitary_type(); + this.state = 1216; + this.match(TPTPParser.Star); + this.state = 1217; + this.tff_atomic_type(); + this._ctx.stop = this._input.LT(-1); + this.state = 1224; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,75,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Tff_xprod_typeContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_tff_xprod_type); + this.state = 1219; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1220; + this.match(TPTPParser.Star); + this.state = 1221; + this.tff_atomic_type(); + } + this.state = 1226; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,75,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + txf_tuple_type() { + let localctx = new Txf_tuple_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 218, TPTPParser.RULE_txf_tuple_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1227; + this.match(TPTPParser.T__13); + this.state = 1228; + this.tff_type_list(); + this.state = 1229; + this.match(TPTPParser.T__14); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_type_list() { + let localctx = new Tff_type_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 220, TPTPParser.RULE_tff_type_list); + try { + this.state = 1236; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,76,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1231; + this.tff_top_level_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1232; + this.tff_top_level_type(); + this.state = 1233; + this.match(TPTPParser.T__2); + this.state = 1234; + this.tff_type_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_subtype() { + let localctx = new Tff_subtypeContext(this, this._ctx, this.state); + this.enterRule(localctx, 222, TPTPParser.RULE_tff_subtype); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1238; + this.atomic_type(); + this.state = 1239; + this.subtype_sign(); + this.state = 1240; + this.atomic_type(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_definition() { + let localctx = new Txf_definitionContext(this, this._ctx, this.state); + this.enterRule(localctx, 224, TPTPParser.RULE_txf_definition); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1242; + this.tff_atomic_formula(); + this.state = 1243; + this.identical(); + this.state = 1244; + this.tff_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_sequent() { + let localctx = new Txf_sequentContext(this, this._ctx, this.state); + this.enterRule(localctx, 226, TPTPParser.RULE_txf_sequent); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1246; + this.txf_tuple(); + this.state = 1247; + this.gentzen_arrow(); + this.state = 1248; + this.txf_tuple(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nhf_long_connective() { + let localctx = new Nhf_long_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 228, TPTPParser.RULE_nhf_long_connective); + try { + this.state = 1261; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,77,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1250; + this.match(TPTPParser.T__17); + this.state = 1251; + this.ntf_connective_name(); + this.state = 1252; + this.match(TPTPParser.T__18); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1254; + this.match(TPTPParser.T__17); + this.state = 1255; + this.ntf_connective_name(); + this.state = 1256; + this.match(TPTPParser.T__1); + this.state = 1257; + this.nhf_parameter_list(); + this.state = 1258; + this.match(TPTPParser.T__3); + this.state = 1259; + this.match(TPTPParser.T__18); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nhf_parameter_list() { + let localctx = new Nhf_parameter_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 230, TPTPParser.RULE_nhf_parameter_list); + try { + this.state = 1268; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,78,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1263; + this.nhf_parameter(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1264; + this.nhf_parameter(); + this.state = 1265; + this.match(TPTPParser.T__2); + this.state = 1266; + this.nhf_parameter_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nhf_parameter() { + let localctx = new Nhf_parameterContext(this, this._ctx, this.state); + this.enterRule(localctx, 232, TPTPParser.RULE_nhf_parameter); + try { + this.state = 1272; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 70: + this.enterOuterAlt(localctx, 1); + this.state = 1270; + this.ntf_index(); + break; + case 1: + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 14: + case 17: + case 18: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1271; + this.nhf_key_pair(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nhf_key_pair() { + let localctx = new Nhf_key_pairContext(this, this._ctx, this.state); + this.enterRule(localctx, 234, TPTPParser.RULE_nhf_key_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1274; + this.thf_definition(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nxf_long_connective() { + let localctx = new Nxf_long_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 236, TPTPParser.RULE_nxf_long_connective); + try { + this.state = 1287; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,80,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1276; + this.match(TPTPParser.T__17); + this.state = 1277; + this.ntf_connective_name(); + this.state = 1278; + this.match(TPTPParser.T__18); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1280; + this.match(TPTPParser.T__17); + this.state = 1281; + this.ntf_connective_name(); + this.state = 1282; + this.match(TPTPParser.T__1); + this.state = 1283; + this.nxf_parameter_list(); + this.state = 1284; + this.match(TPTPParser.T__3); + this.state = 1285; + this.match(TPTPParser.T__18); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nxf_parameter_list() { + let localctx = new Nxf_parameter_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 238, TPTPParser.RULE_nxf_parameter_list); + try { + this.state = 1294; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,81,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1289; + this.nxf_parameter(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1290; + this.nxf_parameter(); + this.state = 1291; + this.match(TPTPParser.T__2); + this.state = 1292; + this.nxf_parameter_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nxf_parameter() { + let localctx = new Nxf_parameterContext(this, this._ctx, this.state); + this.enterRule(localctx, 240, TPTPParser.RULE_nxf_parameter); + try { + this.state = 1298; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 70: + this.enterOuterAlt(localctx, 1); + this.state = 1296; + this.ntf_index(); + break; + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 17: + case 18: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 56: + case 57: + case 59: + this.enterOuterAlt(localctx, 2); + this.state = 1297; + this.nxf_key_pair(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nxf_key_pair() { + let localctx = new Nxf_key_pairContext(this, this._ctx, this.state); + this.enterRule(localctx, 242, TPTPParser.RULE_nxf_key_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1300; + this.txf_definition(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + ntf_connective_name() { + let localctx = new Ntf_connective_nameContext(this, this._ctx, this.state); + this.enterRule(localctx, 244, TPTPParser.RULE_ntf_connective_name); + try { + this.state = 1304; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 56: + this.enterOuterAlt(localctx, 1); + this.state = 1302; + this.ntf_defined_connective(); + break; + case 57: + this.enterOuterAlt(localctx, 2); + this.state = 1303; + this.atomic_system_word(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + ntf_defined_connective() { + let localctx = new Ntf_defined_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 246, TPTPParser.RULE_ntf_defined_connective); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1306; + this.atomic_defined_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + ntf_index() { + let localctx = new Ntf_indexContext(this, this._ctx, this.state); + this.enterRule(localctx, 248, TPTPParser.RULE_ntf_index); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1308; + this.match(TPTPParser.Hash); + this.state = 1309; + this.tff_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + ntf_short_connective() { + let localctx = new Ntf_short_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 250, TPTPParser.RULE_ntf_short_connective); + try { + this.state = 1323; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 14: + this.enterOuterAlt(localctx, 1); + this.state = 1311; + this.match(TPTPParser.T__13); + this.state = 1312; + this.match(TPTPParser.T__4); + this.state = 1313; + this.match(TPTPParser.T__14); + break; + case 69: + this.enterOuterAlt(localctx, 2); + this.state = 1314; + this.match(TPTPParser.Less_sign); + this.state = 1315; + this.match(TPTPParser.T__4); + this.state = 1316; + this.match(TPTPParser.Arrow); + break; + case 18: + this.enterOuterAlt(localctx, 3); + this.state = 1317; + this.match(TPTPParser.T__17); + this.state = 1318; + this.match(TPTPParser.T__4); + this.state = 1319; + this.match(TPTPParser.T__18); + break; + case 2: + this.enterOuterAlt(localctx, 4); + this.state = 1320; + this.match(TPTPParser.T__1); + this.state = 1321; + this.match(TPTPParser.T__4); + this.state = 1322; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tcf_formula() { + let localctx = new Tcf_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 252, TPTPParser.RULE_tcf_formula); + try { + this.state = 1327; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,85,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1325; + this.tcf_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1326; + this.tff_atom_typing(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tcf_logic_formula() { + let localctx = new Tcf_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 254, TPTPParser.RULE_tcf_logic_formula); + try { + this.state = 1331; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 20: + this.enterOuterAlt(localctx, 1); + this.state = 1329; + this.tcf_quantified_formula(); + break; + case 1: + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 21: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1330; + this.cnf_formula(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tcf_quantified_formula() { + let localctx = new Tcf_quantified_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 256, TPTPParser.RULE_tcf_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1333; + this.match(TPTPParser.T__19); + this.state = 1334; + this.match(TPTPParser.T__13); + this.state = 1335; + this.tff_variable_list(); + this.state = 1336; + this.match(TPTPParser.T__14); + this.state = 1337; + this.match(TPTPParser.T__15); + this.state = 1338; + this.tcf_logic_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_formula() { + let localctx = new Fof_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 258, TPTPParser.RULE_fof_formula); + try { + this.state = 1342; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,87,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1340; + this.fof_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1341; + this.fof_sequent(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_logic_formula() { + let localctx = new Fof_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 260, TPTPParser.RULE_fof_logic_formula); + try { + this.state = 1347; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,88,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1344; + this.fof_binary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1345; + this.fof_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1346; + this.fof_unitary_formula(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_binary_formula() { + let localctx = new Fof_binary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 262, TPTPParser.RULE_fof_binary_formula); + try { + this.state = 1351; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,89,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1349; + this.fof_binary_pair(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1350; + this.fof_binary_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_binary_pair() { + let localctx = new Fof_binary_pairContext(this, this._ctx, this.state); + this.enterRule(localctx, 264, TPTPParser.RULE_fof_binary_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1353; + this.fof_unit_formula(); + this.state = 1354; + this.nonassoc_connective(); + this.state = 1355; + this.fof_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_binary_list() { + let localctx = new Fof_binary_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 266, TPTPParser.RULE_fof_binary_list); + try { + this.state = 1359; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,90,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1357; + this.fof_or_formula(0); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1358; + this.fof_and_formula(0); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + fof_or_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Fof_or_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 268; + this.enterRecursionRule(localctx, 268, TPTPParser.RULE_fof_or_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1362; + this.fof_unit_formula(); + this.state = 1363; + this.match(TPTPParser.Vline); + this.state = 1364; + this.fof_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 1371; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,91,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Fof_or_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_fof_or_formula); + this.state = 1366; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1367; + this.match(TPTPParser.Vline); + this.state = 1368; + this.fof_unit_formula(); + } + this.state = 1373; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,91,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + fof_and_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Fof_and_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 270; + this.enterRecursionRule(localctx, 270, TPTPParser.RULE_fof_and_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1375; + this.fof_unit_formula(); + this.state = 1376; + this.match(TPTPParser.T__11); + this.state = 1377; + this.fof_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 1384; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,92,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Fof_and_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_fof_and_formula); + this.state = 1379; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1380; + this.match(TPTPParser.T__11); + this.state = 1381; + this.fof_unit_formula(); + } + this.state = 1386; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,92,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + fof_unary_formula() { + let localctx = new Fof_unary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 272, TPTPParser.RULE_fof_unary_formula); + try { + this.state = 1391; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 21: + this.enterOuterAlt(localctx, 1); + this.state = 1387; + this.unary_connective(); + this.state = 1388; + this.fof_unit_formula(); + break; + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1390; + this.fof_infix_unary(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_infix_unary() { + let localctx = new Fof_infix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 274, TPTPParser.RULE_fof_infix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1393; + this.fof_term(); + this.state = 1394; + this.infix_inequality(); + this.state = 1395; + this.fof_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_unit_formula() { + let localctx = new Fof_unit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 276, TPTPParser.RULE_fof_unit_formula); + try { + this.state = 1399; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,94,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1397; + this.fof_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1398; + this.fof_unary_formula(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_unitary_formula() { + let localctx = new Fof_unitary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 278, TPTPParser.RULE_fof_unitary_formula); + try { + this.state = 1407; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 20: + case 28: + this.enterOuterAlt(localctx, 1); + this.state = 1401; + this.fof_quantified_formula(); + break; + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1402; + this.fof_atomic_formula(); + break; + case 2: + this.enterOuterAlt(localctx, 3); + this.state = 1403; + this.match(TPTPParser.T__1); + this.state = 1404; + this.fof_logic_formula(); + this.state = 1405; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_quantified_formula() { + let localctx = new Fof_quantified_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 280, TPTPParser.RULE_fof_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1409; + this.fof_quantifier(); + this.state = 1410; + this.match(TPTPParser.T__13); + this.state = 1411; + this.fof_variable_list(); + this.state = 1412; + this.match(TPTPParser.T__14); + this.state = 1413; + this.match(TPTPParser.T__15); + this.state = 1414; + this.fof_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_variable_list() { + let localctx = new Fof_variable_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 282, TPTPParser.RULE_fof_variable_list); + try { + this.state = 1421; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,96,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1416; + this.variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1417; + this.variable(); + this.state = 1418; + this.match(TPTPParser.T__2); + this.state = 1419; + this.fof_variable_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_atomic_formula() { + let localctx = new Fof_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 284, TPTPParser.RULE_fof_atomic_formula); + try { + this.state = 1426; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,97,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1423; + this.fof_plain_atomic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1424; + this.fof_defined_atomic_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1425; + this.fof_system_atomic_formula(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_plain_atomic_formula() { + let localctx = new Fof_plain_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 286, TPTPParser.RULE_fof_plain_atomic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1428; + this.fof_plain_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_atomic_formula() { + let localctx = new Fof_defined_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 288, TPTPParser.RULE_fof_defined_atomic_formula); + try { + this.state = 1432; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,98,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1430; + this.fof_defined_plain_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1431; + this.fof_defined_infix_formula(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_plain_formula() { + let localctx = new Fof_defined_plain_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 290, TPTPParser.RULE_fof_defined_plain_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1434; + this.fof_defined_plain_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_infix_formula() { + let localctx = new Fof_defined_infix_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 292, TPTPParser.RULE_fof_defined_infix_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1436; + this.fof_term(); + this.state = 1437; + this.defined_infix_pred(); + this.state = 1438; + this.fof_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_system_atomic_formula() { + let localctx = new Fof_system_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 294, TPTPParser.RULE_fof_system_atomic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1440; + this.fof_system_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_plain_term() { + let localctx = new Fof_plain_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 296, TPTPParser.RULE_fof_plain_term); + try { + this.state = 1448; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,99,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1442; + this.constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1443; + this.functor(); + this.state = 1444; + this.match(TPTPParser.T__1); + this.state = 1445; + this.fof_arguments(); + this.state = 1446; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_term() { + let localctx = new Fof_defined_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 298, TPTPParser.RULE_fof_defined_term); + try { + this.state = 1452; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 55: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 1); + this.state = 1450; + this.defined_term(); + break; + case 56: + this.enterOuterAlt(localctx, 2); + this.state = 1451; + this.fof_defined_atomic_term(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_atomic_term() { + let localctx = new Fof_defined_atomic_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 300, TPTPParser.RULE_fof_defined_atomic_term); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1454; + this.fof_defined_plain_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_plain_term() { + let localctx = new Fof_defined_plain_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 302, TPTPParser.RULE_fof_defined_plain_term); + try { + this.state = 1462; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,101,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1456; + this.defined_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1457; + this.defined_functor(); + this.state = 1458; + this.match(TPTPParser.T__1); + this.state = 1459; + this.fof_arguments(); + this.state = 1460; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_system_term() { + let localctx = new Fof_system_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 304, TPTPParser.RULE_fof_system_term); + try { + this.state = 1470; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,102,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1464; + this.system_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1465; + this.system_functor(); + this.state = 1466; + this.match(TPTPParser.T__1); + this.state = 1467; + this.fof_arguments(); + this.state = 1468; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_arguments() { + let localctx = new Fof_argumentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 306, TPTPParser.RULE_fof_arguments); + try { + this.state = 1477; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,103,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1472; + this.fof_term(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1473; + this.fof_term(); + this.state = 1474; + this.match(TPTPParser.T__2); + this.state = 1475; + this.fof_arguments(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_term() { + let localctx = new Fof_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 308, TPTPParser.RULE_fof_term); + try { + this.state = 1481; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 1); + this.state = 1479; + this.fof_function_term(); + break; + case 58: + this.enterOuterAlt(localctx, 2); + this.state = 1480; + this.variable(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_function_term() { + let localctx = new Fof_function_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 310, TPTPParser.RULE_fof_function_term); + try { + this.state = 1486; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1483; + this.fof_plain_term(); + break; + case 55: + case 56: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1484; + this.fof_defined_term(); + break; + case 57: + this.enterOuterAlt(localctx, 3); + this.state = 1485; + this.fof_system_term(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_sequent() { + let localctx = new Fof_sequentContext(this, this._ctx, this.state); + this.enterRule(localctx, 312, TPTPParser.RULE_fof_sequent); + try { + this.state = 1496; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 14: + this.enterOuterAlt(localctx, 1); + this.state = 1488; + this.fof_formula_tuple(); + this.state = 1489; + this.gentzen_arrow(); + this.state = 1490; + this.fof_formula_tuple(); + break; + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1492; + this.match(TPTPParser.T__1); + this.state = 1493; + this.fof_sequent(); + this.state = 1494; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_formula_tuple() { + let localctx = new Fof_formula_tupleContext(this, this._ctx, this.state); + this.enterRule(localctx, 314, TPTPParser.RULE_fof_formula_tuple); + try { + this.state = 1504; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,107,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1498; + this.match(TPTPParser.T__13); + this.state = 1499; + this.match(TPTPParser.T__14); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1500; + this.match(TPTPParser.T__13); + this.state = 1501; + this.fof_formula_tuple_list(); + this.state = 1502; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_formula_tuple_list() { + let localctx = new Fof_formula_tuple_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 316, TPTPParser.RULE_fof_formula_tuple_list); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1506; + this.fof_logic_formula(); + this.state = 1510; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===3) { + this.state = 1507; + this.comma_fof_logic_formula(); + this.state = 1512; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + comma_fof_logic_formula() { + let localctx = new Comma_fof_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 318, TPTPParser.RULE_comma_fof_logic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1513; + this.match(TPTPParser.T__2); + this.state = 1514; + this.fof_logic_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + cnf_formula() { + let localctx = new Cnf_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 320, TPTPParser.RULE_cnf_formula); + try { + this.state = 1521; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 21: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 1); + this.state = 1516; + this.cnf_disjunction(0); + break; + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1517; + this.match(TPTPParser.T__1); + this.state = 1518; + this.cnf_formula(); + this.state = 1519; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + cnf_disjunction(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Cnf_disjunctionContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 322; + this.enterRecursionRule(localctx, 322, TPTPParser.RULE_cnf_disjunction, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1524; + this.cnf_literal(); + this._ctx.stop = this._input.LT(-1); + this.state = 1531; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,110,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Cnf_disjunctionContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_cnf_disjunction); + this.state = 1526; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1527; + this.match(TPTPParser.Vline); + this.state = 1528; + this.cnf_literal(); + } + this.state = 1533; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,110,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + cnf_literal() { + let localctx = new Cnf_literalContext(this, this._ctx, this.state); + this.enterRule(localctx, 324, TPTPParser.RULE_cnf_literal); + try { + this.state = 1543; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,111,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1534; + this.fof_atomic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1535; + this.match(TPTPParser.T__20); + this.state = 1536; + this.fof_atomic_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1537; + this.match(TPTPParser.T__20); + this.state = 1538; + this.match(TPTPParser.T__1); + this.state = 1539; + this.fof_atomic_formula(); + this.state = 1540; + this.match(TPTPParser.T__3); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1542; + this.fof_infix_unary(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_quantifier() { + let localctx = new Thf_quantifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 326, TPTPParser.RULE_thf_quantifier); + try { + this.state = 1548; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 20: + case 28: + case 70: + this.enterOuterAlt(localctx, 1); + this.state = 1545; + this.tff_quantifier(); + break; + case 22: + case 23: + case 24: + this.enterOuterAlt(localctx, 2); + this.state = 1546; + this.th0_quantifier(); + break; + case 25: + case 26: + this.enterOuterAlt(localctx, 3); + this.state = 1547; + this.type_quantifier(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_unary_connective() { + let localctx = new Thf_unary_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 328, TPTPParser.RULE_thf_unary_connective); + try { + this.state = 1552; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 21: + this.enterOuterAlt(localctx, 1); + this.state = 1550; + this.unary_connective(); + break; + case 2: + case 14: + case 18: + case 69: + this.enterOuterAlt(localctx, 2); + this.state = 1551; + this.ntf_short_connective(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + th0_quantifier() { + let localctx = new Th0_quantifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 330, TPTPParser.RULE_th0_quantifier); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1554; + _la = this._input.LA(1); + if(!((((_la) & ~0x1f) === 0 && ((1 << _la) & 29360128) !== 0))) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + type_quantifier() { + let localctx = new Type_quantifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 332, TPTPParser.RULE_type_quantifier); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1556; + _la = this._input.LA(1); + if(!(_la===25 || _la===26)) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + subtype_sign() { + let localctx = new Subtype_signContext(this, this._ctx, this.state); + this.enterRule(localctx, 334, TPTPParser.RULE_subtype_sign); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1558; + this.match(TPTPParser.T__26); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_unary_connective() { + let localctx = new Tff_unary_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 336, TPTPParser.RULE_tff_unary_connective); + try { + this.state = 1562; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 21: + this.enterOuterAlt(localctx, 1); + this.state = 1560; + this.unary_connective(); + break; + case 2: + case 14: + case 18: + case 69: + this.enterOuterAlt(localctx, 2); + this.state = 1561; + this.ntf_short_connective(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_quantifier() { + let localctx = new Tff_quantifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 338, TPTPParser.RULE_tff_quantifier); + try { + this.state = 1566; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 20: + case 28: + this.enterOuterAlt(localctx, 1); + this.state = 1564; + this.fof_quantifier(); + break; + case 70: + this.enterOuterAlt(localctx, 2); + this.state = 1565; + this.match(TPTPParser.Hash); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_quantifier() { + let localctx = new Fof_quantifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 340, TPTPParser.RULE_fof_quantifier); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1568; + _la = this._input.LA(1); + if(!(_la===20 || _la===28)) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nonassoc_connective() { + let localctx = new Nonassoc_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 342, TPTPParser.RULE_nonassoc_connective); + try { + this.state = 1577; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 29: + this.enterOuterAlt(localctx, 1); + this.state = 1570; + this.match(TPTPParser.T__28); + break; + case 30: + this.enterOuterAlt(localctx, 2); + this.state = 1571; + this.match(TPTPParser.T__29); + break; + case 31: + this.enterOuterAlt(localctx, 3); + this.state = 1572; + this.match(TPTPParser.T__30); + break; + case 32: + this.enterOuterAlt(localctx, 4); + this.state = 1573; + this.match(TPTPParser.T__31); + break; + case 21: + this.enterOuterAlt(localctx, 5); + this.state = 1574; + this.match(TPTPParser.T__20); + this.state = 1575; + this.match(TPTPParser.Vline); + break; + case 33: + this.enterOuterAlt(localctx, 6); + this.state = 1576; + this.match(TPTPParser.T__32); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + assoc_connective() { + let localctx = new Assoc_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 344, TPTPParser.RULE_assoc_connective); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1579; + _la = this._input.LA(1); + if(!(_la===12 || _la===65)) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + unary_connective() { + let localctx = new Unary_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 346, TPTPParser.RULE_unary_connective); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1581; + this.match(TPTPParser.T__20); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + gentzen_arrow() { + let localctx = new Gentzen_arrowContext(this, this._ctx, this.state); + this.enterRule(localctx, 348, TPTPParser.RULE_gentzen_arrow); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1583; + this.match(TPTPParser.T__33); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + assignment() { + let localctx = new AssignmentContext(this, this._ctx, this.state); + this.enterRule(localctx, 350, TPTPParser.RULE_assignment); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1585; + this.match(TPTPParser.T__34); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + identical() { + let localctx = new IdenticalContext(this, this._ctx, this.state); + this.enterRule(localctx, 352, TPTPParser.RULE_identical); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1587; + this.match(TPTPParser.T__35); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + typeable_atom() { + let localctx = new Typeable_atomContext(this, this._ctx, this.state); + this.enterRule(localctx, 354, TPTPParser.RULE_typeable_atom); + try { + this.state = 1591; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1589; + this.constant(); + break; + case 55: + this.enterOuterAlt(localctx, 2); + this.state = 1590; + this.match(TPTPParser.Distinct_object); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + atomic_type() { + let localctx = new Atomic_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 356, TPTPParser.RULE_atomic_type); + try { + this.state = 1596; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1593; + this.typeable_atom(); + break; + case 56: + this.enterOuterAlt(localctx, 2); + this.state = 1594; + this.defined_constant(); + break; + case 57: + this.enterOuterAlt(localctx, 3); + this.state = 1595; + this.system_type(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + type_constant() { + let localctx = new Type_constantContext(this, this._ctx, this.state); + this.enterRule(localctx, 358, TPTPParser.RULE_type_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1598; + this.type_functor(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + type_functor() { + let localctx = new Type_functorContext(this, this._ctx, this.state); + this.enterRule(localctx, 360, TPTPParser.RULE_type_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1600; + this.atomic_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + defined_type() { + let localctx = new Defined_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 362, TPTPParser.RULE_defined_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1602; + this.atomic_defined_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + system_type() { + let localctx = new System_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 364, TPTPParser.RULE_system_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1604; + this.atomic_system_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + defined_infix_pred() { + let localctx = new Defined_infix_predContext(this, this._ctx, this.state); + this.enterRule(localctx, 366, TPTPParser.RULE_defined_infix_pred); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1606; + this.infix_equality(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + infix_equality() { + let localctx = new Infix_equalityContext(this, this._ctx, this.state); + this.enterRule(localctx, 368, TPTPParser.RULE_infix_equality); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1608; + this.match(TPTPParser.T__36); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + infix_inequality() { + let localctx = new Infix_inequalityContext(this, this._ctx, this.state); + this.enterRule(localctx, 370, TPTPParser.RULE_infix_inequality); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1610; + this.match(TPTPParser.T__37); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + constant() { + let localctx = new ConstantContext(this, this._ctx, this.state); + this.enterRule(localctx, 372, TPTPParser.RULE_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1612; + this.functor(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + functor() { + let localctx = new FunctorContext(this, this._ctx, this.state); + this.enterRule(localctx, 374, TPTPParser.RULE_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1614; + this.atomic_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + defined_constant() { + let localctx = new Defined_constantContext(this, this._ctx, this.state); + this.enterRule(localctx, 376, TPTPParser.RULE_defined_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1616; + this.defined_functor(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + defined_functor() { + let localctx = new Defined_functorContext(this, this._ctx, this.state); + this.enterRule(localctx, 378, TPTPParser.RULE_defined_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1618; + this.atomic_defined_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + system_constant() { + let localctx = new System_constantContext(this, this._ctx, this.state); + this.enterRule(localctx, 380, TPTPParser.RULE_system_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1620; + this.system_functor(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + system_functor() { + let localctx = new System_functorContext(this, this._ctx, this.state); + this.enterRule(localctx, 382, TPTPParser.RULE_system_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1622; + this.atomic_system_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + th1_defined_term() { + let localctx = new Th1_defined_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 384, TPTPParser.RULE_th1_defined_term); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1624; + _la = this._input.LA(1); + if(!(((((_la - 39)) & ~0x1f) === 0 && ((1 << (_la - 39)) & 31) !== 0))) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + defined_term() { + let localctx = new Defined_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 386, TPTPParser.RULE_defined_term); + try { + this.state = 1628; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 1); + this.state = 1626; + this.number(); + break; + case 55: + this.enterOuterAlt(localctx, 2); + this.state = 1627; + this.match(TPTPParser.Distinct_object); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + variable() { + let localctx = new VariableContext(this, this._ctx, this.state); + this.enterRule(localctx, 388, TPTPParser.RULE_variable); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1630; + this.match(TPTPParser.Upper_word); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + source() { + let localctx = new SourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 390, TPTPParser.RULE_source); + try { + this.state = 1639; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,120,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1632; + this.dag_source(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1633; + this.internal_source(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1634; + this.external_source(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1635; + this.match(TPTPParser.T__13); + this.state = 1636; + this.sources(); + this.state = 1637; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + sources() { + let localctx = new SourcesContext(this, this._ctx, this.state); + this.enterRule(localctx, 392, TPTPParser.RULE_sources); + try { + this.state = 1646; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,121,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1641; + this.source(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1642; + this.source(); + this.state = 1643; + this.match(TPTPParser.T__2); + this.state = 1644; + this.sources(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + dag_source() { + let localctx = new Dag_sourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 394, TPTPParser.RULE_dag_source); + try { + this.state = 1650; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,122,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1648; + this.name(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1649; + this.inference_record(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + inference_record() { + let localctx = new Inference_recordContext(this, this._ctx, this.state); + this.enterRule(localctx, 396, TPTPParser.RULE_inference_record); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1652; + this.match(TPTPParser.T__43); + this.state = 1653; + this.match(TPTPParser.T__1); + this.state = 1654; + this.inference_rule(); + this.state = 1655; + this.match(TPTPParser.T__2); + this.state = 1656; + this.useful_info(); + this.state = 1657; + this.match(TPTPParser.T__2); + this.state = 1658; + this.parents(); + this.state = 1659; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + inference_rule() { + let localctx = new Inference_ruleContext(this, this._ctx, this.state); + this.enterRule(localctx, 398, TPTPParser.RULE_inference_rule); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1661; + this.atomic_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + internal_source() { + let localctx = new Internal_sourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 400, TPTPParser.RULE_internal_source); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1663; + this.match(TPTPParser.T__44); + this.state = 1664; + this.match(TPTPParser.T__1); + this.state = 1665; + this.intro_type(); + this.state = 1666; + this.match(TPTPParser.T__2); + this.state = 1667; + this.useful_info(); + this.state = 1668; + this.match(TPTPParser.T__2); + this.state = 1669; + this.parents(); + this.state = 1670; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + intro_type() { + let localctx = new Intro_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 402, TPTPParser.RULE_intro_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1672; + this.atomic_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + external_source() { + let localctx = new External_sourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 404, TPTPParser.RULE_external_source); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1674; + this.file_source(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + file_source() { + let localctx = new File_sourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 406, TPTPParser.RULE_file_source); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1676; + this.match(TPTPParser.T__45); + this.state = 1677; + this.match(TPTPParser.T__1); + this.state = 1678; + this.file_name(); + this.state = 1679; + this.file_info(); + this.state = 1680; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + file_info() { + let localctx = new File_infoContext(this, this._ctx, this.state); + this.enterRule(localctx, 408, TPTPParser.RULE_file_info); + try { + this.state = 1685; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 3: + this.enterOuterAlt(localctx, 1); + this.state = 1682; + this.match(TPTPParser.T__2); + this.state = 1683; + this.name(); + break; + case 4: + this.enterOuterAlt(localctx, 2); + this.state = 1684; + this.nothing(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + parents() { + let localctx = new ParentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 410, TPTPParser.RULE_parents); + try { + this.state = 1693; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,124,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1687; + this.match(TPTPParser.T__13); + this.state = 1688; + this.match(TPTPParser.T__14); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1689; + this.match(TPTPParser.T__13); + this.state = 1690; + this.parent_list(); + this.state = 1691; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + parent_list() { + let localctx = new Parent_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 412, TPTPParser.RULE_parent_list); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1695; + this.parent_info(); + this.state = 1699; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===3) { + this.state = 1696; + this.comma_parent_info(); + this.state = 1701; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + comma_parent_info() { + let localctx = new Comma_parent_infoContext(this, this._ctx, this.state); + this.enterRule(localctx, 414, TPTPParser.RULE_comma_parent_info); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1702; + this.match(TPTPParser.T__2); + this.state = 1703; + this.parent_info(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + parent_info() { + let localctx = new Parent_infoContext(this, this._ctx, this.state); + this.enterRule(localctx, 416, TPTPParser.RULE_parent_info); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1705; + this.source(); + this.state = 1706; + this.parent_details(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + parent_details() { + let localctx = new Parent_detailsContext(this, this._ctx, this.state); + this.enterRule(localctx, 418, TPTPParser.RULE_parent_details); + try { + this.state = 1711; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 16: + this.enterOuterAlt(localctx, 1); + this.state = 1708; + this.match(TPTPParser.T__15); + this.state = 1709; + this.general_term(); + break; + case 3: + case 15: + this.enterOuterAlt(localctx, 2); + this.state = 1710; + this.nothing(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + optional_info() { + let localctx = new Optional_infoContext(this, this._ctx, this.state); + this.enterRule(localctx, 420, TPTPParser.RULE_optional_info); + try { + this.state = 1716; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 3: + this.enterOuterAlt(localctx, 1); + this.state = 1713; + this.match(TPTPParser.T__2); + this.state = 1714; + this.useful_info(); + break; + case 4: + this.enterOuterAlt(localctx, 2); + this.state = 1715; + this.nothing(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + useful_info() { + let localctx = new Useful_infoContext(this, this._ctx, this.state); + this.enterRule(localctx, 422, TPTPParser.RULE_useful_info); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1718; + this.general_list(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + include() { + let localctx = new IncludeContext(this, this._ctx, this.state); + this.enterRule(localctx, 424, TPTPParser.RULE_include); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1720; + this.match(TPTPParser.T__46); + this.state = 1721; + this.match(TPTPParser.T__1); + this.state = 1722; + this.file_name(); + this.state = 1723; + this.include_optionals(); + this.state = 1724; + this.match(TPTPParser.T__3); + this.state = 1725; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + include_optionals() { + let localctx = new Include_optionalsContext(this, this._ctx, this.state); + this.enterRule(localctx, 426, TPTPParser.RULE_include_optionals); + try { + this.state = 1735; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,128,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1727; + this.nothing(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1728; + this.match(TPTPParser.T__2); + this.state = 1729; + this.formula_selection(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1730; + this.match(TPTPParser.T__2); + this.state = 1731; + this.formula_selection(); + this.state = 1732; + this.match(TPTPParser.T__2); + this.state = 1733; + this.space_name(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + formula_selection() { + let localctx = new Formula_selectionContext(this, this._ctx, this.state); + this.enterRule(localctx, 428, TPTPParser.RULE_formula_selection); + try { + this.state = 1742; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 14: + this.enterOuterAlt(localctx, 1); + this.state = 1737; + this.match(TPTPParser.T__13); + this.state = 1738; + this.name_list(); + this.state = 1739; + this.match(TPTPParser.T__14); + break; + case 66: + this.enterOuterAlt(localctx, 2); + this.state = 1741; + this.match(TPTPParser.Star); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + name_list() { + let localctx = new Name_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 430, TPTPParser.RULE_name_list); + try { + this.state = 1749; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,130,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1744; + this.name(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1745; + this.name(); + this.state = 1746; + this.match(TPTPParser.T__2); + this.state = 1747; + this.name_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + space_name() { + let localctx = new Space_nameContext(this, this._ctx, this.state); + this.enterRule(localctx, 432, TPTPParser.RULE_space_name); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1751; + this.name(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + general_term() { + let localctx = new General_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 434, TPTPParser.RULE_general_term); + try { + this.state = 1759; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,131,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1753; + this.general_data(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1754; + this.general_data(); + this.state = 1755; + this.match(TPTPParser.T__15); + this.state = 1756; + this.general_term(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1758; + this.general_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + general_data() { + let localctx = new General_dataContext(this, this._ctx, this.state); + this.enterRule(localctx, 436, TPTPParser.RULE_general_data); + try { + this.state = 1767; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,132,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1761; + this.atomic_word(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1762; + this.general_function(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1763; + this.variable(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1764; + this.number(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 1765; + this.match(TPTPParser.Distinct_object); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 1766; + this.formula_data(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + general_function() { + let localctx = new General_functionContext(this, this._ctx, this.state); + this.enterRule(localctx, 438, TPTPParser.RULE_general_function); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1769; + this.atomic_word(); + this.state = 1770; + this.match(TPTPParser.T__1); + this.state = 1771; + this.general_terms(); + this.state = 1772; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + formula_data() { + let localctx = new Formula_dataContext(this, this._ctx, this.state); + this.enterRule(localctx, 440, TPTPParser.RULE_formula_data); + try { + this.state = 1799; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 48: + this.enterOuterAlt(localctx, 1); + this.state = 1774; + this.match(TPTPParser.T__47); + this.state = 1775; + this.match(TPTPParser.T__1); + this.state = 1776; + this.thf_formula(); + this.state = 1777; + this.match(TPTPParser.T__3); + break; + case 49: + this.enterOuterAlt(localctx, 2); + this.state = 1779; + this.match(TPTPParser.T__48); + this.state = 1780; + this.match(TPTPParser.T__1); + this.state = 1781; + this.tff_formula(); + this.state = 1782; + this.match(TPTPParser.T__3); + break; + case 50: + this.enterOuterAlt(localctx, 3); + this.state = 1784; + this.match(TPTPParser.T__49); + this.state = 1785; + this.match(TPTPParser.T__1); + this.state = 1786; + this.fof_formula(); + this.state = 1787; + this.match(TPTPParser.T__3); + break; + case 51: + this.enterOuterAlt(localctx, 4); + this.state = 1789; + this.match(TPTPParser.T__50); + this.state = 1790; + this.match(TPTPParser.T__1); + this.state = 1791; + this.cnf_formula(); + this.state = 1792; + this.match(TPTPParser.T__3); + break; + case 52: + this.enterOuterAlt(localctx, 5); + this.state = 1794; + this.match(TPTPParser.T__51); + this.state = 1795; + this.match(TPTPParser.T__1); + this.state = 1796; + this.fof_term(); + this.state = 1797; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + general_list() { + let localctx = new General_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 442, TPTPParser.RULE_general_list); + try { + this.state = 1807; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,134,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1801; + this.match(TPTPParser.T__13); + this.state = 1802; + this.match(TPTPParser.T__14); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1803; + this.match(TPTPParser.T__13); + this.state = 1804; + this.general_terms(); + this.state = 1805; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + general_terms() { + let localctx = new General_termsContext(this, this._ctx, this.state); + this.enterRule(localctx, 444, TPTPParser.RULE_general_terms); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1809; + this.general_term(); + this.state = 1813; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===3) { + this.state = 1810; + this.comma_general_term(); + this.state = 1815; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + comma_general_term() { + let localctx = new Comma_general_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 446, TPTPParser.RULE_comma_general_term); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1816; + this.match(TPTPParser.T__2); + this.state = 1817; + this.general_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + name() { + let localctx = new NameContext(this, this._ctx, this.state); + this.enterRule(localctx, 448, TPTPParser.RULE_name); + try { + this.state = 1821; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1819; + this.atomic_word(); + break; + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1820; + this.match(TPTPParser.Integer); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + atomic_word() { + let localctx = new Atomic_wordContext(this, this._ctx, this.state); + this.enterRule(localctx, 450, TPTPParser.RULE_atomic_word); + try { + this.state = 1826; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1823; + this.lower_word_token(); + break; + case 53: + this.enterOuterAlt(localctx, 2); + this.state = 1824; + this.match(TPTPParser.Single_quoted); + break; + case 54: + this.enterOuterAlt(localctx, 3); + this.state = 1825; + this.match(TPTPParser.Back_quoted); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + atomic_defined_word() { + let localctx = new Atomic_defined_wordContext(this, this._ctx, this.state); + this.enterRule(localctx, 452, TPTPParser.RULE_atomic_defined_word); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1828; + this.match(TPTPParser.Dollar_word); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + atomic_system_word() { + let localctx = new Atomic_system_wordContext(this, this._ctx, this.state); + this.enterRule(localctx, 454, TPTPParser.RULE_atomic_system_word); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1830; + this.match(TPTPParser.Dollar_dollar_word); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + number() { + let localctx = new NumberContext(this, this._ctx, this.state); + this.enterRule(localctx, 456, TPTPParser.RULE_number); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1832; + _la = this._input.LA(1); + if(!(((((_la - 60)) & ~0x1f) === 0 && ((1 << (_la - 60)) & 7) !== 0))) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + file_name() { + let localctx = new File_nameContext(this, this._ctx, this.state); + this.enterRule(localctx, 458, TPTPParser.RULE_file_name); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1834; + this.atomic_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nothing() { + let localctx = new NothingContext(this, this._ctx, this.state); + this.enterRule(localctx, 460, TPTPParser.RULE_nothing); + try { + this.enterOuterAlt(localctx, 1); + + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + lower_word_token() { + let localctx = new Lower_word_tokenContext(this, this._ctx, this.state); + this.enterRule(localctx, 462, TPTPParser.RULE_lower_word_token); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1838; + _la = this._input.LA(1); + if(!((((_la) & ~0x1f) === 0 && ((1 << _la) & 1986) !== 0) || ((((_la - 44)) & ~0x1f) === 0 && ((1 << (_la - 44)) & 32783) !== 0))) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + +} + +TPTPParser.EOF = antlr4.Token.EOF; +TPTPParser.T__0 = 1; +TPTPParser.T__1 = 2; +TPTPParser.T__2 = 3; +TPTPParser.T__3 = 4; +TPTPParser.T__4 = 5; +TPTPParser.T__5 = 6; +TPTPParser.T__6 = 7; +TPTPParser.T__7 = 8; +TPTPParser.T__8 = 9; +TPTPParser.T__9 = 10; +TPTPParser.T__10 = 11; +TPTPParser.T__11 = 12; +TPTPParser.T__12 = 13; +TPTPParser.T__13 = 14; +TPTPParser.T__14 = 15; +TPTPParser.T__15 = 16; +TPTPParser.T__16 = 17; +TPTPParser.T__17 = 18; +TPTPParser.T__18 = 19; +TPTPParser.T__19 = 20; +TPTPParser.T__20 = 21; +TPTPParser.T__21 = 22; +TPTPParser.T__22 = 23; +TPTPParser.T__23 = 24; +TPTPParser.T__24 = 25; +TPTPParser.T__25 = 26; +TPTPParser.T__26 = 27; +TPTPParser.T__27 = 28; +TPTPParser.T__28 = 29; +TPTPParser.T__29 = 30; +TPTPParser.T__30 = 31; +TPTPParser.T__31 = 32; +TPTPParser.T__32 = 33; +TPTPParser.T__33 = 34; +TPTPParser.T__34 = 35; +TPTPParser.T__35 = 36; +TPTPParser.T__36 = 37; +TPTPParser.T__37 = 38; +TPTPParser.T__38 = 39; +TPTPParser.T__39 = 40; +TPTPParser.T__40 = 41; +TPTPParser.T__41 = 42; +TPTPParser.T__42 = 43; +TPTPParser.T__43 = 44; +TPTPParser.T__44 = 45; +TPTPParser.T__45 = 46; +TPTPParser.T__46 = 47; +TPTPParser.T__47 = 48; +TPTPParser.T__48 = 49; +TPTPParser.T__49 = 50; +TPTPParser.T__50 = 51; +TPTPParser.T__51 = 52; +TPTPParser.Single_quoted = 53; +TPTPParser.Back_quoted = 54; +TPTPParser.Distinct_object = 55; +TPTPParser.Dollar_word = 56; +TPTPParser.Dollar_dollar_word = 57; +TPTPParser.Upper_word = 58; +TPTPParser.Lower_word = 59; +TPTPParser.Real = 60; +TPTPParser.Rational = 61; +TPTPParser.Integer = 62; +TPTPParser.Slash = 63; +TPTPParser.Slosh = 64; +TPTPParser.Vline = 65; +TPTPParser.Star = 66; +TPTPParser.Plus = 67; +TPTPParser.Arrow = 68; +TPTPParser.Less_sign = 69; +TPTPParser.Hash = 70; +TPTPParser.Comment = 71; +TPTPParser.Comment_line = 72; +TPTPParser.WS = 73; + +TPTPParser.RULE_tptp_file = 0; +TPTPParser.RULE_tptp_input = 1; +TPTPParser.RULE_annotated_formula = 2; +TPTPParser.RULE_tpi_annotated = 3; +TPTPParser.RULE_tpi_formula = 4; +TPTPParser.RULE_thf_annotated = 5; +TPTPParser.RULE_tff_annotated = 6; +TPTPParser.RULE_tcf_annotated = 7; +TPTPParser.RULE_fof_annotated = 8; +TPTPParser.RULE_cnf_annotated = 9; +TPTPParser.RULE_annotations = 10; +TPTPParser.RULE_formula_role = 11; +TPTPParser.RULE_thf_formula = 12; +TPTPParser.RULE_thf_logic_formula = 13; +TPTPParser.RULE_thf_binary_formula = 14; +TPTPParser.RULE_thf_binary_pair = 15; +TPTPParser.RULE_thf_binary_list = 16; +TPTPParser.RULE_thf_or_formula = 17; +TPTPParser.RULE_thf_and_formula = 18; +TPTPParser.RULE_thf_apply_formula = 19; +TPTPParser.RULE_thf_unit_formula = 20; +TPTPParser.RULE_thf_preunit_formula = 21; +TPTPParser.RULE_thf_unitary_formula = 22; +TPTPParser.RULE_thf_quantified_formula = 23; +TPTPParser.RULE_thf_quantification = 24; +TPTPParser.RULE_thf_variable_list = 25; +TPTPParser.RULE_thf_typed_variable = 26; +TPTPParser.RULE_thf_unary_formula = 27; +TPTPParser.RULE_thf_prefix_unary = 28; +TPTPParser.RULE_thf_infix_unary = 29; +TPTPParser.RULE_thf_atomic_formula = 30; +TPTPParser.RULE_thf_plain_atomic = 31; +TPTPParser.RULE_thf_defined_atomic = 32; +TPTPParser.RULE_thf_defined_term = 33; +TPTPParser.RULE_thf_defined_infix = 34; +TPTPParser.RULE_thf_system_atomic = 35; +TPTPParser.RULE_thf_let = 36; +TPTPParser.RULE_thf_let_types = 37; +TPTPParser.RULE_thf_atom_typing_list = 38; +TPTPParser.RULE_thf_let_defns = 39; +TPTPParser.RULE_thf_let_defn = 40; +TPTPParser.RULE_thf_let_defn_list = 41; +TPTPParser.RULE_thf_unitary_term = 42; +TPTPParser.RULE_thf_conn_term = 43; +TPTPParser.RULE_thf_tuple = 44; +TPTPParser.RULE_thf_fof_function = 45; +TPTPParser.RULE_thf_arguments = 46; +TPTPParser.RULE_thf_formula_list = 47; +TPTPParser.RULE_comma_thf_logic_formula = 48; +TPTPParser.RULE_thf_atom_typing = 49; +TPTPParser.RULE_thf_top_level_type = 50; +TPTPParser.RULE_thf_unitary_type = 51; +TPTPParser.RULE_thf_apply_type = 52; +TPTPParser.RULE_thf_binary_type = 53; +TPTPParser.RULE_thf_mapping_type = 54; +TPTPParser.RULE_thf_xprod_type = 55; +TPTPParser.RULE_thf_union_type = 56; +TPTPParser.RULE_thf_subtype = 57; +TPTPParser.RULE_thf_definition = 58; +TPTPParser.RULE_thf_sequent = 59; +TPTPParser.RULE_tff_formula = 60; +TPTPParser.RULE_tff_logic_formula = 61; +TPTPParser.RULE_tff_binary_formula = 62; +TPTPParser.RULE_tff_binary_pair = 63; +TPTPParser.RULE_tff_binary_list = 64; +TPTPParser.RULE_tff_or_formula = 65; +TPTPParser.RULE_tff_and_formula = 66; +TPTPParser.RULE_tff_unit_formula = 67; +TPTPParser.RULE_bnf2antlr_tff_formula_term = 68; +TPTPParser.RULE_bnf2antlr_tff_infix_tail = 69; +TPTPParser.RULE_tff_preunit_formula = 70; +TPTPParser.RULE_tff_unitary_formula = 71; +TPTPParser.RULE_txf_unitary_formula = 72; +TPTPParser.RULE_tff_quantified_formula = 73; +TPTPParser.RULE_tff_variable_list = 74; +TPTPParser.RULE_tff_variable = 75; +TPTPParser.RULE_tff_typed_variable = 76; +TPTPParser.RULE_tff_unary_formula = 77; +TPTPParser.RULE_tff_prefix_unary = 78; +TPTPParser.RULE_tff_infix_unary = 79; +TPTPParser.RULE_tff_atomic_formula = 80; +TPTPParser.RULE_tff_plain_atomic = 81; +TPTPParser.RULE_tff_defined_atomic = 82; +TPTPParser.RULE_tff_defined_plain = 83; +TPTPParser.RULE_tff_defined_infix = 84; +TPTPParser.RULE_tff_system_atomic = 85; +TPTPParser.RULE_txf_let = 86; +TPTPParser.RULE_txf_let_types = 87; +TPTPParser.RULE_tff_atom_typing_list = 88; +TPTPParser.RULE_txf_let_defns = 89; +TPTPParser.RULE_txf_let_defn = 90; +TPTPParser.RULE_txf_let_lhs = 91; +TPTPParser.RULE_txf_let_defn_list = 92; +TPTPParser.RULE_nxf_atom = 93; +TPTPParser.RULE_tff_term = 94; +TPTPParser.RULE_tff_unitary_term = 95; +TPTPParser.RULE_txf_tuple = 96; +TPTPParser.RULE_tff_arguments = 97; +TPTPParser.RULE_comma_tff_term = 98; +TPTPParser.RULE_tff_atom_typing = 99; +TPTPParser.RULE_tff_top_level_type = 100; +TPTPParser.RULE_tff_non_atomic_type = 101; +TPTPParser.RULE_tf1_quantified_type = 102; +TPTPParser.RULE_tff_monotype = 103; +TPTPParser.RULE_tff_unitary_type = 104; +TPTPParser.RULE_tff_atomic_type = 105; +TPTPParser.RULE_tff_type_arguments = 106; +TPTPParser.RULE_tff_mapping_type = 107; +TPTPParser.RULE_tff_xprod_type = 108; +TPTPParser.RULE_txf_tuple_type = 109; +TPTPParser.RULE_tff_type_list = 110; +TPTPParser.RULE_tff_subtype = 111; +TPTPParser.RULE_txf_definition = 112; +TPTPParser.RULE_txf_sequent = 113; +TPTPParser.RULE_nhf_long_connective = 114; +TPTPParser.RULE_nhf_parameter_list = 115; +TPTPParser.RULE_nhf_parameter = 116; +TPTPParser.RULE_nhf_key_pair = 117; +TPTPParser.RULE_nxf_long_connective = 118; +TPTPParser.RULE_nxf_parameter_list = 119; +TPTPParser.RULE_nxf_parameter = 120; +TPTPParser.RULE_nxf_key_pair = 121; +TPTPParser.RULE_ntf_connective_name = 122; +TPTPParser.RULE_ntf_defined_connective = 123; +TPTPParser.RULE_ntf_index = 124; +TPTPParser.RULE_ntf_short_connective = 125; +TPTPParser.RULE_tcf_formula = 126; +TPTPParser.RULE_tcf_logic_formula = 127; +TPTPParser.RULE_tcf_quantified_formula = 128; +TPTPParser.RULE_fof_formula = 129; +TPTPParser.RULE_fof_logic_formula = 130; +TPTPParser.RULE_fof_binary_formula = 131; +TPTPParser.RULE_fof_binary_pair = 132; +TPTPParser.RULE_fof_binary_list = 133; +TPTPParser.RULE_fof_or_formula = 134; +TPTPParser.RULE_fof_and_formula = 135; +TPTPParser.RULE_fof_unary_formula = 136; +TPTPParser.RULE_fof_infix_unary = 137; +TPTPParser.RULE_fof_unit_formula = 138; +TPTPParser.RULE_fof_unitary_formula = 139; +TPTPParser.RULE_fof_quantified_formula = 140; +TPTPParser.RULE_fof_variable_list = 141; +TPTPParser.RULE_fof_atomic_formula = 142; +TPTPParser.RULE_fof_plain_atomic_formula = 143; +TPTPParser.RULE_fof_defined_atomic_formula = 144; +TPTPParser.RULE_fof_defined_plain_formula = 145; +TPTPParser.RULE_fof_defined_infix_formula = 146; +TPTPParser.RULE_fof_system_atomic_formula = 147; +TPTPParser.RULE_fof_plain_term = 148; +TPTPParser.RULE_fof_defined_term = 149; +TPTPParser.RULE_fof_defined_atomic_term = 150; +TPTPParser.RULE_fof_defined_plain_term = 151; +TPTPParser.RULE_fof_system_term = 152; +TPTPParser.RULE_fof_arguments = 153; +TPTPParser.RULE_fof_term = 154; +TPTPParser.RULE_fof_function_term = 155; +TPTPParser.RULE_fof_sequent = 156; +TPTPParser.RULE_fof_formula_tuple = 157; +TPTPParser.RULE_fof_formula_tuple_list = 158; +TPTPParser.RULE_comma_fof_logic_formula = 159; +TPTPParser.RULE_cnf_formula = 160; +TPTPParser.RULE_cnf_disjunction = 161; +TPTPParser.RULE_cnf_literal = 162; +TPTPParser.RULE_thf_quantifier = 163; +TPTPParser.RULE_thf_unary_connective = 164; +TPTPParser.RULE_th0_quantifier = 165; +TPTPParser.RULE_type_quantifier = 166; +TPTPParser.RULE_subtype_sign = 167; +TPTPParser.RULE_tff_unary_connective = 168; +TPTPParser.RULE_tff_quantifier = 169; +TPTPParser.RULE_fof_quantifier = 170; +TPTPParser.RULE_nonassoc_connective = 171; +TPTPParser.RULE_assoc_connective = 172; +TPTPParser.RULE_unary_connective = 173; +TPTPParser.RULE_gentzen_arrow = 174; +TPTPParser.RULE_assignment = 175; +TPTPParser.RULE_identical = 176; +TPTPParser.RULE_typeable_atom = 177; +TPTPParser.RULE_atomic_type = 178; +TPTPParser.RULE_type_constant = 179; +TPTPParser.RULE_type_functor = 180; +TPTPParser.RULE_defined_type = 181; +TPTPParser.RULE_system_type = 182; +TPTPParser.RULE_defined_infix_pred = 183; +TPTPParser.RULE_infix_equality = 184; +TPTPParser.RULE_infix_inequality = 185; +TPTPParser.RULE_constant = 186; +TPTPParser.RULE_functor = 187; +TPTPParser.RULE_defined_constant = 188; +TPTPParser.RULE_defined_functor = 189; +TPTPParser.RULE_system_constant = 190; +TPTPParser.RULE_system_functor = 191; +TPTPParser.RULE_th1_defined_term = 192; +TPTPParser.RULE_defined_term = 193; +TPTPParser.RULE_variable = 194; +TPTPParser.RULE_source = 195; +TPTPParser.RULE_sources = 196; +TPTPParser.RULE_dag_source = 197; +TPTPParser.RULE_inference_record = 198; +TPTPParser.RULE_inference_rule = 199; +TPTPParser.RULE_internal_source = 200; +TPTPParser.RULE_intro_type = 201; +TPTPParser.RULE_external_source = 202; +TPTPParser.RULE_file_source = 203; +TPTPParser.RULE_file_info = 204; +TPTPParser.RULE_parents = 205; +TPTPParser.RULE_parent_list = 206; +TPTPParser.RULE_comma_parent_info = 207; +TPTPParser.RULE_parent_info = 208; +TPTPParser.RULE_parent_details = 209; +TPTPParser.RULE_optional_info = 210; +TPTPParser.RULE_useful_info = 211; +TPTPParser.RULE_include = 212; +TPTPParser.RULE_include_optionals = 213; +TPTPParser.RULE_formula_selection = 214; +TPTPParser.RULE_name_list = 215; +TPTPParser.RULE_space_name = 216; +TPTPParser.RULE_general_term = 217; +TPTPParser.RULE_general_data = 218; +TPTPParser.RULE_general_function = 219; +TPTPParser.RULE_formula_data = 220; +TPTPParser.RULE_general_list = 221; +TPTPParser.RULE_general_terms = 222; +TPTPParser.RULE_comma_general_term = 223; +TPTPParser.RULE_name = 224; +TPTPParser.RULE_atomic_word = 225; +TPTPParser.RULE_atomic_defined_word = 226; +TPTPParser.RULE_atomic_system_word = 227; +TPTPParser.RULE_number = 228; +TPTPParser.RULE_file_name = 229; +TPTPParser.RULE_nothing = 230; +TPTPParser.RULE_lower_word_token = 231; + +class Tptp_fileContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tptp_file; + } + + EOF() { + return this.getToken(TPTPParser.EOF, 0); + }; + + tptp_input = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tptp_inputContext); + } else { + return this.getTypedRuleContext(Tptp_inputContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTptp_file(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTptp_file(this); + } + } + + +} + + + +class Tptp_inputContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tptp_input; + } + + annotated_formula() { + return this.getTypedRuleContext(Annotated_formulaContext,0); + }; + + include() { + return this.getTypedRuleContext(IncludeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTptp_input(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTptp_input(this); + } + } + + +} + + + +class Annotated_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_annotated_formula; + } + + thf_annotated() { + return this.getTypedRuleContext(Thf_annotatedContext,0); + }; + + tff_annotated() { + return this.getTypedRuleContext(Tff_annotatedContext,0); + }; + + tcf_annotated() { + return this.getTypedRuleContext(Tcf_annotatedContext,0); + }; + + fof_annotated() { + return this.getTypedRuleContext(Fof_annotatedContext,0); + }; + + cnf_annotated() { + return this.getTypedRuleContext(Cnf_annotatedContext,0); + }; + + tpi_annotated() { + return this.getTypedRuleContext(Tpi_annotatedContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAnnotated_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAnnotated_formula(this); + } + } + + +} + + + +class Tpi_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tpi_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + tpi_formula() { + return this.getTypedRuleContext(Tpi_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTpi_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTpi_annotated(this); + } + } + + +} + + + +class Tpi_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tpi_formula; + } + + fof_formula() { + return this.getTypedRuleContext(Fof_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTpi_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTpi_formula(this); + } + } + + +} + + + +class Thf_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + thf_formula() { + return this.getTypedRuleContext(Thf_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_annotated(this); + } + } + + +} + + + +class Tff_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + tff_formula() { + return this.getTypedRuleContext(Tff_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_annotated(this); + } + } + + +} + + + +class Tcf_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tcf_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + tcf_formula() { + return this.getTypedRuleContext(Tcf_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTcf_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTcf_annotated(this); + } + } + + +} + + + +class Fof_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + fof_formula() { + return this.getTypedRuleContext(Fof_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_annotated(this); + } + } + + +} + + + +class Cnf_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_cnf_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + cnf_formula() { + return this.getTypedRuleContext(Cnf_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterCnf_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitCnf_annotated(this); + } + } + + +} + + + +class AnnotationsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_annotations; + } + + source() { + return this.getTypedRuleContext(SourceContext,0); + }; + + optional_info() { + return this.getTypedRuleContext(Optional_infoContext,0); + }; + + nothing() { + return this.getTypedRuleContext(NothingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAnnotations(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAnnotations(this); + } + } + + +} + + + +class Formula_roleContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_formula_role; + } + + lower_word_token() { + return this.getTypedRuleContext(Lower_word_tokenContext,0); + }; + + general_term() { + return this.getTypedRuleContext(General_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFormula_role(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFormula_role(this); + } + } + + +} + + + +class Thf_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_formula; + } + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + thf_atom_typing() { + return this.getTypedRuleContext(Thf_atom_typingContext,0); + }; + + thf_subtype() { + return this.getTypedRuleContext(Thf_subtypeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_formula(this); + } + } + + +} + + + +class Thf_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_logic_formula; + } + + thf_unitary_formula() { + return this.getTypedRuleContext(Thf_unitary_formulaContext,0); + }; + + thf_unary_formula() { + return this.getTypedRuleContext(Thf_unary_formulaContext,0); + }; + + thf_binary_formula() { + return this.getTypedRuleContext(Thf_binary_formulaContext,0); + }; + + thf_defined_infix() { + return this.getTypedRuleContext(Thf_defined_infixContext,0); + }; + + thf_definition() { + return this.getTypedRuleContext(Thf_definitionContext,0); + }; + + thf_sequent() { + return this.getTypedRuleContext(Thf_sequentContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_logic_formula(this); + } + } + + +} + + + +class Thf_binary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_binary_formula; + } + + thf_binary_pair() { + return this.getTypedRuleContext(Thf_binary_pairContext,0); + }; + + thf_binary_list() { + return this.getTypedRuleContext(Thf_binary_listContext,0); + }; + + thf_binary_type() { + return this.getTypedRuleContext(Thf_binary_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_binary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_binary_formula(this); + } + } + + +} + + + +class Thf_binary_pairContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_binary_pair; + } + + thf_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unit_formulaContext); + } else { + return this.getTypedRuleContext(Thf_unit_formulaContext,i); + } + }; + + nonassoc_connective() { + return this.getTypedRuleContext(Nonassoc_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_binary_pair(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_binary_pair(this); + } + } + + +} + + + +class Thf_binary_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_binary_list; + } + + thf_or_formula() { + return this.getTypedRuleContext(Thf_or_formulaContext,0); + }; + + thf_and_formula() { + return this.getTypedRuleContext(Thf_and_formulaContext,0); + }; + + thf_apply_formula() { + return this.getTypedRuleContext(Thf_apply_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_binary_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_binary_list(this); + } + } + + +} + + + +class Thf_or_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_or_formula; + } + + thf_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unit_formulaContext); + } else { + return this.getTypedRuleContext(Thf_unit_formulaContext,i); + } + }; + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + thf_or_formula() { + return this.getTypedRuleContext(Thf_or_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_or_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_or_formula(this); + } + } + + +} + + + +class Thf_and_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_and_formula; + } + + thf_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unit_formulaContext); + } else { + return this.getTypedRuleContext(Thf_unit_formulaContext,i); + } + }; + + thf_and_formula() { + return this.getTypedRuleContext(Thf_and_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_and_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_and_formula(this); + } + } + + +} + + + +class Thf_apply_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_apply_formula; + } + + thf_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unit_formulaContext); + } else { + return this.getTypedRuleContext(Thf_unit_formulaContext,i); + } + }; + + thf_apply_formula() { + return this.getTypedRuleContext(Thf_apply_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_apply_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_apply_formula(this); + } + } + + +} + + + +class Thf_unit_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unit_formula; + } + + thf_unitary_formula() { + return this.getTypedRuleContext(Thf_unitary_formulaContext,0); + }; + + thf_unary_formula() { + return this.getTypedRuleContext(Thf_unary_formulaContext,0); + }; + + thf_defined_infix() { + return this.getTypedRuleContext(Thf_defined_infixContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unit_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unit_formula(this); + } + } + + +} + + + +class Thf_preunit_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_preunit_formula; + } + + thf_unitary_formula() { + return this.getTypedRuleContext(Thf_unitary_formulaContext,0); + }; + + thf_prefix_unary() { + return this.getTypedRuleContext(Thf_prefix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_preunit_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_preunit_formula(this); + } + } + + +} + + + +class Thf_unitary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unitary_formula; + } + + thf_quantified_formula() { + return this.getTypedRuleContext(Thf_quantified_formulaContext,0); + }; + + thf_atomic_formula() { + return this.getTypedRuleContext(Thf_atomic_formulaContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unitary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unitary_formula(this); + } + } + + +} + + + +class Thf_quantified_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_quantified_formula; + } + + thf_quantification() { + return this.getTypedRuleContext(Thf_quantificationContext,0); + }; + + thf_unit_formula() { + return this.getTypedRuleContext(Thf_unit_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_quantified_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_quantified_formula(this); + } + } + + +} + + + +class Thf_quantificationContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_quantification; + } + + thf_quantifier() { + return this.getTypedRuleContext(Thf_quantifierContext,0); + }; + + thf_variable_list() { + return this.getTypedRuleContext(Thf_variable_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_quantification(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_quantification(this); + } + } + + +} + + + +class Thf_variable_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_variable_list; + } + + thf_typed_variable() { + return this.getTypedRuleContext(Thf_typed_variableContext,0); + }; + + thf_variable_list() { + return this.getTypedRuleContext(Thf_variable_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_variable_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_variable_list(this); + } + } + + +} + + + +class Thf_typed_variableContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_typed_variable; + } + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + thf_top_level_type() { + return this.getTypedRuleContext(Thf_top_level_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_typed_variable(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_typed_variable(this); + } + } + + +} + + + +class Thf_unary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unary_formula; + } + + thf_prefix_unary() { + return this.getTypedRuleContext(Thf_prefix_unaryContext,0); + }; + + thf_infix_unary() { + return this.getTypedRuleContext(Thf_infix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unary_formula(this); + } + } + + +} + + + +class Thf_prefix_unaryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_prefix_unary; + } + + thf_unary_connective() { + return this.getTypedRuleContext(Thf_unary_connectiveContext,0); + }; + + thf_preunit_formula() { + return this.getTypedRuleContext(Thf_preunit_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_prefix_unary(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_prefix_unary(this); + } + } + + +} + + + +class Thf_infix_unaryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_infix_unary; + } + + thf_unitary_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unitary_termContext); + } else { + return this.getTypedRuleContext(Thf_unitary_termContext,i); + } + }; + + infix_inequality() { + return this.getTypedRuleContext(Infix_inequalityContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_infix_unary(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_infix_unary(this); + } + } + + +} + + + +class Thf_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_atomic_formula; + } + + thf_plain_atomic() { + return this.getTypedRuleContext(Thf_plain_atomicContext,0); + }; + + thf_defined_atomic() { + return this.getTypedRuleContext(Thf_defined_atomicContext,0); + }; + + thf_system_atomic() { + return this.getTypedRuleContext(Thf_system_atomicContext,0); + }; + + thf_fof_function() { + return this.getTypedRuleContext(Thf_fof_functionContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_atomic_formula(this); + } + } + + +} + + + +class Thf_plain_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_plain_atomic; + } + + constant() { + return this.getTypedRuleContext(ConstantContext,0); + }; + + thf_tuple() { + return this.getTypedRuleContext(Thf_tupleContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_plain_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_plain_atomic(this); + } + } + + +} + + + +class Thf_defined_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_defined_atomic; + } + + defined_constant() { + return this.getTypedRuleContext(Defined_constantContext,0); + }; + + thf_defined_term() { + return this.getTypedRuleContext(Thf_defined_termContext,0); + }; + + thf_conn_term() { + return this.getTypedRuleContext(Thf_conn_termContext,0); + }; + + nhf_long_connective() { + return this.getTypedRuleContext(Nhf_long_connectiveContext,0); + }; + + thf_let() { + return this.getTypedRuleContext(Thf_letContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_defined_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_defined_atomic(this); + } + } + + +} + + + +class Thf_defined_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_defined_term; + } + + defined_term() { + return this.getTypedRuleContext(Defined_termContext,0); + }; + + th1_defined_term() { + return this.getTypedRuleContext(Th1_defined_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_defined_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_defined_term(this); + } + } + + +} + + + +class Thf_defined_infixContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_defined_infix; + } + + thf_unitary_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unitary_termContext); + } else { + return this.getTypedRuleContext(Thf_unitary_termContext,i); + } + }; + + defined_infix_pred() { + return this.getTypedRuleContext(Defined_infix_predContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_defined_infix(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_defined_infix(this); + } + } + + +} + + + +class Thf_system_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_system_atomic; + } + + system_constant() { + return this.getTypedRuleContext(System_constantContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_system_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_system_atomic(this); + } + } + + +} + + + +class Thf_letContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_let; + } + + thf_let_types() { + return this.getTypedRuleContext(Thf_let_typesContext,0); + }; + + thf_let_defns() { + return this.getTypedRuleContext(Thf_let_defnsContext,0); + }; + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_let(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_let(this); + } + } + + +} + + + +class Thf_let_typesContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_let_types; + } + + thf_atom_typing() { + return this.getTypedRuleContext(Thf_atom_typingContext,0); + }; + + thf_atom_typing_list() { + return this.getTypedRuleContext(Thf_atom_typing_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_let_types(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_let_types(this); + } + } + + +} + + + +class Thf_atom_typing_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_atom_typing_list; + } + + thf_atom_typing() { + return this.getTypedRuleContext(Thf_atom_typingContext,0); + }; + + thf_atom_typing_list() { + return this.getTypedRuleContext(Thf_atom_typing_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_atom_typing_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_atom_typing_list(this); + } + } + + +} + + + +class Thf_let_defnsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_let_defns; + } + + thf_let_defn() { + return this.getTypedRuleContext(Thf_let_defnContext,0); + }; + + thf_let_defn_list() { + return this.getTypedRuleContext(Thf_let_defn_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_let_defns(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_let_defns(this); + } + } + + +} + + + +class Thf_let_defnContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_let_defn; + } + + thf_logic_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_logic_formulaContext); + } else { + return this.getTypedRuleContext(Thf_logic_formulaContext,i); + } + }; + + assignment() { + return this.getTypedRuleContext(AssignmentContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_let_defn(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_let_defn(this); + } + } + + +} + + + +class Thf_let_defn_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_let_defn_list; + } + + thf_let_defn() { + return this.getTypedRuleContext(Thf_let_defnContext,0); + }; + + thf_let_defn_list() { + return this.getTypedRuleContext(Thf_let_defn_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_let_defn_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_let_defn_list(this); + } + } + + +} + + + +class Thf_unitary_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unitary_term; + } + + thf_atomic_formula() { + return this.getTypedRuleContext(Thf_atomic_formulaContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unitary_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unitary_term(this); + } + } + + +} + + + +class Thf_conn_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_conn_term; + } + + nonassoc_connective() { + return this.getTypedRuleContext(Nonassoc_connectiveContext,0); + }; + + assoc_connective() { + return this.getTypedRuleContext(Assoc_connectiveContext,0); + }; + + infix_equality() { + return this.getTypedRuleContext(Infix_equalityContext,0); + }; + + infix_inequality() { + return this.getTypedRuleContext(Infix_inequalityContext,0); + }; + + thf_unary_connective() { + return this.getTypedRuleContext(Thf_unary_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_conn_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_conn_term(this); + } + } + + +} + + + +class Thf_tupleContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_tuple; + } + + thf_formula_list() { + return this.getTypedRuleContext(Thf_formula_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_tuple(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_tuple(this); + } + } + + +} + + + +class Thf_fof_functionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_fof_function; + } + + defined_functor() { + return this.getTypedRuleContext(Defined_functorContext,0); + }; + + thf_arguments() { + return this.getTypedRuleContext(Thf_argumentsContext,0); + }; + + system_functor() { + return this.getTypedRuleContext(System_functorContext,0); + }; + + functor() { + return this.getTypedRuleContext(FunctorContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_fof_function(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_fof_function(this); + } + } + + +} + + + +class Thf_argumentsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_arguments; + } + + thf_formula_list() { + return this.getTypedRuleContext(Thf_formula_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_arguments(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_arguments(this); + } + } + + +} + + + +class Thf_formula_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_formula_list; + } + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + comma_thf_logic_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Comma_thf_logic_formulaContext); + } else { + return this.getTypedRuleContext(Comma_thf_logic_formulaContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_formula_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_formula_list(this); + } + } + + +} + + + +class Comma_thf_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_comma_thf_logic_formula; + } + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterComma_thf_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitComma_thf_logic_formula(this); + } + } + + +} + + + +class Thf_atom_typingContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_atom_typing; + } + + typeable_atom() { + return this.getTypedRuleContext(Typeable_atomContext,0); + }; + + thf_top_level_type() { + return this.getTypedRuleContext(Thf_top_level_typeContext,0); + }; + + thf_atom_typing() { + return this.getTypedRuleContext(Thf_atom_typingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_atom_typing(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_atom_typing(this); + } + } + + +} + + + +class Thf_top_level_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_top_level_type; + } + + thf_unitary_type() { + return this.getTypedRuleContext(Thf_unitary_typeContext,0); + }; + + thf_mapping_type() { + return this.getTypedRuleContext(Thf_mapping_typeContext,0); + }; + + thf_apply_type() { + return this.getTypedRuleContext(Thf_apply_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_top_level_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_top_level_type(this); + } + } + + +} + + + +class Thf_unitary_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unitary_type; + } + + thf_unitary_formula() { + return this.getTypedRuleContext(Thf_unitary_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unitary_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unitary_type(this); + } + } + + +} + + + +class Thf_apply_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_apply_type; + } + + thf_apply_formula() { + return this.getTypedRuleContext(Thf_apply_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_apply_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_apply_type(this); + } + } + + +} + + + +class Thf_binary_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_binary_type; + } + + thf_mapping_type() { + return this.getTypedRuleContext(Thf_mapping_typeContext,0); + }; + + thf_xprod_type() { + return this.getTypedRuleContext(Thf_xprod_typeContext,0); + }; + + thf_union_type() { + return this.getTypedRuleContext(Thf_union_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_binary_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_binary_type(this); + } + } + + +} + + + +class Thf_mapping_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_mapping_type; + } + + thf_unitary_type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unitary_typeContext); + } else { + return this.getTypedRuleContext(Thf_unitary_typeContext,i); + } + }; + + Arrow() { + return this.getToken(TPTPParser.Arrow, 0); + }; + + thf_mapping_type() { + return this.getTypedRuleContext(Thf_mapping_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_mapping_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_mapping_type(this); + } + } + + +} + + + +class Thf_xprod_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_xprod_type; + } + + thf_unitary_type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unitary_typeContext); + } else { + return this.getTypedRuleContext(Thf_unitary_typeContext,i); + } + }; + + Star() { + return this.getToken(TPTPParser.Star, 0); + }; + + thf_xprod_type() { + return this.getTypedRuleContext(Thf_xprod_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_xprod_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_xprod_type(this); + } + } + + +} + + + +class Thf_union_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_union_type; + } + + thf_unitary_type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unitary_typeContext); + } else { + return this.getTypedRuleContext(Thf_unitary_typeContext,i); + } + }; + + Plus() { + return this.getToken(TPTPParser.Plus, 0); + }; + + thf_union_type() { + return this.getTypedRuleContext(Thf_union_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_union_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_union_type(this); + } + } + + +} + + + +class Thf_subtypeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_subtype; + } + + atomic_type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Atomic_typeContext); + } else { + return this.getTypedRuleContext(Atomic_typeContext,i); + } + }; + + subtype_sign() { + return this.getTypedRuleContext(Subtype_signContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_subtype(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_subtype(this); + } + } + + +} + + + +class Thf_definitionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_definition; + } + + thf_atomic_formula() { + return this.getTypedRuleContext(Thf_atomic_formulaContext,0); + }; + + identical() { + return this.getTypedRuleContext(IdenticalContext,0); + }; + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_definition(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_definition(this); + } + } + + +} + + + +class Thf_sequentContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_sequent; + } + + thf_tuple = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_tupleContext); + } else { + return this.getTypedRuleContext(Thf_tupleContext,i); + } + }; + + gentzen_arrow() { + return this.getTypedRuleContext(Gentzen_arrowContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_sequent(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_sequent(this); + } + } + + +} + + + +class Tff_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_formula; + } + + tff_logic_formula() { + return this.getTypedRuleContext(Tff_logic_formulaContext,0); + }; + + tff_atom_typing() { + return this.getTypedRuleContext(Tff_atom_typingContext,0); + }; + + tff_subtype() { + return this.getTypedRuleContext(Tff_subtypeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_formula(this); + } + } + + +} + + + +class Tff_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_logic_formula; + } + + tff_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unit_formulaContext); + } else { + return this.getTypedRuleContext(Tff_unit_formulaContext,i); + } + }; + + nonassoc_connective() { + return this.getTypedRuleContext(Nonassoc_connectiveContext,0); + }; + + Vline = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTokens(TPTPParser.Vline); + } else { + return this.getToken(TPTPParser.Vline, i); + } + }; + + + txf_definition() { + return this.getTypedRuleContext(Txf_definitionContext,0); + }; + + txf_sequent() { + return this.getTypedRuleContext(Txf_sequentContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_logic_formula(this); + } + } + + +} + + + +class Tff_binary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_binary_formula; + } + + tff_binary_pair() { + return this.getTypedRuleContext(Tff_binary_pairContext,0); + }; + + tff_binary_list() { + return this.getTypedRuleContext(Tff_binary_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_binary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_binary_formula(this); + } + } + + +} + + + +class Tff_binary_pairContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_binary_pair; + } + + tff_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unit_formulaContext); + } else { + return this.getTypedRuleContext(Tff_unit_formulaContext,i); + } + }; + + nonassoc_connective() { + return this.getTypedRuleContext(Nonassoc_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_binary_pair(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_binary_pair(this); + } + } + + +} + + + +class Tff_binary_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_binary_list; + } + + tff_or_formula() { + return this.getTypedRuleContext(Tff_or_formulaContext,0); + }; + + tff_and_formula() { + return this.getTypedRuleContext(Tff_and_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_binary_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_binary_list(this); + } + } + + +} + + + +class Tff_or_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_or_formula; + } + + tff_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unit_formulaContext); + } else { + return this.getTypedRuleContext(Tff_unit_formulaContext,i); + } + }; + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + tff_or_formula() { + return this.getTypedRuleContext(Tff_or_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_or_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_or_formula(this); + } + } + + +} + + + +class Tff_and_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_and_formula; + } + + tff_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unit_formulaContext); + } else { + return this.getTypedRuleContext(Tff_unit_formulaContext,i); + } + }; + + tff_and_formula() { + return this.getTypedRuleContext(Tff_and_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_and_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_and_formula(this); + } + } + + +} + + + +class Tff_unit_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unit_formula; + } + + tff_quantified_formula() { + return this.getTypedRuleContext(Tff_quantified_formulaContext,0); + }; + + tff_prefix_unary() { + return this.getTypedRuleContext(Tff_prefix_unaryContext,0); + }; + + bnf2antlr_tff_formula_term() { + return this.getTypedRuleContext(Bnf2antlr_tff_formula_termContext,0); + }; + + bnf2antlr_tff_infix_tail() { + return this.getTypedRuleContext(Bnf2antlr_tff_infix_tailContext,0); + }; + + defined_term() { + return this.getTypedRuleContext(Defined_termContext,0); + }; + + txf_tuple() { + return this.getTypedRuleContext(Txf_tupleContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unit_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unit_formula(this); + } + } + + +} + + + +class Bnf2antlr_tff_formula_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_bnf2antlr_tff_formula_term; + } + + tff_atomic_formula() { + return this.getTypedRuleContext(Tff_atomic_formulaContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + tff_logic_formula() { + return this.getTypedRuleContext(Tff_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterBnf2antlr_tff_formula_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitBnf2antlr_tff_formula_term(this); + } + } + + +} + + + +class Bnf2antlr_tff_infix_tailContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_bnf2antlr_tff_infix_tail; + } + + tff_unitary_term() { + return this.getTypedRuleContext(Tff_unitary_termContext,0); + }; + + defined_infix_pred() { + return this.getTypedRuleContext(Defined_infix_predContext,0); + }; + + infix_inequality() { + return this.getTypedRuleContext(Infix_inequalityContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterBnf2antlr_tff_infix_tail(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitBnf2antlr_tff_infix_tail(this); + } + } + + +} + + + +class Tff_preunit_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_preunit_formula; + } + + tff_unitary_formula() { + return this.getTypedRuleContext(Tff_unitary_formulaContext,0); + }; + + tff_prefix_unary() { + return this.getTypedRuleContext(Tff_prefix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_preunit_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_preunit_formula(this); + } + } + + +} + + + +class Tff_unitary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unitary_formula; + } + + tff_quantified_formula() { + return this.getTypedRuleContext(Tff_quantified_formulaContext,0); + }; + + tff_atomic_formula() { + return this.getTypedRuleContext(Tff_atomic_formulaContext,0); + }; + + txf_unitary_formula() { + return this.getTypedRuleContext(Txf_unitary_formulaContext,0); + }; + + tff_logic_formula() { + return this.getTypedRuleContext(Tff_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unitary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unitary_formula(this); + } + } + + +} + + + +class Txf_unitary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_unitary_formula; + } + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_unitary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_unitary_formula(this); + } + } + + +} + + + +class Tff_quantified_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_quantified_formula; + } + + tff_quantifier() { + return this.getTypedRuleContext(Tff_quantifierContext,0); + }; + + tff_variable_list() { + return this.getTypedRuleContext(Tff_variable_listContext,0); + }; + + tff_unit_formula() { + return this.getTypedRuleContext(Tff_unit_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_quantified_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_quantified_formula(this); + } + } + + +} + + + +class Tff_variable_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_variable_list; + } + + tff_variable() { + return this.getTypedRuleContext(Tff_variableContext,0); + }; + + tff_variable_list() { + return this.getTypedRuleContext(Tff_variable_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_variable_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_variable_list(this); + } + } + + +} + + + +class Tff_variableContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_variable; + } + + tff_typed_variable() { + return this.getTypedRuleContext(Tff_typed_variableContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_variable(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_variable(this); + } + } + + +} + + + +class Tff_typed_variableContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_typed_variable; + } + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_typed_variable(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_typed_variable(this); + } + } + + +} + + + +class Tff_unary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unary_formula; + } + + tff_prefix_unary() { + return this.getTypedRuleContext(Tff_prefix_unaryContext,0); + }; + + tff_infix_unary() { + return this.getTypedRuleContext(Tff_infix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unary_formula(this); + } + } + + +} + + + +class Tff_prefix_unaryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_prefix_unary; + } + + tff_unary_connective() { + return this.getTypedRuleContext(Tff_unary_connectiveContext,0); + }; + + tff_preunit_formula() { + return this.getTypedRuleContext(Tff_preunit_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_prefix_unary(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_prefix_unary(this); + } + } + + +} + + + +class Tff_infix_unaryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_infix_unary; + } + + tff_unitary_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unitary_termContext); + } else { + return this.getTypedRuleContext(Tff_unitary_termContext,i); + } + }; + + infix_inequality() { + return this.getTypedRuleContext(Infix_inequalityContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_infix_unary(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_infix_unary(this); + } + } + + +} + + + +class Tff_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_atomic_formula; + } + + tff_plain_atomic() { + return this.getTypedRuleContext(Tff_plain_atomicContext,0); + }; + + tff_defined_atomic() { + return this.getTypedRuleContext(Tff_defined_atomicContext,0); + }; + + tff_system_atomic() { + return this.getTypedRuleContext(Tff_system_atomicContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_atomic_formula(this); + } + } + + +} + + + +class Tff_plain_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_plain_atomic; + } + + constant() { + return this.getTypedRuleContext(ConstantContext,0); + }; + + functor() { + return this.getTypedRuleContext(FunctorContext,0); + }; + + tff_arguments() { + return this.getTypedRuleContext(Tff_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_plain_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_plain_atomic(this); + } + } + + +} + + + +class Tff_defined_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_defined_atomic; + } + + tff_defined_plain() { + return this.getTypedRuleContext(Tff_defined_plainContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_defined_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_defined_atomic(this); + } + } + + +} + + + +class Tff_defined_plainContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_defined_plain; + } + + defined_constant() { + return this.getTypedRuleContext(Defined_constantContext,0); + }; + + defined_functor() { + return this.getTypedRuleContext(Defined_functorContext,0); + }; + + tff_arguments() { + return this.getTypedRuleContext(Tff_argumentsContext,0); + }; + + nxf_atom() { + return this.getTypedRuleContext(Nxf_atomContext,0); + }; + + txf_let() { + return this.getTypedRuleContext(Txf_letContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_defined_plain(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_defined_plain(this); + } + } + + +} + + + +class Tff_defined_infixContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_defined_infix; + } + + tff_unitary_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unitary_termContext); + } else { + return this.getTypedRuleContext(Tff_unitary_termContext,i); + } + }; + + defined_infix_pred() { + return this.getTypedRuleContext(Defined_infix_predContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_defined_infix(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_defined_infix(this); + } + } + + +} + + + +class Tff_system_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_system_atomic; + } + + system_constant() { + return this.getTypedRuleContext(System_constantContext,0); + }; + + system_functor() { + return this.getTypedRuleContext(System_functorContext,0); + }; + + tff_arguments() { + return this.getTypedRuleContext(Tff_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_system_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_system_atomic(this); + } + } + + +} + + + +class Txf_letContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let; + } + + txf_let_types() { + return this.getTypedRuleContext(Txf_let_typesContext,0); + }; + + txf_let_defns() { + return this.getTypedRuleContext(Txf_let_defnsContext,0); + }; + + tff_term() { + return this.getTypedRuleContext(Tff_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let(this); + } + } + + +} + + + +class Txf_let_typesContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let_types; + } + + tff_atom_typing() { + return this.getTypedRuleContext(Tff_atom_typingContext,0); + }; + + tff_atom_typing_list() { + return this.getTypedRuleContext(Tff_atom_typing_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let_types(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let_types(this); + } + } + + +} + + + +class Tff_atom_typing_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_atom_typing_list; + } + + tff_atom_typing() { + return this.getTypedRuleContext(Tff_atom_typingContext,0); + }; + + tff_atom_typing_list() { + return this.getTypedRuleContext(Tff_atom_typing_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_atom_typing_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_atom_typing_list(this); + } + } + + +} + + + +class Txf_let_defnsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let_defns; + } + + txf_let_defn() { + return this.getTypedRuleContext(Txf_let_defnContext,0); + }; + + txf_let_defn_list() { + return this.getTypedRuleContext(Txf_let_defn_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let_defns(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let_defns(this); + } + } + + +} + + + +class Txf_let_defnContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let_defn; + } + + txf_let_lhs() { + return this.getTypedRuleContext(Txf_let_lhsContext,0); + }; + + assignment() { + return this.getTypedRuleContext(AssignmentContext,0); + }; + + tff_term() { + return this.getTypedRuleContext(Tff_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let_defn(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let_defn(this); + } + } + + +} + + + +class Txf_let_lhsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let_lhs; + } + + tff_plain_atomic() { + return this.getTypedRuleContext(Tff_plain_atomicContext,0); + }; + + txf_tuple() { + return this.getTypedRuleContext(Txf_tupleContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let_lhs(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let_lhs(this); + } + } + + +} + + + +class Txf_let_defn_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let_defn_list; + } + + txf_let_defn() { + return this.getTypedRuleContext(Txf_let_defnContext,0); + }; + + txf_let_defn_list() { + return this.getTypedRuleContext(Txf_let_defn_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let_defn_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let_defn_list(this); + } + } + + +} + + + +class Nxf_atomContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nxf_atom; + } + + nxf_long_connective() { + return this.getTypedRuleContext(Nxf_long_connectiveContext,0); + }; + + tff_arguments() { + return this.getTypedRuleContext(Tff_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNxf_atom(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNxf_atom(this); + } + } + + +} + + + +class Tff_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_term; + } + + tff_logic_formula() { + return this.getTypedRuleContext(Tff_logic_formulaContext,0); + }; + + defined_term() { + return this.getTypedRuleContext(Defined_termContext,0); + }; + + txf_tuple() { + return this.getTypedRuleContext(Txf_tupleContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_term(this); + } + } + + +} + + + +class Tff_unitary_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unitary_term; + } + + tff_atomic_formula() { + return this.getTypedRuleContext(Tff_atomic_formulaContext,0); + }; + + defined_term() { + return this.getTypedRuleContext(Defined_termContext,0); + }; + + txf_tuple() { + return this.getTypedRuleContext(Txf_tupleContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + tff_logic_formula() { + return this.getTypedRuleContext(Tff_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unitary_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unitary_term(this); + } + } + + +} + + + +class Txf_tupleContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_tuple; + } + + tff_arguments() { + return this.getTypedRuleContext(Tff_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_tuple(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_tuple(this); + } + } + + +} + + + +class Tff_argumentsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_arguments; + } + + tff_term() { + return this.getTypedRuleContext(Tff_termContext,0); + }; + + comma_tff_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Comma_tff_termContext); + } else { + return this.getTypedRuleContext(Comma_tff_termContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_arguments(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_arguments(this); + } + } + + +} + + + +class Comma_tff_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_comma_tff_term; + } + + tff_term() { + return this.getTypedRuleContext(Tff_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterComma_tff_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitComma_tff_term(this); + } + } + + +} + + + +class Tff_atom_typingContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_atom_typing; + } + + typeable_atom() { + return this.getTypedRuleContext(Typeable_atomContext,0); + }; + + tff_top_level_type() { + return this.getTypedRuleContext(Tff_top_level_typeContext,0); + }; + + tff_atom_typing() { + return this.getTypedRuleContext(Tff_atom_typingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_atom_typing(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_atom_typing(this); + } + } + + +} + + + +class Tff_top_level_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_top_level_type; + } + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + tff_non_atomic_type() { + return this.getTypedRuleContext(Tff_non_atomic_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_top_level_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_top_level_type(this); + } + } + + +} + + + +class Tff_non_atomic_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_non_atomic_type; + } + + tff_mapping_type() { + return this.getTypedRuleContext(Tff_mapping_typeContext,0); + }; + + tf1_quantified_type() { + return this.getTypedRuleContext(Tf1_quantified_typeContext,0); + }; + + tff_non_atomic_type() { + return this.getTypedRuleContext(Tff_non_atomic_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_non_atomic_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_non_atomic_type(this); + } + } + + +} + + + +class Tf1_quantified_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tf1_quantified_type; + } + + type_quantifier() { + return this.getTypedRuleContext(Type_quantifierContext,0); + }; + + tff_variable_list() { + return this.getTypedRuleContext(Tff_variable_listContext,0); + }; + + tff_monotype() { + return this.getTypedRuleContext(Tff_monotypeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTf1_quantified_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTf1_quantified_type(this); + } + } + + +} + + + +class Tff_monotypeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_monotype; + } + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + tff_mapping_type() { + return this.getTypedRuleContext(Tff_mapping_typeContext,0); + }; + + tf1_quantified_type() { + return this.getTypedRuleContext(Tf1_quantified_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_monotype(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_monotype(this); + } + } + + +} + + + +class Tff_unitary_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unitary_type; + } + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + tff_xprod_type() { + return this.getTypedRuleContext(Tff_xprod_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unitary_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unitary_type(this); + } + } + + +} + + + +class Tff_atomic_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_atomic_type; + } + + type_constant() { + return this.getTypedRuleContext(Type_constantContext,0); + }; + + defined_type() { + return this.getTypedRuleContext(Defined_typeContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + type_functor() { + return this.getTypedRuleContext(Type_functorContext,0); + }; + + tff_type_arguments() { + return this.getTypedRuleContext(Tff_type_argumentsContext,0); + }; + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + txf_tuple_type() { + return this.getTypedRuleContext(Txf_tuple_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_atomic_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_atomic_type(this); + } + } + + +} + + + +class Tff_type_argumentsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_type_arguments; + } + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + tff_type_arguments() { + return this.getTypedRuleContext(Tff_type_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_type_arguments(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_type_arguments(this); + } + } + + +} + + + +class Tff_mapping_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_mapping_type; + } + + tff_unitary_type() { + return this.getTypedRuleContext(Tff_unitary_typeContext,0); + }; + + Arrow() { + return this.getToken(TPTPParser.Arrow, 0); + }; + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_mapping_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_mapping_type(this); + } + } + + +} + + + +class Tff_xprod_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_xprod_type; + } + + tff_unitary_type() { + return this.getTypedRuleContext(Tff_unitary_typeContext,0); + }; + + Star() { + return this.getToken(TPTPParser.Star, 0); + }; + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + tff_xprod_type() { + return this.getTypedRuleContext(Tff_xprod_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_xprod_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_xprod_type(this); + } + } + + +} + + + +class Txf_tuple_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_tuple_type; + } + + tff_type_list() { + return this.getTypedRuleContext(Tff_type_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_tuple_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_tuple_type(this); + } + } + + +} + + + +class Tff_type_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_type_list; + } + + tff_top_level_type() { + return this.getTypedRuleContext(Tff_top_level_typeContext,0); + }; + + tff_type_list() { + return this.getTypedRuleContext(Tff_type_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_type_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_type_list(this); + } + } + + +} + + + +class Tff_subtypeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_subtype; + } + + atomic_type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Atomic_typeContext); + } else { + return this.getTypedRuleContext(Atomic_typeContext,i); + } + }; + + subtype_sign() { + return this.getTypedRuleContext(Subtype_signContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_subtype(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_subtype(this); + } + } + + +} + + + +class Txf_definitionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_definition; + } + + tff_atomic_formula() { + return this.getTypedRuleContext(Tff_atomic_formulaContext,0); + }; + + identical() { + return this.getTypedRuleContext(IdenticalContext,0); + }; + + tff_term() { + return this.getTypedRuleContext(Tff_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_definition(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_definition(this); + } + } + + +} + + + +class Txf_sequentContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_sequent; + } + + txf_tuple = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Txf_tupleContext); + } else { + return this.getTypedRuleContext(Txf_tupleContext,i); + } + }; + + gentzen_arrow() { + return this.getTypedRuleContext(Gentzen_arrowContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_sequent(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_sequent(this); + } + } + + +} + + + +class Nhf_long_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nhf_long_connective; + } + + ntf_connective_name() { + return this.getTypedRuleContext(Ntf_connective_nameContext,0); + }; + + nhf_parameter_list() { + return this.getTypedRuleContext(Nhf_parameter_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNhf_long_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNhf_long_connective(this); + } + } + + +} + + + +class Nhf_parameter_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nhf_parameter_list; + } + + nhf_parameter() { + return this.getTypedRuleContext(Nhf_parameterContext,0); + }; + + nhf_parameter_list() { + return this.getTypedRuleContext(Nhf_parameter_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNhf_parameter_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNhf_parameter_list(this); + } + } + + +} + + + +class Nhf_parameterContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nhf_parameter; + } + + ntf_index() { + return this.getTypedRuleContext(Ntf_indexContext,0); + }; + + nhf_key_pair() { + return this.getTypedRuleContext(Nhf_key_pairContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNhf_parameter(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNhf_parameter(this); + } + } + + +} + + + +class Nhf_key_pairContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nhf_key_pair; + } + + thf_definition() { + return this.getTypedRuleContext(Thf_definitionContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNhf_key_pair(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNhf_key_pair(this); + } + } + + +} + + + +class Nxf_long_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nxf_long_connective; + } + + ntf_connective_name() { + return this.getTypedRuleContext(Ntf_connective_nameContext,0); + }; + + nxf_parameter_list() { + return this.getTypedRuleContext(Nxf_parameter_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNxf_long_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNxf_long_connective(this); + } + } + + +} + + + +class Nxf_parameter_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nxf_parameter_list; + } + + nxf_parameter() { + return this.getTypedRuleContext(Nxf_parameterContext,0); + }; + + nxf_parameter_list() { + return this.getTypedRuleContext(Nxf_parameter_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNxf_parameter_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNxf_parameter_list(this); + } + } + + +} + + + +class Nxf_parameterContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nxf_parameter; + } + + ntf_index() { + return this.getTypedRuleContext(Ntf_indexContext,0); + }; + + nxf_key_pair() { + return this.getTypedRuleContext(Nxf_key_pairContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNxf_parameter(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNxf_parameter(this); + } + } + + +} + + + +class Nxf_key_pairContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nxf_key_pair; + } + + txf_definition() { + return this.getTypedRuleContext(Txf_definitionContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNxf_key_pair(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNxf_key_pair(this); + } + } + + +} + + + +class Ntf_connective_nameContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_ntf_connective_name; + } + + ntf_defined_connective() { + return this.getTypedRuleContext(Ntf_defined_connectiveContext,0); + }; + + atomic_system_word() { + return this.getTypedRuleContext(Atomic_system_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNtf_connective_name(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNtf_connective_name(this); + } + } + + +} + + + +class Ntf_defined_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_ntf_defined_connective; + } + + atomic_defined_word() { + return this.getTypedRuleContext(Atomic_defined_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNtf_defined_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNtf_defined_connective(this); + } + } + + +} + + + +class Ntf_indexContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_ntf_index; + } + + Hash() { + return this.getToken(TPTPParser.Hash, 0); + }; + + tff_unitary_term() { + return this.getTypedRuleContext(Tff_unitary_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNtf_index(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNtf_index(this); + } + } + + +} + + + +class Ntf_short_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_ntf_short_connective; + } + + Less_sign() { + return this.getToken(TPTPParser.Less_sign, 0); + }; + + Arrow() { + return this.getToken(TPTPParser.Arrow, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNtf_short_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNtf_short_connective(this); + } + } + + +} + + + +class Tcf_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tcf_formula; + } + + tcf_logic_formula() { + return this.getTypedRuleContext(Tcf_logic_formulaContext,0); + }; + + tff_atom_typing() { + return this.getTypedRuleContext(Tff_atom_typingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTcf_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTcf_formula(this); + } + } + + +} + + + +class Tcf_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tcf_logic_formula; + } + + tcf_quantified_formula() { + return this.getTypedRuleContext(Tcf_quantified_formulaContext,0); + }; + + cnf_formula() { + return this.getTypedRuleContext(Cnf_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTcf_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTcf_logic_formula(this); + } + } + + +} + + + +class Tcf_quantified_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tcf_quantified_formula; + } + + tff_variable_list() { + return this.getTypedRuleContext(Tff_variable_listContext,0); + }; + + tcf_logic_formula() { + return this.getTypedRuleContext(Tcf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTcf_quantified_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTcf_quantified_formula(this); + } + } + + +} + + + +class Fof_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_formula; + } + + fof_logic_formula() { + return this.getTypedRuleContext(Fof_logic_formulaContext,0); + }; + + fof_sequent() { + return this.getTypedRuleContext(Fof_sequentContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_formula(this); + } + } + + +} + + + +class Fof_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_logic_formula; + } + + fof_binary_formula() { + return this.getTypedRuleContext(Fof_binary_formulaContext,0); + }; + + fof_unary_formula() { + return this.getTypedRuleContext(Fof_unary_formulaContext,0); + }; + + fof_unitary_formula() { + return this.getTypedRuleContext(Fof_unitary_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_logic_formula(this); + } + } + + +} + + + +class Fof_binary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_binary_formula; + } + + fof_binary_pair() { + return this.getTypedRuleContext(Fof_binary_pairContext,0); + }; + + fof_binary_list() { + return this.getTypedRuleContext(Fof_binary_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_binary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_binary_formula(this); + } + } + + +} + + + +class Fof_binary_pairContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_binary_pair; + } + + fof_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_unit_formulaContext); + } else { + return this.getTypedRuleContext(Fof_unit_formulaContext,i); + } + }; + + nonassoc_connective() { + return this.getTypedRuleContext(Nonassoc_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_binary_pair(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_binary_pair(this); + } + } + + +} + + + +class Fof_binary_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_binary_list; + } + + fof_or_formula() { + return this.getTypedRuleContext(Fof_or_formulaContext,0); + }; + + fof_and_formula() { + return this.getTypedRuleContext(Fof_and_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_binary_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_binary_list(this); + } + } + + +} + + + +class Fof_or_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_or_formula; + } + + fof_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_unit_formulaContext); + } else { + return this.getTypedRuleContext(Fof_unit_formulaContext,i); + } + }; + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + fof_or_formula() { + return this.getTypedRuleContext(Fof_or_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_or_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_or_formula(this); + } + } + + +} + + + +class Fof_and_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_and_formula; + } + + fof_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_unit_formulaContext); + } else { + return this.getTypedRuleContext(Fof_unit_formulaContext,i); + } + }; + + fof_and_formula() { + return this.getTypedRuleContext(Fof_and_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_and_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_and_formula(this); + } + } + + +} + + + +class Fof_unary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_unary_formula; + } + + unary_connective() { + return this.getTypedRuleContext(Unary_connectiveContext,0); + }; + + fof_unit_formula() { + return this.getTypedRuleContext(Fof_unit_formulaContext,0); + }; + + fof_infix_unary() { + return this.getTypedRuleContext(Fof_infix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_unary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_unary_formula(this); + } + } + + +} + + + +class Fof_infix_unaryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_infix_unary; + } + + fof_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_termContext); + } else { + return this.getTypedRuleContext(Fof_termContext,i); + } + }; + + infix_inequality() { + return this.getTypedRuleContext(Infix_inequalityContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_infix_unary(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_infix_unary(this); + } + } + + +} + + + +class Fof_unit_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_unit_formula; + } + + fof_unitary_formula() { + return this.getTypedRuleContext(Fof_unitary_formulaContext,0); + }; + + fof_unary_formula() { + return this.getTypedRuleContext(Fof_unary_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_unit_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_unit_formula(this); + } + } + + +} + + + +class Fof_unitary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_unitary_formula; + } + + fof_quantified_formula() { + return this.getTypedRuleContext(Fof_quantified_formulaContext,0); + }; + + fof_atomic_formula() { + return this.getTypedRuleContext(Fof_atomic_formulaContext,0); + }; + + fof_logic_formula() { + return this.getTypedRuleContext(Fof_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_unitary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_unitary_formula(this); + } + } + + +} + + + +class Fof_quantified_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_quantified_formula; + } + + fof_quantifier() { + return this.getTypedRuleContext(Fof_quantifierContext,0); + }; + + fof_variable_list() { + return this.getTypedRuleContext(Fof_variable_listContext,0); + }; + + fof_unit_formula() { + return this.getTypedRuleContext(Fof_unit_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_quantified_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_quantified_formula(this); + } + } + + +} + + + +class Fof_variable_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_variable_list; + } + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + fof_variable_list() { + return this.getTypedRuleContext(Fof_variable_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_variable_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_variable_list(this); + } + } + + +} + + + +class Fof_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_atomic_formula; + } + + fof_plain_atomic_formula() { + return this.getTypedRuleContext(Fof_plain_atomic_formulaContext,0); + }; + + fof_defined_atomic_formula() { + return this.getTypedRuleContext(Fof_defined_atomic_formulaContext,0); + }; + + fof_system_atomic_formula() { + return this.getTypedRuleContext(Fof_system_atomic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_atomic_formula(this); + } + } + + +} + + + +class Fof_plain_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_plain_atomic_formula; + } + + fof_plain_term() { + return this.getTypedRuleContext(Fof_plain_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_plain_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_plain_atomic_formula(this); + } + } + + +} + + + +class Fof_defined_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_atomic_formula; + } + + fof_defined_plain_formula() { + return this.getTypedRuleContext(Fof_defined_plain_formulaContext,0); + }; + + fof_defined_infix_formula() { + return this.getTypedRuleContext(Fof_defined_infix_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_atomic_formula(this); + } + } + + +} + + + +class Fof_defined_plain_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_plain_formula; + } + + fof_defined_plain_term() { + return this.getTypedRuleContext(Fof_defined_plain_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_plain_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_plain_formula(this); + } + } + + +} + + + +class Fof_defined_infix_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_infix_formula; + } + + fof_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_termContext); + } else { + return this.getTypedRuleContext(Fof_termContext,i); + } + }; + + defined_infix_pred() { + return this.getTypedRuleContext(Defined_infix_predContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_infix_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_infix_formula(this); + } + } + + +} + + + +class Fof_system_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_system_atomic_formula; + } + + fof_system_term() { + return this.getTypedRuleContext(Fof_system_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_system_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_system_atomic_formula(this); + } + } + + +} + + + +class Fof_plain_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_plain_term; + } + + constant() { + return this.getTypedRuleContext(ConstantContext,0); + }; + + functor() { + return this.getTypedRuleContext(FunctorContext,0); + }; + + fof_arguments() { + return this.getTypedRuleContext(Fof_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_plain_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_plain_term(this); + } + } + + +} + + + +class Fof_defined_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_term; + } + + defined_term() { + return this.getTypedRuleContext(Defined_termContext,0); + }; + + fof_defined_atomic_term() { + return this.getTypedRuleContext(Fof_defined_atomic_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_term(this); + } + } + + +} + + + +class Fof_defined_atomic_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_atomic_term; + } + + fof_defined_plain_term() { + return this.getTypedRuleContext(Fof_defined_plain_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_atomic_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_atomic_term(this); + } + } + + +} + + + +class Fof_defined_plain_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_plain_term; + } + + defined_constant() { + return this.getTypedRuleContext(Defined_constantContext,0); + }; + + defined_functor() { + return this.getTypedRuleContext(Defined_functorContext,0); + }; + + fof_arguments() { + return this.getTypedRuleContext(Fof_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_plain_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_plain_term(this); + } + } + + +} + + + +class Fof_system_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_system_term; + } + + system_constant() { + return this.getTypedRuleContext(System_constantContext,0); + }; + + system_functor() { + return this.getTypedRuleContext(System_functorContext,0); + }; + + fof_arguments() { + return this.getTypedRuleContext(Fof_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_system_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_system_term(this); + } + } + + +} + + + +class Fof_argumentsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_arguments; + } + + fof_term() { + return this.getTypedRuleContext(Fof_termContext,0); + }; + + fof_arguments() { + return this.getTypedRuleContext(Fof_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_arguments(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_arguments(this); + } + } + + +} + + + +class Fof_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_term; + } + + fof_function_term() { + return this.getTypedRuleContext(Fof_function_termContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_term(this); + } + } + + +} + + + +class Fof_function_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_function_term; + } + + fof_plain_term() { + return this.getTypedRuleContext(Fof_plain_termContext,0); + }; + + fof_defined_term() { + return this.getTypedRuleContext(Fof_defined_termContext,0); + }; + + fof_system_term() { + return this.getTypedRuleContext(Fof_system_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_function_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_function_term(this); + } + } + + +} + + + +class Fof_sequentContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_sequent; + } + + fof_formula_tuple = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_formula_tupleContext); + } else { + return this.getTypedRuleContext(Fof_formula_tupleContext,i); + } + }; + + gentzen_arrow() { + return this.getTypedRuleContext(Gentzen_arrowContext,0); + }; + + fof_sequent() { + return this.getTypedRuleContext(Fof_sequentContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_sequent(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_sequent(this); + } + } + + +} + + + +class Fof_formula_tupleContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_formula_tuple; + } + + fof_formula_tuple_list() { + return this.getTypedRuleContext(Fof_formula_tuple_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_formula_tuple(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_formula_tuple(this); + } + } + + +} + + + +class Fof_formula_tuple_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_formula_tuple_list; + } + + fof_logic_formula() { + return this.getTypedRuleContext(Fof_logic_formulaContext,0); + }; + + comma_fof_logic_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Comma_fof_logic_formulaContext); + } else { + return this.getTypedRuleContext(Comma_fof_logic_formulaContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_formula_tuple_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_formula_tuple_list(this); + } + } + + +} + + + +class Comma_fof_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_comma_fof_logic_formula; + } + + fof_logic_formula() { + return this.getTypedRuleContext(Fof_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterComma_fof_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitComma_fof_logic_formula(this); + } + } + + +} + + + +class Cnf_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_cnf_formula; + } + + cnf_disjunction() { + return this.getTypedRuleContext(Cnf_disjunctionContext,0); + }; + + cnf_formula() { + return this.getTypedRuleContext(Cnf_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterCnf_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitCnf_formula(this); + } + } + + +} + + + +class Cnf_disjunctionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_cnf_disjunction; + } + + cnf_literal() { + return this.getTypedRuleContext(Cnf_literalContext,0); + }; + + cnf_disjunction() { + return this.getTypedRuleContext(Cnf_disjunctionContext,0); + }; + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterCnf_disjunction(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitCnf_disjunction(this); + } + } + + +} + + + +class Cnf_literalContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_cnf_literal; + } + + fof_atomic_formula() { + return this.getTypedRuleContext(Fof_atomic_formulaContext,0); + }; + + fof_infix_unary() { + return this.getTypedRuleContext(Fof_infix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterCnf_literal(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitCnf_literal(this); + } + } + + +} + + + +class Thf_quantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_quantifier; + } + + tff_quantifier() { + return this.getTypedRuleContext(Tff_quantifierContext,0); + }; + + th0_quantifier() { + return this.getTypedRuleContext(Th0_quantifierContext,0); + }; + + type_quantifier() { + return this.getTypedRuleContext(Type_quantifierContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_quantifier(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_quantifier(this); + } + } + + +} + + + +class Thf_unary_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unary_connective; + } + + unary_connective() { + return this.getTypedRuleContext(Unary_connectiveContext,0); + }; + + ntf_short_connective() { + return this.getTypedRuleContext(Ntf_short_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unary_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unary_connective(this); + } + } + + +} + + + +class Th0_quantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_th0_quantifier; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTh0_quantifier(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTh0_quantifier(this); + } + } + + +} + + + +class Type_quantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_type_quantifier; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterType_quantifier(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitType_quantifier(this); + } + } + + +} + + + +class Subtype_signContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_subtype_sign; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSubtype_sign(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSubtype_sign(this); + } + } + + +} + + + +class Tff_unary_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unary_connective; + } + + unary_connective() { + return this.getTypedRuleContext(Unary_connectiveContext,0); + }; + + ntf_short_connective() { + return this.getTypedRuleContext(Ntf_short_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unary_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unary_connective(this); + } + } + + +} + + + +class Tff_quantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_quantifier; + } + + fof_quantifier() { + return this.getTypedRuleContext(Fof_quantifierContext,0); + }; + + Hash() { + return this.getToken(TPTPParser.Hash, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_quantifier(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_quantifier(this); + } + } + + +} + + + +class Fof_quantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_quantifier; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_quantifier(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_quantifier(this); + } + } + + +} + + + +class Nonassoc_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nonassoc_connective; + } + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNonassoc_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNonassoc_connective(this); + } + } + + +} + + + +class Assoc_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_assoc_connective; + } + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAssoc_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAssoc_connective(this); + } + } + + +} + + + +class Unary_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_unary_connective; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterUnary_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitUnary_connective(this); + } + } + + +} + + + +class Gentzen_arrowContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_gentzen_arrow; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGentzen_arrow(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGentzen_arrow(this); + } + } + + +} + + + +class AssignmentContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_assignment; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAssignment(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAssignment(this); + } + } + + +} + + + +class IdenticalContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_identical; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterIdentical(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitIdentical(this); + } + } + + +} + + + +class Typeable_atomContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_typeable_atom; + } + + constant() { + return this.getTypedRuleContext(ConstantContext,0); + }; + + Distinct_object() { + return this.getToken(TPTPParser.Distinct_object, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTypeable_atom(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTypeable_atom(this); + } + } + + +} + + + +class Atomic_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_atomic_type; + } + + typeable_atom() { + return this.getTypedRuleContext(Typeable_atomContext,0); + }; + + defined_constant() { + return this.getTypedRuleContext(Defined_constantContext,0); + }; + + system_type() { + return this.getTypedRuleContext(System_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAtomic_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAtomic_type(this); + } + } + + +} + + + +class Type_constantContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_type_constant; + } + + type_functor() { + return this.getTypedRuleContext(Type_functorContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterType_constant(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitType_constant(this); + } + } + + +} + + + +class Type_functorContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_type_functor; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterType_functor(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitType_functor(this); + } + } + + +} + + + +class Defined_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_defined_type; + } + + atomic_defined_word() { + return this.getTypedRuleContext(Atomic_defined_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDefined_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDefined_type(this); + } + } + + +} + + + +class System_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_system_type; + } + + atomic_system_word() { + return this.getTypedRuleContext(Atomic_system_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSystem_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSystem_type(this); + } + } + + +} + + + +class Defined_infix_predContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_defined_infix_pred; + } + + infix_equality() { + return this.getTypedRuleContext(Infix_equalityContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDefined_infix_pred(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDefined_infix_pred(this); + } + } + + +} + + + +class Infix_equalityContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_infix_equality; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInfix_equality(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInfix_equality(this); + } + } + + +} + + + +class Infix_inequalityContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_infix_inequality; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInfix_inequality(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInfix_inequality(this); + } + } + + +} + + + +class ConstantContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_constant; + } + + functor() { + return this.getTypedRuleContext(FunctorContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterConstant(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitConstant(this); + } + } + + +} + + + +class FunctorContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_functor; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFunctor(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFunctor(this); + } + } + + +} + + + +class Defined_constantContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_defined_constant; + } + + defined_functor() { + return this.getTypedRuleContext(Defined_functorContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDefined_constant(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDefined_constant(this); + } + } + + +} + + + +class Defined_functorContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_defined_functor; + } + + atomic_defined_word() { + return this.getTypedRuleContext(Atomic_defined_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDefined_functor(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDefined_functor(this); + } + } + + +} + + + +class System_constantContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_system_constant; + } + + system_functor() { + return this.getTypedRuleContext(System_functorContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSystem_constant(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSystem_constant(this); + } + } + + +} + + + +class System_functorContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_system_functor; + } + + atomic_system_word() { + return this.getTypedRuleContext(Atomic_system_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSystem_functor(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSystem_functor(this); + } + } + + +} + + + +class Th1_defined_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_th1_defined_term; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTh1_defined_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTh1_defined_term(this); + } + } + + +} + + + +class Defined_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_defined_term; + } + + number() { + return this.getTypedRuleContext(NumberContext,0); + }; + + Distinct_object() { + return this.getToken(TPTPParser.Distinct_object, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDefined_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDefined_term(this); + } + } + + +} + + + +class VariableContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_variable; + } + + Upper_word() { + return this.getToken(TPTPParser.Upper_word, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterVariable(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitVariable(this); + } + } + + +} + + + +class SourceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_source; + } + + dag_source() { + return this.getTypedRuleContext(Dag_sourceContext,0); + }; + + internal_source() { + return this.getTypedRuleContext(Internal_sourceContext,0); + }; + + external_source() { + return this.getTypedRuleContext(External_sourceContext,0); + }; + + sources() { + return this.getTypedRuleContext(SourcesContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSource(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSource(this); + } + } + + +} + + + +class SourcesContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_sources; + } + + source() { + return this.getTypedRuleContext(SourceContext,0); + }; + + sources() { + return this.getTypedRuleContext(SourcesContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSources(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSources(this); + } + } + + +} + + + +class Dag_sourceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_dag_source; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + inference_record() { + return this.getTypedRuleContext(Inference_recordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDag_source(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDag_source(this); + } + } + + +} + + + +class Inference_recordContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_inference_record; + } + + inference_rule() { + return this.getTypedRuleContext(Inference_ruleContext,0); + }; + + useful_info() { + return this.getTypedRuleContext(Useful_infoContext,0); + }; + + parents() { + return this.getTypedRuleContext(ParentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInference_record(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInference_record(this); + } + } + + +} + + + +class Inference_ruleContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_inference_rule; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInference_rule(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInference_rule(this); + } + } + + +} + + + +class Internal_sourceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_internal_source; + } + + intro_type() { + return this.getTypedRuleContext(Intro_typeContext,0); + }; + + useful_info() { + return this.getTypedRuleContext(Useful_infoContext,0); + }; + + parents() { + return this.getTypedRuleContext(ParentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInternal_source(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInternal_source(this); + } + } + + +} + + + +class Intro_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_intro_type; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterIntro_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitIntro_type(this); + } + } + + +} + + + +class External_sourceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_external_source; + } + + file_source() { + return this.getTypedRuleContext(File_sourceContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterExternal_source(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitExternal_source(this); + } + } + + +} + + + +class File_sourceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_file_source; + } + + file_name() { + return this.getTypedRuleContext(File_nameContext,0); + }; + + file_info() { + return this.getTypedRuleContext(File_infoContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFile_source(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFile_source(this); + } + } + + +} + + + +class File_infoContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_file_info; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + nothing() { + return this.getTypedRuleContext(NothingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFile_info(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFile_info(this); + } + } + + +} + + + +class ParentsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_parents; + } + + parent_list() { + return this.getTypedRuleContext(Parent_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterParents(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitParents(this); + } + } + + +} + + + +class Parent_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_parent_list; + } + + parent_info() { + return this.getTypedRuleContext(Parent_infoContext,0); + }; + + comma_parent_info = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Comma_parent_infoContext); + } else { + return this.getTypedRuleContext(Comma_parent_infoContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterParent_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitParent_list(this); + } + } + + +} + + + +class Comma_parent_infoContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_comma_parent_info; + } + + parent_info() { + return this.getTypedRuleContext(Parent_infoContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterComma_parent_info(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitComma_parent_info(this); + } + } + + +} + + + +class Parent_infoContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_parent_info; + } + + source() { + return this.getTypedRuleContext(SourceContext,0); + }; + + parent_details() { + return this.getTypedRuleContext(Parent_detailsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterParent_info(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitParent_info(this); + } + } + + +} + + + +class Parent_detailsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_parent_details; + } + + general_term() { + return this.getTypedRuleContext(General_termContext,0); + }; + + nothing() { + return this.getTypedRuleContext(NothingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterParent_details(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitParent_details(this); + } + } + + +} + + + +class Optional_infoContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_optional_info; + } + + useful_info() { + return this.getTypedRuleContext(Useful_infoContext,0); + }; + + nothing() { + return this.getTypedRuleContext(NothingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterOptional_info(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitOptional_info(this); + } + } + + +} + + + +class Useful_infoContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_useful_info; + } + + general_list() { + return this.getTypedRuleContext(General_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterUseful_info(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitUseful_info(this); + } + } + + +} + + + +class IncludeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_include; + } + + file_name() { + return this.getTypedRuleContext(File_nameContext,0); + }; + + include_optionals() { + return this.getTypedRuleContext(Include_optionalsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInclude(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInclude(this); + } + } + + +} + + + +class Include_optionalsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_include_optionals; + } + + nothing() { + return this.getTypedRuleContext(NothingContext,0); + }; + + formula_selection() { + return this.getTypedRuleContext(Formula_selectionContext,0); + }; + + space_name() { + return this.getTypedRuleContext(Space_nameContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInclude_optionals(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInclude_optionals(this); + } + } + + +} + + + +class Formula_selectionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_formula_selection; + } + + name_list() { + return this.getTypedRuleContext(Name_listContext,0); + }; + + Star() { + return this.getToken(TPTPParser.Star, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFormula_selection(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFormula_selection(this); + } + } + + +} + + + +class Name_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_name_list; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + name_list() { + return this.getTypedRuleContext(Name_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterName_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitName_list(this); + } + } + + +} + + + +class Space_nameContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_space_name; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSpace_name(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSpace_name(this); + } + } + + +} + + + +class General_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_general_term; + } + + general_data() { + return this.getTypedRuleContext(General_dataContext,0); + }; + + general_term() { + return this.getTypedRuleContext(General_termContext,0); + }; + + general_list() { + return this.getTypedRuleContext(General_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGeneral_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGeneral_term(this); + } + } + + +} + + + +class General_dataContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_general_data; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + general_function() { + return this.getTypedRuleContext(General_functionContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + number() { + return this.getTypedRuleContext(NumberContext,0); + }; + + Distinct_object() { + return this.getToken(TPTPParser.Distinct_object, 0); + }; + + formula_data() { + return this.getTypedRuleContext(Formula_dataContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGeneral_data(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGeneral_data(this); + } + } + + +} + + + +class General_functionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_general_function; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + general_terms() { + return this.getTypedRuleContext(General_termsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGeneral_function(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGeneral_function(this); + } + } + + +} + + + +class Formula_dataContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_formula_data; + } + + thf_formula() { + return this.getTypedRuleContext(Thf_formulaContext,0); + }; + + tff_formula() { + return this.getTypedRuleContext(Tff_formulaContext,0); + }; + + fof_formula() { + return this.getTypedRuleContext(Fof_formulaContext,0); + }; + + cnf_formula() { + return this.getTypedRuleContext(Cnf_formulaContext,0); + }; + + fof_term() { + return this.getTypedRuleContext(Fof_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFormula_data(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFormula_data(this); + } + } + + +} + + + +class General_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_general_list; + } + + general_terms() { + return this.getTypedRuleContext(General_termsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGeneral_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGeneral_list(this); + } + } + + +} + + + +class General_termsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_general_terms; + } + + general_term() { + return this.getTypedRuleContext(General_termContext,0); + }; + + comma_general_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Comma_general_termContext); + } else { + return this.getTypedRuleContext(Comma_general_termContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGeneral_terms(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGeneral_terms(this); + } + } + + +} + + + +class Comma_general_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_comma_general_term; + } + + general_term() { + return this.getTypedRuleContext(General_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterComma_general_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitComma_general_term(this); + } + } + + +} + + + +class NameContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_name; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + Integer() { + return this.getToken(TPTPParser.Integer, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterName(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitName(this); + } + } + + +} + + + +class Atomic_wordContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_atomic_word; + } + + lower_word_token() { + return this.getTypedRuleContext(Lower_word_tokenContext,0); + }; + + Single_quoted() { + return this.getToken(TPTPParser.Single_quoted, 0); + }; + + Back_quoted() { + return this.getToken(TPTPParser.Back_quoted, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAtomic_word(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAtomic_word(this); + } + } + + +} + + + +class Atomic_defined_wordContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_atomic_defined_word; + } + + Dollar_word() { + return this.getToken(TPTPParser.Dollar_word, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAtomic_defined_word(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAtomic_defined_word(this); + } + } + + +} + + + +class Atomic_system_wordContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_atomic_system_word; + } + + Dollar_dollar_word() { + return this.getToken(TPTPParser.Dollar_dollar_word, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAtomic_system_word(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAtomic_system_word(this); + } + } + + +} + + + +class NumberContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_number; + } + + Integer() { + return this.getToken(TPTPParser.Integer, 0); + }; + + Rational() { + return this.getToken(TPTPParser.Rational, 0); + }; + + Real() { + return this.getToken(TPTPParser.Real, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNumber(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNumber(this); + } + } + + +} + + + +class File_nameContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_file_name; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFile_name(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFile_name(this); + } + } + + +} + + + +class NothingContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nothing; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNothing(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNothing(this); + } + } + + +} + + + +class Lower_word_tokenContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_lower_word_token; + } + + Lower_word() { + return this.getToken(TPTPParser.Lower_word, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterLower_word_token(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitLower_word_token(this); + } + } + + +} + + + + +TPTPParser.Tptp_fileContext = Tptp_fileContext; +TPTPParser.Tptp_inputContext = Tptp_inputContext; +TPTPParser.Annotated_formulaContext = Annotated_formulaContext; +TPTPParser.Tpi_annotatedContext = Tpi_annotatedContext; +TPTPParser.Tpi_formulaContext = Tpi_formulaContext; +TPTPParser.Thf_annotatedContext = Thf_annotatedContext; +TPTPParser.Tff_annotatedContext = Tff_annotatedContext; +TPTPParser.Tcf_annotatedContext = Tcf_annotatedContext; +TPTPParser.Fof_annotatedContext = Fof_annotatedContext; +TPTPParser.Cnf_annotatedContext = Cnf_annotatedContext; +TPTPParser.AnnotationsContext = AnnotationsContext; +TPTPParser.Formula_roleContext = Formula_roleContext; +TPTPParser.Thf_formulaContext = Thf_formulaContext; +TPTPParser.Thf_logic_formulaContext = Thf_logic_formulaContext; +TPTPParser.Thf_binary_formulaContext = Thf_binary_formulaContext; +TPTPParser.Thf_binary_pairContext = Thf_binary_pairContext; +TPTPParser.Thf_binary_listContext = Thf_binary_listContext; +TPTPParser.Thf_or_formulaContext = Thf_or_formulaContext; +TPTPParser.Thf_and_formulaContext = Thf_and_formulaContext; +TPTPParser.Thf_apply_formulaContext = Thf_apply_formulaContext; +TPTPParser.Thf_unit_formulaContext = Thf_unit_formulaContext; +TPTPParser.Thf_preunit_formulaContext = Thf_preunit_formulaContext; +TPTPParser.Thf_unitary_formulaContext = Thf_unitary_formulaContext; +TPTPParser.Thf_quantified_formulaContext = Thf_quantified_formulaContext; +TPTPParser.Thf_quantificationContext = Thf_quantificationContext; +TPTPParser.Thf_variable_listContext = Thf_variable_listContext; +TPTPParser.Thf_typed_variableContext = Thf_typed_variableContext; +TPTPParser.Thf_unary_formulaContext = Thf_unary_formulaContext; +TPTPParser.Thf_prefix_unaryContext = Thf_prefix_unaryContext; +TPTPParser.Thf_infix_unaryContext = Thf_infix_unaryContext; +TPTPParser.Thf_atomic_formulaContext = Thf_atomic_formulaContext; +TPTPParser.Thf_plain_atomicContext = Thf_plain_atomicContext; +TPTPParser.Thf_defined_atomicContext = Thf_defined_atomicContext; +TPTPParser.Thf_defined_termContext = Thf_defined_termContext; +TPTPParser.Thf_defined_infixContext = Thf_defined_infixContext; +TPTPParser.Thf_system_atomicContext = Thf_system_atomicContext; +TPTPParser.Thf_letContext = Thf_letContext; +TPTPParser.Thf_let_typesContext = Thf_let_typesContext; +TPTPParser.Thf_atom_typing_listContext = Thf_atom_typing_listContext; +TPTPParser.Thf_let_defnsContext = Thf_let_defnsContext; +TPTPParser.Thf_let_defnContext = Thf_let_defnContext; +TPTPParser.Thf_let_defn_listContext = Thf_let_defn_listContext; +TPTPParser.Thf_unitary_termContext = Thf_unitary_termContext; +TPTPParser.Thf_conn_termContext = Thf_conn_termContext; +TPTPParser.Thf_tupleContext = Thf_tupleContext; +TPTPParser.Thf_fof_functionContext = Thf_fof_functionContext; +TPTPParser.Thf_argumentsContext = Thf_argumentsContext; +TPTPParser.Thf_formula_listContext = Thf_formula_listContext; +TPTPParser.Comma_thf_logic_formulaContext = Comma_thf_logic_formulaContext; +TPTPParser.Thf_atom_typingContext = Thf_atom_typingContext; +TPTPParser.Thf_top_level_typeContext = Thf_top_level_typeContext; +TPTPParser.Thf_unitary_typeContext = Thf_unitary_typeContext; +TPTPParser.Thf_apply_typeContext = Thf_apply_typeContext; +TPTPParser.Thf_binary_typeContext = Thf_binary_typeContext; +TPTPParser.Thf_mapping_typeContext = Thf_mapping_typeContext; +TPTPParser.Thf_xprod_typeContext = Thf_xprod_typeContext; +TPTPParser.Thf_union_typeContext = Thf_union_typeContext; +TPTPParser.Thf_subtypeContext = Thf_subtypeContext; +TPTPParser.Thf_definitionContext = Thf_definitionContext; +TPTPParser.Thf_sequentContext = Thf_sequentContext; +TPTPParser.Tff_formulaContext = Tff_formulaContext; +TPTPParser.Tff_logic_formulaContext = Tff_logic_formulaContext; +TPTPParser.Tff_binary_formulaContext = Tff_binary_formulaContext; +TPTPParser.Tff_binary_pairContext = Tff_binary_pairContext; +TPTPParser.Tff_binary_listContext = Tff_binary_listContext; +TPTPParser.Tff_or_formulaContext = Tff_or_formulaContext; +TPTPParser.Tff_and_formulaContext = Tff_and_formulaContext; +TPTPParser.Tff_unit_formulaContext = Tff_unit_formulaContext; +TPTPParser.Bnf2antlr_tff_formula_termContext = Bnf2antlr_tff_formula_termContext; +TPTPParser.Bnf2antlr_tff_infix_tailContext = Bnf2antlr_tff_infix_tailContext; +TPTPParser.Tff_preunit_formulaContext = Tff_preunit_formulaContext; +TPTPParser.Tff_unitary_formulaContext = Tff_unitary_formulaContext; +TPTPParser.Txf_unitary_formulaContext = Txf_unitary_formulaContext; +TPTPParser.Tff_quantified_formulaContext = Tff_quantified_formulaContext; +TPTPParser.Tff_variable_listContext = Tff_variable_listContext; +TPTPParser.Tff_variableContext = Tff_variableContext; +TPTPParser.Tff_typed_variableContext = Tff_typed_variableContext; +TPTPParser.Tff_unary_formulaContext = Tff_unary_formulaContext; +TPTPParser.Tff_prefix_unaryContext = Tff_prefix_unaryContext; +TPTPParser.Tff_infix_unaryContext = Tff_infix_unaryContext; +TPTPParser.Tff_atomic_formulaContext = Tff_atomic_formulaContext; +TPTPParser.Tff_plain_atomicContext = Tff_plain_atomicContext; +TPTPParser.Tff_defined_atomicContext = Tff_defined_atomicContext; +TPTPParser.Tff_defined_plainContext = Tff_defined_plainContext; +TPTPParser.Tff_defined_infixContext = Tff_defined_infixContext; +TPTPParser.Tff_system_atomicContext = Tff_system_atomicContext; +TPTPParser.Txf_letContext = Txf_letContext; +TPTPParser.Txf_let_typesContext = Txf_let_typesContext; +TPTPParser.Tff_atom_typing_listContext = Tff_atom_typing_listContext; +TPTPParser.Txf_let_defnsContext = Txf_let_defnsContext; +TPTPParser.Txf_let_defnContext = Txf_let_defnContext; +TPTPParser.Txf_let_lhsContext = Txf_let_lhsContext; +TPTPParser.Txf_let_defn_listContext = Txf_let_defn_listContext; +TPTPParser.Nxf_atomContext = Nxf_atomContext; +TPTPParser.Tff_termContext = Tff_termContext; +TPTPParser.Tff_unitary_termContext = Tff_unitary_termContext; +TPTPParser.Txf_tupleContext = Txf_tupleContext; +TPTPParser.Tff_argumentsContext = Tff_argumentsContext; +TPTPParser.Comma_tff_termContext = Comma_tff_termContext; +TPTPParser.Tff_atom_typingContext = Tff_atom_typingContext; +TPTPParser.Tff_top_level_typeContext = Tff_top_level_typeContext; +TPTPParser.Tff_non_atomic_typeContext = Tff_non_atomic_typeContext; +TPTPParser.Tf1_quantified_typeContext = Tf1_quantified_typeContext; +TPTPParser.Tff_monotypeContext = Tff_monotypeContext; +TPTPParser.Tff_unitary_typeContext = Tff_unitary_typeContext; +TPTPParser.Tff_atomic_typeContext = Tff_atomic_typeContext; +TPTPParser.Tff_type_argumentsContext = Tff_type_argumentsContext; +TPTPParser.Tff_mapping_typeContext = Tff_mapping_typeContext; +TPTPParser.Tff_xprod_typeContext = Tff_xprod_typeContext; +TPTPParser.Txf_tuple_typeContext = Txf_tuple_typeContext; +TPTPParser.Tff_type_listContext = Tff_type_listContext; +TPTPParser.Tff_subtypeContext = Tff_subtypeContext; +TPTPParser.Txf_definitionContext = Txf_definitionContext; +TPTPParser.Txf_sequentContext = Txf_sequentContext; +TPTPParser.Nhf_long_connectiveContext = Nhf_long_connectiveContext; +TPTPParser.Nhf_parameter_listContext = Nhf_parameter_listContext; +TPTPParser.Nhf_parameterContext = Nhf_parameterContext; +TPTPParser.Nhf_key_pairContext = Nhf_key_pairContext; +TPTPParser.Nxf_long_connectiveContext = Nxf_long_connectiveContext; +TPTPParser.Nxf_parameter_listContext = Nxf_parameter_listContext; +TPTPParser.Nxf_parameterContext = Nxf_parameterContext; +TPTPParser.Nxf_key_pairContext = Nxf_key_pairContext; +TPTPParser.Ntf_connective_nameContext = Ntf_connective_nameContext; +TPTPParser.Ntf_defined_connectiveContext = Ntf_defined_connectiveContext; +TPTPParser.Ntf_indexContext = Ntf_indexContext; +TPTPParser.Ntf_short_connectiveContext = Ntf_short_connectiveContext; +TPTPParser.Tcf_formulaContext = Tcf_formulaContext; +TPTPParser.Tcf_logic_formulaContext = Tcf_logic_formulaContext; +TPTPParser.Tcf_quantified_formulaContext = Tcf_quantified_formulaContext; +TPTPParser.Fof_formulaContext = Fof_formulaContext; +TPTPParser.Fof_logic_formulaContext = Fof_logic_formulaContext; +TPTPParser.Fof_binary_formulaContext = Fof_binary_formulaContext; +TPTPParser.Fof_binary_pairContext = Fof_binary_pairContext; +TPTPParser.Fof_binary_listContext = Fof_binary_listContext; +TPTPParser.Fof_or_formulaContext = Fof_or_formulaContext; +TPTPParser.Fof_and_formulaContext = Fof_and_formulaContext; +TPTPParser.Fof_unary_formulaContext = Fof_unary_formulaContext; +TPTPParser.Fof_infix_unaryContext = Fof_infix_unaryContext; +TPTPParser.Fof_unit_formulaContext = Fof_unit_formulaContext; +TPTPParser.Fof_unitary_formulaContext = Fof_unitary_formulaContext; +TPTPParser.Fof_quantified_formulaContext = Fof_quantified_formulaContext; +TPTPParser.Fof_variable_listContext = Fof_variable_listContext; +TPTPParser.Fof_atomic_formulaContext = Fof_atomic_formulaContext; +TPTPParser.Fof_plain_atomic_formulaContext = Fof_plain_atomic_formulaContext; +TPTPParser.Fof_defined_atomic_formulaContext = Fof_defined_atomic_formulaContext; +TPTPParser.Fof_defined_plain_formulaContext = Fof_defined_plain_formulaContext; +TPTPParser.Fof_defined_infix_formulaContext = Fof_defined_infix_formulaContext; +TPTPParser.Fof_system_atomic_formulaContext = Fof_system_atomic_formulaContext; +TPTPParser.Fof_plain_termContext = Fof_plain_termContext; +TPTPParser.Fof_defined_termContext = Fof_defined_termContext; +TPTPParser.Fof_defined_atomic_termContext = Fof_defined_atomic_termContext; +TPTPParser.Fof_defined_plain_termContext = Fof_defined_plain_termContext; +TPTPParser.Fof_system_termContext = Fof_system_termContext; +TPTPParser.Fof_argumentsContext = Fof_argumentsContext; +TPTPParser.Fof_termContext = Fof_termContext; +TPTPParser.Fof_function_termContext = Fof_function_termContext; +TPTPParser.Fof_sequentContext = Fof_sequentContext; +TPTPParser.Fof_formula_tupleContext = Fof_formula_tupleContext; +TPTPParser.Fof_formula_tuple_listContext = Fof_formula_tuple_listContext; +TPTPParser.Comma_fof_logic_formulaContext = Comma_fof_logic_formulaContext; +TPTPParser.Cnf_formulaContext = Cnf_formulaContext; +TPTPParser.Cnf_disjunctionContext = Cnf_disjunctionContext; +TPTPParser.Cnf_literalContext = Cnf_literalContext; +TPTPParser.Thf_quantifierContext = Thf_quantifierContext; +TPTPParser.Thf_unary_connectiveContext = Thf_unary_connectiveContext; +TPTPParser.Th0_quantifierContext = Th0_quantifierContext; +TPTPParser.Type_quantifierContext = Type_quantifierContext; +TPTPParser.Subtype_signContext = Subtype_signContext; +TPTPParser.Tff_unary_connectiveContext = Tff_unary_connectiveContext; +TPTPParser.Tff_quantifierContext = Tff_quantifierContext; +TPTPParser.Fof_quantifierContext = Fof_quantifierContext; +TPTPParser.Nonassoc_connectiveContext = Nonassoc_connectiveContext; +TPTPParser.Assoc_connectiveContext = Assoc_connectiveContext; +TPTPParser.Unary_connectiveContext = Unary_connectiveContext; +TPTPParser.Gentzen_arrowContext = Gentzen_arrowContext; +TPTPParser.AssignmentContext = AssignmentContext; +TPTPParser.IdenticalContext = IdenticalContext; +TPTPParser.Typeable_atomContext = Typeable_atomContext; +TPTPParser.Atomic_typeContext = Atomic_typeContext; +TPTPParser.Type_constantContext = Type_constantContext; +TPTPParser.Type_functorContext = Type_functorContext; +TPTPParser.Defined_typeContext = Defined_typeContext; +TPTPParser.System_typeContext = System_typeContext; +TPTPParser.Defined_infix_predContext = Defined_infix_predContext; +TPTPParser.Infix_equalityContext = Infix_equalityContext; +TPTPParser.Infix_inequalityContext = Infix_inequalityContext; +TPTPParser.ConstantContext = ConstantContext; +TPTPParser.FunctorContext = FunctorContext; +TPTPParser.Defined_constantContext = Defined_constantContext; +TPTPParser.Defined_functorContext = Defined_functorContext; +TPTPParser.System_constantContext = System_constantContext; +TPTPParser.System_functorContext = System_functorContext; +TPTPParser.Th1_defined_termContext = Th1_defined_termContext; +TPTPParser.Defined_termContext = Defined_termContext; +TPTPParser.VariableContext = VariableContext; +TPTPParser.SourceContext = SourceContext; +TPTPParser.SourcesContext = SourcesContext; +TPTPParser.Dag_sourceContext = Dag_sourceContext; +TPTPParser.Inference_recordContext = Inference_recordContext; +TPTPParser.Inference_ruleContext = Inference_ruleContext; +TPTPParser.Internal_sourceContext = Internal_sourceContext; +TPTPParser.Intro_typeContext = Intro_typeContext; +TPTPParser.External_sourceContext = External_sourceContext; +TPTPParser.File_sourceContext = File_sourceContext; +TPTPParser.File_infoContext = File_infoContext; +TPTPParser.ParentsContext = ParentsContext; +TPTPParser.Parent_listContext = Parent_listContext; +TPTPParser.Comma_parent_infoContext = Comma_parent_infoContext; +TPTPParser.Parent_infoContext = Parent_infoContext; +TPTPParser.Parent_detailsContext = Parent_detailsContext; +TPTPParser.Optional_infoContext = Optional_infoContext; +TPTPParser.Useful_infoContext = Useful_infoContext; +TPTPParser.IncludeContext = IncludeContext; +TPTPParser.Include_optionalsContext = Include_optionalsContext; +TPTPParser.Formula_selectionContext = Formula_selectionContext; +TPTPParser.Name_listContext = Name_listContext; +TPTPParser.Space_nameContext = Space_nameContext; +TPTPParser.General_termContext = General_termContext; +TPTPParser.General_dataContext = General_dataContext; +TPTPParser.General_functionContext = General_functionContext; +TPTPParser.Formula_dataContext = Formula_dataContext; +TPTPParser.General_listContext = General_listContext; +TPTPParser.General_termsContext = General_termsContext; +TPTPParser.Comma_general_termContext = Comma_general_termContext; +TPTPParser.NameContext = NameContext; +TPTPParser.Atomic_wordContext = Atomic_wordContext; +TPTPParser.Atomic_defined_wordContext = Atomic_defined_wordContext; +TPTPParser.Atomic_system_wordContext = Atomic_system_wordContext; +TPTPParser.NumberContext = NumberContext; +TPTPParser.File_nameContext = File_nameContext; +TPTPParser.NothingContext = NothingContext; +TPTPParser.Lower_word_tokenContext = Lower_word_tokenContext; diff --git a/tptplus/server/parser/vendor/tptp-antlr/original/TPTP.g4 b/tptplus/server/parser/vendor/tptp-antlr/original/TPTP.g4 new file mode 100644 index 0000000..b50c1c1 --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/original/TPTP.g4 @@ -0,0 +1,1454 @@ +grammar TPTP; + +// Generated from SyntaxBNF-v10.0.0.1 using BNFMetaParser.g4. +// ::= rules become parser rules; :== restrictions become comments; +// ::- rules become tokens; ::: rules become lexer fragments unless +// referenced directly by a parser rule. + +tptp_file + : tptp_input* EOF + ; + +tptp_input + : annotated_formula + | include + ; + +annotated_formula + : thf_annotated + | tff_annotated + | tcf_annotated + | fof_annotated + | cnf_annotated + | tpi_annotated + ; + +tpi_annotated + : 'tpi' '(' name ',' formula_role ',' tpi_formula annotations ')' '.' + ; + +tpi_formula + : fof_formula + ; + +thf_annotated + : 'thf' '(' name ',' formula_role ',' thf_formula annotations ')' '.' + ; + +tff_annotated + : 'tff' '(' name ',' formula_role ',' tff_formula annotations ')' '.' + ; + +tcf_annotated + : 'tcf' '(' name ',' formula_role ',' tcf_formula annotations ')' '.' + ; + +fof_annotated + : 'fof' '(' name ',' formula_role ',' fof_formula annotations ')' '.' + ; + +cnf_annotated + : 'cnf' '(' name ',' formula_role ',' cnf_formula annotations ')' '.' + ; + +annotations + : ',' source optional_info + | nothing + ; + +formula_role + : lower_word_token + | lower_word_token '-' general_term + ; + +thf_formula + : thf_logic_formula + | thf_atom_typing + | thf_subtype + ; + +thf_logic_formula + : thf_unitary_formula + | thf_unary_formula + | thf_binary_formula + | thf_defined_infix + | thf_definition + | thf_sequent + ; + +thf_binary_formula + : thf_binary_pair + | thf_binary_list + | thf_binary_type + ; + +thf_binary_pair + : thf_unit_formula nonassoc_connective thf_unit_formula + ; + +thf_binary_list + : thf_or_formula + | thf_and_formula + | thf_apply_formula + ; + +thf_or_formula + : thf_unit_formula Vline thf_unit_formula + | thf_or_formula Vline thf_unit_formula + ; + +thf_and_formula + : thf_unit_formula '&' thf_unit_formula + | thf_and_formula '&' thf_unit_formula + ; + +thf_apply_formula + : thf_unit_formula '@' thf_unit_formula + | thf_apply_formula '@' thf_unit_formula + ; + +thf_unit_formula + : thf_unitary_formula + | thf_unary_formula + | thf_defined_infix + ; + +thf_preunit_formula + : thf_unitary_formula + | thf_prefix_unary + ; + +thf_unitary_formula + : thf_quantified_formula + | thf_atomic_formula + | variable + | '(' thf_logic_formula ')' + ; + +thf_quantified_formula + : thf_quantification thf_unit_formula + ; + +thf_quantification + : thf_quantifier '[' thf_variable_list ']' ':' + ; + +thf_variable_list + : thf_typed_variable + | thf_typed_variable ',' thf_variable_list + ; + +thf_typed_variable + : variable ':' thf_top_level_type + ; + +thf_unary_formula + : thf_prefix_unary + | thf_infix_unary + ; + +thf_prefix_unary + : thf_unary_connective thf_preunit_formula + ; + +thf_infix_unary + : thf_unitary_term infix_inequality thf_unitary_term + ; + +thf_atomic_formula + : thf_plain_atomic + | thf_defined_atomic + | thf_system_atomic + | thf_fof_function + ; + +thf_plain_atomic + : constant + | thf_tuple + ; + +thf_defined_atomic + : defined_constant + | thf_defined_term + | '(' thf_conn_term ')' + | nhf_long_connective + | thf_let + ; + +thf_defined_term + : defined_term + | th1_defined_term + ; + +thf_defined_infix + : thf_unitary_term defined_infix_pred thf_unitary_term + ; + +thf_system_atomic + : system_constant + ; + +thf_let + : '$let' '(' thf_let_types ',' thf_let_defns ',' thf_logic_formula ')' + ; + +thf_let_types + : thf_atom_typing + | '[' thf_atom_typing_list ']' + ; + +thf_atom_typing_list + : thf_atom_typing + | thf_atom_typing ',' thf_atom_typing_list + ; + +thf_let_defns + : thf_let_defn + | '[' thf_let_defn_list ']' + ; + +thf_let_defn + : thf_logic_formula assignment thf_logic_formula + ; + +thf_let_defn_list + : thf_let_defn + | thf_let_defn ',' thf_let_defn_list + ; + +thf_unitary_term + : thf_atomic_formula + | variable + | '(' thf_logic_formula ')' + ; + +thf_conn_term + : nonassoc_connective + | assoc_connective + | infix_equality + | infix_inequality + | thf_unary_connective + ; + +thf_tuple + : '[' ']' + | '[' thf_formula_list ']' + ; + +thf_fof_function + : defined_functor '(' thf_arguments ')' + | system_functor '(' thf_arguments ')' + | functor '(' thf_arguments ')' + ; + +thf_arguments + : thf_formula_list + ; + +thf_formula_list + : thf_logic_formula comma_thf_logic_formula* + ; + +comma_thf_logic_formula + : ',' thf_logic_formula + ; + +thf_atom_typing + : typeable_atom ':' thf_top_level_type + | '(' thf_atom_typing ')' + ; + +thf_top_level_type + : thf_unitary_type + | thf_mapping_type + | thf_apply_type + ; + +thf_unitary_type + : thf_unitary_formula + ; + +thf_apply_type + : thf_apply_formula + ; + +thf_binary_type + : thf_mapping_type + | thf_xprod_type + | thf_union_type + ; + +thf_mapping_type + : thf_unitary_type Arrow thf_unitary_type + | thf_unitary_type Arrow thf_mapping_type + ; + +thf_xprod_type + : thf_unitary_type Star thf_unitary_type + | thf_xprod_type Star thf_unitary_type + ; + +thf_union_type + : thf_unitary_type Plus thf_unitary_type + | thf_union_type Plus thf_unitary_type + ; + +thf_subtype + : atomic_type subtype_sign atomic_type + ; + +thf_definition + : thf_atomic_formula identical thf_logic_formula + ; + +thf_sequent + : thf_tuple gentzen_arrow thf_tuple + ; + +tff_formula + : tff_logic_formula + | tff_atom_typing + | tff_subtype + ; + +tff_logic_formula + : tff_unitary_formula + | tff_unary_formula + | tff_binary_formula + | tff_defined_infix + | txf_definition + | txf_sequent + ; + +tff_binary_formula + : tff_binary_pair + | tff_binary_list + ; + +tff_binary_pair + : tff_unit_formula nonassoc_connective tff_unit_formula + ; + +tff_binary_list + : tff_or_formula + | tff_and_formula + ; + +tff_or_formula + : tff_unit_formula Vline tff_unit_formula + | tff_or_formula Vline tff_unit_formula + ; + +tff_and_formula + : tff_unit_formula '&' tff_unit_formula + | tff_and_formula '&' tff_unit_formula + ; + +tff_unit_formula + : tff_unitary_formula + | tff_unary_formula + | tff_defined_infix + ; + +tff_preunit_formula + : tff_unitary_formula + | tff_prefix_unary + ; + +tff_unitary_formula + : tff_quantified_formula + | tff_atomic_formula + | txf_unitary_formula + | '(' tff_logic_formula ')' + ; + +txf_unitary_formula + : variable + ; + +tff_quantified_formula + : tff_quantifier '[' tff_variable_list ']' ':' tff_unit_formula + ; + +tff_variable_list + : tff_variable + | tff_variable ',' tff_variable_list + ; + +tff_variable + : tff_typed_variable + | variable + ; + +tff_typed_variable + : variable ':' tff_atomic_type + ; + +tff_unary_formula + : tff_prefix_unary + | tff_infix_unary + ; + +tff_prefix_unary + : tff_unary_connective tff_preunit_formula + ; + +tff_infix_unary + : tff_unitary_term infix_inequality tff_unitary_term + ; + +tff_atomic_formula + : tff_plain_atomic + | tff_defined_atomic + | tff_system_atomic + ; + +tff_plain_atomic + : constant + | functor '(' tff_arguments ')' + ; + +tff_defined_atomic + : tff_defined_plain + ; + +tff_defined_plain + : defined_constant + | defined_functor '(' tff_arguments ')' + | nxf_atom + | txf_let + ; + +tff_defined_infix + : tff_unitary_term defined_infix_pred tff_unitary_term + ; + +tff_system_atomic + : system_constant + | system_functor '(' tff_arguments ')' + ; + +txf_let + : '$let' '(' txf_let_types ',' txf_let_defns ',' tff_term ')' + ; + +txf_let_types + : tff_atom_typing + | '[' tff_atom_typing_list ']' + ; + +tff_atom_typing_list + : tff_atom_typing + | tff_atom_typing ',' tff_atom_typing_list + ; + +txf_let_defns + : txf_let_defn + | '[' txf_let_defn_list ']' + ; + +txf_let_defn + : txf_let_lhs assignment tff_term + ; + +txf_let_lhs + : tff_plain_atomic + | txf_tuple + ; + +txf_let_defn_list + : txf_let_defn + | txf_let_defn ',' txf_let_defn_list + ; + +nxf_atom + : nxf_long_connective '@' '(' tff_arguments ')' + ; + +tff_term + : tff_logic_formula + | defined_term + | txf_tuple + ; + +tff_unitary_term + : tff_atomic_formula + | defined_term + | txf_tuple + | variable + | '(' tff_logic_formula ')' + ; + +txf_tuple + : '[' ']' + | '[' tff_arguments ']' + ; + +tff_arguments + : tff_term comma_tff_term* + ; + +comma_tff_term + : ',' tff_term + ; + +tff_atom_typing + : typeable_atom ':' tff_top_level_type + | '(' tff_atom_typing ')' + ; + +tff_top_level_type + : tff_atomic_type + | tff_non_atomic_type + ; + +tff_non_atomic_type + : tff_mapping_type + | tf1_quantified_type + | '(' tff_non_atomic_type ')' + ; + +tf1_quantified_type + : type_quantifier '[' tff_variable_list ']' ':' tff_monotype + ; + +tff_monotype + : tff_atomic_type + | '(' tff_mapping_type ')' + | tf1_quantified_type + ; + +tff_unitary_type + : tff_atomic_type + | '(' tff_xprod_type ')' + ; + +tff_atomic_type + : type_constant + | defined_type + | variable + | type_functor '(' tff_type_arguments ')' + | '(' tff_atomic_type ')' + | txf_tuple_type + ; + +tff_type_arguments + : tff_atomic_type + | tff_atomic_type ',' tff_type_arguments + ; + +tff_mapping_type + : tff_unitary_type Arrow tff_atomic_type + ; + +tff_xprod_type + : tff_unitary_type Star tff_atomic_type + | tff_xprod_type Star tff_atomic_type + ; + +txf_tuple_type + : '[' tff_type_list ']' + ; + +tff_type_list + : tff_top_level_type + | tff_top_level_type ',' tff_type_list + ; + +tff_subtype + : atomic_type subtype_sign atomic_type + ; + +txf_definition + : tff_atomic_formula identical tff_term + ; + +txf_sequent + : txf_tuple gentzen_arrow txf_tuple + ; + +nhf_long_connective + : '{' ntf_connective_name '}' + | '{' ntf_connective_name '(' nhf_parameter_list ')' '}' + ; + +nhf_parameter_list + : nhf_parameter + | nhf_parameter ',' nhf_parameter_list + ; + +nhf_parameter + : ntf_index + | nhf_key_pair + ; + +nhf_key_pair + : thf_definition + ; + +nxf_long_connective + : '{' ntf_connective_name '}' + | '{' ntf_connective_name '(' nxf_parameter_list ')' '}' + ; + +nxf_parameter_list + : nxf_parameter + | nxf_parameter ',' nxf_parameter_list + ; + +nxf_parameter + : ntf_index + | nxf_key_pair + ; + +nxf_key_pair + : txf_definition + ; + +ntf_connective_name + : ntf_defined_connective + | atomic_system_word + ; + +ntf_defined_connective + : atomic_defined_word + ; + +ntf_index + : Hash tff_unitary_term + ; + +ntf_short_connective + : '[' '.' ']' + | Less_sign '.' Arrow + | '{' '.' '}' + | '(' '.' ')' + ; + +tcf_formula + : tcf_logic_formula + | tff_atom_typing + ; + +tcf_logic_formula + : tcf_quantified_formula + | cnf_formula + ; + +tcf_quantified_formula + : '!' '[' tff_variable_list ']' ':' tcf_logic_formula + ; + +fof_formula + : fof_logic_formula + | fof_sequent + ; + +fof_logic_formula + : fof_binary_formula + | fof_unary_formula + | fof_unitary_formula + ; + +fof_binary_formula + : fof_binary_pair + | fof_binary_list + ; + +fof_binary_pair + : fof_unit_formula nonassoc_connective fof_unit_formula + ; + +fof_binary_list + : fof_or_formula + | fof_and_formula + ; + +fof_or_formula + : fof_unit_formula Vline fof_unit_formula + | fof_or_formula Vline fof_unit_formula + ; + +fof_and_formula + : fof_unit_formula '&' fof_unit_formula + | fof_and_formula '&' fof_unit_formula + ; + +fof_unary_formula + : unary_connective fof_unit_formula + | fof_infix_unary + ; + +fof_infix_unary + : fof_term infix_inequality fof_term + ; + +fof_unit_formula + : fof_unitary_formula + | fof_unary_formula + ; + +fof_unitary_formula + : fof_quantified_formula + | fof_atomic_formula + | '(' fof_logic_formula ')' + ; + +fof_quantified_formula + : fof_quantifier '[' fof_variable_list ']' ':' fof_unit_formula + ; + +fof_variable_list + : variable + | variable ',' fof_variable_list + ; + +fof_atomic_formula + : fof_plain_atomic_formula + | fof_defined_atomic_formula + | fof_system_atomic_formula + ; + +fof_plain_atomic_formula + : fof_plain_term + ; + +fof_defined_atomic_formula + : fof_defined_plain_formula + | fof_defined_infix_formula + ; + +fof_defined_plain_formula + : fof_defined_plain_term + ; + +fof_defined_infix_formula + : fof_term defined_infix_pred fof_term + ; + +fof_system_atomic_formula + : fof_system_term + ; + +fof_plain_term + : constant + | functor '(' fof_arguments ')' + ; + +fof_defined_term + : defined_term + | fof_defined_atomic_term + ; + +fof_defined_atomic_term + : fof_defined_plain_term + ; + +fof_defined_plain_term + : defined_constant + | defined_functor '(' fof_arguments ')' + ; + +fof_system_term + : system_constant + | system_functor '(' fof_arguments ')' + ; + +fof_arguments + : fof_term + | fof_term ',' fof_arguments + ; + +fof_term + : fof_function_term + | variable + ; + +fof_function_term + : fof_plain_term + | fof_defined_term + | fof_system_term + ; + +fof_sequent + : fof_formula_tuple gentzen_arrow fof_formula_tuple + | '(' fof_sequent ')' + ; + +fof_formula_tuple + : '[' ']' + | '[' fof_formula_tuple_list ']' + ; + +fof_formula_tuple_list + : fof_logic_formula comma_fof_logic_formula* + ; + +comma_fof_logic_formula + : ',' fof_logic_formula + ; + +cnf_formula + : cnf_disjunction + | '(' cnf_formula ')' + ; + +cnf_disjunction + : cnf_literal + | cnf_disjunction Vline cnf_literal + ; + +cnf_literal + : fof_atomic_formula + | '~' fof_atomic_formula + | '~' '(' fof_atomic_formula ')' + | fof_infix_unary + ; + +thf_quantifier + : tff_quantifier + | th0_quantifier + | type_quantifier + ; + +thf_unary_connective + : unary_connective + | ntf_short_connective + ; + +th0_quantifier + : '^' + | '@+' + | '@-' + ; + +type_quantifier + : '!>' + | '?*' + ; + +subtype_sign + : '<<' + ; + +tff_unary_connective + : unary_connective + | ntf_short_connective + ; + +tff_quantifier + : fof_quantifier + | Hash + ; + +fof_quantifier + : '!' + | '?' + ; + +nonassoc_connective + : '<=>' + | '=>' + | '<=' + | '<~>' + | '~' Vline + | '~&' + ; + +assoc_connective + : Vline + | '&' + ; + +unary_connective + : '~' + ; + +gentzen_arrow + : '-->' + ; + +assignment + : ':=' + ; + +identical + : '==' + ; + +typeable_atom + : constant + | Distinct_object + ; + +atomic_type + : typeable_atom + | defined_constant + | system_type + ; + +type_constant + : type_functor + ; + +type_functor + : atomic_word + ; + +defined_type + : atomic_defined_word + ; + +system_type + : atomic_system_word + ; + +defined_infix_pred + : infix_equality + ; + +infix_equality + : '=' + ; + +infix_inequality + : '!=' + ; + +constant + : functor + ; + +functor + : atomic_word + ; + +defined_constant + : defined_functor + ; + +defined_functor + : atomic_defined_word + ; + +system_constant + : system_functor + ; + +system_functor + : atomic_system_word + ; + +th1_defined_term + : '!!' + | '??' + | '@@+' + | '@@-' + | '@=' + ; + +defined_term + : number + | Distinct_object + ; + +variable + : Upper_word + ; + +source + : dag_source + | internal_source + | external_source + | '[' sources ']' + ; + +sources + : source + | source ',' sources + ; + +dag_source + : name + | inference_record + ; + +inference_record + : 'inference' '(' inference_rule ',' useful_info ',' parents ')' + ; + +inference_rule + : atomic_word + ; + +internal_source + : 'introduced' '(' intro_type ',' useful_info ',' parents ')' + ; + +intro_type + : atomic_word + ; + +external_source + : file_source + ; + +file_source + : 'file' '(' file_name file_info ')' + ; + +file_info + : ',' name + | nothing + ; + +parents + : '[' ']' + | '[' parent_list ']' + ; + +parent_list + : parent_info comma_parent_info* + ; + +comma_parent_info + : ',' parent_info + ; + +parent_info + : source parent_details + ; + +parent_details + : ':' general_term + | nothing + ; + +optional_info + : ',' useful_info + | nothing + ; + +useful_info + : general_list + ; + +include + : 'include' '(' file_name include_optionals ')' '.' + ; + +include_optionals + : nothing + | ',' formula_selection + | ',' formula_selection ',' space_name + ; + +formula_selection + : '[' name_list ']' + | Star + ; + +name_list + : name + | name ',' name_list + ; + +space_name + : name + ; + +general_term + : general_data + | general_data ':' general_term + | general_list + ; + +general_data + : atomic_word + | general_function + | variable + | number + | Distinct_object + | formula_data + ; + +general_function + : atomic_word '(' general_terms ')' + ; + +formula_data + : '$thf' '(' thf_formula ')' + | '$tff' '(' tff_formula ')' + | '$fof' '(' fof_formula ')' + | '$cnf' '(' cnf_formula ')' + | '$fot' '(' fof_term ')' + ; + +general_list + : '[' ']' + | '[' general_terms ']' + ; + +general_terms + : general_term comma_general_term* + ; + +comma_general_term + : ',' general_term + ; + +name + : atomic_word + | Integer + ; + +atomic_word + : lower_word_token + | Single_quoted + | Back_quoted + ; + +atomic_defined_word + : Dollar_word + ; + +atomic_system_word + : Dollar_dollar_word + ; + +number + : Integer + | Rational + | Real + ; + +file_name + : atomic_word + ; + +nothing + : + ; + +// Preserve Lower_word spellings shadowed by implicit literal tokens. +lower_word_token + : Lower_word + | 'cnf' + | 'file' + | 'fof' + | 'include' + | 'inference' + | 'introduced' + | 'tcf' + | 'tff' + | 'thf' + | 'tpi' + ; + +// Semantic restrictions from SyntaxBNF. +// They constrain the language semantically and are intentionally +// not added as alternative context-free productions. +// line 54: :== axiom | hypothesis | definition | assumption | lemma | theorem | corollary | conjecture | negated_conjecture | plain | type | interpretation | logic | unknown +// line 156: :== | +// line 157: :== | | | | () +// line 159: :== [] : +// line 217: :== | () +// line 225: :== | () | | | +// line 233: :== | () +// line 235: :== $ite(,,) +// line 293: :== $box | $dia | {$necessary} | {$possible} | {$obligatory} | {$permissible} | {$knows} | {$canKnow} | {$believes} | {$canBelieve} +// line 303: :== [] +// line 304: :== $modal | $alethic_modal | $deontic_modal | $epistemic_modal | $doxastic_modal | $intuitionistic +// line 306: :== | , +// line 307: :== | | | | +// line 309: :== $domains +// line 310: :== | [] +// line 311: :== $constant | $varying | $cumulative | $decreasing | +// line 313: :== | , +// line 314: :== $designation +// line 315: :== | [] +// line 316: :== $rigid | $flexible | +// line 318: :== | , +// line 320: :== $terms +// line 321: :== | [] +// line 322: :== $local | $global | +// line 323: :== | , +// line 324: :== $modalities +// line 325: :== | [] +// line 326: :== | | +// line 328: :== | , +// line 330: :== $time +// line 331: :== | [] +// line 332: :== $reflexivity | $irreflexivity | $transitivity | $asymmetry | $anti_symmetry | $linearity | $forward_linearity | $backward_linearity | $beginning | $end | $no_beginning | $no_end | $density | $forward_discreteness | $backward_discreteness | +// line 337: :== | , +// line 339: :== $modal_system_K | $modal_system_KB | $modal_system_K4 | $modal_system_K5 | $modal_system_K45 | $modal_system_KB5 | $modal_system_D | $modal_system_DB | $modal_system_D4 | $modal_system_D5 | $modal_system_D45 | $modal_system_M | $modal_system_B | $modal_system_S4 | $modal_system_S5 | $modal_system_S5U +// line 345: :== $modal_axiom_K | $modal_axiom_M | $modal_axiom_B | $modal_axiom_D | $modal_axiom_4 | $modal_axiom_5 | $modal_axiom_CD | $modal_axiom_BoxM | $modal_axiom_C4 | $modal_axiom_C +// line 379: :== | () +// line 382: :== | () +// line 453: :== | | +// line 463: :== $oType | $o | $iType | $i | $tType | $real | $rat | $int +// line 471: :== +// line 472: :== +// line 473: :== +// line 474: :== $true | $false +// line 475: :== +// line 476: :== $distinct | $less | $lesseq | $greater | $greatereq | $is_int | $is_rat +// line 482: :== +// line 483: :== +// line 491: :== $uminus | $sum | $difference | $product | $quotient | $quotient_e | $quotient_t | $quotient_f | $remainder_e | $remainder_t | $remainder_f | $floor | $ceiling | $truncate | $round | $abs | $to_int | $to_rat | $to_real +// line 518: :== definition | tautology | assumption | theory +// line 535: :== [] | [] +// line 536: :== * +// line 537: :== , +// line 538: :== | | +// line 540: :== | +// line 541: :== description() +// line 542: :== iquote() +// line 547: :== | | | +// line 549: :== status() | +// line 565: :== (,) +// line 568: :== assumptions([]) +// line 571: :== refutation() +// line 573: :== new_symbols(,[]) +// line 574: :== | , +// line 576: :== | +// line 592: :== bind(,) | bind_type(,) +// line 593: :== $thf() | $tff() + +// Lexer rules derived from ::- and ::: definitions. +Single_quoted + : Single_quote Sq_char Sq_char* Single_quote + ; + +Back_quoted + : Back_quote Upper_word + ; + +Distinct_object + : Double_quote Do_char Do_char* Double_quote + ; + +Dollar_word + : Dollar Alpha_numeric* + ; + +Dollar_dollar_word + : Dollar Dollar Alpha_numeric* + ; + +Upper_word + : Upper_alpha Alpha_numeric* + ; + +Lower_word + : Lower_alpha Alpha_numeric* + ; + +Real + : Signed_real + | Unsigned_real + ; + +fragment Signed_real + : Sign Unsigned_real + ; + +fragment Unsigned_real + : Decimal_fraction + | Decimal_exponent + ; + +fragment Decimal_exponent + : ( Integer_digits | Decimal_fraction ) Exponent Exp_integer + ; + +fragment Decimal_fraction + : Unsigned_integer Dot Integer_digits + ; + +fragment Exp_integer + : Signed_exp_integer + | Integer_digits + ; + +fragment Signed_exp_integer + : Sign Integer_digits + ; + +Rational + : Signed_rational + | Unsigned_rational + ; + +fragment Signed_rational + : Sign Unsigned_rational + ; + +fragment Unsigned_rational + : Unsigned_integer Slash Positive_integer + ; + +Integer + : Signed_integer + | Unsigned_integer + ; + +fragment Signed_integer + : Sign Unsigned_integer + ; + +fragment Unsigned_integer + : Zero_numeric + | Positive_integer + ; + +fragment Positive_integer + : Non_zero_numeric Numeric* + ; + +fragment Integer_digits + : Numeric Numeric* + ; + +Slash + : Slash_char + ; + +Slosh + : Slosh_char + ; + +Vline + : [|] + ; + +Star + : [*] + ; + +Plus + : [+] + ; + +Arrow + : [>] + ; + +Less_sign + : [<] + ; + +Hash + : [#] + ; + +Comment + : ( Comment_line | Comment_block ) + -> channel(HIDDEN); + +Comment_line + : Percentage_sign Comment_char* + ; + +fragment Comment_block + : Slash_char Star Not_star_slash Star Star* Slash_char + ; + +fragment Not_star_slash + : ( ~[*]* [*] [*]* ~[/*] )* ~[*]* + ; + +fragment Percentage_sign + : [%] + ; + +fragment Double_quote + : ["] + ; + +fragment Do_char + : [\u0020-\u0021\u0023-\u005B\u005D-\u007E] + | [\\] ["\\] + ; + +fragment Single_quote + : ['] + ; + +fragment Back_quote + : [`] + ; + +fragment Sq_char + : [\u0020-\u0026\u0028-\u005B\u005D-\u007E] + | [\\] ['\\] + ; + +fragment Sign + : [+\-] + ; + +fragment Dot + : [.] + ; + +fragment Exponent + : [Ee] + ; + +fragment Slash_char + : [/] + ; + +fragment Slosh_char + : [\\] + ; + +fragment Zero_numeric + : [0] + ; + +fragment Non_zero_numeric + : [1-9] + ; + +fragment Numeric + : [0-9] + ; + +fragment Lower_alpha + : [a-z] + ; + +fragment Upper_alpha + : [A-Z] + ; + +fragment Underscore + : [_] + ; + +fragment Alpha + : Lower_alpha + | Upper_alpha + ; + +fragment Alpha_numeric + : Lower_alpha + | Upper_alpha + | Numeric + | Underscore + ; + +fragment Dollar + : [$] + ; + +fragment Comment_char + : ~[\r\n] + ; + +// SyntaxBNF permits whitespace between tokens. +WS + : [ \t\r\n]+ -> skip + ; diff --git a/tptplus/server/parser/vendor/tptp-antlr/original/TPTPLexer.js b/tptplus/server/parser/vendor/tptp-antlr/original/TPTPLexer.js new file mode 100644 index 0000000..0ba0927 --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/original/TPTPLexer.js @@ -0,0 +1,350 @@ +// Generated from TPTP.g4 by ANTLR 4.13.2 +// jshint ignore: start +import antlr4 from 'antlr4'; + + +const serializedATN = [4,0,73,645,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2, +4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7, +12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19, +2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2, +27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34, +7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7, +41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48, +2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2, +56,7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63, +7,63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7, +70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77, +2,78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2, +85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91,7,91,2,92, +7,92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2,98,7,98,2,99,7, +99,2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103,2,104,7,104,2,105,7,105, +2,106,7,106,2,107,7,107,1,0,1,0,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4, +1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,9,1,9, +1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16, +1,16,1,16,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1, +22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26, +1,27,1,27,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,30,1,30,1,30,1,31,1,31,1, +31,1,31,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,35,1,35,1,35, +1,36,1,36,1,37,1,37,1,37,1,38,1,38,1,38,1,39,1,39,1,39,1,40,1,40,1,40,1, +40,1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,43,1,43,1,43, +1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1, +45,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,47,1,47, +1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,50,1, +50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1,52,5,52,405,8,52, +10,52,12,52,408,9,52,1,52,1,52,1,53,1,53,1,53,1,54,1,54,1,54,5,54,418,8, +54,10,54,12,54,421,9,54,1,54,1,54,1,55,1,55,5,55,427,8,55,10,55,12,55,430, +9,55,1,56,1,56,1,56,5,56,435,8,56,10,56,12,56,438,9,56,1,57,1,57,5,57,442, +8,57,10,57,12,57,445,9,57,1,58,1,58,5,58,449,8,58,10,58,12,58,452,9,58,1, +59,1,59,3,59,456,8,59,1,60,1,60,1,60,1,61,1,61,3,61,463,8,61,1,62,1,62,3, +62,467,8,62,1,62,1,62,1,62,1,63,1,63,1,63,1,63,1,64,1,64,3,64,478,8,64,1, +65,1,65,1,65,1,66,1,66,3,66,485,8,66,1,67,1,67,1,67,1,68,1,68,1,68,1,68, +1,69,1,69,3,69,496,8,69,1,70,1,70,1,70,1,71,1,71,3,71,503,8,71,1,72,1,72, +5,72,507,8,72,10,72,12,72,510,9,72,1,73,1,73,5,73,514,8,73,10,73,12,73,517, +9,73,1,74,1,74,1,75,1,75,1,76,1,76,1,77,1,77,1,78,1,78,1,79,1,79,1,80,1, +80,1,81,1,81,1,82,1,82,3,82,537,8,82,1,82,1,82,1,83,1,83,5,83,543,8,83,10, +83,12,83,546,9,83,1,84,1,84,1,84,1,84,1,84,5,84,553,8,84,10,84,12,84,556, +9,84,1,84,1,84,1,85,5,85,561,8,85,10,85,12,85,564,9,85,1,85,1,85,5,85,568, +8,85,10,85,12,85,571,9,85,1,85,5,85,574,8,85,10,85,12,85,577,9,85,1,85,5, +85,580,8,85,10,85,12,85,583,9,85,1,86,1,86,1,87,1,87,1,88,1,88,1,88,3,88, +592,8,88,1,89,1,89,1,90,1,90,1,91,1,91,1,91,3,91,601,8,91,1,92,1,92,1,93, +1,93,1,94,1,94,1,95,1,95,1,96,1,96,1,97,1,97,1,98,1,98,1,99,1,99,1,100,1, +100,1,101,1,101,1,102,1,102,1,103,1,103,3,103,627,8,103,1,104,1,104,1,104, +1,104,3,104,633,8,104,1,105,1,105,1,106,1,106,1,107,4,107,640,8,107,11,107, +12,107,641,1,107,1,107,0,0,108,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19, +10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43, +22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67, +34,69,35,71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91, +46,93,47,95,48,97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,113, +57,115,58,117,59,119,60,121,0,123,0,125,0,127,0,129,0,131,0,133,61,135,0, +137,0,139,62,141,0,143,0,145,0,147,0,149,63,151,64,153,65,155,66,157,67, +159,68,161,69,163,70,165,71,167,72,169,0,171,0,173,0,175,0,177,0,179,0,181, +0,183,0,185,0,187,0,189,0,191,0,193,0,195,0,197,0,199,0,201,0,203,0,205, +0,207,0,209,0,211,0,213,0,215,73,1,0,29,1,0,124,124,1,0,42,42,1,0,43,43, +1,0,62,62,1,0,60,60,1,0,35,35,2,0,42,42,47,47,1,0,37,37,1,0,34,34,3,0,32, +33,35,91,93,126,1,0,92,92,2,0,34,34,92,92,1,0,39,39,1,0,96,96,3,0,32,38, +40,91,93,126,2,0,39,39,92,92,2,0,43,43,45,45,1,0,46,46,2,0,69,69,101,101, +1,0,47,47,1,0,48,48,1,0,49,57,1,0,48,57,1,0,97,122,1,0,65,90,1,0,95,95,1, +0,36,36,2,0,10,10,13,13,3,0,9,10,13,13,32,32,638,0,1,1,0,0,0,0,3,1,0,0,0, +0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0, +0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27, +1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0, +0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1, +0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0, +61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0, +0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83, +1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0, +0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105, +1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1, +0,0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,133,1,0,0,0,0,139,1,0,0,0,0,149,1,0, +0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0, +0,0,161,1,0,0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,215,1,0,0,0, +1,217,1,0,0,0,3,221,1,0,0,0,5,223,1,0,0,0,7,225,1,0,0,0,9,227,1,0,0,0,11, +229,1,0,0,0,13,233,1,0,0,0,15,237,1,0,0,0,17,241,1,0,0,0,19,245,1,0,0,0, +21,249,1,0,0,0,23,251,1,0,0,0,25,253,1,0,0,0,27,255,1,0,0,0,29,257,1,0,0, +0,31,259,1,0,0,0,33,261,1,0,0,0,35,266,1,0,0,0,37,268,1,0,0,0,39,270,1,0, +0,0,41,272,1,0,0,0,43,274,1,0,0,0,45,276,1,0,0,0,47,279,1,0,0,0,49,282,1, +0,0,0,51,285,1,0,0,0,53,288,1,0,0,0,55,291,1,0,0,0,57,293,1,0,0,0,59,297, +1,0,0,0,61,300,1,0,0,0,63,303,1,0,0,0,65,307,1,0,0,0,67,310,1,0,0,0,69,314, +1,0,0,0,71,317,1,0,0,0,73,320,1,0,0,0,75,322,1,0,0,0,77,325,1,0,0,0,79,328, +1,0,0,0,81,331,1,0,0,0,83,335,1,0,0,0,85,339,1,0,0,0,87,342,1,0,0,0,89,352, +1,0,0,0,91,363,1,0,0,0,93,368,1,0,0,0,95,376,1,0,0,0,97,381,1,0,0,0,99,386, +1,0,0,0,101,391,1,0,0,0,103,396,1,0,0,0,105,401,1,0,0,0,107,411,1,0,0,0, +109,414,1,0,0,0,111,424,1,0,0,0,113,431,1,0,0,0,115,439,1,0,0,0,117,446, +1,0,0,0,119,455,1,0,0,0,121,457,1,0,0,0,123,462,1,0,0,0,125,466,1,0,0,0, +127,471,1,0,0,0,129,477,1,0,0,0,131,479,1,0,0,0,133,484,1,0,0,0,135,486, +1,0,0,0,137,489,1,0,0,0,139,495,1,0,0,0,141,497,1,0,0,0,143,502,1,0,0,0, +145,504,1,0,0,0,147,511,1,0,0,0,149,518,1,0,0,0,151,520,1,0,0,0,153,522, +1,0,0,0,155,524,1,0,0,0,157,526,1,0,0,0,159,528,1,0,0,0,161,530,1,0,0,0, +163,532,1,0,0,0,165,536,1,0,0,0,167,540,1,0,0,0,169,547,1,0,0,0,171,575, +1,0,0,0,173,584,1,0,0,0,175,586,1,0,0,0,177,591,1,0,0,0,179,593,1,0,0,0, +181,595,1,0,0,0,183,600,1,0,0,0,185,602,1,0,0,0,187,604,1,0,0,0,189,606, +1,0,0,0,191,608,1,0,0,0,193,610,1,0,0,0,195,612,1,0,0,0,197,614,1,0,0,0, +199,616,1,0,0,0,201,618,1,0,0,0,203,620,1,0,0,0,205,622,1,0,0,0,207,626, +1,0,0,0,209,632,1,0,0,0,211,634,1,0,0,0,213,636,1,0,0,0,215,639,1,0,0,0, +217,218,5,116,0,0,218,219,5,112,0,0,219,220,5,105,0,0,220,2,1,0,0,0,221, +222,5,40,0,0,222,4,1,0,0,0,223,224,5,44,0,0,224,6,1,0,0,0,225,226,5,41,0, +0,226,8,1,0,0,0,227,228,5,46,0,0,228,10,1,0,0,0,229,230,5,116,0,0,230,231, +5,104,0,0,231,232,5,102,0,0,232,12,1,0,0,0,233,234,5,116,0,0,234,235,5,102, +0,0,235,236,5,102,0,0,236,14,1,0,0,0,237,238,5,116,0,0,238,239,5,99,0,0, +239,240,5,102,0,0,240,16,1,0,0,0,241,242,5,102,0,0,242,243,5,111,0,0,243, +244,5,102,0,0,244,18,1,0,0,0,245,246,5,99,0,0,246,247,5,110,0,0,247,248, +5,102,0,0,248,20,1,0,0,0,249,250,5,45,0,0,250,22,1,0,0,0,251,252,5,38,0, +0,252,24,1,0,0,0,253,254,5,64,0,0,254,26,1,0,0,0,255,256,5,91,0,0,256,28, +1,0,0,0,257,258,5,93,0,0,258,30,1,0,0,0,259,260,5,58,0,0,260,32,1,0,0,0, +261,262,5,36,0,0,262,263,5,108,0,0,263,264,5,101,0,0,264,265,5,116,0,0,265, +34,1,0,0,0,266,267,5,123,0,0,267,36,1,0,0,0,268,269,5,125,0,0,269,38,1,0, +0,0,270,271,5,33,0,0,271,40,1,0,0,0,272,273,5,126,0,0,273,42,1,0,0,0,274, +275,5,94,0,0,275,44,1,0,0,0,276,277,5,64,0,0,277,278,5,43,0,0,278,46,1,0, +0,0,279,280,5,64,0,0,280,281,5,45,0,0,281,48,1,0,0,0,282,283,5,33,0,0,283, +284,5,62,0,0,284,50,1,0,0,0,285,286,5,63,0,0,286,287,5,42,0,0,287,52,1,0, +0,0,288,289,5,60,0,0,289,290,5,60,0,0,290,54,1,0,0,0,291,292,5,63,0,0,292, +56,1,0,0,0,293,294,5,60,0,0,294,295,5,61,0,0,295,296,5,62,0,0,296,58,1,0, +0,0,297,298,5,61,0,0,298,299,5,62,0,0,299,60,1,0,0,0,300,301,5,60,0,0,301, +302,5,61,0,0,302,62,1,0,0,0,303,304,5,60,0,0,304,305,5,126,0,0,305,306,5, +62,0,0,306,64,1,0,0,0,307,308,5,126,0,0,308,309,5,38,0,0,309,66,1,0,0,0, +310,311,5,45,0,0,311,312,5,45,0,0,312,313,5,62,0,0,313,68,1,0,0,0,314,315, +5,58,0,0,315,316,5,61,0,0,316,70,1,0,0,0,317,318,5,61,0,0,318,319,5,61,0, +0,319,72,1,0,0,0,320,321,5,61,0,0,321,74,1,0,0,0,322,323,5,33,0,0,323,324, +5,61,0,0,324,76,1,0,0,0,325,326,5,33,0,0,326,327,5,33,0,0,327,78,1,0,0,0, +328,329,5,63,0,0,329,330,5,63,0,0,330,80,1,0,0,0,331,332,5,64,0,0,332,333, +5,64,0,0,333,334,5,43,0,0,334,82,1,0,0,0,335,336,5,64,0,0,336,337,5,64,0, +0,337,338,5,45,0,0,338,84,1,0,0,0,339,340,5,64,0,0,340,341,5,61,0,0,341, +86,1,0,0,0,342,343,5,105,0,0,343,344,5,110,0,0,344,345,5,102,0,0,345,346, +5,101,0,0,346,347,5,114,0,0,347,348,5,101,0,0,348,349,5,110,0,0,349,350, +5,99,0,0,350,351,5,101,0,0,351,88,1,0,0,0,352,353,5,105,0,0,353,354,5,110, +0,0,354,355,5,116,0,0,355,356,5,114,0,0,356,357,5,111,0,0,357,358,5,100, +0,0,358,359,5,117,0,0,359,360,5,99,0,0,360,361,5,101,0,0,361,362,5,100,0, +0,362,90,1,0,0,0,363,364,5,102,0,0,364,365,5,105,0,0,365,366,5,108,0,0,366, +367,5,101,0,0,367,92,1,0,0,0,368,369,5,105,0,0,369,370,5,110,0,0,370,371, +5,99,0,0,371,372,5,108,0,0,372,373,5,117,0,0,373,374,5,100,0,0,374,375,5, +101,0,0,375,94,1,0,0,0,376,377,5,36,0,0,377,378,5,116,0,0,378,379,5,104, +0,0,379,380,5,102,0,0,380,96,1,0,0,0,381,382,5,36,0,0,382,383,5,116,0,0, +383,384,5,102,0,0,384,385,5,102,0,0,385,98,1,0,0,0,386,387,5,36,0,0,387, +388,5,102,0,0,388,389,5,111,0,0,389,390,5,102,0,0,390,100,1,0,0,0,391,392, +5,36,0,0,392,393,5,99,0,0,393,394,5,110,0,0,394,395,5,102,0,0,395,102,1, +0,0,0,396,397,5,36,0,0,397,398,5,102,0,0,398,399,5,111,0,0,399,400,5,116, +0,0,400,104,1,0,0,0,401,402,3,179,89,0,402,406,3,183,91,0,403,405,3,183, +91,0,404,403,1,0,0,0,405,408,1,0,0,0,406,404,1,0,0,0,406,407,1,0,0,0,407, +409,1,0,0,0,408,406,1,0,0,0,409,410,3,179,89,0,410,106,1,0,0,0,411,412,3, +181,90,0,412,413,3,115,57,0,413,108,1,0,0,0,414,415,3,175,87,0,415,419,3, +177,88,0,416,418,3,177,88,0,417,416,1,0,0,0,418,421,1,0,0,0,419,417,1,0, +0,0,419,420,1,0,0,0,420,422,1,0,0,0,421,419,1,0,0,0,422,423,3,175,87,0,423, +110,1,0,0,0,424,428,3,211,105,0,425,427,3,209,104,0,426,425,1,0,0,0,427, +430,1,0,0,0,428,426,1,0,0,0,428,429,1,0,0,0,429,112,1,0,0,0,430,428,1,0, +0,0,431,432,3,211,105,0,432,436,3,211,105,0,433,435,3,209,104,0,434,433, +1,0,0,0,435,438,1,0,0,0,436,434,1,0,0,0,436,437,1,0,0,0,437,114,1,0,0,0, +438,436,1,0,0,0,439,443,3,203,101,0,440,442,3,209,104,0,441,440,1,0,0,0, +442,445,1,0,0,0,443,441,1,0,0,0,443,444,1,0,0,0,444,116,1,0,0,0,445,443, +1,0,0,0,446,450,3,201,100,0,447,449,3,209,104,0,448,447,1,0,0,0,449,452, +1,0,0,0,450,448,1,0,0,0,450,451,1,0,0,0,451,118,1,0,0,0,452,450,1,0,0,0, +453,456,3,121,60,0,454,456,3,123,61,0,455,453,1,0,0,0,455,454,1,0,0,0,456, +120,1,0,0,0,457,458,3,185,92,0,458,459,3,123,61,0,459,122,1,0,0,0,460,463, +3,127,63,0,461,463,3,125,62,0,462,460,1,0,0,0,462,461,1,0,0,0,463,124,1, +0,0,0,464,467,3,147,73,0,465,467,3,127,63,0,466,464,1,0,0,0,466,465,1,0, +0,0,467,468,1,0,0,0,468,469,3,189,94,0,469,470,3,129,64,0,470,126,1,0,0, +0,471,472,3,143,71,0,472,473,3,187,93,0,473,474,3,147,73,0,474,128,1,0,0, +0,475,478,3,131,65,0,476,478,3,147,73,0,477,475,1,0,0,0,477,476,1,0,0,0, +478,130,1,0,0,0,479,480,3,185,92,0,480,481,3,147,73,0,481,132,1,0,0,0,482, +485,3,135,67,0,483,485,3,137,68,0,484,482,1,0,0,0,484,483,1,0,0,0,485,134, +1,0,0,0,486,487,3,185,92,0,487,488,3,137,68,0,488,136,1,0,0,0,489,490,3, +143,71,0,490,491,3,149,74,0,491,492,3,145,72,0,492,138,1,0,0,0,493,496,3, +141,70,0,494,496,3,143,71,0,495,493,1,0,0,0,495,494,1,0,0,0,496,140,1,0, +0,0,497,498,3,185,92,0,498,499,3,143,71,0,499,142,1,0,0,0,500,503,3,195, +97,0,501,503,3,145,72,0,502,500,1,0,0,0,502,501,1,0,0,0,503,144,1,0,0,0, +504,508,3,197,98,0,505,507,3,199,99,0,506,505,1,0,0,0,507,510,1,0,0,0,508, +506,1,0,0,0,508,509,1,0,0,0,509,146,1,0,0,0,510,508,1,0,0,0,511,515,3,199, +99,0,512,514,3,199,99,0,513,512,1,0,0,0,514,517,1,0,0,0,515,513,1,0,0,0, +515,516,1,0,0,0,516,148,1,0,0,0,517,515,1,0,0,0,518,519,3,191,95,0,519,150, +1,0,0,0,520,521,3,193,96,0,521,152,1,0,0,0,522,523,7,0,0,0,523,154,1,0,0, +0,524,525,7,1,0,0,525,156,1,0,0,0,526,527,7,2,0,0,527,158,1,0,0,0,528,529, +7,3,0,0,529,160,1,0,0,0,530,531,7,4,0,0,531,162,1,0,0,0,532,533,7,5,0,0, +533,164,1,0,0,0,534,537,3,167,83,0,535,537,3,169,84,0,536,534,1,0,0,0,536, +535,1,0,0,0,537,538,1,0,0,0,538,539,6,82,0,0,539,166,1,0,0,0,540,544,3,173, +86,0,541,543,3,213,106,0,542,541,1,0,0,0,543,546,1,0,0,0,544,542,1,0,0,0, +544,545,1,0,0,0,545,168,1,0,0,0,546,544,1,0,0,0,547,548,3,191,95,0,548,549, +3,155,77,0,549,550,3,171,85,0,550,554,3,155,77,0,551,553,3,155,77,0,552, +551,1,0,0,0,553,556,1,0,0,0,554,552,1,0,0,0,554,555,1,0,0,0,555,557,1,0, +0,0,556,554,1,0,0,0,557,558,3,191,95,0,558,170,1,0,0,0,559,561,8,1,0,0,560, +559,1,0,0,0,561,564,1,0,0,0,562,560,1,0,0,0,562,563,1,0,0,0,563,565,1,0, +0,0,564,562,1,0,0,0,565,569,7,1,0,0,566,568,7,1,0,0,567,566,1,0,0,0,568, +571,1,0,0,0,569,567,1,0,0,0,569,570,1,0,0,0,570,572,1,0,0,0,571,569,1,0, +0,0,572,574,8,6,0,0,573,562,1,0,0,0,574,577,1,0,0,0,575,573,1,0,0,0,575, +576,1,0,0,0,576,581,1,0,0,0,577,575,1,0,0,0,578,580,8,1,0,0,579,578,1,0, +0,0,580,583,1,0,0,0,581,579,1,0,0,0,581,582,1,0,0,0,582,172,1,0,0,0,583, +581,1,0,0,0,584,585,7,7,0,0,585,174,1,0,0,0,586,587,7,8,0,0,587,176,1,0, +0,0,588,592,7,9,0,0,589,590,7,10,0,0,590,592,7,11,0,0,591,588,1,0,0,0,591, +589,1,0,0,0,592,178,1,0,0,0,593,594,7,12,0,0,594,180,1,0,0,0,595,596,7,13, +0,0,596,182,1,0,0,0,597,601,7,14,0,0,598,599,7,10,0,0,599,601,7,15,0,0,600, +597,1,0,0,0,600,598,1,0,0,0,601,184,1,0,0,0,602,603,7,16,0,0,603,186,1,0, +0,0,604,605,7,17,0,0,605,188,1,0,0,0,606,607,7,18,0,0,607,190,1,0,0,0,608, +609,7,19,0,0,609,192,1,0,0,0,610,611,7,10,0,0,611,194,1,0,0,0,612,613,7, +20,0,0,613,196,1,0,0,0,614,615,7,21,0,0,615,198,1,0,0,0,616,617,7,22,0,0, +617,200,1,0,0,0,618,619,7,23,0,0,619,202,1,0,0,0,620,621,7,24,0,0,621,204, +1,0,0,0,622,623,7,25,0,0,623,206,1,0,0,0,624,627,3,201,100,0,625,627,3,203, +101,0,626,624,1,0,0,0,626,625,1,0,0,0,627,208,1,0,0,0,628,633,3,201,100, +0,629,633,3,203,101,0,630,633,3,199,99,0,631,633,3,205,102,0,632,628,1,0, +0,0,632,629,1,0,0,0,632,630,1,0,0,0,632,631,1,0,0,0,633,210,1,0,0,0,634, +635,7,26,0,0,635,212,1,0,0,0,636,637,8,27,0,0,637,214,1,0,0,0,638,640,7, +28,0,0,639,638,1,0,0,0,640,641,1,0,0,0,641,639,1,0,0,0,641,642,1,0,0,0,642, +643,1,0,0,0,643,644,6,107,1,0,644,216,1,0,0,0,28,0,406,419,428,436,443,450, +455,462,466,477,484,495,502,508,515,536,544,554,562,569,575,581,591,600, +626,632,641,2,0,1,0,6,0,0]; + + +const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN); + +const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) ); + +export default class TPTPLexer extends antlr4.Lexer { + + static grammarFileName = "TPTP.g4"; + static channelNames = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ]; + static modeNames = [ "DEFAULT_MODE" ]; + static literalNames = [ null, "'tpi'", "'('", "','", "')'", "'.'", "'thf'", + "'tff'", "'tcf'", "'fof'", "'cnf'", "'-'", "'&'", + "'@'", "'['", "']'", "':'", "'$let'", "'{'", "'}'", + "'!'", "'~'", "'^'", "'@+'", "'@-'", "'!>'", "'?*'", + "'<<'", "'?'", "'<=>'", "'=>'", "'<='", "'<~>'", + "'~&'", "'-->'", "':='", "'=='", "'='", "'!='", + "'!!'", "'??'", "'@@+'", "'@@-'", "'@='", "'inference'", + "'introduced'", "'file'", "'include'", "'$thf'", + "'$tff'", "'$fof'", "'$cnf'", "'$fot'" ]; + static symbolicNames = [ null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, "Single_quoted", + "Back_quoted", "Distinct_object", "Dollar_word", + "Dollar_dollar_word", "Upper_word", "Lower_word", + "Real", "Rational", "Integer", "Slash", "Slosh", + "Vline", "Star", "Plus", "Arrow", "Less_sign", + "Hash", "Comment", "Comment_line", "WS" ]; + static ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", + "T__7", "T__8", "T__9", "T__10", "T__11", "T__12", + "T__13", "T__14", "T__15", "T__16", "T__17", "T__18", + "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", + "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", + "T__31", "T__32", "T__33", "T__34", "T__35", "T__36", + "T__37", "T__38", "T__39", "T__40", "T__41", "T__42", + "T__43", "T__44", "T__45", "T__46", "T__47", "T__48", + "T__49", "T__50", "T__51", "Single_quoted", "Back_quoted", + "Distinct_object", "Dollar_word", "Dollar_dollar_word", + "Upper_word", "Lower_word", "Real", "Signed_real", + "Unsigned_real", "Decimal_exponent", "Decimal_fraction", + "Exp_integer", "Signed_exp_integer", "Rational", "Signed_rational", + "Unsigned_rational", "Integer", "Signed_integer", + "Unsigned_integer", "Positive_integer", "Integer_digits", + "Slash", "Slosh", "Vline", "Star", "Plus", "Arrow", + "Less_sign", "Hash", "Comment", "Comment_line", "Comment_block", + "Not_star_slash", "Percentage_sign", "Double_quote", + "Do_char", "Single_quote", "Back_quote", "Sq_char", + "Sign", "Dot", "Exponent", "Slash_char", "Slosh_char", + "Zero_numeric", "Non_zero_numeric", "Numeric", "Lower_alpha", + "Upper_alpha", "Underscore", "Alpha", "Alpha_numeric", + "Dollar", "Comment_char", "WS" ]; + + constructor(input) { + super(input) + this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.atn.PredictionContextCache()); + } +} + +TPTPLexer.EOF = antlr4.Token.EOF; +TPTPLexer.T__0 = 1; +TPTPLexer.T__1 = 2; +TPTPLexer.T__2 = 3; +TPTPLexer.T__3 = 4; +TPTPLexer.T__4 = 5; +TPTPLexer.T__5 = 6; +TPTPLexer.T__6 = 7; +TPTPLexer.T__7 = 8; +TPTPLexer.T__8 = 9; +TPTPLexer.T__9 = 10; +TPTPLexer.T__10 = 11; +TPTPLexer.T__11 = 12; +TPTPLexer.T__12 = 13; +TPTPLexer.T__13 = 14; +TPTPLexer.T__14 = 15; +TPTPLexer.T__15 = 16; +TPTPLexer.T__16 = 17; +TPTPLexer.T__17 = 18; +TPTPLexer.T__18 = 19; +TPTPLexer.T__19 = 20; +TPTPLexer.T__20 = 21; +TPTPLexer.T__21 = 22; +TPTPLexer.T__22 = 23; +TPTPLexer.T__23 = 24; +TPTPLexer.T__24 = 25; +TPTPLexer.T__25 = 26; +TPTPLexer.T__26 = 27; +TPTPLexer.T__27 = 28; +TPTPLexer.T__28 = 29; +TPTPLexer.T__29 = 30; +TPTPLexer.T__30 = 31; +TPTPLexer.T__31 = 32; +TPTPLexer.T__32 = 33; +TPTPLexer.T__33 = 34; +TPTPLexer.T__34 = 35; +TPTPLexer.T__35 = 36; +TPTPLexer.T__36 = 37; +TPTPLexer.T__37 = 38; +TPTPLexer.T__38 = 39; +TPTPLexer.T__39 = 40; +TPTPLexer.T__40 = 41; +TPTPLexer.T__41 = 42; +TPTPLexer.T__42 = 43; +TPTPLexer.T__43 = 44; +TPTPLexer.T__44 = 45; +TPTPLexer.T__45 = 46; +TPTPLexer.T__46 = 47; +TPTPLexer.T__47 = 48; +TPTPLexer.T__48 = 49; +TPTPLexer.T__49 = 50; +TPTPLexer.T__50 = 51; +TPTPLexer.T__51 = 52; +TPTPLexer.Single_quoted = 53; +TPTPLexer.Back_quoted = 54; +TPTPLexer.Distinct_object = 55; +TPTPLexer.Dollar_word = 56; +TPTPLexer.Dollar_dollar_word = 57; +TPTPLexer.Upper_word = 58; +TPTPLexer.Lower_word = 59; +TPTPLexer.Real = 60; +TPTPLexer.Rational = 61; +TPTPLexer.Integer = 62; +TPTPLexer.Slash = 63; +TPTPLexer.Slosh = 64; +TPTPLexer.Vline = 65; +TPTPLexer.Star = 66; +TPTPLexer.Plus = 67; +TPTPLexer.Arrow = 68; +TPTPLexer.Less_sign = 69; +TPTPLexer.Hash = 70; +TPTPLexer.Comment = 71; +TPTPLexer.Comment_line = 72; +TPTPLexer.WS = 73; + + + diff --git a/tptplus/server/parser/vendor/tptp-antlr/original/TPTPListener.js b/tptplus/server/parser/vendor/tptp-antlr/original/TPTPListener.js new file mode 100644 index 0000000..c5e647a --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/original/TPTPListener.js @@ -0,0 +1,2079 @@ +// Generated from TPTP.g4 by ANTLR 4.13.2 +// jshint ignore: start +import antlr4 from 'antlr4'; + +// This class defines a complete listener for a parse tree produced by TPTPParser. +export default class TPTPListener extends antlr4.tree.ParseTreeListener { + + // Enter a parse tree produced by TPTPParser#tptp_file. + enterTptp_file(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tptp_file. + exitTptp_file(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tptp_input. + enterTptp_input(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tptp_input. + exitTptp_input(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#annotated_formula. + enterAnnotated_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#annotated_formula. + exitAnnotated_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tpi_annotated. + enterTpi_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tpi_annotated. + exitTpi_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tpi_formula. + enterTpi_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tpi_formula. + exitTpi_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_annotated. + enterThf_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_annotated. + exitThf_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_annotated. + enterTff_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_annotated. + exitTff_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tcf_annotated. + enterTcf_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tcf_annotated. + exitTcf_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_annotated. + enterFof_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_annotated. + exitFof_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#cnf_annotated. + enterCnf_annotated(ctx) { + } + + // Exit a parse tree produced by TPTPParser#cnf_annotated. + exitCnf_annotated(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#annotations. + enterAnnotations(ctx) { + } + + // Exit a parse tree produced by TPTPParser#annotations. + exitAnnotations(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#formula_role. + enterFormula_role(ctx) { + } + + // Exit a parse tree produced by TPTPParser#formula_role. + exitFormula_role(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_formula. + enterThf_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_formula. + exitThf_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_logic_formula. + enterThf_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_logic_formula. + exitThf_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_binary_formula. + enterThf_binary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_binary_formula. + exitThf_binary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_binary_pair. + enterThf_binary_pair(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_binary_pair. + exitThf_binary_pair(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_binary_list. + enterThf_binary_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_binary_list. + exitThf_binary_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_or_formula. + enterThf_or_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_or_formula. + exitThf_or_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_and_formula. + enterThf_and_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_and_formula. + exitThf_and_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_apply_formula. + enterThf_apply_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_apply_formula. + exitThf_apply_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unit_formula. + enterThf_unit_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unit_formula. + exitThf_unit_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_preunit_formula. + enterThf_preunit_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_preunit_formula. + exitThf_preunit_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unitary_formula. + enterThf_unitary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unitary_formula. + exitThf_unitary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_quantified_formula. + enterThf_quantified_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_quantified_formula. + exitThf_quantified_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_quantification. + enterThf_quantification(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_quantification. + exitThf_quantification(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_variable_list. + enterThf_variable_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_variable_list. + exitThf_variable_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_typed_variable. + enterThf_typed_variable(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_typed_variable. + exitThf_typed_variable(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unary_formula. + enterThf_unary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unary_formula. + exitThf_unary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_prefix_unary. + enterThf_prefix_unary(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_prefix_unary. + exitThf_prefix_unary(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_infix_unary. + enterThf_infix_unary(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_infix_unary. + exitThf_infix_unary(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_atomic_formula. + enterThf_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_atomic_formula. + exitThf_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_plain_atomic. + enterThf_plain_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_plain_atomic. + exitThf_plain_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_defined_atomic. + enterThf_defined_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_defined_atomic. + exitThf_defined_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_defined_term. + enterThf_defined_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_defined_term. + exitThf_defined_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_defined_infix. + enterThf_defined_infix(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_defined_infix. + exitThf_defined_infix(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_system_atomic. + enterThf_system_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_system_atomic. + exitThf_system_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_let. + enterThf_let(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_let. + exitThf_let(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_let_types. + enterThf_let_types(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_let_types. + exitThf_let_types(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_atom_typing_list. + enterThf_atom_typing_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_atom_typing_list. + exitThf_atom_typing_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_let_defns. + enterThf_let_defns(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_let_defns. + exitThf_let_defns(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_let_defn. + enterThf_let_defn(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_let_defn. + exitThf_let_defn(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_let_defn_list. + enterThf_let_defn_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_let_defn_list. + exitThf_let_defn_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unitary_term. + enterThf_unitary_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unitary_term. + exitThf_unitary_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_conn_term. + enterThf_conn_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_conn_term. + exitThf_conn_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_tuple. + enterThf_tuple(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_tuple. + exitThf_tuple(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_fof_function. + enterThf_fof_function(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_fof_function. + exitThf_fof_function(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_arguments. + enterThf_arguments(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_arguments. + exitThf_arguments(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_formula_list. + enterThf_formula_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_formula_list. + exitThf_formula_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#comma_thf_logic_formula. + enterComma_thf_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#comma_thf_logic_formula. + exitComma_thf_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_atom_typing. + enterThf_atom_typing(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_atom_typing. + exitThf_atom_typing(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_top_level_type. + enterThf_top_level_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_top_level_type. + exitThf_top_level_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unitary_type. + enterThf_unitary_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unitary_type. + exitThf_unitary_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_apply_type. + enterThf_apply_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_apply_type. + exitThf_apply_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_binary_type. + enterThf_binary_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_binary_type. + exitThf_binary_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_mapping_type. + enterThf_mapping_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_mapping_type. + exitThf_mapping_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_xprod_type. + enterThf_xprod_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_xprod_type. + exitThf_xprod_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_union_type. + enterThf_union_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_union_type. + exitThf_union_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_subtype. + enterThf_subtype(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_subtype. + exitThf_subtype(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_definition. + enterThf_definition(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_definition. + exitThf_definition(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_sequent. + enterThf_sequent(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_sequent. + exitThf_sequent(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_formula. + enterTff_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_formula. + exitTff_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_logic_formula. + enterTff_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_logic_formula. + exitTff_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_binary_formula. + enterTff_binary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_binary_formula. + exitTff_binary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_binary_pair. + enterTff_binary_pair(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_binary_pair. + exitTff_binary_pair(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_binary_list. + enterTff_binary_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_binary_list. + exitTff_binary_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_or_formula. + enterTff_or_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_or_formula. + exitTff_or_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_and_formula. + enterTff_and_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_and_formula. + exitTff_and_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unit_formula. + enterTff_unit_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unit_formula. + exitTff_unit_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_preunit_formula. + enterTff_preunit_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_preunit_formula. + exitTff_preunit_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unitary_formula. + enterTff_unitary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unitary_formula. + exitTff_unitary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_unitary_formula. + enterTxf_unitary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_unitary_formula. + exitTxf_unitary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_quantified_formula. + enterTff_quantified_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_quantified_formula. + exitTff_quantified_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_variable_list. + enterTff_variable_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_variable_list. + exitTff_variable_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_variable. + enterTff_variable(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_variable. + exitTff_variable(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_typed_variable. + enterTff_typed_variable(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_typed_variable. + exitTff_typed_variable(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unary_formula. + enterTff_unary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unary_formula. + exitTff_unary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_prefix_unary. + enterTff_prefix_unary(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_prefix_unary. + exitTff_prefix_unary(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_infix_unary. + enterTff_infix_unary(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_infix_unary. + exitTff_infix_unary(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_atomic_formula. + enterTff_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_atomic_formula. + exitTff_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_plain_atomic. + enterTff_plain_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_plain_atomic. + exitTff_plain_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_defined_atomic. + enterTff_defined_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_defined_atomic. + exitTff_defined_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_defined_plain. + enterTff_defined_plain(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_defined_plain. + exitTff_defined_plain(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_defined_infix. + enterTff_defined_infix(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_defined_infix. + exitTff_defined_infix(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_system_atomic. + enterTff_system_atomic(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_system_atomic. + exitTff_system_atomic(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let. + enterTxf_let(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let. + exitTxf_let(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let_types. + enterTxf_let_types(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let_types. + exitTxf_let_types(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_atom_typing_list. + enterTff_atom_typing_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_atom_typing_list. + exitTff_atom_typing_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let_defns. + enterTxf_let_defns(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let_defns. + exitTxf_let_defns(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let_defn. + enterTxf_let_defn(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let_defn. + exitTxf_let_defn(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let_lhs. + enterTxf_let_lhs(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let_lhs. + exitTxf_let_lhs(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_let_defn_list. + enterTxf_let_defn_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_let_defn_list. + exitTxf_let_defn_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nxf_atom. + enterNxf_atom(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nxf_atom. + exitNxf_atom(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_term. + enterTff_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_term. + exitTff_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unitary_term. + enterTff_unitary_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unitary_term. + exitTff_unitary_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_tuple. + enterTxf_tuple(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_tuple. + exitTxf_tuple(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_arguments. + enterTff_arguments(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_arguments. + exitTff_arguments(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#comma_tff_term. + enterComma_tff_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#comma_tff_term. + exitComma_tff_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_atom_typing. + enterTff_atom_typing(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_atom_typing. + exitTff_atom_typing(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_top_level_type. + enterTff_top_level_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_top_level_type. + exitTff_top_level_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_non_atomic_type. + enterTff_non_atomic_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_non_atomic_type. + exitTff_non_atomic_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tf1_quantified_type. + enterTf1_quantified_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tf1_quantified_type. + exitTf1_quantified_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_monotype. + enterTff_monotype(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_monotype. + exitTff_monotype(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unitary_type. + enterTff_unitary_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unitary_type. + exitTff_unitary_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_atomic_type. + enterTff_atomic_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_atomic_type. + exitTff_atomic_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_type_arguments. + enterTff_type_arguments(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_type_arguments. + exitTff_type_arguments(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_mapping_type. + enterTff_mapping_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_mapping_type. + exitTff_mapping_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_xprod_type. + enterTff_xprod_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_xprod_type. + exitTff_xprod_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_tuple_type. + enterTxf_tuple_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_tuple_type. + exitTxf_tuple_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_type_list. + enterTff_type_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_type_list. + exitTff_type_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_subtype. + enterTff_subtype(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_subtype. + exitTff_subtype(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_definition. + enterTxf_definition(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_definition. + exitTxf_definition(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#txf_sequent. + enterTxf_sequent(ctx) { + } + + // Exit a parse tree produced by TPTPParser#txf_sequent. + exitTxf_sequent(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nhf_long_connective. + enterNhf_long_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nhf_long_connective. + exitNhf_long_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nhf_parameter_list. + enterNhf_parameter_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nhf_parameter_list. + exitNhf_parameter_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nhf_parameter. + enterNhf_parameter(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nhf_parameter. + exitNhf_parameter(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nhf_key_pair. + enterNhf_key_pair(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nhf_key_pair. + exitNhf_key_pair(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nxf_long_connective. + enterNxf_long_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nxf_long_connective. + exitNxf_long_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nxf_parameter_list. + enterNxf_parameter_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nxf_parameter_list. + exitNxf_parameter_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nxf_parameter. + enterNxf_parameter(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nxf_parameter. + exitNxf_parameter(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nxf_key_pair. + enterNxf_key_pair(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nxf_key_pair. + exitNxf_key_pair(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#ntf_connective_name. + enterNtf_connective_name(ctx) { + } + + // Exit a parse tree produced by TPTPParser#ntf_connective_name. + exitNtf_connective_name(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#ntf_defined_connective. + enterNtf_defined_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#ntf_defined_connective. + exitNtf_defined_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#ntf_index. + enterNtf_index(ctx) { + } + + // Exit a parse tree produced by TPTPParser#ntf_index. + exitNtf_index(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#ntf_short_connective. + enterNtf_short_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#ntf_short_connective. + exitNtf_short_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tcf_formula. + enterTcf_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tcf_formula. + exitTcf_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tcf_logic_formula. + enterTcf_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tcf_logic_formula. + exitTcf_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tcf_quantified_formula. + enterTcf_quantified_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tcf_quantified_formula. + exitTcf_quantified_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_formula. + enterFof_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_formula. + exitFof_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_logic_formula. + enterFof_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_logic_formula. + exitFof_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_binary_formula. + enterFof_binary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_binary_formula. + exitFof_binary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_binary_pair. + enterFof_binary_pair(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_binary_pair. + exitFof_binary_pair(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_binary_list. + enterFof_binary_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_binary_list. + exitFof_binary_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_or_formula. + enterFof_or_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_or_formula. + exitFof_or_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_and_formula. + enterFof_and_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_and_formula. + exitFof_and_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_unary_formula. + enterFof_unary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_unary_formula. + exitFof_unary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_infix_unary. + enterFof_infix_unary(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_infix_unary. + exitFof_infix_unary(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_unit_formula. + enterFof_unit_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_unit_formula. + exitFof_unit_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_unitary_formula. + enterFof_unitary_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_unitary_formula. + exitFof_unitary_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_quantified_formula. + enterFof_quantified_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_quantified_formula. + exitFof_quantified_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_variable_list. + enterFof_variable_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_variable_list. + exitFof_variable_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_atomic_formula. + enterFof_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_atomic_formula. + exitFof_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_plain_atomic_formula. + enterFof_plain_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_plain_atomic_formula. + exitFof_plain_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_atomic_formula. + enterFof_defined_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_atomic_formula. + exitFof_defined_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_plain_formula. + enterFof_defined_plain_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_plain_formula. + exitFof_defined_plain_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_infix_formula. + enterFof_defined_infix_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_infix_formula. + exitFof_defined_infix_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_system_atomic_formula. + enterFof_system_atomic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_system_atomic_formula. + exitFof_system_atomic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_plain_term. + enterFof_plain_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_plain_term. + exitFof_plain_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_term. + enterFof_defined_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_term. + exitFof_defined_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_atomic_term. + enterFof_defined_atomic_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_atomic_term. + exitFof_defined_atomic_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_defined_plain_term. + enterFof_defined_plain_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_defined_plain_term. + exitFof_defined_plain_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_system_term. + enterFof_system_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_system_term. + exitFof_system_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_arguments. + enterFof_arguments(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_arguments. + exitFof_arguments(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_term. + enterFof_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_term. + exitFof_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_function_term. + enterFof_function_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_function_term. + exitFof_function_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_sequent. + enterFof_sequent(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_sequent. + exitFof_sequent(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_formula_tuple. + enterFof_formula_tuple(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_formula_tuple. + exitFof_formula_tuple(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_formula_tuple_list. + enterFof_formula_tuple_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_formula_tuple_list. + exitFof_formula_tuple_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#comma_fof_logic_formula. + enterComma_fof_logic_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#comma_fof_logic_formula. + exitComma_fof_logic_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#cnf_formula. + enterCnf_formula(ctx) { + } + + // Exit a parse tree produced by TPTPParser#cnf_formula. + exitCnf_formula(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#cnf_disjunction. + enterCnf_disjunction(ctx) { + } + + // Exit a parse tree produced by TPTPParser#cnf_disjunction. + exitCnf_disjunction(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#cnf_literal. + enterCnf_literal(ctx) { + } + + // Exit a parse tree produced by TPTPParser#cnf_literal. + exitCnf_literal(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_quantifier. + enterThf_quantifier(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_quantifier. + exitThf_quantifier(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_unary_connective. + enterThf_unary_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_unary_connective. + exitThf_unary_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#th0_quantifier. + enterTh0_quantifier(ctx) { + } + + // Exit a parse tree produced by TPTPParser#th0_quantifier. + exitTh0_quantifier(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#type_quantifier. + enterType_quantifier(ctx) { + } + + // Exit a parse tree produced by TPTPParser#type_quantifier. + exitType_quantifier(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#subtype_sign. + enterSubtype_sign(ctx) { + } + + // Exit a parse tree produced by TPTPParser#subtype_sign. + exitSubtype_sign(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_unary_connective. + enterTff_unary_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_unary_connective. + exitTff_unary_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_quantifier. + enterTff_quantifier(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_quantifier. + exitTff_quantifier(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_quantifier. + enterFof_quantifier(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_quantifier. + exitFof_quantifier(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nonassoc_connective. + enterNonassoc_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nonassoc_connective. + exitNonassoc_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#assoc_connective. + enterAssoc_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#assoc_connective. + exitAssoc_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#unary_connective. + enterUnary_connective(ctx) { + } + + // Exit a parse tree produced by TPTPParser#unary_connective. + exitUnary_connective(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#gentzen_arrow. + enterGentzen_arrow(ctx) { + } + + // Exit a parse tree produced by TPTPParser#gentzen_arrow. + exitGentzen_arrow(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#assignment. + enterAssignment(ctx) { + } + + // Exit a parse tree produced by TPTPParser#assignment. + exitAssignment(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#identical. + enterIdentical(ctx) { + } + + // Exit a parse tree produced by TPTPParser#identical. + exitIdentical(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#typeable_atom. + enterTypeable_atom(ctx) { + } + + // Exit a parse tree produced by TPTPParser#typeable_atom. + exitTypeable_atom(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#atomic_type. + enterAtomic_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#atomic_type. + exitAtomic_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#type_constant. + enterType_constant(ctx) { + } + + // Exit a parse tree produced by TPTPParser#type_constant. + exitType_constant(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#type_functor. + enterType_functor(ctx) { + } + + // Exit a parse tree produced by TPTPParser#type_functor. + exitType_functor(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#defined_type. + enterDefined_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#defined_type. + exitDefined_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#system_type. + enterSystem_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#system_type. + exitSystem_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#defined_infix_pred. + enterDefined_infix_pred(ctx) { + } + + // Exit a parse tree produced by TPTPParser#defined_infix_pred. + exitDefined_infix_pred(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#infix_equality. + enterInfix_equality(ctx) { + } + + // Exit a parse tree produced by TPTPParser#infix_equality. + exitInfix_equality(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#infix_inequality. + enterInfix_inequality(ctx) { + } + + // Exit a parse tree produced by TPTPParser#infix_inequality. + exitInfix_inequality(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#constant. + enterConstant(ctx) { + } + + // Exit a parse tree produced by TPTPParser#constant. + exitConstant(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#functor. + enterFunctor(ctx) { + } + + // Exit a parse tree produced by TPTPParser#functor. + exitFunctor(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#defined_constant. + enterDefined_constant(ctx) { + } + + // Exit a parse tree produced by TPTPParser#defined_constant. + exitDefined_constant(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#defined_functor. + enterDefined_functor(ctx) { + } + + // Exit a parse tree produced by TPTPParser#defined_functor. + exitDefined_functor(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#system_constant. + enterSystem_constant(ctx) { + } + + // Exit a parse tree produced by TPTPParser#system_constant. + exitSystem_constant(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#system_functor. + enterSystem_functor(ctx) { + } + + // Exit a parse tree produced by TPTPParser#system_functor. + exitSystem_functor(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#th1_defined_term. + enterTh1_defined_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#th1_defined_term. + exitTh1_defined_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#defined_term. + enterDefined_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#defined_term. + exitDefined_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#variable. + enterVariable(ctx) { + } + + // Exit a parse tree produced by TPTPParser#variable. + exitVariable(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#source. + enterSource(ctx) { + } + + // Exit a parse tree produced by TPTPParser#source. + exitSource(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#sources. + enterSources(ctx) { + } + + // Exit a parse tree produced by TPTPParser#sources. + exitSources(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#dag_source. + enterDag_source(ctx) { + } + + // Exit a parse tree produced by TPTPParser#dag_source. + exitDag_source(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#inference_record. + enterInference_record(ctx) { + } + + // Exit a parse tree produced by TPTPParser#inference_record. + exitInference_record(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#inference_rule. + enterInference_rule(ctx) { + } + + // Exit a parse tree produced by TPTPParser#inference_rule. + exitInference_rule(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#internal_source. + enterInternal_source(ctx) { + } + + // Exit a parse tree produced by TPTPParser#internal_source. + exitInternal_source(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#intro_type. + enterIntro_type(ctx) { + } + + // Exit a parse tree produced by TPTPParser#intro_type. + exitIntro_type(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#external_source. + enterExternal_source(ctx) { + } + + // Exit a parse tree produced by TPTPParser#external_source. + exitExternal_source(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#file_source. + enterFile_source(ctx) { + } + + // Exit a parse tree produced by TPTPParser#file_source. + exitFile_source(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#file_info. + enterFile_info(ctx) { + } + + // Exit a parse tree produced by TPTPParser#file_info. + exitFile_info(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#parents. + enterParents(ctx) { + } + + // Exit a parse tree produced by TPTPParser#parents. + exitParents(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#parent_list. + enterParent_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#parent_list. + exitParent_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#comma_parent_info. + enterComma_parent_info(ctx) { + } + + // Exit a parse tree produced by TPTPParser#comma_parent_info. + exitComma_parent_info(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#parent_info. + enterParent_info(ctx) { + } + + // Exit a parse tree produced by TPTPParser#parent_info. + exitParent_info(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#parent_details. + enterParent_details(ctx) { + } + + // Exit a parse tree produced by TPTPParser#parent_details. + exitParent_details(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#optional_info. + enterOptional_info(ctx) { + } + + // Exit a parse tree produced by TPTPParser#optional_info. + exitOptional_info(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#useful_info. + enterUseful_info(ctx) { + } + + // Exit a parse tree produced by TPTPParser#useful_info. + exitUseful_info(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#include. + enterInclude(ctx) { + } + + // Exit a parse tree produced by TPTPParser#include. + exitInclude(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#include_optionals. + enterInclude_optionals(ctx) { + } + + // Exit a parse tree produced by TPTPParser#include_optionals. + exitInclude_optionals(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#formula_selection. + enterFormula_selection(ctx) { + } + + // Exit a parse tree produced by TPTPParser#formula_selection. + exitFormula_selection(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#name_list. + enterName_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#name_list. + exitName_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#space_name. + enterSpace_name(ctx) { + } + + // Exit a parse tree produced by TPTPParser#space_name. + exitSpace_name(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#general_term. + enterGeneral_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#general_term. + exitGeneral_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#general_data. + enterGeneral_data(ctx) { + } + + // Exit a parse tree produced by TPTPParser#general_data. + exitGeneral_data(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#general_function. + enterGeneral_function(ctx) { + } + + // Exit a parse tree produced by TPTPParser#general_function. + exitGeneral_function(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#formula_data. + enterFormula_data(ctx) { + } + + // Exit a parse tree produced by TPTPParser#formula_data. + exitFormula_data(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#general_list. + enterGeneral_list(ctx) { + } + + // Exit a parse tree produced by TPTPParser#general_list. + exitGeneral_list(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#general_terms. + enterGeneral_terms(ctx) { + } + + // Exit a parse tree produced by TPTPParser#general_terms. + exitGeneral_terms(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#comma_general_term. + enterComma_general_term(ctx) { + } + + // Exit a parse tree produced by TPTPParser#comma_general_term. + exitComma_general_term(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#name. + enterName(ctx) { + } + + // Exit a parse tree produced by TPTPParser#name. + exitName(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#atomic_word. + enterAtomic_word(ctx) { + } + + // Exit a parse tree produced by TPTPParser#atomic_word. + exitAtomic_word(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#atomic_defined_word. + enterAtomic_defined_word(ctx) { + } + + // Exit a parse tree produced by TPTPParser#atomic_defined_word. + exitAtomic_defined_word(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#atomic_system_word. + enterAtomic_system_word(ctx) { + } + + // Exit a parse tree produced by TPTPParser#atomic_system_word. + exitAtomic_system_word(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#number. + enterNumber(ctx) { + } + + // Exit a parse tree produced by TPTPParser#number. + exitNumber(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#file_name. + enterFile_name(ctx) { + } + + // Exit a parse tree produced by TPTPParser#file_name. + exitFile_name(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#nothing. + enterNothing(ctx) { + } + + // Exit a parse tree produced by TPTPParser#nothing. + exitNothing(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#lower_word_token. + enterLower_word_token(ctx) { + } + + // Exit a parse tree produced by TPTPParser#lower_word_token. + exitLower_word_token(ctx) { + } + + + +} \ No newline at end of file diff --git a/tptplus/server/parser/vendor/tptp-antlr/original/TPTPParser.js b/tptplus/server/parser/vendor/tptp-antlr/original/TPTPParser.js new file mode 100644 index 0000000..62d1460 --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/original/TPTPParser.js @@ -0,0 +1,19605 @@ +// Generated from TPTP.g4 by ANTLR 4.13.2 +// jshint ignore: start +import antlr4 from 'antlr4'; +import TPTPListener from './TPTPListener.js'; +const serializedATN = [4,1,73,1794,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7, +4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12, +2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2, +20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27, +7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7, +34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41, +2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2, +49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56, +7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7, +63,2,64,7,64,2,65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70, +2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2, +78,7,78,2,79,7,79,2,80,7,80,2,81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2,85, +7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,2,91,7,91,2,92,7, +92,2,93,7,93,2,94,7,94,2,95,7,95,2,96,7,96,2,97,7,97,2,98,7,98,2,99,7,99, +2,100,7,100,2,101,7,101,2,102,7,102,2,103,7,103,2,104,7,104,2,105,7,105, +2,106,7,106,2,107,7,107,2,108,7,108,2,109,7,109,2,110,7,110,2,111,7,111, +2,112,7,112,2,113,7,113,2,114,7,114,2,115,7,115,2,116,7,116,2,117,7,117, +2,118,7,118,2,119,7,119,2,120,7,120,2,121,7,121,2,122,7,122,2,123,7,123, +2,124,7,124,2,125,7,125,2,126,7,126,2,127,7,127,2,128,7,128,2,129,7,129, +2,130,7,130,2,131,7,131,2,132,7,132,2,133,7,133,2,134,7,134,2,135,7,135, +2,136,7,136,2,137,7,137,2,138,7,138,2,139,7,139,2,140,7,140,2,141,7,141, +2,142,7,142,2,143,7,143,2,144,7,144,2,145,7,145,2,146,7,146,2,147,7,147, +2,148,7,148,2,149,7,149,2,150,7,150,2,151,7,151,2,152,7,152,2,153,7,153, +2,154,7,154,2,155,7,155,2,156,7,156,2,157,7,157,2,158,7,158,2,159,7,159, +2,160,7,160,2,161,7,161,2,162,7,162,2,163,7,163,2,164,7,164,2,165,7,165, +2,166,7,166,2,167,7,167,2,168,7,168,2,169,7,169,2,170,7,170,2,171,7,171, +2,172,7,172,2,173,7,173,2,174,7,174,2,175,7,175,2,176,7,176,2,177,7,177, +2,178,7,178,2,179,7,179,2,180,7,180,2,181,7,181,2,182,7,182,2,183,7,183, +2,184,7,184,2,185,7,185,2,186,7,186,2,187,7,187,2,188,7,188,2,189,7,189, +2,190,7,190,2,191,7,191,2,192,7,192,2,193,7,193,2,194,7,194,2,195,7,195, +2,196,7,196,2,197,7,197,2,198,7,198,2,199,7,199,2,200,7,200,2,201,7,201, +2,202,7,202,2,203,7,203,2,204,7,204,2,205,7,205,2,206,7,206,2,207,7,207, +2,208,7,208,2,209,7,209,2,210,7,210,2,211,7,211,2,212,7,212,2,213,7,213, +2,214,7,214,2,215,7,215,2,216,7,216,2,217,7,217,2,218,7,218,2,219,7,219, +2,220,7,220,2,221,7,221,2,222,7,222,2,223,7,223,2,224,7,224,2,225,7,225, +2,226,7,226,2,227,7,227,2,228,7,228,2,229,7,229,1,0,5,0,462,8,0,10,0,12, +0,465,9,0,1,0,1,0,1,1,1,1,3,1,471,8,1,1,2,1,2,1,2,1,2,1,2,1,2,3,2,479,8, +2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,5,1,5,1,5,1,5,1, +5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1, +7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1, +8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10, +1,10,1,10,3,10,554,8,10,1,11,1,11,1,11,1,11,1,11,3,11,561,8,11,1,12,1,12, +1,12,3,12,566,8,12,1,13,1,13,1,13,1,13,1,13,1,13,3,13,574,8,13,1,14,1,14, +1,14,3,14,579,8,14,1,15,1,15,1,15,1,15,1,16,1,16,1,16,3,16,588,8,16,1,17, +1,17,1,17,1,17,1,17,1,17,1,17,1,17,5,17,598,8,17,10,17,12,17,601,9,17,1, +18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,5,18,611,8,18,10,18,12,18,614,9,18, +1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,5,19,624,8,19,10,19,12,19,627,9, +19,1,20,1,20,1,20,3,20,632,8,20,1,21,1,21,3,21,636,8,21,1,22,1,22,1,22,1, +22,1,22,1,22,1,22,3,22,645,8,22,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24, +1,24,1,25,1,25,1,25,1,25,1,25,3,25,661,8,25,1,26,1,26,1,26,1,26,1,27,1,27, +3,27,669,8,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,3,30, +682,8,30,1,31,1,31,3,31,686,8,31,1,32,1,32,1,32,1,32,1,32,1,32,1,32,1,32, +3,32,696,8,32,1,33,1,33,3,33,700,8,33,1,34,1,34,1,34,1,34,1,35,1,35,1,36, +1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,3,37,722, +8,37,1,38,1,38,1,38,1,38,1,38,3,38,729,8,38,1,39,1,39,1,39,1,39,1,39,3,39, +736,8,39,1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,41,3,41,747,8,41,1,42, +1,42,1,42,1,42,1,42,1,42,3,42,755,8,42,1,43,1,43,1,43,1,43,1,43,3,43,762, +8,43,1,44,1,44,1,44,1,44,1,44,1,44,3,44,770,8,44,1,45,1,45,1,45,1,45,1,45, +1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,3,45,787,8,45,1,46,1,46, +1,47,1,47,5,47,793,8,47,10,47,12,47,796,9,47,1,48,1,48,1,48,1,49,1,49,1, +49,1,49,1,49,1,49,1,49,1,49,3,49,809,8,49,1,50,1,50,1,50,3,50,814,8,50,1, +51,1,51,1,52,1,52,1,53,1,53,1,53,3,53,823,8,53,1,54,1,54,1,54,1,54,1,54, +1,54,1,54,1,54,3,54,833,8,54,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,5,55, +843,8,55,10,55,12,55,846,9,55,1,56,1,56,1,56,1,56,1,56,1,56,1,56,1,56,5, +56,856,8,56,10,56,12,56,859,9,56,1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58, +1,59,1,59,1,59,1,59,1,60,1,60,1,60,3,60,876,8,60,1,61,1,61,1,61,1,61,1,61, +1,61,3,61,884,8,61,1,62,1,62,3,62,888,8,62,1,63,1,63,1,63,1,63,1,64,1,64, +3,64,896,8,64,1,65,1,65,1,65,1,65,1,65,1,65,1,65,1,65,5,65,906,8,65,10,65, +12,65,909,9,65,1,66,1,66,1,66,1,66,1,66,1,66,1,66,1,66,5,66,919,8,66,10, +66,12,66,922,9,66,1,67,1,67,1,67,3,67,927,8,67,1,68,1,68,3,68,931,8,68,1, +69,1,69,1,69,1,69,1,69,1,69,1,69,3,69,940,8,69,1,70,1,70,1,71,1,71,1,71, +1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,3,72,956,8,72,1,73,1,73,3,73, +960,8,73,1,74,1,74,1,74,1,74,1,75,1,75,3,75,968,8,75,1,76,1,76,1,76,1,77, +1,77,1,77,1,77,1,78,1,78,1,78,3,78,980,8,78,1,79,1,79,1,79,1,79,1,79,1,79, +3,79,988,8,79,1,80,1,80,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,3,81,1000, +8,81,1,82,1,82,1,82,1,82,1,83,1,83,1,83,1,83,1,83,1,83,3,83,1012,8,83,1, +84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85,1,85,3,85, +1028,8,85,1,86,1,86,1,86,1,86,1,86,3,86,1035,8,86,1,87,1,87,1,87,1,87,1, +87,3,87,1042,8,87,1,88,1,88,1,88,1,88,1,89,1,89,3,89,1050,8,89,1,90,1,90, +1,90,1,90,1,90,3,90,1057,8,90,1,91,1,91,1,91,1,91,1,91,1,91,1,92,1,92,1, +92,3,92,1068,8,92,1,93,1,93,1,93,1,93,1,93,1,93,1,93,1,93,3,93,1078,8,93, +1,94,1,94,1,94,1,94,1,94,1,94,3,94,1086,8,94,1,95,1,95,5,95,1090,8,95,10, +95,12,95,1093,9,95,1,96,1,96,1,96,1,97,1,97,1,97,1,97,1,97,1,97,1,97,1,97, +3,97,1106,8,97,1,98,1,98,3,98,1110,8,98,1,99,1,99,1,99,1,99,1,99,1,99,3, +99,1118,8,99,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,101,1,101,1,101, +1,101,1,101,1,101,3,101,1133,8,101,1,102,1,102,1,102,1,102,1,102,3,102,1140, +8,102,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103,1,103, +1,103,1,103,3,103,1155,8,103,1,104,1,104,1,104,1,104,1,104,3,104,1162,8, +104,1,105,1,105,1,105,1,105,1,106,1,106,1,106,1,106,1,106,1,106,1,106,1, +106,5,106,1176,8,106,10,106,12,106,1179,9,106,1,107,1,107,1,107,1,107,1, +108,1,108,1,108,1,108,1,108,3,108,1190,8,108,1,109,1,109,1,109,1,109,1,110, +1,110,1,110,1,110,1,111,1,111,1,111,1,111,1,112,1,112,1,112,1,112,1,112, +1,112,1,112,1,112,1,112,1,112,1,112,3,112,1215,8,112,1,113,1,113,1,113,1, +113,1,113,3,113,1222,8,113,1,114,1,114,3,114,1226,8,114,1,115,1,115,1,116, +1,116,1,116,1,116,1,116,1,116,1,116,1,116,1,116,1,116,1,116,3,116,1241,8, +116,1,117,1,117,1,117,1,117,1,117,3,117,1248,8,117,1,118,1,118,3,118,1252, +8,118,1,119,1,119,1,120,1,120,3,120,1258,8,120,1,121,1,121,1,122,1,122,1, +122,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1,123,1, +123,3,123,1277,8,123,1,124,1,124,3,124,1281,8,124,1,125,1,125,3,125,1285, +8,125,1,126,1,126,1,126,1,126,1,126,1,126,1,126,1,127,1,127,3,127,1296,8, +127,1,128,1,128,1,128,3,128,1301,8,128,1,129,1,129,3,129,1305,8,129,1,130, +1,130,1,130,1,130,1,131,1,131,3,131,1313,8,131,1,132,1,132,1,132,1,132,1, +132,1,132,1,132,1,132,5,132,1323,8,132,10,132,12,132,1326,9,132,1,133,1, +133,1,133,1,133,1,133,1,133,1,133,1,133,5,133,1336,8,133,10,133,12,133,1339, +9,133,1,134,1,134,1,134,1,134,3,134,1345,8,134,1,135,1,135,1,135,1,135,1, +136,1,136,3,136,1353,8,136,1,137,1,137,1,137,1,137,1,137,1,137,3,137,1361, +8,137,1,138,1,138,1,138,1,138,1,138,1,138,1,138,1,139,1,139,1,139,1,139, +1,139,3,139,1375,8,139,1,140,1,140,1,140,3,140,1380,8,140,1,141,1,141,1, +142,1,142,3,142,1386,8,142,1,143,1,143,1,144,1,144,1,144,1,144,1,145,1,145, +1,146,1,146,1,146,1,146,1,146,1,146,3,146,1402,8,146,1,147,1,147,3,147,1406, +8,147,1,148,1,148,1,149,1,149,1,149,1,149,1,149,1,149,3,149,1416,8,149,1, +150,1,150,1,150,1,150,1,150,1,150,3,150,1424,8,150,1,151,1,151,1,151,1,151, +1,151,3,151,1431,8,151,1,152,1,152,3,152,1435,8,152,1,153,1,153,1,153,3, +153,1440,8,153,1,154,1,154,1,154,1,154,1,154,1,154,1,154,1,154,3,154,1450, +8,154,1,155,1,155,1,155,1,155,1,155,1,155,3,155,1458,8,155,1,156,1,156,5, +156,1462,8,156,10,156,12,156,1465,9,156,1,157,1,157,1,157,1,158,1,158,1, +158,1,158,1,158,3,158,1475,8,158,1,159,1,159,1,159,1,159,1,159,1,159,5,159, +1483,8,159,10,159,12,159,1486,9,159,1,160,1,160,1,160,1,160,1,160,1,160, +1,160,1,160,1,160,3,160,1497,8,160,1,161,1,161,1,161,3,161,1502,8,161,1, +162,1,162,3,162,1506,8,162,1,163,1,163,1,164,1,164,1,165,1,165,1,166,1,166, +3,166,1516,8,166,1,167,1,167,3,167,1520,8,167,1,168,1,168,1,169,1,169,1, +169,1,169,1,169,1,169,1,169,3,169,1531,8,169,1,170,1,170,1,171,1,171,1,172, +1,172,1,173,1,173,1,174,1,174,1,175,1,175,3,175,1545,8,175,1,176,1,176,1, +176,3,176,1550,8,176,1,177,1,177,1,178,1,178,1,179,1,179,1,180,1,180,1,181, +1,181,1,182,1,182,1,183,1,183,1,184,1,184,1,185,1,185,1,186,1,186,1,187, +1,187,1,188,1,188,1,189,1,189,1,190,1,190,1,191,1,191,3,191,1582,8,191,1, +192,1,192,1,193,1,193,1,193,1,193,1,193,1,193,1,193,3,193,1593,8,193,1,194, +1,194,1,194,1,194,1,194,3,194,1600,8,194,1,195,1,195,3,195,1604,8,195,1, +196,1,196,1,196,1,196,1,196,1,196,1,196,1,196,1,196,1,197,1,197,1,198,1, +198,1,198,1,198,1,198,1,198,1,198,1,198,1,198,1,199,1,199,1,200,1,200,1, +201,1,201,1,201,1,201,1,201,1,201,1,202,1,202,1,202,3,202,1639,8,202,1,203, +1,203,1,203,1,203,1,203,1,203,3,203,1647,8,203,1,204,1,204,5,204,1651,8, +204,10,204,12,204,1654,9,204,1,205,1,205,1,205,1,206,1,206,1,206,1,207,1, +207,1,207,3,207,1665,8,207,1,208,1,208,1,208,3,208,1670,8,208,1,209,1,209, +1,210,1,210,1,210,1,210,1,210,1,210,1,210,1,211,1,211,1,211,1,211,1,211, +1,211,1,211,1,211,3,211,1689,8,211,1,212,1,212,1,212,1,212,1,212,3,212,1696, +8,212,1,213,1,213,1,213,1,213,1,213,3,213,1703,8,213,1,214,1,214,1,215,1, +215,1,215,1,215,1,215,1,215,3,215,1713,8,215,1,216,1,216,1,216,1,216,1,216, +1,216,3,216,1721,8,216,1,217,1,217,1,217,1,217,1,217,1,218,1,218,1,218,1, +218,1,218,1,218,1,218,1,218,1,218,1,218,1,218,1,218,1,218,1,218,1,218,1, +218,1,218,1,218,1,218,1,218,1,218,1,218,1,218,1,218,1,218,3,218,1753,8,218, +1,219,1,219,1,219,1,219,1,219,1,219,3,219,1761,8,219,1,220,1,220,5,220,1765, +8,220,10,220,12,220,1768,9,220,1,221,1,221,1,221,1,222,1,222,3,222,1775, +8,222,1,223,1,223,1,223,3,223,1780,8,223,1,224,1,224,1,225,1,225,1,226,1, +226,1,227,1,227,1,228,1,228,1,229,1,229,1,229,0,11,34,36,38,110,112,130, +132,212,264,266,318,230,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34, +36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82, +84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,118,120,122, +124,126,128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158, +160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,192,194, +196,198,200,202,204,206,208,210,212,214,216,218,220,222,224,226,228,230, +232,234,236,238,240,242,244,246,248,250,252,254,256,258,260,262,264,266, +268,270,272,274,276,278,280,282,284,286,288,290,292,294,296,298,300,302, +304,306,308,310,312,314,316,318,320,322,324,326,328,330,332,334,336,338, +340,342,344,346,348,350,352,354,356,358,360,362,364,366,368,370,372,374, +376,378,380,382,384,386,388,390,392,394,396,398,400,402,404,406,408,410, +412,414,416,418,420,422,424,426,428,430,432,434,436,438,440,442,444,446, +448,450,452,454,456,458,0,7,1,0,22,24,1,0,25,26,2,0,20,20,28,28,2,0,12,12, +65,65,1,0,39,43,1,0,60,62,4,0,1,1,6,10,44,47,59,59,1767,0,463,1,0,0,0,2, +470,1,0,0,0,4,478,1,0,0,0,6,480,1,0,0,0,8,491,1,0,0,0,10,493,1,0,0,0,12, +504,1,0,0,0,14,515,1,0,0,0,16,526,1,0,0,0,18,537,1,0,0,0,20,553,1,0,0,0, +22,560,1,0,0,0,24,565,1,0,0,0,26,573,1,0,0,0,28,578,1,0,0,0,30,580,1,0,0, +0,32,587,1,0,0,0,34,589,1,0,0,0,36,602,1,0,0,0,38,615,1,0,0,0,40,631,1,0, +0,0,42,635,1,0,0,0,44,644,1,0,0,0,46,646,1,0,0,0,48,649,1,0,0,0,50,660,1, +0,0,0,52,662,1,0,0,0,54,668,1,0,0,0,56,670,1,0,0,0,58,673,1,0,0,0,60,681, +1,0,0,0,62,685,1,0,0,0,64,695,1,0,0,0,66,699,1,0,0,0,68,701,1,0,0,0,70,705, +1,0,0,0,72,707,1,0,0,0,74,721,1,0,0,0,76,728,1,0,0,0,78,735,1,0,0,0,80,737, +1,0,0,0,82,746,1,0,0,0,84,754,1,0,0,0,86,761,1,0,0,0,88,769,1,0,0,0,90,786, +1,0,0,0,92,788,1,0,0,0,94,790,1,0,0,0,96,797,1,0,0,0,98,808,1,0,0,0,100, +813,1,0,0,0,102,815,1,0,0,0,104,817,1,0,0,0,106,822,1,0,0,0,108,832,1,0, +0,0,110,834,1,0,0,0,112,847,1,0,0,0,114,860,1,0,0,0,116,864,1,0,0,0,118, +868,1,0,0,0,120,875,1,0,0,0,122,883,1,0,0,0,124,887,1,0,0,0,126,889,1,0, +0,0,128,895,1,0,0,0,130,897,1,0,0,0,132,910,1,0,0,0,134,926,1,0,0,0,136, +930,1,0,0,0,138,939,1,0,0,0,140,941,1,0,0,0,142,943,1,0,0,0,144,955,1,0, +0,0,146,959,1,0,0,0,148,961,1,0,0,0,150,967,1,0,0,0,152,969,1,0,0,0,154, +972,1,0,0,0,156,979,1,0,0,0,158,987,1,0,0,0,160,989,1,0,0,0,162,999,1,0, +0,0,164,1001,1,0,0,0,166,1011,1,0,0,0,168,1013,1,0,0,0,170,1027,1,0,0,0, +172,1034,1,0,0,0,174,1041,1,0,0,0,176,1043,1,0,0,0,178,1049,1,0,0,0,180, +1056,1,0,0,0,182,1058,1,0,0,0,184,1067,1,0,0,0,186,1077,1,0,0,0,188,1085, +1,0,0,0,190,1087,1,0,0,0,192,1094,1,0,0,0,194,1105,1,0,0,0,196,1109,1,0, +0,0,198,1117,1,0,0,0,200,1119,1,0,0,0,202,1132,1,0,0,0,204,1139,1,0,0,0, +206,1154,1,0,0,0,208,1161,1,0,0,0,210,1163,1,0,0,0,212,1167,1,0,0,0,214, +1180,1,0,0,0,216,1189,1,0,0,0,218,1191,1,0,0,0,220,1195,1,0,0,0,222,1199, +1,0,0,0,224,1214,1,0,0,0,226,1221,1,0,0,0,228,1225,1,0,0,0,230,1227,1,0, +0,0,232,1240,1,0,0,0,234,1247,1,0,0,0,236,1251,1,0,0,0,238,1253,1,0,0,0, +240,1257,1,0,0,0,242,1259,1,0,0,0,244,1261,1,0,0,0,246,1276,1,0,0,0,248, +1280,1,0,0,0,250,1284,1,0,0,0,252,1286,1,0,0,0,254,1295,1,0,0,0,256,1300, +1,0,0,0,258,1304,1,0,0,0,260,1306,1,0,0,0,262,1312,1,0,0,0,264,1314,1,0, +0,0,266,1327,1,0,0,0,268,1344,1,0,0,0,270,1346,1,0,0,0,272,1352,1,0,0,0, +274,1360,1,0,0,0,276,1362,1,0,0,0,278,1374,1,0,0,0,280,1379,1,0,0,0,282, +1381,1,0,0,0,284,1385,1,0,0,0,286,1387,1,0,0,0,288,1389,1,0,0,0,290,1393, +1,0,0,0,292,1401,1,0,0,0,294,1405,1,0,0,0,296,1407,1,0,0,0,298,1415,1,0, +0,0,300,1423,1,0,0,0,302,1430,1,0,0,0,304,1434,1,0,0,0,306,1439,1,0,0,0, +308,1449,1,0,0,0,310,1457,1,0,0,0,312,1459,1,0,0,0,314,1466,1,0,0,0,316, +1474,1,0,0,0,318,1476,1,0,0,0,320,1496,1,0,0,0,322,1501,1,0,0,0,324,1505, +1,0,0,0,326,1507,1,0,0,0,328,1509,1,0,0,0,330,1511,1,0,0,0,332,1515,1,0, +0,0,334,1519,1,0,0,0,336,1521,1,0,0,0,338,1530,1,0,0,0,340,1532,1,0,0,0, +342,1534,1,0,0,0,344,1536,1,0,0,0,346,1538,1,0,0,0,348,1540,1,0,0,0,350, +1544,1,0,0,0,352,1549,1,0,0,0,354,1551,1,0,0,0,356,1553,1,0,0,0,358,1555, +1,0,0,0,360,1557,1,0,0,0,362,1559,1,0,0,0,364,1561,1,0,0,0,366,1563,1,0, +0,0,368,1565,1,0,0,0,370,1567,1,0,0,0,372,1569,1,0,0,0,374,1571,1,0,0,0, +376,1573,1,0,0,0,378,1575,1,0,0,0,380,1577,1,0,0,0,382,1581,1,0,0,0,384, +1583,1,0,0,0,386,1592,1,0,0,0,388,1599,1,0,0,0,390,1603,1,0,0,0,392,1605, +1,0,0,0,394,1614,1,0,0,0,396,1616,1,0,0,0,398,1625,1,0,0,0,400,1627,1,0, +0,0,402,1629,1,0,0,0,404,1638,1,0,0,0,406,1646,1,0,0,0,408,1648,1,0,0,0, +410,1655,1,0,0,0,412,1658,1,0,0,0,414,1664,1,0,0,0,416,1669,1,0,0,0,418, +1671,1,0,0,0,420,1673,1,0,0,0,422,1688,1,0,0,0,424,1695,1,0,0,0,426,1702, +1,0,0,0,428,1704,1,0,0,0,430,1712,1,0,0,0,432,1720,1,0,0,0,434,1722,1,0, +0,0,436,1752,1,0,0,0,438,1760,1,0,0,0,440,1762,1,0,0,0,442,1769,1,0,0,0, +444,1774,1,0,0,0,446,1779,1,0,0,0,448,1781,1,0,0,0,450,1783,1,0,0,0,452, +1785,1,0,0,0,454,1787,1,0,0,0,456,1789,1,0,0,0,458,1791,1,0,0,0,460,462, +3,2,1,0,461,460,1,0,0,0,462,465,1,0,0,0,463,461,1,0,0,0,463,464,1,0,0,0, +464,466,1,0,0,0,465,463,1,0,0,0,466,467,5,0,0,1,467,1,1,0,0,0,468,471,3, +4,2,0,469,471,3,420,210,0,470,468,1,0,0,0,470,469,1,0,0,0,471,3,1,0,0,0, +472,479,3,10,5,0,473,479,3,12,6,0,474,479,3,14,7,0,475,479,3,16,8,0,476, +479,3,18,9,0,477,479,3,6,3,0,478,472,1,0,0,0,478,473,1,0,0,0,478,474,1,0, +0,0,478,475,1,0,0,0,478,476,1,0,0,0,478,477,1,0,0,0,479,5,1,0,0,0,480,481, +5,1,0,0,481,482,5,2,0,0,482,483,3,444,222,0,483,484,5,3,0,0,484,485,3,22, +11,0,485,486,5,3,0,0,486,487,3,8,4,0,487,488,3,20,10,0,488,489,5,4,0,0,489, +490,5,5,0,0,490,7,1,0,0,0,491,492,3,254,127,0,492,9,1,0,0,0,493,494,5,6, +0,0,494,495,5,2,0,0,495,496,3,444,222,0,496,497,5,3,0,0,497,498,3,22,11, +0,498,499,5,3,0,0,499,500,3,24,12,0,500,501,3,20,10,0,501,502,5,4,0,0,502, +503,5,5,0,0,503,11,1,0,0,0,504,505,5,7,0,0,505,506,5,2,0,0,506,507,3,444, +222,0,507,508,5,3,0,0,508,509,3,22,11,0,509,510,5,3,0,0,510,511,3,120,60, +0,511,512,3,20,10,0,512,513,5,4,0,0,513,514,5,5,0,0,514,13,1,0,0,0,515,516, +5,8,0,0,516,517,5,2,0,0,517,518,3,444,222,0,518,519,5,3,0,0,519,520,3,22, +11,0,520,521,5,3,0,0,521,522,3,248,124,0,522,523,3,20,10,0,523,524,5,4,0, +0,524,525,5,5,0,0,525,15,1,0,0,0,526,527,5,9,0,0,527,528,5,2,0,0,528,529, +3,444,222,0,529,530,5,3,0,0,530,531,3,22,11,0,531,532,5,3,0,0,532,533,3, +254,127,0,533,534,3,20,10,0,534,535,5,4,0,0,535,536,5,5,0,0,536,17,1,0,0, +0,537,538,5,10,0,0,538,539,5,2,0,0,539,540,3,444,222,0,540,541,5,3,0,0,541, +542,3,22,11,0,542,543,5,3,0,0,543,544,3,316,158,0,544,545,3,20,10,0,545, +546,5,4,0,0,546,547,5,5,0,0,547,19,1,0,0,0,548,549,5,3,0,0,549,550,3,386, +193,0,550,551,3,416,208,0,551,554,1,0,0,0,552,554,3,456,228,0,553,548,1, +0,0,0,553,552,1,0,0,0,554,21,1,0,0,0,555,561,3,458,229,0,556,557,3,458,229, +0,557,558,5,11,0,0,558,559,3,430,215,0,559,561,1,0,0,0,560,555,1,0,0,0,560, +556,1,0,0,0,561,23,1,0,0,0,562,566,3,26,13,0,563,566,3,98,49,0,564,566,3, +114,57,0,565,562,1,0,0,0,565,563,1,0,0,0,565,564,1,0,0,0,566,25,1,0,0,0, +567,574,3,44,22,0,568,574,3,54,27,0,569,574,3,28,14,0,570,574,3,68,34,0, +571,574,3,116,58,0,572,574,3,118,59,0,573,567,1,0,0,0,573,568,1,0,0,0,573, +569,1,0,0,0,573,570,1,0,0,0,573,571,1,0,0,0,573,572,1,0,0,0,574,27,1,0,0, +0,575,579,3,30,15,0,576,579,3,32,16,0,577,579,3,106,53,0,578,575,1,0,0,0, +578,576,1,0,0,0,578,577,1,0,0,0,579,29,1,0,0,0,580,581,3,40,20,0,581,582, +3,338,169,0,582,583,3,40,20,0,583,31,1,0,0,0,584,588,3,34,17,0,585,588,3, +36,18,0,586,588,3,38,19,0,587,584,1,0,0,0,587,585,1,0,0,0,587,586,1,0,0, +0,588,33,1,0,0,0,589,590,6,17,-1,0,590,591,3,40,20,0,591,592,5,65,0,0,592, +593,3,40,20,0,593,599,1,0,0,0,594,595,10,1,0,0,595,596,5,65,0,0,596,598, +3,40,20,0,597,594,1,0,0,0,598,601,1,0,0,0,599,597,1,0,0,0,599,600,1,0,0, +0,600,35,1,0,0,0,601,599,1,0,0,0,602,603,6,18,-1,0,603,604,3,40,20,0,604, +605,5,12,0,0,605,606,3,40,20,0,606,612,1,0,0,0,607,608,10,1,0,0,608,609, +5,12,0,0,609,611,3,40,20,0,610,607,1,0,0,0,611,614,1,0,0,0,612,610,1,0,0, +0,612,613,1,0,0,0,613,37,1,0,0,0,614,612,1,0,0,0,615,616,6,19,-1,0,616,617, +3,40,20,0,617,618,5,13,0,0,618,619,3,40,20,0,619,625,1,0,0,0,620,621,10, +1,0,0,621,622,5,13,0,0,622,624,3,40,20,0,623,620,1,0,0,0,624,627,1,0,0,0, +625,623,1,0,0,0,625,626,1,0,0,0,626,39,1,0,0,0,627,625,1,0,0,0,628,632,3, +44,22,0,629,632,3,54,27,0,630,632,3,68,34,0,631,628,1,0,0,0,631,629,1,0, +0,0,631,630,1,0,0,0,632,41,1,0,0,0,633,636,3,44,22,0,634,636,3,56,28,0,635, +633,1,0,0,0,635,634,1,0,0,0,636,43,1,0,0,0,637,645,3,46,23,0,638,645,3,60, +30,0,639,645,3,384,192,0,640,641,5,2,0,0,641,642,3,26,13,0,642,643,5,4,0, +0,643,645,1,0,0,0,644,637,1,0,0,0,644,638,1,0,0,0,644,639,1,0,0,0,644,640, +1,0,0,0,645,45,1,0,0,0,646,647,3,48,24,0,647,648,3,40,20,0,648,47,1,0,0, +0,649,650,3,322,161,0,650,651,5,14,0,0,651,652,3,50,25,0,652,653,5,15,0, +0,653,654,5,16,0,0,654,49,1,0,0,0,655,661,3,52,26,0,656,657,3,52,26,0,657, +658,5,3,0,0,658,659,3,50,25,0,659,661,1,0,0,0,660,655,1,0,0,0,660,656,1, +0,0,0,661,51,1,0,0,0,662,663,3,384,192,0,663,664,5,16,0,0,664,665,3,100, +50,0,665,53,1,0,0,0,666,669,3,56,28,0,667,669,3,58,29,0,668,666,1,0,0,0, +668,667,1,0,0,0,669,55,1,0,0,0,670,671,3,324,162,0,671,672,3,42,21,0,672, +57,1,0,0,0,673,674,3,84,42,0,674,675,3,366,183,0,675,676,3,84,42,0,676,59, +1,0,0,0,677,682,3,62,31,0,678,682,3,64,32,0,679,682,3,70,35,0,680,682,3, +90,45,0,681,677,1,0,0,0,681,678,1,0,0,0,681,679,1,0,0,0,681,680,1,0,0,0, +682,61,1,0,0,0,683,686,3,368,184,0,684,686,3,88,44,0,685,683,1,0,0,0,685, +684,1,0,0,0,686,63,1,0,0,0,687,696,3,372,186,0,688,696,3,66,33,0,689,690, +5,2,0,0,690,691,3,86,43,0,691,692,5,4,0,0,692,696,1,0,0,0,693,696,3,224, +112,0,694,696,3,72,36,0,695,687,1,0,0,0,695,688,1,0,0,0,695,689,1,0,0,0, +695,693,1,0,0,0,695,694,1,0,0,0,696,65,1,0,0,0,697,700,3,382,191,0,698,700, +3,380,190,0,699,697,1,0,0,0,699,698,1,0,0,0,700,67,1,0,0,0,701,702,3,84, +42,0,702,703,3,362,181,0,703,704,3,84,42,0,704,69,1,0,0,0,705,706,3,376, +188,0,706,71,1,0,0,0,707,708,5,17,0,0,708,709,5,2,0,0,709,710,3,74,37,0, +710,711,5,3,0,0,711,712,3,78,39,0,712,713,5,3,0,0,713,714,3,26,13,0,714, +715,5,4,0,0,715,73,1,0,0,0,716,722,3,98,49,0,717,718,5,14,0,0,718,719,3, +76,38,0,719,720,5,15,0,0,720,722,1,0,0,0,721,716,1,0,0,0,721,717,1,0,0,0, +722,75,1,0,0,0,723,729,3,98,49,0,724,725,3,98,49,0,725,726,5,3,0,0,726,727, +3,76,38,0,727,729,1,0,0,0,728,723,1,0,0,0,728,724,1,0,0,0,729,77,1,0,0,0, +730,736,3,80,40,0,731,732,5,14,0,0,732,733,3,82,41,0,733,734,5,15,0,0,734, +736,1,0,0,0,735,730,1,0,0,0,735,731,1,0,0,0,736,79,1,0,0,0,737,738,3,26, +13,0,738,739,3,346,173,0,739,740,3,26,13,0,740,81,1,0,0,0,741,747,3,80,40, +0,742,743,3,80,40,0,743,744,5,3,0,0,744,745,3,82,41,0,745,747,1,0,0,0,746, +741,1,0,0,0,746,742,1,0,0,0,747,83,1,0,0,0,748,755,3,60,30,0,749,755,3,384, +192,0,750,751,5,2,0,0,751,752,3,26,13,0,752,753,5,4,0,0,753,755,1,0,0,0, +754,748,1,0,0,0,754,749,1,0,0,0,754,750,1,0,0,0,755,85,1,0,0,0,756,762,3, +338,169,0,757,762,3,340,170,0,758,762,3,364,182,0,759,762,3,366,183,0,760, +762,3,324,162,0,761,756,1,0,0,0,761,757,1,0,0,0,761,758,1,0,0,0,761,759, +1,0,0,0,761,760,1,0,0,0,762,87,1,0,0,0,763,764,5,14,0,0,764,770,5,15,0,0, +765,766,5,14,0,0,766,767,3,94,47,0,767,768,5,15,0,0,768,770,1,0,0,0,769, +763,1,0,0,0,769,765,1,0,0,0,770,89,1,0,0,0,771,772,3,374,187,0,772,773,5, +2,0,0,773,774,3,92,46,0,774,775,5,4,0,0,775,787,1,0,0,0,776,777,3,378,189, +0,777,778,5,2,0,0,778,779,3,92,46,0,779,780,5,4,0,0,780,787,1,0,0,0,781, +782,3,370,185,0,782,783,5,2,0,0,783,784,3,92,46,0,784,785,5,4,0,0,785,787, +1,0,0,0,786,771,1,0,0,0,786,776,1,0,0,0,786,781,1,0,0,0,787,91,1,0,0,0,788, +789,3,94,47,0,789,93,1,0,0,0,790,794,3,26,13,0,791,793,3,96,48,0,792,791, +1,0,0,0,793,796,1,0,0,0,794,792,1,0,0,0,794,795,1,0,0,0,795,95,1,0,0,0,796, +794,1,0,0,0,797,798,5,3,0,0,798,799,3,26,13,0,799,97,1,0,0,0,800,801,3,350, +175,0,801,802,5,16,0,0,802,803,3,100,50,0,803,809,1,0,0,0,804,805,5,2,0, +0,805,806,3,98,49,0,806,807,5,4,0,0,807,809,1,0,0,0,808,800,1,0,0,0,808, +804,1,0,0,0,809,99,1,0,0,0,810,814,3,102,51,0,811,814,3,108,54,0,812,814, +3,104,52,0,813,810,1,0,0,0,813,811,1,0,0,0,813,812,1,0,0,0,814,101,1,0,0, +0,815,816,3,44,22,0,816,103,1,0,0,0,817,818,3,38,19,0,818,105,1,0,0,0,819, +823,3,108,54,0,820,823,3,110,55,0,821,823,3,112,56,0,822,819,1,0,0,0,822, +820,1,0,0,0,822,821,1,0,0,0,823,107,1,0,0,0,824,825,3,102,51,0,825,826,5, +68,0,0,826,827,3,102,51,0,827,833,1,0,0,0,828,829,3,102,51,0,829,830,5,68, +0,0,830,831,3,108,54,0,831,833,1,0,0,0,832,824,1,0,0,0,832,828,1,0,0,0,833, +109,1,0,0,0,834,835,6,55,-1,0,835,836,3,102,51,0,836,837,5,66,0,0,837,838, +3,102,51,0,838,844,1,0,0,0,839,840,10,1,0,0,840,841,5,66,0,0,841,843,3,102, +51,0,842,839,1,0,0,0,843,846,1,0,0,0,844,842,1,0,0,0,844,845,1,0,0,0,845, +111,1,0,0,0,846,844,1,0,0,0,847,848,6,56,-1,0,848,849,3,102,51,0,849,850, +5,67,0,0,850,851,3,102,51,0,851,857,1,0,0,0,852,853,10,1,0,0,853,854,5,67, +0,0,854,856,3,102,51,0,855,852,1,0,0,0,856,859,1,0,0,0,857,855,1,0,0,0,857, +858,1,0,0,0,858,113,1,0,0,0,859,857,1,0,0,0,860,861,3,352,176,0,861,862, +3,330,165,0,862,863,3,352,176,0,863,115,1,0,0,0,864,865,3,60,30,0,865,866, +3,348,174,0,866,867,3,26,13,0,867,117,1,0,0,0,868,869,3,88,44,0,869,870, +3,344,172,0,870,871,3,88,44,0,871,119,1,0,0,0,872,876,3,122,61,0,873,876, +3,194,97,0,874,876,3,218,109,0,875,872,1,0,0,0,875,873,1,0,0,0,875,874,1, +0,0,0,876,121,1,0,0,0,877,884,3,138,69,0,878,884,3,150,75,0,879,884,3,124, +62,0,880,884,3,164,82,0,881,884,3,220,110,0,882,884,3,222,111,0,883,877, +1,0,0,0,883,878,1,0,0,0,883,879,1,0,0,0,883,880,1,0,0,0,883,881,1,0,0,0, +883,882,1,0,0,0,884,123,1,0,0,0,885,888,3,126,63,0,886,888,3,128,64,0,887, +885,1,0,0,0,887,886,1,0,0,0,888,125,1,0,0,0,889,890,3,134,67,0,890,891,3, +338,169,0,891,892,3,134,67,0,892,127,1,0,0,0,893,896,3,130,65,0,894,896, +3,132,66,0,895,893,1,0,0,0,895,894,1,0,0,0,896,129,1,0,0,0,897,898,6,65, +-1,0,898,899,3,134,67,0,899,900,5,65,0,0,900,901,3,134,67,0,901,907,1,0, +0,0,902,903,10,1,0,0,903,904,5,65,0,0,904,906,3,134,67,0,905,902,1,0,0,0, +906,909,1,0,0,0,907,905,1,0,0,0,907,908,1,0,0,0,908,131,1,0,0,0,909,907, +1,0,0,0,910,911,6,66,-1,0,911,912,3,134,67,0,912,913,5,12,0,0,913,914,3, +134,67,0,914,920,1,0,0,0,915,916,10,1,0,0,916,917,5,12,0,0,917,919,3,134, +67,0,918,915,1,0,0,0,919,922,1,0,0,0,920,918,1,0,0,0,920,921,1,0,0,0,921, +133,1,0,0,0,922,920,1,0,0,0,923,927,3,138,69,0,924,927,3,150,75,0,925,927, +3,164,82,0,926,923,1,0,0,0,926,924,1,0,0,0,926,925,1,0,0,0,927,135,1,0,0, +0,928,931,3,138,69,0,929,931,3,152,76,0,930,928,1,0,0,0,930,929,1,0,0,0, +931,137,1,0,0,0,932,940,3,142,71,0,933,940,3,156,78,0,934,940,3,140,70,0, +935,936,5,2,0,0,936,937,3,122,61,0,937,938,5,4,0,0,938,940,1,0,0,0,939,932, +1,0,0,0,939,933,1,0,0,0,939,934,1,0,0,0,939,935,1,0,0,0,940,139,1,0,0,0, +941,942,3,384,192,0,942,141,1,0,0,0,943,944,3,334,167,0,944,945,5,14,0,0, +945,946,3,144,72,0,946,947,5,15,0,0,947,948,5,16,0,0,948,949,3,134,67,0, +949,143,1,0,0,0,950,956,3,146,73,0,951,952,3,146,73,0,952,953,5,3,0,0,953, +954,3,144,72,0,954,956,1,0,0,0,955,950,1,0,0,0,955,951,1,0,0,0,956,145,1, +0,0,0,957,960,3,148,74,0,958,960,3,384,192,0,959,957,1,0,0,0,959,958,1,0, +0,0,960,147,1,0,0,0,961,962,3,384,192,0,962,963,5,16,0,0,963,964,3,206,103, +0,964,149,1,0,0,0,965,968,3,152,76,0,966,968,3,154,77,0,967,965,1,0,0,0, +967,966,1,0,0,0,968,151,1,0,0,0,969,970,3,332,166,0,970,971,3,136,68,0,971, +153,1,0,0,0,972,973,3,186,93,0,973,974,3,366,183,0,974,975,3,186,93,0,975, +155,1,0,0,0,976,980,3,158,79,0,977,980,3,160,80,0,978,980,3,166,83,0,979, +976,1,0,0,0,979,977,1,0,0,0,979,978,1,0,0,0,980,157,1,0,0,0,981,988,3,368, +184,0,982,983,3,370,185,0,983,984,5,2,0,0,984,985,3,190,95,0,985,986,5,4, +0,0,986,988,1,0,0,0,987,981,1,0,0,0,987,982,1,0,0,0,988,159,1,0,0,0,989, +990,3,162,81,0,990,161,1,0,0,0,991,1000,3,372,186,0,992,993,3,374,187,0, +993,994,5,2,0,0,994,995,3,190,95,0,995,996,5,4,0,0,996,1000,1,0,0,0,997, +1000,3,182,91,0,998,1000,3,168,84,0,999,991,1,0,0,0,999,992,1,0,0,0,999, +997,1,0,0,0,999,998,1,0,0,0,1000,163,1,0,0,0,1001,1002,3,186,93,0,1002,1003, +3,362,181,0,1003,1004,3,186,93,0,1004,165,1,0,0,0,1005,1012,3,376,188,0, +1006,1007,3,378,189,0,1007,1008,5,2,0,0,1008,1009,3,190,95,0,1009,1010,5, +4,0,0,1010,1012,1,0,0,0,1011,1005,1,0,0,0,1011,1006,1,0,0,0,1012,167,1,0, +0,0,1013,1014,5,17,0,0,1014,1015,5,2,0,0,1015,1016,3,170,85,0,1016,1017, +5,3,0,0,1017,1018,3,174,87,0,1018,1019,5,3,0,0,1019,1020,3,184,92,0,1020, +1021,5,4,0,0,1021,169,1,0,0,0,1022,1028,3,194,97,0,1023,1024,5,14,0,0,1024, +1025,3,172,86,0,1025,1026,5,15,0,0,1026,1028,1,0,0,0,1027,1022,1,0,0,0,1027, +1023,1,0,0,0,1028,171,1,0,0,0,1029,1035,3,194,97,0,1030,1031,3,194,97,0, +1031,1032,5,3,0,0,1032,1033,3,172,86,0,1033,1035,1,0,0,0,1034,1029,1,0,0, +0,1034,1030,1,0,0,0,1035,173,1,0,0,0,1036,1042,3,176,88,0,1037,1038,5,14, +0,0,1038,1039,3,180,90,0,1039,1040,5,15,0,0,1040,1042,1,0,0,0,1041,1036, +1,0,0,0,1041,1037,1,0,0,0,1042,175,1,0,0,0,1043,1044,3,178,89,0,1044,1045, +3,346,173,0,1045,1046,3,184,92,0,1046,177,1,0,0,0,1047,1050,3,158,79,0,1048, +1050,3,188,94,0,1049,1047,1,0,0,0,1049,1048,1,0,0,0,1050,179,1,0,0,0,1051, +1057,3,176,88,0,1052,1053,3,176,88,0,1053,1054,5,3,0,0,1054,1055,3,180,90, +0,1055,1057,1,0,0,0,1056,1051,1,0,0,0,1056,1052,1,0,0,0,1057,181,1,0,0,0, +1058,1059,3,232,116,0,1059,1060,5,13,0,0,1060,1061,5,2,0,0,1061,1062,3,190, +95,0,1062,1063,5,4,0,0,1063,183,1,0,0,0,1064,1068,3,122,61,0,1065,1068,3, +382,191,0,1066,1068,3,188,94,0,1067,1064,1,0,0,0,1067,1065,1,0,0,0,1067, +1066,1,0,0,0,1068,185,1,0,0,0,1069,1078,3,156,78,0,1070,1078,3,382,191,0, +1071,1078,3,188,94,0,1072,1078,3,384,192,0,1073,1074,5,2,0,0,1074,1075,3, +122,61,0,1075,1076,5,4,0,0,1076,1078,1,0,0,0,1077,1069,1,0,0,0,1077,1070, +1,0,0,0,1077,1071,1,0,0,0,1077,1072,1,0,0,0,1077,1073,1,0,0,0,1078,187,1, +0,0,0,1079,1080,5,14,0,0,1080,1086,5,15,0,0,1081,1082,5,14,0,0,1082,1083, +3,190,95,0,1083,1084,5,15,0,0,1084,1086,1,0,0,0,1085,1079,1,0,0,0,1085,1081, +1,0,0,0,1086,189,1,0,0,0,1087,1091,3,184,92,0,1088,1090,3,192,96,0,1089, +1088,1,0,0,0,1090,1093,1,0,0,0,1091,1089,1,0,0,0,1091,1092,1,0,0,0,1092, +191,1,0,0,0,1093,1091,1,0,0,0,1094,1095,5,3,0,0,1095,1096,3,184,92,0,1096, +193,1,0,0,0,1097,1098,3,350,175,0,1098,1099,5,16,0,0,1099,1100,3,196,98, +0,1100,1106,1,0,0,0,1101,1102,5,2,0,0,1102,1103,3,194,97,0,1103,1104,5,4, +0,0,1104,1106,1,0,0,0,1105,1097,1,0,0,0,1105,1101,1,0,0,0,1106,195,1,0,0, +0,1107,1110,3,206,103,0,1108,1110,3,198,99,0,1109,1107,1,0,0,0,1109,1108, +1,0,0,0,1110,197,1,0,0,0,1111,1118,3,210,105,0,1112,1118,3,200,100,0,1113, +1114,5,2,0,0,1114,1115,3,198,99,0,1115,1116,5,4,0,0,1116,1118,1,0,0,0,1117, +1111,1,0,0,0,1117,1112,1,0,0,0,1117,1113,1,0,0,0,1118,199,1,0,0,0,1119,1120, +3,328,164,0,1120,1121,5,14,0,0,1121,1122,3,144,72,0,1122,1123,5,15,0,0,1123, +1124,5,16,0,0,1124,1125,3,202,101,0,1125,201,1,0,0,0,1126,1133,3,206,103, +0,1127,1128,5,2,0,0,1128,1129,3,210,105,0,1129,1130,5,4,0,0,1130,1133,1, +0,0,0,1131,1133,3,200,100,0,1132,1126,1,0,0,0,1132,1127,1,0,0,0,1132,1131, +1,0,0,0,1133,203,1,0,0,0,1134,1140,3,206,103,0,1135,1136,5,2,0,0,1136,1137, +3,212,106,0,1137,1138,5,4,0,0,1138,1140,1,0,0,0,1139,1134,1,0,0,0,1139,1135, +1,0,0,0,1140,205,1,0,0,0,1141,1155,3,354,177,0,1142,1155,3,358,179,0,1143, +1155,3,384,192,0,1144,1145,3,356,178,0,1145,1146,5,2,0,0,1146,1147,3,208, +104,0,1147,1148,5,4,0,0,1148,1155,1,0,0,0,1149,1150,5,2,0,0,1150,1151,3, +206,103,0,1151,1152,5,4,0,0,1152,1155,1,0,0,0,1153,1155,3,214,107,0,1154, +1141,1,0,0,0,1154,1142,1,0,0,0,1154,1143,1,0,0,0,1154,1144,1,0,0,0,1154, +1149,1,0,0,0,1154,1153,1,0,0,0,1155,207,1,0,0,0,1156,1162,3,206,103,0,1157, +1158,3,206,103,0,1158,1159,5,3,0,0,1159,1160,3,208,104,0,1160,1162,1,0,0, +0,1161,1156,1,0,0,0,1161,1157,1,0,0,0,1162,209,1,0,0,0,1163,1164,3,204,102, +0,1164,1165,5,68,0,0,1165,1166,3,206,103,0,1166,211,1,0,0,0,1167,1168,6, +106,-1,0,1168,1169,3,204,102,0,1169,1170,5,66,0,0,1170,1171,3,206,103,0, +1171,1177,1,0,0,0,1172,1173,10,1,0,0,1173,1174,5,66,0,0,1174,1176,3,206, +103,0,1175,1172,1,0,0,0,1176,1179,1,0,0,0,1177,1175,1,0,0,0,1177,1178,1, +0,0,0,1178,213,1,0,0,0,1179,1177,1,0,0,0,1180,1181,5,14,0,0,1181,1182,3, +216,108,0,1182,1183,5,15,0,0,1183,215,1,0,0,0,1184,1190,3,196,98,0,1185, +1186,3,196,98,0,1186,1187,5,3,0,0,1187,1188,3,216,108,0,1188,1190,1,0,0, +0,1189,1184,1,0,0,0,1189,1185,1,0,0,0,1190,217,1,0,0,0,1191,1192,3,352,176, +0,1192,1193,3,330,165,0,1193,1194,3,352,176,0,1194,219,1,0,0,0,1195,1196, +3,156,78,0,1196,1197,3,348,174,0,1197,1198,3,184,92,0,1198,221,1,0,0,0,1199, +1200,3,188,94,0,1200,1201,3,344,172,0,1201,1202,3,188,94,0,1202,223,1,0, +0,0,1203,1204,5,18,0,0,1204,1205,3,240,120,0,1205,1206,5,19,0,0,1206,1215, +1,0,0,0,1207,1208,5,18,0,0,1208,1209,3,240,120,0,1209,1210,5,2,0,0,1210, +1211,3,226,113,0,1211,1212,5,4,0,0,1212,1213,5,19,0,0,1213,1215,1,0,0,0, +1214,1203,1,0,0,0,1214,1207,1,0,0,0,1215,225,1,0,0,0,1216,1222,3,228,114, +0,1217,1218,3,228,114,0,1218,1219,5,3,0,0,1219,1220,3,226,113,0,1220,1222, +1,0,0,0,1221,1216,1,0,0,0,1221,1217,1,0,0,0,1222,227,1,0,0,0,1223,1226,3, +244,122,0,1224,1226,3,230,115,0,1225,1223,1,0,0,0,1225,1224,1,0,0,0,1226, +229,1,0,0,0,1227,1228,3,116,58,0,1228,231,1,0,0,0,1229,1230,5,18,0,0,1230, +1231,3,240,120,0,1231,1232,5,19,0,0,1232,1241,1,0,0,0,1233,1234,5,18,0,0, +1234,1235,3,240,120,0,1235,1236,5,2,0,0,1236,1237,3,234,117,0,1237,1238, +5,4,0,0,1238,1239,5,19,0,0,1239,1241,1,0,0,0,1240,1229,1,0,0,0,1240,1233, +1,0,0,0,1241,233,1,0,0,0,1242,1248,3,236,118,0,1243,1244,3,236,118,0,1244, +1245,5,3,0,0,1245,1246,3,234,117,0,1246,1248,1,0,0,0,1247,1242,1,0,0,0,1247, +1243,1,0,0,0,1248,235,1,0,0,0,1249,1252,3,244,122,0,1250,1252,3,238,119, +0,1251,1249,1,0,0,0,1251,1250,1,0,0,0,1252,237,1,0,0,0,1253,1254,3,220,110, +0,1254,239,1,0,0,0,1255,1258,3,242,121,0,1256,1258,3,450,225,0,1257,1255, +1,0,0,0,1257,1256,1,0,0,0,1258,241,1,0,0,0,1259,1260,3,448,224,0,1260,243, +1,0,0,0,1261,1262,5,70,0,0,1262,1263,3,186,93,0,1263,245,1,0,0,0,1264,1265, +5,14,0,0,1265,1266,5,5,0,0,1266,1277,5,15,0,0,1267,1268,5,69,0,0,1268,1269, +5,5,0,0,1269,1277,5,68,0,0,1270,1271,5,18,0,0,1271,1272,5,5,0,0,1272,1277, +5,19,0,0,1273,1274,5,2,0,0,1274,1275,5,5,0,0,1275,1277,5,4,0,0,1276,1264, +1,0,0,0,1276,1267,1,0,0,0,1276,1270,1,0,0,0,1276,1273,1,0,0,0,1277,247,1, +0,0,0,1278,1281,3,250,125,0,1279,1281,3,194,97,0,1280,1278,1,0,0,0,1280, +1279,1,0,0,0,1281,249,1,0,0,0,1282,1285,3,252,126,0,1283,1285,3,316,158, +0,1284,1282,1,0,0,0,1284,1283,1,0,0,0,1285,251,1,0,0,0,1286,1287,5,20,0, +0,1287,1288,5,14,0,0,1288,1289,3,144,72,0,1289,1290,5,15,0,0,1290,1291,5, +16,0,0,1291,1292,3,250,125,0,1292,253,1,0,0,0,1293,1296,3,256,128,0,1294, +1296,3,308,154,0,1295,1293,1,0,0,0,1295,1294,1,0,0,0,1296,255,1,0,0,0,1297, +1301,3,258,129,0,1298,1301,3,268,134,0,1299,1301,3,274,137,0,1300,1297,1, +0,0,0,1300,1298,1,0,0,0,1300,1299,1,0,0,0,1301,257,1,0,0,0,1302,1305,3,260, +130,0,1303,1305,3,262,131,0,1304,1302,1,0,0,0,1304,1303,1,0,0,0,1305,259, +1,0,0,0,1306,1307,3,272,136,0,1307,1308,3,338,169,0,1308,1309,3,272,136, +0,1309,261,1,0,0,0,1310,1313,3,264,132,0,1311,1313,3,266,133,0,1312,1310, +1,0,0,0,1312,1311,1,0,0,0,1313,263,1,0,0,0,1314,1315,6,132,-1,0,1315,1316, +3,272,136,0,1316,1317,5,65,0,0,1317,1318,3,272,136,0,1318,1324,1,0,0,0,1319, +1320,10,1,0,0,1320,1321,5,65,0,0,1321,1323,3,272,136,0,1322,1319,1,0,0,0, +1323,1326,1,0,0,0,1324,1322,1,0,0,0,1324,1325,1,0,0,0,1325,265,1,0,0,0,1326, +1324,1,0,0,0,1327,1328,6,133,-1,0,1328,1329,3,272,136,0,1329,1330,5,12,0, +0,1330,1331,3,272,136,0,1331,1337,1,0,0,0,1332,1333,10,1,0,0,1333,1334,5, +12,0,0,1334,1336,3,272,136,0,1335,1332,1,0,0,0,1336,1339,1,0,0,0,1337,1335, +1,0,0,0,1337,1338,1,0,0,0,1338,267,1,0,0,0,1339,1337,1,0,0,0,1340,1341,3, +342,171,0,1341,1342,3,272,136,0,1342,1345,1,0,0,0,1343,1345,3,270,135,0, +1344,1340,1,0,0,0,1344,1343,1,0,0,0,1345,269,1,0,0,0,1346,1347,3,304,152, +0,1347,1348,3,366,183,0,1348,1349,3,304,152,0,1349,271,1,0,0,0,1350,1353, +3,274,137,0,1351,1353,3,268,134,0,1352,1350,1,0,0,0,1352,1351,1,0,0,0,1353, +273,1,0,0,0,1354,1361,3,276,138,0,1355,1361,3,280,140,0,1356,1357,5,2,0, +0,1357,1358,3,256,128,0,1358,1359,5,4,0,0,1359,1361,1,0,0,0,1360,1354,1, +0,0,0,1360,1355,1,0,0,0,1360,1356,1,0,0,0,1361,275,1,0,0,0,1362,1363,3,336, +168,0,1363,1364,5,14,0,0,1364,1365,3,278,139,0,1365,1366,5,15,0,0,1366,1367, +5,16,0,0,1367,1368,3,272,136,0,1368,277,1,0,0,0,1369,1375,3,384,192,0,1370, +1371,3,384,192,0,1371,1372,5,3,0,0,1372,1373,3,278,139,0,1373,1375,1,0,0, +0,1374,1369,1,0,0,0,1374,1370,1,0,0,0,1375,279,1,0,0,0,1376,1380,3,282,141, +0,1377,1380,3,284,142,0,1378,1380,3,290,145,0,1379,1376,1,0,0,0,1379,1377, +1,0,0,0,1379,1378,1,0,0,0,1380,281,1,0,0,0,1381,1382,3,292,146,0,1382,283, +1,0,0,0,1383,1386,3,286,143,0,1384,1386,3,288,144,0,1385,1383,1,0,0,0,1385, +1384,1,0,0,0,1386,285,1,0,0,0,1387,1388,3,298,149,0,1388,287,1,0,0,0,1389, +1390,3,304,152,0,1390,1391,3,362,181,0,1391,1392,3,304,152,0,1392,289,1, +0,0,0,1393,1394,3,300,150,0,1394,291,1,0,0,0,1395,1402,3,368,184,0,1396, +1397,3,370,185,0,1397,1398,5,2,0,0,1398,1399,3,302,151,0,1399,1400,5,4,0, +0,1400,1402,1,0,0,0,1401,1395,1,0,0,0,1401,1396,1,0,0,0,1402,293,1,0,0,0, +1403,1406,3,382,191,0,1404,1406,3,296,148,0,1405,1403,1,0,0,0,1405,1404, +1,0,0,0,1406,295,1,0,0,0,1407,1408,3,298,149,0,1408,297,1,0,0,0,1409,1416, +3,372,186,0,1410,1411,3,374,187,0,1411,1412,5,2,0,0,1412,1413,3,302,151, +0,1413,1414,5,4,0,0,1414,1416,1,0,0,0,1415,1409,1,0,0,0,1415,1410,1,0,0, +0,1416,299,1,0,0,0,1417,1424,3,376,188,0,1418,1419,3,378,189,0,1419,1420, +5,2,0,0,1420,1421,3,302,151,0,1421,1422,5,4,0,0,1422,1424,1,0,0,0,1423,1417, +1,0,0,0,1423,1418,1,0,0,0,1424,301,1,0,0,0,1425,1431,3,304,152,0,1426,1427, +3,304,152,0,1427,1428,5,3,0,0,1428,1429,3,302,151,0,1429,1431,1,0,0,0,1430, +1425,1,0,0,0,1430,1426,1,0,0,0,1431,303,1,0,0,0,1432,1435,3,306,153,0,1433, +1435,3,384,192,0,1434,1432,1,0,0,0,1434,1433,1,0,0,0,1435,305,1,0,0,0,1436, +1440,3,292,146,0,1437,1440,3,294,147,0,1438,1440,3,300,150,0,1439,1436,1, +0,0,0,1439,1437,1,0,0,0,1439,1438,1,0,0,0,1440,307,1,0,0,0,1441,1442,3,310, +155,0,1442,1443,3,344,172,0,1443,1444,3,310,155,0,1444,1450,1,0,0,0,1445, +1446,5,2,0,0,1446,1447,3,308,154,0,1447,1448,5,4,0,0,1448,1450,1,0,0,0,1449, +1441,1,0,0,0,1449,1445,1,0,0,0,1450,309,1,0,0,0,1451,1452,5,14,0,0,1452, +1458,5,15,0,0,1453,1454,5,14,0,0,1454,1455,3,312,156,0,1455,1456,5,15,0, +0,1456,1458,1,0,0,0,1457,1451,1,0,0,0,1457,1453,1,0,0,0,1458,311,1,0,0,0, +1459,1463,3,256,128,0,1460,1462,3,314,157,0,1461,1460,1,0,0,0,1462,1465, +1,0,0,0,1463,1461,1,0,0,0,1463,1464,1,0,0,0,1464,313,1,0,0,0,1465,1463,1, +0,0,0,1466,1467,5,3,0,0,1467,1468,3,256,128,0,1468,315,1,0,0,0,1469,1475, +3,318,159,0,1470,1471,5,2,0,0,1471,1472,3,316,158,0,1472,1473,5,4,0,0,1473, +1475,1,0,0,0,1474,1469,1,0,0,0,1474,1470,1,0,0,0,1475,317,1,0,0,0,1476,1477, +6,159,-1,0,1477,1478,3,320,160,0,1478,1484,1,0,0,0,1479,1480,10,1,0,0,1480, +1481,5,65,0,0,1481,1483,3,320,160,0,1482,1479,1,0,0,0,1483,1486,1,0,0,0, +1484,1482,1,0,0,0,1484,1485,1,0,0,0,1485,319,1,0,0,0,1486,1484,1,0,0,0,1487, +1497,3,280,140,0,1488,1489,5,21,0,0,1489,1497,3,280,140,0,1490,1491,5,21, +0,0,1491,1492,5,2,0,0,1492,1493,3,280,140,0,1493,1494,5,4,0,0,1494,1497, +1,0,0,0,1495,1497,3,270,135,0,1496,1487,1,0,0,0,1496,1488,1,0,0,0,1496,1490, +1,0,0,0,1496,1495,1,0,0,0,1497,321,1,0,0,0,1498,1502,3,334,167,0,1499,1502, +3,326,163,0,1500,1502,3,328,164,0,1501,1498,1,0,0,0,1501,1499,1,0,0,0,1501, +1500,1,0,0,0,1502,323,1,0,0,0,1503,1506,3,342,171,0,1504,1506,3,246,123, +0,1505,1503,1,0,0,0,1505,1504,1,0,0,0,1506,325,1,0,0,0,1507,1508,7,0,0,0, +1508,327,1,0,0,0,1509,1510,7,1,0,0,1510,329,1,0,0,0,1511,1512,5,27,0,0,1512, +331,1,0,0,0,1513,1516,3,342,171,0,1514,1516,3,246,123,0,1515,1513,1,0,0, +0,1515,1514,1,0,0,0,1516,333,1,0,0,0,1517,1520,3,336,168,0,1518,1520,5,70, +0,0,1519,1517,1,0,0,0,1519,1518,1,0,0,0,1520,335,1,0,0,0,1521,1522,7,2,0, +0,1522,337,1,0,0,0,1523,1531,5,29,0,0,1524,1531,5,30,0,0,1525,1531,5,31, +0,0,1526,1531,5,32,0,0,1527,1528,5,21,0,0,1528,1531,5,65,0,0,1529,1531,5, +33,0,0,1530,1523,1,0,0,0,1530,1524,1,0,0,0,1530,1525,1,0,0,0,1530,1526,1, +0,0,0,1530,1527,1,0,0,0,1530,1529,1,0,0,0,1531,339,1,0,0,0,1532,1533,7,3, +0,0,1533,341,1,0,0,0,1534,1535,5,21,0,0,1535,343,1,0,0,0,1536,1537,5,34, +0,0,1537,345,1,0,0,0,1538,1539,5,35,0,0,1539,347,1,0,0,0,1540,1541,5,36, +0,0,1541,349,1,0,0,0,1542,1545,3,368,184,0,1543,1545,5,55,0,0,1544,1542, +1,0,0,0,1544,1543,1,0,0,0,1545,351,1,0,0,0,1546,1550,3,350,175,0,1547,1550, +3,372,186,0,1548,1550,3,360,180,0,1549,1546,1,0,0,0,1549,1547,1,0,0,0,1549, +1548,1,0,0,0,1550,353,1,0,0,0,1551,1552,3,356,178,0,1552,355,1,0,0,0,1553, +1554,3,446,223,0,1554,357,1,0,0,0,1555,1556,3,448,224,0,1556,359,1,0,0,0, +1557,1558,3,450,225,0,1558,361,1,0,0,0,1559,1560,3,364,182,0,1560,363,1, +0,0,0,1561,1562,5,37,0,0,1562,365,1,0,0,0,1563,1564,5,38,0,0,1564,367,1, +0,0,0,1565,1566,3,370,185,0,1566,369,1,0,0,0,1567,1568,3,446,223,0,1568, +371,1,0,0,0,1569,1570,3,374,187,0,1570,373,1,0,0,0,1571,1572,3,448,224,0, +1572,375,1,0,0,0,1573,1574,3,378,189,0,1574,377,1,0,0,0,1575,1576,3,450, +225,0,1576,379,1,0,0,0,1577,1578,7,4,0,0,1578,381,1,0,0,0,1579,1582,3,452, +226,0,1580,1582,5,55,0,0,1581,1579,1,0,0,0,1581,1580,1,0,0,0,1582,383,1, +0,0,0,1583,1584,5,58,0,0,1584,385,1,0,0,0,1585,1593,3,390,195,0,1586,1593, +3,396,198,0,1587,1593,3,400,200,0,1588,1589,5,14,0,0,1589,1590,3,388,194, +0,1590,1591,5,15,0,0,1591,1593,1,0,0,0,1592,1585,1,0,0,0,1592,1586,1,0,0, +0,1592,1587,1,0,0,0,1592,1588,1,0,0,0,1593,387,1,0,0,0,1594,1600,3,386,193, +0,1595,1596,3,386,193,0,1596,1597,5,3,0,0,1597,1598,3,388,194,0,1598,1600, +1,0,0,0,1599,1594,1,0,0,0,1599,1595,1,0,0,0,1600,389,1,0,0,0,1601,1604,3, +444,222,0,1602,1604,3,392,196,0,1603,1601,1,0,0,0,1603,1602,1,0,0,0,1604, +391,1,0,0,0,1605,1606,5,44,0,0,1606,1607,5,2,0,0,1607,1608,3,394,197,0,1608, +1609,5,3,0,0,1609,1610,3,418,209,0,1610,1611,5,3,0,0,1611,1612,3,406,203, +0,1612,1613,5,4,0,0,1613,393,1,0,0,0,1614,1615,3,446,223,0,1615,395,1,0, +0,0,1616,1617,5,45,0,0,1617,1618,5,2,0,0,1618,1619,3,398,199,0,1619,1620, +5,3,0,0,1620,1621,3,418,209,0,1621,1622,5,3,0,0,1622,1623,3,406,203,0,1623, +1624,5,4,0,0,1624,397,1,0,0,0,1625,1626,3,446,223,0,1626,399,1,0,0,0,1627, +1628,3,402,201,0,1628,401,1,0,0,0,1629,1630,5,46,0,0,1630,1631,5,2,0,0,1631, +1632,3,454,227,0,1632,1633,3,404,202,0,1633,1634,5,4,0,0,1634,403,1,0,0, +0,1635,1636,5,3,0,0,1636,1639,3,444,222,0,1637,1639,3,456,228,0,1638,1635, +1,0,0,0,1638,1637,1,0,0,0,1639,405,1,0,0,0,1640,1641,5,14,0,0,1641,1647, +5,15,0,0,1642,1643,5,14,0,0,1643,1644,3,408,204,0,1644,1645,5,15,0,0,1645, +1647,1,0,0,0,1646,1640,1,0,0,0,1646,1642,1,0,0,0,1647,407,1,0,0,0,1648,1652, +3,412,206,0,1649,1651,3,410,205,0,1650,1649,1,0,0,0,1651,1654,1,0,0,0,1652, +1650,1,0,0,0,1652,1653,1,0,0,0,1653,409,1,0,0,0,1654,1652,1,0,0,0,1655,1656, +5,3,0,0,1656,1657,3,412,206,0,1657,411,1,0,0,0,1658,1659,3,386,193,0,1659, +1660,3,414,207,0,1660,413,1,0,0,0,1661,1662,5,16,0,0,1662,1665,3,430,215, +0,1663,1665,3,456,228,0,1664,1661,1,0,0,0,1664,1663,1,0,0,0,1665,415,1,0, +0,0,1666,1667,5,3,0,0,1667,1670,3,418,209,0,1668,1670,3,456,228,0,1669,1666, +1,0,0,0,1669,1668,1,0,0,0,1670,417,1,0,0,0,1671,1672,3,438,219,0,1672,419, +1,0,0,0,1673,1674,5,47,0,0,1674,1675,5,2,0,0,1675,1676,3,454,227,0,1676, +1677,3,422,211,0,1677,1678,5,4,0,0,1678,1679,5,5,0,0,1679,421,1,0,0,0,1680, +1689,3,456,228,0,1681,1682,5,3,0,0,1682,1689,3,424,212,0,1683,1684,5,3,0, +0,1684,1685,3,424,212,0,1685,1686,5,3,0,0,1686,1687,3,428,214,0,1687,1689, +1,0,0,0,1688,1680,1,0,0,0,1688,1681,1,0,0,0,1688,1683,1,0,0,0,1689,423,1, +0,0,0,1690,1691,5,14,0,0,1691,1692,3,426,213,0,1692,1693,5,15,0,0,1693,1696, +1,0,0,0,1694,1696,5,66,0,0,1695,1690,1,0,0,0,1695,1694,1,0,0,0,1696,425, +1,0,0,0,1697,1703,3,444,222,0,1698,1699,3,444,222,0,1699,1700,5,3,0,0,1700, +1701,3,426,213,0,1701,1703,1,0,0,0,1702,1697,1,0,0,0,1702,1698,1,0,0,0,1703, +427,1,0,0,0,1704,1705,3,444,222,0,1705,429,1,0,0,0,1706,1713,3,432,216,0, +1707,1708,3,432,216,0,1708,1709,5,16,0,0,1709,1710,3,430,215,0,1710,1713, +1,0,0,0,1711,1713,3,438,219,0,1712,1706,1,0,0,0,1712,1707,1,0,0,0,1712,1711, +1,0,0,0,1713,431,1,0,0,0,1714,1721,3,446,223,0,1715,1721,3,434,217,0,1716, +1721,3,384,192,0,1717,1721,3,452,226,0,1718,1721,5,55,0,0,1719,1721,3,436, +218,0,1720,1714,1,0,0,0,1720,1715,1,0,0,0,1720,1716,1,0,0,0,1720,1717,1, +0,0,0,1720,1718,1,0,0,0,1720,1719,1,0,0,0,1721,433,1,0,0,0,1722,1723,3,446, +223,0,1723,1724,5,2,0,0,1724,1725,3,440,220,0,1725,1726,5,4,0,0,1726,435, +1,0,0,0,1727,1728,5,48,0,0,1728,1729,5,2,0,0,1729,1730,3,24,12,0,1730,1731, +5,4,0,0,1731,1753,1,0,0,0,1732,1733,5,49,0,0,1733,1734,5,2,0,0,1734,1735, +3,120,60,0,1735,1736,5,4,0,0,1736,1753,1,0,0,0,1737,1738,5,50,0,0,1738,1739, +5,2,0,0,1739,1740,3,254,127,0,1740,1741,5,4,0,0,1741,1753,1,0,0,0,1742,1743, +5,51,0,0,1743,1744,5,2,0,0,1744,1745,3,316,158,0,1745,1746,5,4,0,0,1746, +1753,1,0,0,0,1747,1748,5,52,0,0,1748,1749,5,2,0,0,1749,1750,3,304,152,0, +1750,1751,5,4,0,0,1751,1753,1,0,0,0,1752,1727,1,0,0,0,1752,1732,1,0,0,0, +1752,1737,1,0,0,0,1752,1742,1,0,0,0,1752,1747,1,0,0,0,1753,437,1,0,0,0,1754, +1755,5,14,0,0,1755,1761,5,15,0,0,1756,1757,5,14,0,0,1757,1758,3,440,220, +0,1758,1759,5,15,0,0,1759,1761,1,0,0,0,1760,1754,1,0,0,0,1760,1756,1,0,0, +0,1761,439,1,0,0,0,1762,1766,3,430,215,0,1763,1765,3,442,221,0,1764,1763, +1,0,0,0,1765,1768,1,0,0,0,1766,1764,1,0,0,0,1766,1767,1,0,0,0,1767,441,1, +0,0,0,1768,1766,1,0,0,0,1769,1770,5,3,0,0,1770,1771,3,430,215,0,1771,443, +1,0,0,0,1772,1775,3,446,223,0,1773,1775,5,62,0,0,1774,1772,1,0,0,0,1774, +1773,1,0,0,0,1775,445,1,0,0,0,1776,1780,3,458,229,0,1777,1780,5,53,0,0,1778, +1780,5,54,0,0,1779,1776,1,0,0,0,1779,1777,1,0,0,0,1779,1778,1,0,0,0,1780, +447,1,0,0,0,1781,1782,5,56,0,0,1782,449,1,0,0,0,1783,1784,5,57,0,0,1784, +451,1,0,0,0,1785,1786,7,5,0,0,1786,453,1,0,0,0,1787,1788,3,446,223,0,1788, +455,1,0,0,0,1789,1790,1,0,0,0,1790,457,1,0,0,0,1791,1792,7,6,0,0,1792,459, +1,0,0,0,131,463,470,478,553,560,565,573,578,587,599,612,625,631,635,644, +660,668,681,685,695,699,721,728,735,746,754,761,769,786,794,808,813,822, +832,844,857,875,883,887,895,907,920,926,930,939,955,959,967,979,987,999, +1011,1027,1034,1041,1049,1056,1067,1077,1085,1091,1105,1109,1117,1132,1139, +1154,1161,1177,1189,1214,1221,1225,1240,1247,1251,1257,1276,1280,1284,1295, +1300,1304,1312,1324,1337,1344,1352,1360,1374,1379,1385,1401,1405,1415,1423, +1430,1434,1439,1449,1457,1463,1474,1484,1496,1501,1505,1515,1519,1530,1544, +1549,1581,1592,1599,1603,1638,1646,1652,1664,1669,1688,1695,1702,1712,1720, +1752,1760,1766,1774,1779]; + + +const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN); + +const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) ); + +const sharedContextCache = new antlr4.atn.PredictionContextCache(); + +export default class TPTPParser extends antlr4.Parser { + + static grammarFileName = "TPTP.g4"; + static literalNames = [ null, "'tpi'", "'('", "','", "')'", "'.'", "'thf'", + "'tff'", "'tcf'", "'fof'", "'cnf'", "'-'", "'&'", + "'@'", "'['", "']'", "':'", "'$let'", "'{'", + "'}'", "'!'", "'~'", "'^'", "'@+'", "'@-'", + "'!>'", "'?*'", "'<<'", "'?'", "'<=>'", "'=>'", + "'<='", "'<~>'", "'~&'", "'-->'", "':='", "'=='", + "'='", "'!='", "'!!'", "'??'", "'@@+'", "'@@-'", + "'@='", "'inference'", "'introduced'", "'file'", + "'include'", "'$thf'", "'$tff'", "'$fof'", "'$cnf'", + "'$fot'" ]; + static symbolicNames = [ null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, + null, null, null, null, null, "Single_quoted", + "Back_quoted", "Distinct_object", "Dollar_word", + "Dollar_dollar_word", "Upper_word", "Lower_word", + "Real", "Rational", "Integer", "Slash", "Slosh", + "Vline", "Star", "Plus", "Arrow", "Less_sign", + "Hash", "Comment", "Comment_line", "WS" ]; + static ruleNames = [ "tptp_file", "tptp_input", "annotated_formula", + "tpi_annotated", "tpi_formula", "thf_annotated", + "tff_annotated", "tcf_annotated", "fof_annotated", + "cnf_annotated", "annotations", "formula_role", + "thf_formula", "thf_logic_formula", "thf_binary_formula", + "thf_binary_pair", "thf_binary_list", "thf_or_formula", + "thf_and_formula", "thf_apply_formula", "thf_unit_formula", + "thf_preunit_formula", "thf_unitary_formula", "thf_quantified_formula", + "thf_quantification", "thf_variable_list", "thf_typed_variable", + "thf_unary_formula", "thf_prefix_unary", "thf_infix_unary", + "thf_atomic_formula", "thf_plain_atomic", "thf_defined_atomic", + "thf_defined_term", "thf_defined_infix", "thf_system_atomic", + "thf_let", "thf_let_types", "thf_atom_typing_list", + "thf_let_defns", "thf_let_defn", "thf_let_defn_list", + "thf_unitary_term", "thf_conn_term", "thf_tuple", + "thf_fof_function", "thf_arguments", "thf_formula_list", + "comma_thf_logic_formula", "thf_atom_typing", "thf_top_level_type", + "thf_unitary_type", "thf_apply_type", "thf_binary_type", + "thf_mapping_type", "thf_xprod_type", "thf_union_type", + "thf_subtype", "thf_definition", "thf_sequent", + "tff_formula", "tff_logic_formula", "tff_binary_formula", + "tff_binary_pair", "tff_binary_list", "tff_or_formula", + "tff_and_formula", "tff_unit_formula", "tff_preunit_formula", + "tff_unitary_formula", "txf_unitary_formula", "tff_quantified_formula", + "tff_variable_list", "tff_variable", "tff_typed_variable", + "tff_unary_formula", "tff_prefix_unary", "tff_infix_unary", + "tff_atomic_formula", "tff_plain_atomic", "tff_defined_atomic", + "tff_defined_plain", "tff_defined_infix", "tff_system_atomic", + "txf_let", "txf_let_types", "tff_atom_typing_list", + "txf_let_defns", "txf_let_defn", "txf_let_lhs", + "txf_let_defn_list", "nxf_atom", "tff_term", "tff_unitary_term", + "txf_tuple", "tff_arguments", "comma_tff_term", + "tff_atom_typing", "tff_top_level_type", "tff_non_atomic_type", + "tf1_quantified_type", "tff_monotype", "tff_unitary_type", + "tff_atomic_type", "tff_type_arguments", "tff_mapping_type", + "tff_xprod_type", "txf_tuple_type", "tff_type_list", + "tff_subtype", "txf_definition", "txf_sequent", + "nhf_long_connective", "nhf_parameter_list", "nhf_parameter", + "nhf_key_pair", "nxf_long_connective", "nxf_parameter_list", + "nxf_parameter", "nxf_key_pair", "ntf_connective_name", + "ntf_defined_connective", "ntf_index", "ntf_short_connective", + "tcf_formula", "tcf_logic_formula", "tcf_quantified_formula", + "fof_formula", "fof_logic_formula", "fof_binary_formula", + "fof_binary_pair", "fof_binary_list", "fof_or_formula", + "fof_and_formula", "fof_unary_formula", "fof_infix_unary", + "fof_unit_formula", "fof_unitary_formula", "fof_quantified_formula", + "fof_variable_list", "fof_atomic_formula", "fof_plain_atomic_formula", + "fof_defined_atomic_formula", "fof_defined_plain_formula", + "fof_defined_infix_formula", "fof_system_atomic_formula", + "fof_plain_term", "fof_defined_term", "fof_defined_atomic_term", + "fof_defined_plain_term", "fof_system_term", "fof_arguments", + "fof_term", "fof_function_term", "fof_sequent", + "fof_formula_tuple", "fof_formula_tuple_list", + "comma_fof_logic_formula", "cnf_formula", "cnf_disjunction", + "cnf_literal", "thf_quantifier", "thf_unary_connective", + "th0_quantifier", "type_quantifier", "subtype_sign", + "tff_unary_connective", "tff_quantifier", "fof_quantifier", + "nonassoc_connective", "assoc_connective", "unary_connective", + "gentzen_arrow", "assignment", "identical", "typeable_atom", + "atomic_type", "type_constant", "type_functor", + "defined_type", "system_type", "defined_infix_pred", + "infix_equality", "infix_inequality", "constant", + "functor", "defined_constant", "defined_functor", + "system_constant", "system_functor", "th1_defined_term", + "defined_term", "variable", "source", "sources", + "dag_source", "inference_record", "inference_rule", + "internal_source", "intro_type", "external_source", + "file_source", "file_info", "parents", "parent_list", + "comma_parent_info", "parent_info", "parent_details", + "optional_info", "useful_info", "include", "include_optionals", + "formula_selection", "name_list", "space_name", + "general_term", "general_data", "general_function", + "formula_data", "general_list", "general_terms", + "comma_general_term", "name", "atomic_word", "atomic_defined_word", + "atomic_system_word", "number", "file_name", "nothing", + "lower_word_token" ]; + + constructor(input) { + super(input); + this._interp = new antlr4.atn.ParserATNSimulator(this, atn, decisionsToDFA, sharedContextCache); + this.ruleNames = TPTPParser.ruleNames; + this.literalNames = TPTPParser.literalNames; + this.symbolicNames = TPTPParser.symbolicNames; + } + + sempred(localctx, ruleIndex, predIndex) { + switch(ruleIndex) { + case 17: + return this.thf_or_formula_sempred(localctx, predIndex); + case 18: + return this.thf_and_formula_sempred(localctx, predIndex); + case 19: + return this.thf_apply_formula_sempred(localctx, predIndex); + case 55: + return this.thf_xprod_type_sempred(localctx, predIndex); + case 56: + return this.thf_union_type_sempred(localctx, predIndex); + case 65: + return this.tff_or_formula_sempred(localctx, predIndex); + case 66: + return this.tff_and_formula_sempred(localctx, predIndex); + case 106: + return this.tff_xprod_type_sempred(localctx, predIndex); + case 132: + return this.fof_or_formula_sempred(localctx, predIndex); + case 133: + return this.fof_and_formula_sempred(localctx, predIndex); + case 159: + return this.cnf_disjunction_sempred(localctx, predIndex); + default: + throw "No predicate with index:" + ruleIndex; + } + } + + thf_or_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 0: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + thf_and_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 1: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + thf_apply_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 2: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + thf_xprod_type_sempred(localctx, predIndex) { + switch(predIndex) { + case 3: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + thf_union_type_sempred(localctx, predIndex) { + switch(predIndex) { + case 4: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + tff_or_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 5: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + tff_and_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 6: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + tff_xprod_type_sempred(localctx, predIndex) { + switch(predIndex) { + case 7: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + fof_or_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 8: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + fof_and_formula_sempred(localctx, predIndex) { + switch(predIndex) { + case 9: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + cnf_disjunction_sempred(localctx, predIndex) { + switch(predIndex) { + case 10: + return this.precpred(this._ctx, 1); + default: + throw "No predicate with index:" + predIndex; + } + }; + + + + + tptp_file() { + let localctx = new Tptp_fileContext(this, this._ctx, this.state); + this.enterRule(localctx, 0, TPTPParser.RULE_tptp_file); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 463; + this._errHandler.sync(this); + _la = this._input.LA(1); + while((((_la) & ~0x1f) === 0 && ((1 << _la) & 1986) !== 0) || _la===47) { + this.state = 460; + this.tptp_input(); + this.state = 465; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + this.state = 466; + this.match(TPTPParser.EOF); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tptp_input() { + let localctx = new Tptp_inputContext(this, this._ctx, this.state); + this.enterRule(localctx, 2, TPTPParser.RULE_tptp_input); + try { + this.state = 470; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + this.enterOuterAlt(localctx, 1); + this.state = 468; + this.annotated_formula(); + break; + case 47: + this.enterOuterAlt(localctx, 2); + this.state = 469; + this.include(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + annotated_formula() { + let localctx = new Annotated_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 4, TPTPParser.RULE_annotated_formula); + try { + this.state = 478; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 6: + this.enterOuterAlt(localctx, 1); + this.state = 472; + this.thf_annotated(); + break; + case 7: + this.enterOuterAlt(localctx, 2); + this.state = 473; + this.tff_annotated(); + break; + case 8: + this.enterOuterAlt(localctx, 3); + this.state = 474; + this.tcf_annotated(); + break; + case 9: + this.enterOuterAlt(localctx, 4); + this.state = 475; + this.fof_annotated(); + break; + case 10: + this.enterOuterAlt(localctx, 5); + this.state = 476; + this.cnf_annotated(); + break; + case 1: + this.enterOuterAlt(localctx, 6); + this.state = 477; + this.tpi_annotated(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tpi_annotated() { + let localctx = new Tpi_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 6, TPTPParser.RULE_tpi_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 480; + this.match(TPTPParser.T__0); + this.state = 481; + this.match(TPTPParser.T__1); + this.state = 482; + this.name(); + this.state = 483; + this.match(TPTPParser.T__2); + this.state = 484; + this.formula_role(); + this.state = 485; + this.match(TPTPParser.T__2); + this.state = 486; + this.tpi_formula(); + this.state = 487; + this.annotations(); + this.state = 488; + this.match(TPTPParser.T__3); + this.state = 489; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tpi_formula() { + let localctx = new Tpi_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 8, TPTPParser.RULE_tpi_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 491; + this.fof_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_annotated() { + let localctx = new Thf_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 10, TPTPParser.RULE_thf_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 493; + this.match(TPTPParser.T__5); + this.state = 494; + this.match(TPTPParser.T__1); + this.state = 495; + this.name(); + this.state = 496; + this.match(TPTPParser.T__2); + this.state = 497; + this.formula_role(); + this.state = 498; + this.match(TPTPParser.T__2); + this.state = 499; + this.thf_formula(); + this.state = 500; + this.annotations(); + this.state = 501; + this.match(TPTPParser.T__3); + this.state = 502; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_annotated() { + let localctx = new Tff_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 12, TPTPParser.RULE_tff_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 504; + this.match(TPTPParser.T__6); + this.state = 505; + this.match(TPTPParser.T__1); + this.state = 506; + this.name(); + this.state = 507; + this.match(TPTPParser.T__2); + this.state = 508; + this.formula_role(); + this.state = 509; + this.match(TPTPParser.T__2); + this.state = 510; + this.tff_formula(); + this.state = 511; + this.annotations(); + this.state = 512; + this.match(TPTPParser.T__3); + this.state = 513; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tcf_annotated() { + let localctx = new Tcf_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 14, TPTPParser.RULE_tcf_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 515; + this.match(TPTPParser.T__7); + this.state = 516; + this.match(TPTPParser.T__1); + this.state = 517; + this.name(); + this.state = 518; + this.match(TPTPParser.T__2); + this.state = 519; + this.formula_role(); + this.state = 520; + this.match(TPTPParser.T__2); + this.state = 521; + this.tcf_formula(); + this.state = 522; + this.annotations(); + this.state = 523; + this.match(TPTPParser.T__3); + this.state = 524; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_annotated() { + let localctx = new Fof_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 16, TPTPParser.RULE_fof_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 526; + this.match(TPTPParser.T__8); + this.state = 527; + this.match(TPTPParser.T__1); + this.state = 528; + this.name(); + this.state = 529; + this.match(TPTPParser.T__2); + this.state = 530; + this.formula_role(); + this.state = 531; + this.match(TPTPParser.T__2); + this.state = 532; + this.fof_formula(); + this.state = 533; + this.annotations(); + this.state = 534; + this.match(TPTPParser.T__3); + this.state = 535; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + cnf_annotated() { + let localctx = new Cnf_annotatedContext(this, this._ctx, this.state); + this.enterRule(localctx, 18, TPTPParser.RULE_cnf_annotated); + try { + this.enterOuterAlt(localctx, 1); + this.state = 537; + this.match(TPTPParser.T__9); + this.state = 538; + this.match(TPTPParser.T__1); + this.state = 539; + this.name(); + this.state = 540; + this.match(TPTPParser.T__2); + this.state = 541; + this.formula_role(); + this.state = 542; + this.match(TPTPParser.T__2); + this.state = 543; + this.cnf_formula(); + this.state = 544; + this.annotations(); + this.state = 545; + this.match(TPTPParser.T__3); + this.state = 546; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + annotations() { + let localctx = new AnnotationsContext(this, this._ctx, this.state); + this.enterRule(localctx, 20, TPTPParser.RULE_annotations); + try { + this.state = 553; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 3: + this.enterOuterAlt(localctx, 1); + this.state = 548; + this.match(TPTPParser.T__2); + this.state = 549; + this.source(); + this.state = 550; + this.optional_info(); + break; + case 4: + this.enterOuterAlt(localctx, 2); + this.state = 552; + this.nothing(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + formula_role() { + let localctx = new Formula_roleContext(this, this._ctx, this.state); + this.enterRule(localctx, 22, TPTPParser.RULE_formula_role); + try { + this.state = 560; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,4,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 555; + this.lower_word_token(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 556; + this.lower_word_token(); + this.state = 557; + this.match(TPTPParser.T__10); + this.state = 558; + this.general_term(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_formula() { + let localctx = new Thf_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 24, TPTPParser.RULE_thf_formula); + try { + this.state = 565; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,5,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 562; + this.thf_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 563; + this.thf_atom_typing(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 564; + this.thf_subtype(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_logic_formula() { + let localctx = new Thf_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 26, TPTPParser.RULE_thf_logic_formula); + try { + this.state = 573; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,6,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 567; + this.thf_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 568; + this.thf_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 569; + this.thf_binary_formula(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 570; + this.thf_defined_infix(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 571; + this.thf_definition(); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 572; + this.thf_sequent(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_binary_formula() { + let localctx = new Thf_binary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 28, TPTPParser.RULE_thf_binary_formula); + try { + this.state = 578; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,7,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 575; + this.thf_binary_pair(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 576; + this.thf_binary_list(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 577; + this.thf_binary_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_binary_pair() { + let localctx = new Thf_binary_pairContext(this, this._ctx, this.state); + this.enterRule(localctx, 30, TPTPParser.RULE_thf_binary_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 580; + this.thf_unit_formula(); + this.state = 581; + this.nonassoc_connective(); + this.state = 582; + this.thf_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_binary_list() { + let localctx = new Thf_binary_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 32, TPTPParser.RULE_thf_binary_list); + try { + this.state = 587; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,8,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 584; + this.thf_or_formula(0); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 585; + this.thf_and_formula(0); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 586; + this.thf_apply_formula(0); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + thf_or_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Thf_or_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 34; + this.enterRecursionRule(localctx, 34, TPTPParser.RULE_thf_or_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 590; + this.thf_unit_formula(); + this.state = 591; + this.match(TPTPParser.Vline); + this.state = 592; + this.thf_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 599; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,9,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Thf_or_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_or_formula); + this.state = 594; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 595; + this.match(TPTPParser.Vline); + this.state = 596; + this.thf_unit_formula(); + } + this.state = 601; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,9,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + thf_and_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Thf_and_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 36; + this.enterRecursionRule(localctx, 36, TPTPParser.RULE_thf_and_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 603; + this.thf_unit_formula(); + this.state = 604; + this.match(TPTPParser.T__11); + this.state = 605; + this.thf_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 612; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,10,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Thf_and_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_and_formula); + this.state = 607; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 608; + this.match(TPTPParser.T__11); + this.state = 609; + this.thf_unit_formula(); + } + this.state = 614; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,10,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + thf_apply_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Thf_apply_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 38; + this.enterRecursionRule(localctx, 38, TPTPParser.RULE_thf_apply_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 616; + this.thf_unit_formula(); + this.state = 617; + this.match(TPTPParser.T__12); + this.state = 618; + this.thf_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 625; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,11,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Thf_apply_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_apply_formula); + this.state = 620; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 621; + this.match(TPTPParser.T__12); + this.state = 622; + this.thf_unit_formula(); + } + this.state = 627; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,11,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + thf_unit_formula() { + let localctx = new Thf_unit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 40, TPTPParser.RULE_thf_unit_formula); + try { + this.state = 631; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,12,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 628; + this.thf_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 629; + this.thf_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 630; + this.thf_defined_infix(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_preunit_formula() { + let localctx = new Thf_preunit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 42, TPTPParser.RULE_thf_preunit_formula); + try { + this.state = 635; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,13,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 633; + this.thf_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 634; + this.thf_prefix_unary(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_unitary_formula() { + let localctx = new Thf_unitary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 44, TPTPParser.RULE_thf_unitary_formula); + try { + this.state = 644; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,14,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 637; + this.thf_quantified_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 638; + this.thf_atomic_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 639; + this.variable(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 640; + this.match(TPTPParser.T__1); + this.state = 641; + this.thf_logic_formula(); + this.state = 642; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_quantified_formula() { + let localctx = new Thf_quantified_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 46, TPTPParser.RULE_thf_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 646; + this.thf_quantification(); + this.state = 647; + this.thf_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_quantification() { + let localctx = new Thf_quantificationContext(this, this._ctx, this.state); + this.enterRule(localctx, 48, TPTPParser.RULE_thf_quantification); + try { + this.enterOuterAlt(localctx, 1); + this.state = 649; + this.thf_quantifier(); + this.state = 650; + this.match(TPTPParser.T__13); + this.state = 651; + this.thf_variable_list(); + this.state = 652; + this.match(TPTPParser.T__14); + this.state = 653; + this.match(TPTPParser.T__15); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_variable_list() { + let localctx = new Thf_variable_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 50, TPTPParser.RULE_thf_variable_list); + try { + this.state = 660; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,15,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 655; + this.thf_typed_variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 656; + this.thf_typed_variable(); + this.state = 657; + this.match(TPTPParser.T__2); + this.state = 658; + this.thf_variable_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_typed_variable() { + let localctx = new Thf_typed_variableContext(this, this._ctx, this.state); + this.enterRule(localctx, 52, TPTPParser.RULE_thf_typed_variable); + try { + this.enterOuterAlt(localctx, 1); + this.state = 662; + this.variable(); + this.state = 663; + this.match(TPTPParser.T__15); + this.state = 664; + this.thf_top_level_type(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_unary_formula() { + let localctx = new Thf_unary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 54, TPTPParser.RULE_thf_unary_formula); + try { + this.state = 668; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,16,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 666; + this.thf_prefix_unary(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 667; + this.thf_infix_unary(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_prefix_unary() { + let localctx = new Thf_prefix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 56, TPTPParser.RULE_thf_prefix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 670; + this.thf_unary_connective(); + this.state = 671; + this.thf_preunit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_infix_unary() { + let localctx = new Thf_infix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 58, TPTPParser.RULE_thf_infix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 673; + this.thf_unitary_term(); + this.state = 674; + this.infix_inequality(); + this.state = 675; + this.thf_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_atomic_formula() { + let localctx = new Thf_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 60, TPTPParser.RULE_thf_atomic_formula); + try { + this.state = 681; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,17,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 677; + this.thf_plain_atomic(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 678; + this.thf_defined_atomic(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 679; + this.thf_system_atomic(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 680; + this.thf_fof_function(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_plain_atomic() { + let localctx = new Thf_plain_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 62, TPTPParser.RULE_thf_plain_atomic); + try { + this.state = 685; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 683; + this.constant(); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 684; + this.thf_tuple(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_defined_atomic() { + let localctx = new Thf_defined_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 64, TPTPParser.RULE_thf_defined_atomic); + try { + this.state = 695; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 56: + this.enterOuterAlt(localctx, 1); + this.state = 687; + this.defined_constant(); + break; + case 39: + case 40: + case 41: + case 42: + case 43: + case 55: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 688; + this.thf_defined_term(); + break; + case 2: + this.enterOuterAlt(localctx, 3); + this.state = 689; + this.match(TPTPParser.T__1); + this.state = 690; + this.thf_conn_term(); + this.state = 691; + this.match(TPTPParser.T__3); + break; + case 18: + this.enterOuterAlt(localctx, 4); + this.state = 693; + this.nhf_long_connective(); + break; + case 17: + this.enterOuterAlt(localctx, 5); + this.state = 694; + this.thf_let(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_defined_term() { + let localctx = new Thf_defined_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 66, TPTPParser.RULE_thf_defined_term); + try { + this.state = 699; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 55: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 1); + this.state = 697; + this.defined_term(); + break; + case 39: + case 40: + case 41: + case 42: + case 43: + this.enterOuterAlt(localctx, 2); + this.state = 698; + this.th1_defined_term(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_defined_infix() { + let localctx = new Thf_defined_infixContext(this, this._ctx, this.state); + this.enterRule(localctx, 68, TPTPParser.RULE_thf_defined_infix); + try { + this.enterOuterAlt(localctx, 1); + this.state = 701; + this.thf_unitary_term(); + this.state = 702; + this.defined_infix_pred(); + this.state = 703; + this.thf_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_system_atomic() { + let localctx = new Thf_system_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 70, TPTPParser.RULE_thf_system_atomic); + try { + this.enterOuterAlt(localctx, 1); + this.state = 705; + this.system_constant(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_let() { + let localctx = new Thf_letContext(this, this._ctx, this.state); + this.enterRule(localctx, 72, TPTPParser.RULE_thf_let); + try { + this.enterOuterAlt(localctx, 1); + this.state = 707; + this.match(TPTPParser.T__16); + this.state = 708; + this.match(TPTPParser.T__1); + this.state = 709; + this.thf_let_types(); + this.state = 710; + this.match(TPTPParser.T__2); + this.state = 711; + this.thf_let_defns(); + this.state = 712; + this.match(TPTPParser.T__2); + this.state = 713; + this.thf_logic_formula(); + this.state = 714; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_let_types() { + let localctx = new Thf_let_typesContext(this, this._ctx, this.state); + this.enterRule(localctx, 74, TPTPParser.RULE_thf_let_types); + try { + this.state = 721; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 716; + this.thf_atom_typing(); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 717; + this.match(TPTPParser.T__13); + this.state = 718; + this.thf_atom_typing_list(); + this.state = 719; + this.match(TPTPParser.T__14); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_atom_typing_list() { + let localctx = new Thf_atom_typing_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 76, TPTPParser.RULE_thf_atom_typing_list); + try { + this.state = 728; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,22,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 723; + this.thf_atom_typing(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 724; + this.thf_atom_typing(); + this.state = 725; + this.match(TPTPParser.T__2); + this.state = 726; + this.thf_atom_typing_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_let_defns() { + let localctx = new Thf_let_defnsContext(this, this._ctx, this.state); + this.enterRule(localctx, 78, TPTPParser.RULE_thf_let_defns); + try { + this.state = 735; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,23,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 730; + this.thf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 731; + this.match(TPTPParser.T__13); + this.state = 732; + this.thf_let_defn_list(); + this.state = 733; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_let_defn() { + let localctx = new Thf_let_defnContext(this, this._ctx, this.state); + this.enterRule(localctx, 80, TPTPParser.RULE_thf_let_defn); + try { + this.enterOuterAlt(localctx, 1); + this.state = 737; + this.thf_logic_formula(); + this.state = 738; + this.assignment(); + this.state = 739; + this.thf_logic_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_let_defn_list() { + let localctx = new Thf_let_defn_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 82, TPTPParser.RULE_thf_let_defn_list); + try { + this.state = 746; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,24,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 741; + this.thf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 742; + this.thf_let_defn(); + this.state = 743; + this.match(TPTPParser.T__2); + this.state = 744; + this.thf_let_defn_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_unitary_term() { + let localctx = new Thf_unitary_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 84, TPTPParser.RULE_thf_unitary_term); + try { + this.state = 754; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,25,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 748; + this.thf_atomic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 749; + this.variable(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 750; + this.match(TPTPParser.T__1); + this.state = 751; + this.thf_logic_formula(); + this.state = 752; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_conn_term() { + let localctx = new Thf_conn_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 86, TPTPParser.RULE_thf_conn_term); + try { + this.state = 761; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,26,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 756; + this.nonassoc_connective(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 757; + this.assoc_connective(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 758; + this.infix_equality(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 759; + this.infix_inequality(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 760; + this.thf_unary_connective(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_tuple() { + let localctx = new Thf_tupleContext(this, this._ctx, this.state); + this.enterRule(localctx, 88, TPTPParser.RULE_thf_tuple); + try { + this.state = 769; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,27,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 763; + this.match(TPTPParser.T__13); + this.state = 764; + this.match(TPTPParser.T__14); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 765; + this.match(TPTPParser.T__13); + this.state = 766; + this.thf_formula_list(); + this.state = 767; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_fof_function() { + let localctx = new Thf_fof_functionContext(this, this._ctx, this.state); + this.enterRule(localctx, 90, TPTPParser.RULE_thf_fof_function); + try { + this.state = 786; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 56: + this.enterOuterAlt(localctx, 1); + this.state = 771; + this.defined_functor(); + this.state = 772; + this.match(TPTPParser.T__1); + this.state = 773; + this.thf_arguments(); + this.state = 774; + this.match(TPTPParser.T__3); + break; + case 57: + this.enterOuterAlt(localctx, 2); + this.state = 776; + this.system_functor(); + this.state = 777; + this.match(TPTPParser.T__1); + this.state = 778; + this.thf_arguments(); + this.state = 779; + this.match(TPTPParser.T__3); + break; + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 3); + this.state = 781; + this.functor(); + this.state = 782; + this.match(TPTPParser.T__1); + this.state = 783; + this.thf_arguments(); + this.state = 784; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_arguments() { + let localctx = new Thf_argumentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 92, TPTPParser.RULE_thf_arguments); + try { + this.enterOuterAlt(localctx, 1); + this.state = 788; + this.thf_formula_list(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_formula_list() { + let localctx = new Thf_formula_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 94, TPTPParser.RULE_thf_formula_list); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 790; + this.thf_logic_formula(); + this.state = 794; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===3) { + this.state = 791; + this.comma_thf_logic_formula(); + this.state = 796; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + comma_thf_logic_formula() { + let localctx = new Comma_thf_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 96, TPTPParser.RULE_comma_thf_logic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 797; + this.match(TPTPParser.T__2); + this.state = 798; + this.thf_logic_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_atom_typing() { + let localctx = new Thf_atom_typingContext(this, this._ctx, this.state); + this.enterRule(localctx, 98, TPTPParser.RULE_thf_atom_typing); + try { + this.state = 808; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 800; + this.typeable_atom(); + this.state = 801; + this.match(TPTPParser.T__15); + this.state = 802; + this.thf_top_level_type(); + break; + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 804; + this.match(TPTPParser.T__1); + this.state = 805; + this.thf_atom_typing(); + this.state = 806; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_top_level_type() { + let localctx = new Thf_top_level_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 100, TPTPParser.RULE_thf_top_level_type); + try { + this.state = 813; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,31,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 810; + this.thf_unitary_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 811; + this.thf_mapping_type(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 812; + this.thf_apply_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_unitary_type() { + let localctx = new Thf_unitary_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 102, TPTPParser.RULE_thf_unitary_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 815; + this.thf_unitary_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_apply_type() { + let localctx = new Thf_apply_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 104, TPTPParser.RULE_thf_apply_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 817; + this.thf_apply_formula(0); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_binary_type() { + let localctx = new Thf_binary_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 106, TPTPParser.RULE_thf_binary_type); + try { + this.state = 822; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,32,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 819; + this.thf_mapping_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 820; + this.thf_xprod_type(0); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 821; + this.thf_union_type(0); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_mapping_type() { + let localctx = new Thf_mapping_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 108, TPTPParser.RULE_thf_mapping_type); + try { + this.state = 832; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,33,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 824; + this.thf_unitary_type(); + this.state = 825; + this.match(TPTPParser.Arrow); + this.state = 826; + this.thf_unitary_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 828; + this.thf_unitary_type(); + this.state = 829; + this.match(TPTPParser.Arrow); + this.state = 830; + this.thf_mapping_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + thf_xprod_type(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Thf_xprod_typeContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 110; + this.enterRecursionRule(localctx, 110, TPTPParser.RULE_thf_xprod_type, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 835; + this.thf_unitary_type(); + this.state = 836; + this.match(TPTPParser.Star); + this.state = 837; + this.thf_unitary_type(); + this._ctx.stop = this._input.LT(-1); + this.state = 844; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,34,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Thf_xprod_typeContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_xprod_type); + this.state = 839; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 840; + this.match(TPTPParser.Star); + this.state = 841; + this.thf_unitary_type(); + } + this.state = 846; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,34,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + thf_union_type(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Thf_union_typeContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 112; + this.enterRecursionRule(localctx, 112, TPTPParser.RULE_thf_union_type, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 848; + this.thf_unitary_type(); + this.state = 849; + this.match(TPTPParser.Plus); + this.state = 850; + this.thf_unitary_type(); + this._ctx.stop = this._input.LT(-1); + this.state = 857; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,35,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Thf_union_typeContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_union_type); + this.state = 852; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 853; + this.match(TPTPParser.Plus); + this.state = 854; + this.thf_unitary_type(); + } + this.state = 859; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,35,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + thf_subtype() { + let localctx = new Thf_subtypeContext(this, this._ctx, this.state); + this.enterRule(localctx, 114, TPTPParser.RULE_thf_subtype); + try { + this.enterOuterAlt(localctx, 1); + this.state = 860; + this.atomic_type(); + this.state = 861; + this.subtype_sign(); + this.state = 862; + this.atomic_type(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_definition() { + let localctx = new Thf_definitionContext(this, this._ctx, this.state); + this.enterRule(localctx, 116, TPTPParser.RULE_thf_definition); + try { + this.enterOuterAlt(localctx, 1); + this.state = 864; + this.thf_atomic_formula(); + this.state = 865; + this.identical(); + this.state = 866; + this.thf_logic_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_sequent() { + let localctx = new Thf_sequentContext(this, this._ctx, this.state); + this.enterRule(localctx, 118, TPTPParser.RULE_thf_sequent); + try { + this.enterOuterAlt(localctx, 1); + this.state = 868; + this.thf_tuple(); + this.state = 869; + this.gentzen_arrow(); + this.state = 870; + this.thf_tuple(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_formula() { + let localctx = new Tff_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 120, TPTPParser.RULE_tff_formula); + try { + this.state = 875; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,36,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 872; + this.tff_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 873; + this.tff_atom_typing(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 874; + this.tff_subtype(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_logic_formula() { + let localctx = new Tff_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 122, TPTPParser.RULE_tff_logic_formula); + try { + this.state = 883; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,37,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 877; + this.tff_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 878; + this.tff_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 879; + this.tff_binary_formula(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 880; + this.tff_defined_infix(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 881; + this.txf_definition(); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 882; + this.txf_sequent(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_binary_formula() { + let localctx = new Tff_binary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 124, TPTPParser.RULE_tff_binary_formula); + try { + this.state = 887; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,38,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 885; + this.tff_binary_pair(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 886; + this.tff_binary_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_binary_pair() { + let localctx = new Tff_binary_pairContext(this, this._ctx, this.state); + this.enterRule(localctx, 126, TPTPParser.RULE_tff_binary_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 889; + this.tff_unit_formula(); + this.state = 890; + this.nonassoc_connective(); + this.state = 891; + this.tff_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_binary_list() { + let localctx = new Tff_binary_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 128, TPTPParser.RULE_tff_binary_list); + try { + this.state = 895; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,39,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 893; + this.tff_or_formula(0); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 894; + this.tff_and_formula(0); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + tff_or_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Tff_or_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 130; + this.enterRecursionRule(localctx, 130, TPTPParser.RULE_tff_or_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 898; + this.tff_unit_formula(); + this.state = 899; + this.match(TPTPParser.Vline); + this.state = 900; + this.tff_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 907; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,40,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Tff_or_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_tff_or_formula); + this.state = 902; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 903; + this.match(TPTPParser.Vline); + this.state = 904; + this.tff_unit_formula(); + } + this.state = 909; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,40,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + tff_and_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Tff_and_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 132; + this.enterRecursionRule(localctx, 132, TPTPParser.RULE_tff_and_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 911; + this.tff_unit_formula(); + this.state = 912; + this.match(TPTPParser.T__11); + this.state = 913; + this.tff_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 920; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,41,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Tff_and_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_tff_and_formula); + this.state = 915; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 916; + this.match(TPTPParser.T__11); + this.state = 917; + this.tff_unit_formula(); + } + this.state = 922; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,41,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + tff_unit_formula() { + let localctx = new Tff_unit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 134, TPTPParser.RULE_tff_unit_formula); + try { + this.state = 926; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,42,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 923; + this.tff_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 924; + this.tff_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 925; + this.tff_defined_infix(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_preunit_formula() { + let localctx = new Tff_preunit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 136, TPTPParser.RULE_tff_preunit_formula); + try { + this.state = 930; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,43,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 928; + this.tff_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 929; + this.tff_prefix_unary(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_unitary_formula() { + let localctx = new Tff_unitary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 138, TPTPParser.RULE_tff_unitary_formula); + try { + this.state = 939; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 20: + case 28: + case 70: + this.enterOuterAlt(localctx, 1); + this.state = 932; + this.tff_quantified_formula(); + break; + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 17: + case 18: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 56: + case 57: + case 59: + this.enterOuterAlt(localctx, 2); + this.state = 933; + this.tff_atomic_formula(); + break; + case 58: + this.enterOuterAlt(localctx, 3); + this.state = 934; + this.txf_unitary_formula(); + break; + case 2: + this.enterOuterAlt(localctx, 4); + this.state = 935; + this.match(TPTPParser.T__1); + this.state = 936; + this.tff_logic_formula(); + this.state = 937; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_unitary_formula() { + let localctx = new Txf_unitary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 140, TPTPParser.RULE_txf_unitary_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 941; + this.variable(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_quantified_formula() { + let localctx = new Tff_quantified_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 142, TPTPParser.RULE_tff_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 943; + this.tff_quantifier(); + this.state = 944; + this.match(TPTPParser.T__13); + this.state = 945; + this.tff_variable_list(); + this.state = 946; + this.match(TPTPParser.T__14); + this.state = 947; + this.match(TPTPParser.T__15); + this.state = 948; + this.tff_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_variable_list() { + let localctx = new Tff_variable_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 144, TPTPParser.RULE_tff_variable_list); + try { + this.state = 955; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,45,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 950; + this.tff_variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 951; + this.tff_variable(); + this.state = 952; + this.match(TPTPParser.T__2); + this.state = 953; + this.tff_variable_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_variable() { + let localctx = new Tff_variableContext(this, this._ctx, this.state); + this.enterRule(localctx, 146, TPTPParser.RULE_tff_variable); + try { + this.state = 959; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,46,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 957; + this.tff_typed_variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 958; + this.variable(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_typed_variable() { + let localctx = new Tff_typed_variableContext(this, this._ctx, this.state); + this.enterRule(localctx, 148, TPTPParser.RULE_tff_typed_variable); + try { + this.enterOuterAlt(localctx, 1); + this.state = 961; + this.variable(); + this.state = 962; + this.match(TPTPParser.T__15); + this.state = 963; + this.tff_atomic_type(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_unary_formula() { + let localctx = new Tff_unary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 150, TPTPParser.RULE_tff_unary_formula); + try { + this.state = 967; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,47,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 965; + this.tff_prefix_unary(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 966; + this.tff_infix_unary(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_prefix_unary() { + let localctx = new Tff_prefix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 152, TPTPParser.RULE_tff_prefix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 969; + this.tff_unary_connective(); + this.state = 970; + this.tff_preunit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_infix_unary() { + let localctx = new Tff_infix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 154, TPTPParser.RULE_tff_infix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 972; + this.tff_unitary_term(); + this.state = 973; + this.infix_inequality(); + this.state = 974; + this.tff_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_atomic_formula() { + let localctx = new Tff_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 156, TPTPParser.RULE_tff_atomic_formula); + try { + this.state = 979; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 976; + this.tff_plain_atomic(); + break; + case 17: + case 18: + case 56: + this.enterOuterAlt(localctx, 2); + this.state = 977; + this.tff_defined_atomic(); + break; + case 57: + this.enterOuterAlt(localctx, 3); + this.state = 978; + this.tff_system_atomic(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_plain_atomic() { + let localctx = new Tff_plain_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 158, TPTPParser.RULE_tff_plain_atomic); + try { + this.state = 987; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,49,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 981; + this.constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 982; + this.functor(); + this.state = 983; + this.match(TPTPParser.T__1); + this.state = 984; + this.tff_arguments(); + this.state = 985; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_defined_atomic() { + let localctx = new Tff_defined_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 160, TPTPParser.RULE_tff_defined_atomic); + try { + this.enterOuterAlt(localctx, 1); + this.state = 989; + this.tff_defined_plain(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_defined_plain() { + let localctx = new Tff_defined_plainContext(this, this._ctx, this.state); + this.enterRule(localctx, 162, TPTPParser.RULE_tff_defined_plain); + try { + this.state = 999; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,50,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 991; + this.defined_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 992; + this.defined_functor(); + this.state = 993; + this.match(TPTPParser.T__1); + this.state = 994; + this.tff_arguments(); + this.state = 995; + this.match(TPTPParser.T__3); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 997; + this.nxf_atom(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 998; + this.txf_let(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_defined_infix() { + let localctx = new Tff_defined_infixContext(this, this._ctx, this.state); + this.enterRule(localctx, 164, TPTPParser.RULE_tff_defined_infix); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1001; + this.tff_unitary_term(); + this.state = 1002; + this.defined_infix_pred(); + this.state = 1003; + this.tff_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_system_atomic() { + let localctx = new Tff_system_atomicContext(this, this._ctx, this.state); + this.enterRule(localctx, 166, TPTPParser.RULE_tff_system_atomic); + try { + this.state = 1011; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,51,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1005; + this.system_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1006; + this.system_functor(); + this.state = 1007; + this.match(TPTPParser.T__1); + this.state = 1008; + this.tff_arguments(); + this.state = 1009; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let() { + let localctx = new Txf_letContext(this, this._ctx, this.state); + this.enterRule(localctx, 168, TPTPParser.RULE_txf_let); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1013; + this.match(TPTPParser.T__16); + this.state = 1014; + this.match(TPTPParser.T__1); + this.state = 1015; + this.txf_let_types(); + this.state = 1016; + this.match(TPTPParser.T__2); + this.state = 1017; + this.txf_let_defns(); + this.state = 1018; + this.match(TPTPParser.T__2); + this.state = 1019; + this.tff_term(); + this.state = 1020; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let_types() { + let localctx = new Txf_let_typesContext(this, this._ctx, this.state); + this.enterRule(localctx, 170, TPTPParser.RULE_txf_let_types); + try { + this.state = 1027; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1022; + this.tff_atom_typing(); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 1023; + this.match(TPTPParser.T__13); + this.state = 1024; + this.tff_atom_typing_list(); + this.state = 1025; + this.match(TPTPParser.T__14); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_atom_typing_list() { + let localctx = new Tff_atom_typing_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 172, TPTPParser.RULE_tff_atom_typing_list); + try { + this.state = 1034; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,53,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1029; + this.tff_atom_typing(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1030; + this.tff_atom_typing(); + this.state = 1031; + this.match(TPTPParser.T__2); + this.state = 1032; + this.tff_atom_typing_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let_defns() { + let localctx = new Txf_let_defnsContext(this, this._ctx, this.state); + this.enterRule(localctx, 174, TPTPParser.RULE_txf_let_defns); + try { + this.state = 1041; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,54,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1036; + this.txf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1037; + this.match(TPTPParser.T__13); + this.state = 1038; + this.txf_let_defn_list(); + this.state = 1039; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let_defn() { + let localctx = new Txf_let_defnContext(this, this._ctx, this.state); + this.enterRule(localctx, 176, TPTPParser.RULE_txf_let_defn); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1043; + this.txf_let_lhs(); + this.state = 1044; + this.assignment(); + this.state = 1045; + this.tff_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let_lhs() { + let localctx = new Txf_let_lhsContext(this, this._ctx, this.state); + this.enterRule(localctx, 178, TPTPParser.RULE_txf_let_lhs); + try { + this.state = 1049; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1047; + this.tff_plain_atomic(); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 1048; + this.txf_tuple(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_let_defn_list() { + let localctx = new Txf_let_defn_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 180, TPTPParser.RULE_txf_let_defn_list); + try { + this.state = 1056; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,56,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1051; + this.txf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1052; + this.txf_let_defn(); + this.state = 1053; + this.match(TPTPParser.T__2); + this.state = 1054; + this.txf_let_defn_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nxf_atom() { + let localctx = new Nxf_atomContext(this, this._ctx, this.state); + this.enterRule(localctx, 182, TPTPParser.RULE_nxf_atom); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1058; + this.nxf_long_connective(); + this.state = 1059; + this.match(TPTPParser.T__12); + this.state = 1060; + this.match(TPTPParser.T__1); + this.state = 1061; + this.tff_arguments(); + this.state = 1062; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_term() { + let localctx = new Tff_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 184, TPTPParser.RULE_tff_term); + try { + this.state = 1067; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,57,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1064; + this.tff_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1065; + this.defined_term(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1066; + this.txf_tuple(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_unitary_term() { + let localctx = new Tff_unitary_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 186, TPTPParser.RULE_tff_unitary_term); + try { + this.state = 1077; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 17: + case 18: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 56: + case 57: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1069; + this.tff_atomic_formula(); + break; + case 55: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1070; + this.defined_term(); + break; + case 14: + this.enterOuterAlt(localctx, 3); + this.state = 1071; + this.txf_tuple(); + break; + case 58: + this.enterOuterAlt(localctx, 4); + this.state = 1072; + this.variable(); + break; + case 2: + this.enterOuterAlt(localctx, 5); + this.state = 1073; + this.match(TPTPParser.T__1); + this.state = 1074; + this.tff_logic_formula(); + this.state = 1075; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_tuple() { + let localctx = new Txf_tupleContext(this, this._ctx, this.state); + this.enterRule(localctx, 188, TPTPParser.RULE_txf_tuple); + try { + this.state = 1085; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,59,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1079; + this.match(TPTPParser.T__13); + this.state = 1080; + this.match(TPTPParser.T__14); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1081; + this.match(TPTPParser.T__13); + this.state = 1082; + this.tff_arguments(); + this.state = 1083; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_arguments() { + let localctx = new Tff_argumentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 190, TPTPParser.RULE_tff_arguments); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1087; + this.tff_term(); + this.state = 1091; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===3) { + this.state = 1088; + this.comma_tff_term(); + this.state = 1093; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + comma_tff_term() { + let localctx = new Comma_tff_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 192, TPTPParser.RULE_comma_tff_term); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1094; + this.match(TPTPParser.T__2); + this.state = 1095; + this.tff_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_atom_typing() { + let localctx = new Tff_atom_typingContext(this, this._ctx, this.state); + this.enterRule(localctx, 194, TPTPParser.RULE_tff_atom_typing); + try { + this.state = 1105; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1097; + this.typeable_atom(); + this.state = 1098; + this.match(TPTPParser.T__15); + this.state = 1099; + this.tff_top_level_type(); + break; + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1101; + this.match(TPTPParser.T__1); + this.state = 1102; + this.tff_atom_typing(); + this.state = 1103; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_top_level_type() { + let localctx = new Tff_top_level_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 196, TPTPParser.RULE_tff_top_level_type); + try { + this.state = 1109; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,62,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1107; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1108; + this.tff_non_atomic_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_non_atomic_type() { + let localctx = new Tff_non_atomic_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 198, TPTPParser.RULE_tff_non_atomic_type); + try { + this.state = 1117; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,63,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1111; + this.tff_mapping_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1112; + this.tf1_quantified_type(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1113; + this.match(TPTPParser.T__1); + this.state = 1114; + this.tff_non_atomic_type(); + this.state = 1115; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tf1_quantified_type() { + let localctx = new Tf1_quantified_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 200, TPTPParser.RULE_tf1_quantified_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1119; + this.type_quantifier(); + this.state = 1120; + this.match(TPTPParser.T__13); + this.state = 1121; + this.tff_variable_list(); + this.state = 1122; + this.match(TPTPParser.T__14); + this.state = 1123; + this.match(TPTPParser.T__15); + this.state = 1124; + this.tff_monotype(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_monotype() { + let localctx = new Tff_monotypeContext(this, this._ctx, this.state); + this.enterRule(localctx, 202, TPTPParser.RULE_tff_monotype); + try { + this.state = 1132; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,64,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1126; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1127; + this.match(TPTPParser.T__1); + this.state = 1128; + this.tff_mapping_type(); + this.state = 1129; + this.match(TPTPParser.T__3); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1131; + this.tf1_quantified_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_unitary_type() { + let localctx = new Tff_unitary_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 204, TPTPParser.RULE_tff_unitary_type); + try { + this.state = 1139; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,65,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1134; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1135; + this.match(TPTPParser.T__1); + this.state = 1136; + this.tff_xprod_type(0); + this.state = 1137; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_atomic_type() { + let localctx = new Tff_atomic_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 206, TPTPParser.RULE_tff_atomic_type); + try { + this.state = 1154; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,66,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1141; + this.type_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1142; + this.defined_type(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1143; + this.variable(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1144; + this.type_functor(); + this.state = 1145; + this.match(TPTPParser.T__1); + this.state = 1146; + this.tff_type_arguments(); + this.state = 1147; + this.match(TPTPParser.T__3); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 1149; + this.match(TPTPParser.T__1); + this.state = 1150; + this.tff_atomic_type(); + this.state = 1151; + this.match(TPTPParser.T__3); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 1153; + this.txf_tuple_type(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_type_arguments() { + let localctx = new Tff_type_argumentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 208, TPTPParser.RULE_tff_type_arguments); + try { + this.state = 1161; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,67,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1156; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1157; + this.tff_atomic_type(); + this.state = 1158; + this.match(TPTPParser.T__2); + this.state = 1159; + this.tff_type_arguments(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_mapping_type() { + let localctx = new Tff_mapping_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 210, TPTPParser.RULE_tff_mapping_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1163; + this.tff_unitary_type(); + this.state = 1164; + this.match(TPTPParser.Arrow); + this.state = 1165; + this.tff_atomic_type(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + tff_xprod_type(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Tff_xprod_typeContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 212; + this.enterRecursionRule(localctx, 212, TPTPParser.RULE_tff_xprod_type, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1168; + this.tff_unitary_type(); + this.state = 1169; + this.match(TPTPParser.Star); + this.state = 1170; + this.tff_atomic_type(); + this._ctx.stop = this._input.LT(-1); + this.state = 1177; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,68,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Tff_xprod_typeContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_tff_xprod_type); + this.state = 1172; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1173; + this.match(TPTPParser.Star); + this.state = 1174; + this.tff_atomic_type(); + } + this.state = 1179; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,68,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + txf_tuple_type() { + let localctx = new Txf_tuple_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 214, TPTPParser.RULE_txf_tuple_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1180; + this.match(TPTPParser.T__13); + this.state = 1181; + this.tff_type_list(); + this.state = 1182; + this.match(TPTPParser.T__14); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_type_list() { + let localctx = new Tff_type_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 216, TPTPParser.RULE_tff_type_list); + try { + this.state = 1189; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,69,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1184; + this.tff_top_level_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1185; + this.tff_top_level_type(); + this.state = 1186; + this.match(TPTPParser.T__2); + this.state = 1187; + this.tff_type_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_subtype() { + let localctx = new Tff_subtypeContext(this, this._ctx, this.state); + this.enterRule(localctx, 218, TPTPParser.RULE_tff_subtype); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1191; + this.atomic_type(); + this.state = 1192; + this.subtype_sign(); + this.state = 1193; + this.atomic_type(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_definition() { + let localctx = new Txf_definitionContext(this, this._ctx, this.state); + this.enterRule(localctx, 220, TPTPParser.RULE_txf_definition); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1195; + this.tff_atomic_formula(); + this.state = 1196; + this.identical(); + this.state = 1197; + this.tff_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + txf_sequent() { + let localctx = new Txf_sequentContext(this, this._ctx, this.state); + this.enterRule(localctx, 222, TPTPParser.RULE_txf_sequent); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1199; + this.txf_tuple(); + this.state = 1200; + this.gentzen_arrow(); + this.state = 1201; + this.txf_tuple(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nhf_long_connective() { + let localctx = new Nhf_long_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 224, TPTPParser.RULE_nhf_long_connective); + try { + this.state = 1214; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,70,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1203; + this.match(TPTPParser.T__17); + this.state = 1204; + this.ntf_connective_name(); + this.state = 1205; + this.match(TPTPParser.T__18); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1207; + this.match(TPTPParser.T__17); + this.state = 1208; + this.ntf_connective_name(); + this.state = 1209; + this.match(TPTPParser.T__1); + this.state = 1210; + this.nhf_parameter_list(); + this.state = 1211; + this.match(TPTPParser.T__3); + this.state = 1212; + this.match(TPTPParser.T__18); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nhf_parameter_list() { + let localctx = new Nhf_parameter_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 226, TPTPParser.RULE_nhf_parameter_list); + try { + this.state = 1221; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,71,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1216; + this.nhf_parameter(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1217; + this.nhf_parameter(); + this.state = 1218; + this.match(TPTPParser.T__2); + this.state = 1219; + this.nhf_parameter_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nhf_parameter() { + let localctx = new Nhf_parameterContext(this, this._ctx, this.state); + this.enterRule(localctx, 228, TPTPParser.RULE_nhf_parameter); + try { + this.state = 1225; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 70: + this.enterOuterAlt(localctx, 1); + this.state = 1223; + this.ntf_index(); + break; + case 1: + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 14: + case 17: + case 18: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1224; + this.nhf_key_pair(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nhf_key_pair() { + let localctx = new Nhf_key_pairContext(this, this._ctx, this.state); + this.enterRule(localctx, 230, TPTPParser.RULE_nhf_key_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1227; + this.thf_definition(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nxf_long_connective() { + let localctx = new Nxf_long_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 232, TPTPParser.RULE_nxf_long_connective); + try { + this.state = 1240; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,73,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1229; + this.match(TPTPParser.T__17); + this.state = 1230; + this.ntf_connective_name(); + this.state = 1231; + this.match(TPTPParser.T__18); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1233; + this.match(TPTPParser.T__17); + this.state = 1234; + this.ntf_connective_name(); + this.state = 1235; + this.match(TPTPParser.T__1); + this.state = 1236; + this.nxf_parameter_list(); + this.state = 1237; + this.match(TPTPParser.T__3); + this.state = 1238; + this.match(TPTPParser.T__18); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nxf_parameter_list() { + let localctx = new Nxf_parameter_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 234, TPTPParser.RULE_nxf_parameter_list); + try { + this.state = 1247; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,74,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1242; + this.nxf_parameter(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1243; + this.nxf_parameter(); + this.state = 1244; + this.match(TPTPParser.T__2); + this.state = 1245; + this.nxf_parameter_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nxf_parameter() { + let localctx = new Nxf_parameterContext(this, this._ctx, this.state); + this.enterRule(localctx, 236, TPTPParser.RULE_nxf_parameter); + try { + this.state = 1251; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 70: + this.enterOuterAlt(localctx, 1); + this.state = 1249; + this.ntf_index(); + break; + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 17: + case 18: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 56: + case 57: + case 59: + this.enterOuterAlt(localctx, 2); + this.state = 1250; + this.nxf_key_pair(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nxf_key_pair() { + let localctx = new Nxf_key_pairContext(this, this._ctx, this.state); + this.enterRule(localctx, 238, TPTPParser.RULE_nxf_key_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1253; + this.txf_definition(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + ntf_connective_name() { + let localctx = new Ntf_connective_nameContext(this, this._ctx, this.state); + this.enterRule(localctx, 240, TPTPParser.RULE_ntf_connective_name); + try { + this.state = 1257; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 56: + this.enterOuterAlt(localctx, 1); + this.state = 1255; + this.ntf_defined_connective(); + break; + case 57: + this.enterOuterAlt(localctx, 2); + this.state = 1256; + this.atomic_system_word(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + ntf_defined_connective() { + let localctx = new Ntf_defined_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 242, TPTPParser.RULE_ntf_defined_connective); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1259; + this.atomic_defined_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + ntf_index() { + let localctx = new Ntf_indexContext(this, this._ctx, this.state); + this.enterRule(localctx, 244, TPTPParser.RULE_ntf_index); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1261; + this.match(TPTPParser.Hash); + this.state = 1262; + this.tff_unitary_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + ntf_short_connective() { + let localctx = new Ntf_short_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 246, TPTPParser.RULE_ntf_short_connective); + try { + this.state = 1276; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 14: + this.enterOuterAlt(localctx, 1); + this.state = 1264; + this.match(TPTPParser.T__13); + this.state = 1265; + this.match(TPTPParser.T__4); + this.state = 1266; + this.match(TPTPParser.T__14); + break; + case 69: + this.enterOuterAlt(localctx, 2); + this.state = 1267; + this.match(TPTPParser.Less_sign); + this.state = 1268; + this.match(TPTPParser.T__4); + this.state = 1269; + this.match(TPTPParser.Arrow); + break; + case 18: + this.enterOuterAlt(localctx, 3); + this.state = 1270; + this.match(TPTPParser.T__17); + this.state = 1271; + this.match(TPTPParser.T__4); + this.state = 1272; + this.match(TPTPParser.T__18); + break; + case 2: + this.enterOuterAlt(localctx, 4); + this.state = 1273; + this.match(TPTPParser.T__1); + this.state = 1274; + this.match(TPTPParser.T__4); + this.state = 1275; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tcf_formula() { + let localctx = new Tcf_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 248, TPTPParser.RULE_tcf_formula); + try { + this.state = 1280; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,78,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1278; + this.tcf_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1279; + this.tff_atom_typing(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tcf_logic_formula() { + let localctx = new Tcf_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 250, TPTPParser.RULE_tcf_logic_formula); + try { + this.state = 1284; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 20: + this.enterOuterAlt(localctx, 1); + this.state = 1282; + this.tcf_quantified_formula(); + break; + case 1: + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 21: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1283; + this.cnf_formula(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tcf_quantified_formula() { + let localctx = new Tcf_quantified_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 252, TPTPParser.RULE_tcf_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1286; + this.match(TPTPParser.T__19); + this.state = 1287; + this.match(TPTPParser.T__13); + this.state = 1288; + this.tff_variable_list(); + this.state = 1289; + this.match(TPTPParser.T__14); + this.state = 1290; + this.match(TPTPParser.T__15); + this.state = 1291; + this.tcf_logic_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_formula() { + let localctx = new Fof_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 254, TPTPParser.RULE_fof_formula); + try { + this.state = 1295; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,80,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1293; + this.fof_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1294; + this.fof_sequent(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_logic_formula() { + let localctx = new Fof_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 256, TPTPParser.RULE_fof_logic_formula); + try { + this.state = 1300; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,81,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1297; + this.fof_binary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1298; + this.fof_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1299; + this.fof_unitary_formula(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_binary_formula() { + let localctx = new Fof_binary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 258, TPTPParser.RULE_fof_binary_formula); + try { + this.state = 1304; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,82,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1302; + this.fof_binary_pair(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1303; + this.fof_binary_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_binary_pair() { + let localctx = new Fof_binary_pairContext(this, this._ctx, this.state); + this.enterRule(localctx, 260, TPTPParser.RULE_fof_binary_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1306; + this.fof_unit_formula(); + this.state = 1307; + this.nonassoc_connective(); + this.state = 1308; + this.fof_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_binary_list() { + let localctx = new Fof_binary_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 262, TPTPParser.RULE_fof_binary_list); + try { + this.state = 1312; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,83,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1310; + this.fof_or_formula(0); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1311; + this.fof_and_formula(0); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + fof_or_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Fof_or_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 264; + this.enterRecursionRule(localctx, 264, TPTPParser.RULE_fof_or_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1315; + this.fof_unit_formula(); + this.state = 1316; + this.match(TPTPParser.Vline); + this.state = 1317; + this.fof_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 1324; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,84,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Fof_or_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_fof_or_formula); + this.state = 1319; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1320; + this.match(TPTPParser.Vline); + this.state = 1321; + this.fof_unit_formula(); + } + this.state = 1326; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,84,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + fof_and_formula(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Fof_and_formulaContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 266; + this.enterRecursionRule(localctx, 266, TPTPParser.RULE_fof_and_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1328; + this.fof_unit_formula(); + this.state = 1329; + this.match(TPTPParser.T__11); + this.state = 1330; + this.fof_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 1337; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,85,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Fof_and_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_fof_and_formula); + this.state = 1332; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1333; + this.match(TPTPParser.T__11); + this.state = 1334; + this.fof_unit_formula(); + } + this.state = 1339; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,85,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + fof_unary_formula() { + let localctx = new Fof_unary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 268, TPTPParser.RULE_fof_unary_formula); + try { + this.state = 1344; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 21: + this.enterOuterAlt(localctx, 1); + this.state = 1340; + this.unary_connective(); + this.state = 1341; + this.fof_unit_formula(); + break; + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1343; + this.fof_infix_unary(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_infix_unary() { + let localctx = new Fof_infix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 270, TPTPParser.RULE_fof_infix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1346; + this.fof_term(); + this.state = 1347; + this.infix_inequality(); + this.state = 1348; + this.fof_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_unit_formula() { + let localctx = new Fof_unit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 272, TPTPParser.RULE_fof_unit_formula); + try { + this.state = 1352; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,87,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1350; + this.fof_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1351; + this.fof_unary_formula(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_unitary_formula() { + let localctx = new Fof_unitary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 274, TPTPParser.RULE_fof_unitary_formula); + try { + this.state = 1360; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 20: + case 28: + this.enterOuterAlt(localctx, 1); + this.state = 1354; + this.fof_quantified_formula(); + break; + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1355; + this.fof_atomic_formula(); + break; + case 2: + this.enterOuterAlt(localctx, 3); + this.state = 1356; + this.match(TPTPParser.T__1); + this.state = 1357; + this.fof_logic_formula(); + this.state = 1358; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_quantified_formula() { + let localctx = new Fof_quantified_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 276, TPTPParser.RULE_fof_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1362; + this.fof_quantifier(); + this.state = 1363; + this.match(TPTPParser.T__13); + this.state = 1364; + this.fof_variable_list(); + this.state = 1365; + this.match(TPTPParser.T__14); + this.state = 1366; + this.match(TPTPParser.T__15); + this.state = 1367; + this.fof_unit_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_variable_list() { + let localctx = new Fof_variable_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 278, TPTPParser.RULE_fof_variable_list); + try { + this.state = 1374; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,89,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1369; + this.variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1370; + this.variable(); + this.state = 1371; + this.match(TPTPParser.T__2); + this.state = 1372; + this.fof_variable_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_atomic_formula() { + let localctx = new Fof_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 280, TPTPParser.RULE_fof_atomic_formula); + try { + this.state = 1379; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,90,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1376; + this.fof_plain_atomic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1377; + this.fof_defined_atomic_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1378; + this.fof_system_atomic_formula(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_plain_atomic_formula() { + let localctx = new Fof_plain_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 282, TPTPParser.RULE_fof_plain_atomic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1381; + this.fof_plain_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_atomic_formula() { + let localctx = new Fof_defined_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 284, TPTPParser.RULE_fof_defined_atomic_formula); + try { + this.state = 1385; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,91,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1383; + this.fof_defined_plain_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1384; + this.fof_defined_infix_formula(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_plain_formula() { + let localctx = new Fof_defined_plain_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 286, TPTPParser.RULE_fof_defined_plain_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1387; + this.fof_defined_plain_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_infix_formula() { + let localctx = new Fof_defined_infix_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 288, TPTPParser.RULE_fof_defined_infix_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1389; + this.fof_term(); + this.state = 1390; + this.defined_infix_pred(); + this.state = 1391; + this.fof_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_system_atomic_formula() { + let localctx = new Fof_system_atomic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 290, TPTPParser.RULE_fof_system_atomic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1393; + this.fof_system_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_plain_term() { + let localctx = new Fof_plain_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 292, TPTPParser.RULE_fof_plain_term); + try { + this.state = 1401; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,92,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1395; + this.constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1396; + this.functor(); + this.state = 1397; + this.match(TPTPParser.T__1); + this.state = 1398; + this.fof_arguments(); + this.state = 1399; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_term() { + let localctx = new Fof_defined_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 294, TPTPParser.RULE_fof_defined_term); + try { + this.state = 1405; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 55: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 1); + this.state = 1403; + this.defined_term(); + break; + case 56: + this.enterOuterAlt(localctx, 2); + this.state = 1404; + this.fof_defined_atomic_term(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_atomic_term() { + let localctx = new Fof_defined_atomic_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 296, TPTPParser.RULE_fof_defined_atomic_term); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1407; + this.fof_defined_plain_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_defined_plain_term() { + let localctx = new Fof_defined_plain_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 298, TPTPParser.RULE_fof_defined_plain_term); + try { + this.state = 1415; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,94,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1409; + this.defined_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1410; + this.defined_functor(); + this.state = 1411; + this.match(TPTPParser.T__1); + this.state = 1412; + this.fof_arguments(); + this.state = 1413; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_system_term() { + let localctx = new Fof_system_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 300, TPTPParser.RULE_fof_system_term); + try { + this.state = 1423; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,95,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1417; + this.system_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1418; + this.system_functor(); + this.state = 1419; + this.match(TPTPParser.T__1); + this.state = 1420; + this.fof_arguments(); + this.state = 1421; + this.match(TPTPParser.T__3); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_arguments() { + let localctx = new Fof_argumentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 302, TPTPParser.RULE_fof_arguments); + try { + this.state = 1430; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,96,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1425; + this.fof_term(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1426; + this.fof_term(); + this.state = 1427; + this.match(TPTPParser.T__2); + this.state = 1428; + this.fof_arguments(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_term() { + let localctx = new Fof_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 304, TPTPParser.RULE_fof_term); + try { + this.state = 1434; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 1); + this.state = 1432; + this.fof_function_term(); + break; + case 58: + this.enterOuterAlt(localctx, 2); + this.state = 1433; + this.variable(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_function_term() { + let localctx = new Fof_function_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 306, TPTPParser.RULE_fof_function_term); + try { + this.state = 1439; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1436; + this.fof_plain_term(); + break; + case 55: + case 56: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1437; + this.fof_defined_term(); + break; + case 57: + this.enterOuterAlt(localctx, 3); + this.state = 1438; + this.fof_system_term(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_sequent() { + let localctx = new Fof_sequentContext(this, this._ctx, this.state); + this.enterRule(localctx, 308, TPTPParser.RULE_fof_sequent); + try { + this.state = 1449; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 14: + this.enterOuterAlt(localctx, 1); + this.state = 1441; + this.fof_formula_tuple(); + this.state = 1442; + this.gentzen_arrow(); + this.state = 1443; + this.fof_formula_tuple(); + break; + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1445; + this.match(TPTPParser.T__1); + this.state = 1446; + this.fof_sequent(); + this.state = 1447; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_formula_tuple() { + let localctx = new Fof_formula_tupleContext(this, this._ctx, this.state); + this.enterRule(localctx, 310, TPTPParser.RULE_fof_formula_tuple); + try { + this.state = 1457; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,100,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1451; + this.match(TPTPParser.T__13); + this.state = 1452; + this.match(TPTPParser.T__14); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1453; + this.match(TPTPParser.T__13); + this.state = 1454; + this.fof_formula_tuple_list(); + this.state = 1455; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_formula_tuple_list() { + let localctx = new Fof_formula_tuple_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 312, TPTPParser.RULE_fof_formula_tuple_list); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1459; + this.fof_logic_formula(); + this.state = 1463; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===3) { + this.state = 1460; + this.comma_fof_logic_formula(); + this.state = 1465; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + comma_fof_logic_formula() { + let localctx = new Comma_fof_logic_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 314, TPTPParser.RULE_comma_fof_logic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1466; + this.match(TPTPParser.T__2); + this.state = 1467; + this.fof_logic_formula(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + cnf_formula() { + let localctx = new Cnf_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 316, TPTPParser.RULE_cnf_formula); + try { + this.state = 1474; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 21: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 1); + this.state = 1469; + this.cnf_disjunction(0); + break; + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1470; + this.match(TPTPParser.T__1); + this.state = 1471; + this.cnf_formula(); + this.state = 1472; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + cnf_disjunction(_p) { + if(_p===undefined) { + _p = 0; + } + const _parentctx = this._ctx; + const _parentState = this.state; + let localctx = new Cnf_disjunctionContext(this, this._ctx, _parentState); + let _prevctx = localctx; + const _startState = 318; + this.enterRecursionRule(localctx, 318, TPTPParser.RULE_cnf_disjunction, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1477; + this.cnf_literal(); + this._ctx.stop = this._input.LT(-1); + this.state = 1484; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,103,this._ctx) + while(_alt!=2 && _alt!=antlr4.atn.ATN.INVALID_ALT_NUMBER) { + if(_alt===1) { + if(this._parseListeners!==null) { + this.triggerExitRuleEvent(); + } + _prevctx = localctx; + localctx = new Cnf_disjunctionContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_cnf_disjunction); + this.state = 1479; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1480; + this.match(TPTPParser.Vline); + this.state = 1481; + this.cnf_literal(); + } + this.state = 1486; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,103,this._ctx); + } + + } catch( error) { + if(error instanceof antlr4.error.RecognitionException) { + localctx.exception = error; + this._errHandler.reportError(this, error); + this._errHandler.recover(this, error); + } else { + throw error; + } + } finally { + this.unrollRecursionContexts(_parentctx) + } + return localctx; + } + + + + cnf_literal() { + let localctx = new Cnf_literalContext(this, this._ctx, this.state); + this.enterRule(localctx, 320, TPTPParser.RULE_cnf_literal); + try { + this.state = 1496; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,104,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1487; + this.fof_atomic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1488; + this.match(TPTPParser.T__20); + this.state = 1489; + this.fof_atomic_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1490; + this.match(TPTPParser.T__20); + this.state = 1491; + this.match(TPTPParser.T__1); + this.state = 1492; + this.fof_atomic_formula(); + this.state = 1493; + this.match(TPTPParser.T__3); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1495; + this.fof_infix_unary(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_quantifier() { + let localctx = new Thf_quantifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 322, TPTPParser.RULE_thf_quantifier); + try { + this.state = 1501; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 20: + case 28: + case 70: + this.enterOuterAlt(localctx, 1); + this.state = 1498; + this.tff_quantifier(); + break; + case 22: + case 23: + case 24: + this.enterOuterAlt(localctx, 2); + this.state = 1499; + this.th0_quantifier(); + break; + case 25: + case 26: + this.enterOuterAlt(localctx, 3); + this.state = 1500; + this.type_quantifier(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + thf_unary_connective() { + let localctx = new Thf_unary_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 324, TPTPParser.RULE_thf_unary_connective); + try { + this.state = 1505; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 21: + this.enterOuterAlt(localctx, 1); + this.state = 1503; + this.unary_connective(); + break; + case 2: + case 14: + case 18: + case 69: + this.enterOuterAlt(localctx, 2); + this.state = 1504; + this.ntf_short_connective(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + th0_quantifier() { + let localctx = new Th0_quantifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 326, TPTPParser.RULE_th0_quantifier); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1507; + _la = this._input.LA(1); + if(!((((_la) & ~0x1f) === 0 && ((1 << _la) & 29360128) !== 0))) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + type_quantifier() { + let localctx = new Type_quantifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 328, TPTPParser.RULE_type_quantifier); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1509; + _la = this._input.LA(1); + if(!(_la===25 || _la===26)) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + subtype_sign() { + let localctx = new Subtype_signContext(this, this._ctx, this.state); + this.enterRule(localctx, 330, TPTPParser.RULE_subtype_sign); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1511; + this.match(TPTPParser.T__26); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_unary_connective() { + let localctx = new Tff_unary_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 332, TPTPParser.RULE_tff_unary_connective); + try { + this.state = 1515; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 21: + this.enterOuterAlt(localctx, 1); + this.state = 1513; + this.unary_connective(); + break; + case 2: + case 14: + case 18: + case 69: + this.enterOuterAlt(localctx, 2); + this.state = 1514; + this.ntf_short_connective(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + tff_quantifier() { + let localctx = new Tff_quantifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 334, TPTPParser.RULE_tff_quantifier); + try { + this.state = 1519; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 20: + case 28: + this.enterOuterAlt(localctx, 1); + this.state = 1517; + this.fof_quantifier(); + break; + case 70: + this.enterOuterAlt(localctx, 2); + this.state = 1518; + this.match(TPTPParser.Hash); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + fof_quantifier() { + let localctx = new Fof_quantifierContext(this, this._ctx, this.state); + this.enterRule(localctx, 336, TPTPParser.RULE_fof_quantifier); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1521; + _la = this._input.LA(1); + if(!(_la===20 || _la===28)) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nonassoc_connective() { + let localctx = new Nonassoc_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 338, TPTPParser.RULE_nonassoc_connective); + try { + this.state = 1530; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 29: + this.enterOuterAlt(localctx, 1); + this.state = 1523; + this.match(TPTPParser.T__28); + break; + case 30: + this.enterOuterAlt(localctx, 2); + this.state = 1524; + this.match(TPTPParser.T__29); + break; + case 31: + this.enterOuterAlt(localctx, 3); + this.state = 1525; + this.match(TPTPParser.T__30); + break; + case 32: + this.enterOuterAlt(localctx, 4); + this.state = 1526; + this.match(TPTPParser.T__31); + break; + case 21: + this.enterOuterAlt(localctx, 5); + this.state = 1527; + this.match(TPTPParser.T__20); + this.state = 1528; + this.match(TPTPParser.Vline); + break; + case 33: + this.enterOuterAlt(localctx, 6); + this.state = 1529; + this.match(TPTPParser.T__32); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + assoc_connective() { + let localctx = new Assoc_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 340, TPTPParser.RULE_assoc_connective); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1532; + _la = this._input.LA(1); + if(!(_la===12 || _la===65)) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + unary_connective() { + let localctx = new Unary_connectiveContext(this, this._ctx, this.state); + this.enterRule(localctx, 342, TPTPParser.RULE_unary_connective); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1534; + this.match(TPTPParser.T__20); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + gentzen_arrow() { + let localctx = new Gentzen_arrowContext(this, this._ctx, this.state); + this.enterRule(localctx, 344, TPTPParser.RULE_gentzen_arrow); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1536; + this.match(TPTPParser.T__33); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + assignment() { + let localctx = new AssignmentContext(this, this._ctx, this.state); + this.enterRule(localctx, 346, TPTPParser.RULE_assignment); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1538; + this.match(TPTPParser.T__34); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + identical() { + let localctx = new IdenticalContext(this, this._ctx, this.state); + this.enterRule(localctx, 348, TPTPParser.RULE_identical); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1540; + this.match(TPTPParser.T__35); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + typeable_atom() { + let localctx = new Typeable_atomContext(this, this._ctx, this.state); + this.enterRule(localctx, 350, TPTPParser.RULE_typeable_atom); + try { + this.state = 1544; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1542; + this.constant(); + break; + case 55: + this.enterOuterAlt(localctx, 2); + this.state = 1543; + this.match(TPTPParser.Distinct_object); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + atomic_type() { + let localctx = new Atomic_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 352, TPTPParser.RULE_atomic_type); + try { + this.state = 1549; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 55: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1546; + this.typeable_atom(); + break; + case 56: + this.enterOuterAlt(localctx, 2); + this.state = 1547; + this.defined_constant(); + break; + case 57: + this.enterOuterAlt(localctx, 3); + this.state = 1548; + this.system_type(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + type_constant() { + let localctx = new Type_constantContext(this, this._ctx, this.state); + this.enterRule(localctx, 354, TPTPParser.RULE_type_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1551; + this.type_functor(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + type_functor() { + let localctx = new Type_functorContext(this, this._ctx, this.state); + this.enterRule(localctx, 356, TPTPParser.RULE_type_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1553; + this.atomic_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + defined_type() { + let localctx = new Defined_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 358, TPTPParser.RULE_defined_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1555; + this.atomic_defined_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + system_type() { + let localctx = new System_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 360, TPTPParser.RULE_system_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1557; + this.atomic_system_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + defined_infix_pred() { + let localctx = new Defined_infix_predContext(this, this._ctx, this.state); + this.enterRule(localctx, 362, TPTPParser.RULE_defined_infix_pred); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1559; + this.infix_equality(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + infix_equality() { + let localctx = new Infix_equalityContext(this, this._ctx, this.state); + this.enterRule(localctx, 364, TPTPParser.RULE_infix_equality); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1561; + this.match(TPTPParser.T__36); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + infix_inequality() { + let localctx = new Infix_inequalityContext(this, this._ctx, this.state); + this.enterRule(localctx, 366, TPTPParser.RULE_infix_inequality); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1563; + this.match(TPTPParser.T__37); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + constant() { + let localctx = new ConstantContext(this, this._ctx, this.state); + this.enterRule(localctx, 368, TPTPParser.RULE_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1565; + this.functor(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + functor() { + let localctx = new FunctorContext(this, this._ctx, this.state); + this.enterRule(localctx, 370, TPTPParser.RULE_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1567; + this.atomic_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + defined_constant() { + let localctx = new Defined_constantContext(this, this._ctx, this.state); + this.enterRule(localctx, 372, TPTPParser.RULE_defined_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1569; + this.defined_functor(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + defined_functor() { + let localctx = new Defined_functorContext(this, this._ctx, this.state); + this.enterRule(localctx, 374, TPTPParser.RULE_defined_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1571; + this.atomic_defined_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + system_constant() { + let localctx = new System_constantContext(this, this._ctx, this.state); + this.enterRule(localctx, 376, TPTPParser.RULE_system_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1573; + this.system_functor(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + system_functor() { + let localctx = new System_functorContext(this, this._ctx, this.state); + this.enterRule(localctx, 378, TPTPParser.RULE_system_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1575; + this.atomic_system_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + th1_defined_term() { + let localctx = new Th1_defined_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 380, TPTPParser.RULE_th1_defined_term); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1577; + _la = this._input.LA(1); + if(!(((((_la - 39)) & ~0x1f) === 0 && ((1 << (_la - 39)) & 31) !== 0))) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + defined_term() { + let localctx = new Defined_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 382, TPTPParser.RULE_defined_term); + try { + this.state = 1581; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 60: + case 61: + case 62: + this.enterOuterAlt(localctx, 1); + this.state = 1579; + this.number(); + break; + case 55: + this.enterOuterAlt(localctx, 2); + this.state = 1580; + this.match(TPTPParser.Distinct_object); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + variable() { + let localctx = new VariableContext(this, this._ctx, this.state); + this.enterRule(localctx, 384, TPTPParser.RULE_variable); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1583; + this.match(TPTPParser.Upper_word); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + source() { + let localctx = new SourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 386, TPTPParser.RULE_source); + try { + this.state = 1592; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,113,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1585; + this.dag_source(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1586; + this.internal_source(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1587; + this.external_source(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1588; + this.match(TPTPParser.T__13); + this.state = 1589; + this.sources(); + this.state = 1590; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + sources() { + let localctx = new SourcesContext(this, this._ctx, this.state); + this.enterRule(localctx, 388, TPTPParser.RULE_sources); + try { + this.state = 1599; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,114,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1594; + this.source(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1595; + this.source(); + this.state = 1596; + this.match(TPTPParser.T__2); + this.state = 1597; + this.sources(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + dag_source() { + let localctx = new Dag_sourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 390, TPTPParser.RULE_dag_source); + try { + this.state = 1603; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,115,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1601; + this.name(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1602; + this.inference_record(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + inference_record() { + let localctx = new Inference_recordContext(this, this._ctx, this.state); + this.enterRule(localctx, 392, TPTPParser.RULE_inference_record); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1605; + this.match(TPTPParser.T__43); + this.state = 1606; + this.match(TPTPParser.T__1); + this.state = 1607; + this.inference_rule(); + this.state = 1608; + this.match(TPTPParser.T__2); + this.state = 1609; + this.useful_info(); + this.state = 1610; + this.match(TPTPParser.T__2); + this.state = 1611; + this.parents(); + this.state = 1612; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + inference_rule() { + let localctx = new Inference_ruleContext(this, this._ctx, this.state); + this.enterRule(localctx, 394, TPTPParser.RULE_inference_rule); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1614; + this.atomic_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + internal_source() { + let localctx = new Internal_sourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 396, TPTPParser.RULE_internal_source); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1616; + this.match(TPTPParser.T__44); + this.state = 1617; + this.match(TPTPParser.T__1); + this.state = 1618; + this.intro_type(); + this.state = 1619; + this.match(TPTPParser.T__2); + this.state = 1620; + this.useful_info(); + this.state = 1621; + this.match(TPTPParser.T__2); + this.state = 1622; + this.parents(); + this.state = 1623; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + intro_type() { + let localctx = new Intro_typeContext(this, this._ctx, this.state); + this.enterRule(localctx, 398, TPTPParser.RULE_intro_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1625; + this.atomic_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + external_source() { + let localctx = new External_sourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 400, TPTPParser.RULE_external_source); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1627; + this.file_source(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + file_source() { + let localctx = new File_sourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 402, TPTPParser.RULE_file_source); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1629; + this.match(TPTPParser.T__45); + this.state = 1630; + this.match(TPTPParser.T__1); + this.state = 1631; + this.file_name(); + this.state = 1632; + this.file_info(); + this.state = 1633; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + file_info() { + let localctx = new File_infoContext(this, this._ctx, this.state); + this.enterRule(localctx, 404, TPTPParser.RULE_file_info); + try { + this.state = 1638; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 3: + this.enterOuterAlt(localctx, 1); + this.state = 1635; + this.match(TPTPParser.T__2); + this.state = 1636; + this.name(); + break; + case 4: + this.enterOuterAlt(localctx, 2); + this.state = 1637; + this.nothing(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + parents() { + let localctx = new ParentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 406, TPTPParser.RULE_parents); + try { + this.state = 1646; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,117,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1640; + this.match(TPTPParser.T__13); + this.state = 1641; + this.match(TPTPParser.T__14); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1642; + this.match(TPTPParser.T__13); + this.state = 1643; + this.parent_list(); + this.state = 1644; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + parent_list() { + let localctx = new Parent_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 408, TPTPParser.RULE_parent_list); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1648; + this.parent_info(); + this.state = 1652; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===3) { + this.state = 1649; + this.comma_parent_info(); + this.state = 1654; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + comma_parent_info() { + let localctx = new Comma_parent_infoContext(this, this._ctx, this.state); + this.enterRule(localctx, 410, TPTPParser.RULE_comma_parent_info); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1655; + this.match(TPTPParser.T__2); + this.state = 1656; + this.parent_info(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + parent_info() { + let localctx = new Parent_infoContext(this, this._ctx, this.state); + this.enterRule(localctx, 412, TPTPParser.RULE_parent_info); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1658; + this.source(); + this.state = 1659; + this.parent_details(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + parent_details() { + let localctx = new Parent_detailsContext(this, this._ctx, this.state); + this.enterRule(localctx, 414, TPTPParser.RULE_parent_details); + try { + this.state = 1664; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 16: + this.enterOuterAlt(localctx, 1); + this.state = 1661; + this.match(TPTPParser.T__15); + this.state = 1662; + this.general_term(); + break; + case 3: + case 15: + this.enterOuterAlt(localctx, 2); + this.state = 1663; + this.nothing(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + optional_info() { + let localctx = new Optional_infoContext(this, this._ctx, this.state); + this.enterRule(localctx, 416, TPTPParser.RULE_optional_info); + try { + this.state = 1669; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 3: + this.enterOuterAlt(localctx, 1); + this.state = 1666; + this.match(TPTPParser.T__2); + this.state = 1667; + this.useful_info(); + break; + case 4: + this.enterOuterAlt(localctx, 2); + this.state = 1668; + this.nothing(); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + useful_info() { + let localctx = new Useful_infoContext(this, this._ctx, this.state); + this.enterRule(localctx, 418, TPTPParser.RULE_useful_info); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1671; + this.general_list(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + include() { + let localctx = new IncludeContext(this, this._ctx, this.state); + this.enterRule(localctx, 420, TPTPParser.RULE_include); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1673; + this.match(TPTPParser.T__46); + this.state = 1674; + this.match(TPTPParser.T__1); + this.state = 1675; + this.file_name(); + this.state = 1676; + this.include_optionals(); + this.state = 1677; + this.match(TPTPParser.T__3); + this.state = 1678; + this.match(TPTPParser.T__4); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + include_optionals() { + let localctx = new Include_optionalsContext(this, this._ctx, this.state); + this.enterRule(localctx, 422, TPTPParser.RULE_include_optionals); + try { + this.state = 1688; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,121,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1680; + this.nothing(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1681; + this.match(TPTPParser.T__2); + this.state = 1682; + this.formula_selection(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1683; + this.match(TPTPParser.T__2); + this.state = 1684; + this.formula_selection(); + this.state = 1685; + this.match(TPTPParser.T__2); + this.state = 1686; + this.space_name(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + formula_selection() { + let localctx = new Formula_selectionContext(this, this._ctx, this.state); + this.enterRule(localctx, 424, TPTPParser.RULE_formula_selection); + try { + this.state = 1695; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 14: + this.enterOuterAlt(localctx, 1); + this.state = 1690; + this.match(TPTPParser.T__13); + this.state = 1691; + this.name_list(); + this.state = 1692; + this.match(TPTPParser.T__14); + break; + case 66: + this.enterOuterAlt(localctx, 2); + this.state = 1694; + this.match(TPTPParser.Star); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + name_list() { + let localctx = new Name_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 426, TPTPParser.RULE_name_list); + try { + this.state = 1702; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,123,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1697; + this.name(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1698; + this.name(); + this.state = 1699; + this.match(TPTPParser.T__2); + this.state = 1700; + this.name_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + space_name() { + let localctx = new Space_nameContext(this, this._ctx, this.state); + this.enterRule(localctx, 428, TPTPParser.RULE_space_name); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1704; + this.name(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + general_term() { + let localctx = new General_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 430, TPTPParser.RULE_general_term); + try { + this.state = 1712; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,124,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1706; + this.general_data(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1707; + this.general_data(); + this.state = 1708; + this.match(TPTPParser.T__15); + this.state = 1709; + this.general_term(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1711; + this.general_list(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + general_data() { + let localctx = new General_dataContext(this, this._ctx, this.state); + this.enterRule(localctx, 432, TPTPParser.RULE_general_data); + try { + this.state = 1720; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,125,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1714; + this.atomic_word(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1715; + this.general_function(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1716; + this.variable(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1717; + this.number(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 1718; + this.match(TPTPParser.Distinct_object); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 1719; + this.formula_data(); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + general_function() { + let localctx = new General_functionContext(this, this._ctx, this.state); + this.enterRule(localctx, 434, TPTPParser.RULE_general_function); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1722; + this.atomic_word(); + this.state = 1723; + this.match(TPTPParser.T__1); + this.state = 1724; + this.general_terms(); + this.state = 1725; + this.match(TPTPParser.T__3); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + formula_data() { + let localctx = new Formula_dataContext(this, this._ctx, this.state); + this.enterRule(localctx, 436, TPTPParser.RULE_formula_data); + try { + this.state = 1752; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 48: + this.enterOuterAlt(localctx, 1); + this.state = 1727; + this.match(TPTPParser.T__47); + this.state = 1728; + this.match(TPTPParser.T__1); + this.state = 1729; + this.thf_formula(); + this.state = 1730; + this.match(TPTPParser.T__3); + break; + case 49: + this.enterOuterAlt(localctx, 2); + this.state = 1732; + this.match(TPTPParser.T__48); + this.state = 1733; + this.match(TPTPParser.T__1); + this.state = 1734; + this.tff_formula(); + this.state = 1735; + this.match(TPTPParser.T__3); + break; + case 50: + this.enterOuterAlt(localctx, 3); + this.state = 1737; + this.match(TPTPParser.T__49); + this.state = 1738; + this.match(TPTPParser.T__1); + this.state = 1739; + this.fof_formula(); + this.state = 1740; + this.match(TPTPParser.T__3); + break; + case 51: + this.enterOuterAlt(localctx, 4); + this.state = 1742; + this.match(TPTPParser.T__50); + this.state = 1743; + this.match(TPTPParser.T__1); + this.state = 1744; + this.cnf_formula(); + this.state = 1745; + this.match(TPTPParser.T__3); + break; + case 52: + this.enterOuterAlt(localctx, 5); + this.state = 1747; + this.match(TPTPParser.T__51); + this.state = 1748; + this.match(TPTPParser.T__1); + this.state = 1749; + this.fof_term(); + this.state = 1750; + this.match(TPTPParser.T__3); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + general_list() { + let localctx = new General_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 438, TPTPParser.RULE_general_list); + try { + this.state = 1760; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,127,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1754; + this.match(TPTPParser.T__13); + this.state = 1755; + this.match(TPTPParser.T__14); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1756; + this.match(TPTPParser.T__13); + this.state = 1757; + this.general_terms(); + this.state = 1758; + this.match(TPTPParser.T__14); + break; + + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + general_terms() { + let localctx = new General_termsContext(this, this._ctx, this.state); + this.enterRule(localctx, 440, TPTPParser.RULE_general_terms); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1762; + this.general_term(); + this.state = 1766; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===3) { + this.state = 1763; + this.comma_general_term(); + this.state = 1768; + this._errHandler.sync(this); + _la = this._input.LA(1); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + comma_general_term() { + let localctx = new Comma_general_termContext(this, this._ctx, this.state); + this.enterRule(localctx, 442, TPTPParser.RULE_comma_general_term); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1769; + this.match(TPTPParser.T__2); + this.state = 1770; + this.general_term(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + name() { + let localctx = new NameContext(this, this._ctx, this.state); + this.enterRule(localctx, 444, TPTPParser.RULE_name); + try { + this.state = 1774; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 53: + case 54: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1772; + this.atomic_word(); + break; + case 62: + this.enterOuterAlt(localctx, 2); + this.state = 1773; + this.match(TPTPParser.Integer); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + atomic_word() { + let localctx = new Atomic_wordContext(this, this._ctx, this.state); + this.enterRule(localctx, 446, TPTPParser.RULE_atomic_word); + try { + this.state = 1779; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 1: + case 6: + case 7: + case 8: + case 9: + case 10: + case 44: + case 45: + case 46: + case 47: + case 59: + this.enterOuterAlt(localctx, 1); + this.state = 1776; + this.lower_word_token(); + break; + case 53: + this.enterOuterAlt(localctx, 2); + this.state = 1777; + this.match(TPTPParser.Single_quoted); + break; + case 54: + this.enterOuterAlt(localctx, 3); + this.state = 1778; + this.match(TPTPParser.Back_quoted); + break; + default: + throw new antlr4.error.NoViableAltException(this); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + atomic_defined_word() { + let localctx = new Atomic_defined_wordContext(this, this._ctx, this.state); + this.enterRule(localctx, 448, TPTPParser.RULE_atomic_defined_word); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1781; + this.match(TPTPParser.Dollar_word); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + atomic_system_word() { + let localctx = new Atomic_system_wordContext(this, this._ctx, this.state); + this.enterRule(localctx, 450, TPTPParser.RULE_atomic_system_word); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1783; + this.match(TPTPParser.Dollar_dollar_word); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + number() { + let localctx = new NumberContext(this, this._ctx, this.state); + this.enterRule(localctx, 452, TPTPParser.RULE_number); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1785; + _la = this._input.LA(1); + if(!(((((_la - 60)) & ~0x1f) === 0 && ((1 << (_la - 60)) & 7) !== 0))) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + file_name() { + let localctx = new File_nameContext(this, this._ctx, this.state); + this.enterRule(localctx, 454, TPTPParser.RULE_file_name); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1787; + this.atomic_word(); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + nothing() { + let localctx = new NothingContext(this, this._ctx, this.state); + this.enterRule(localctx, 456, TPTPParser.RULE_nothing); + try { + this.enterOuterAlt(localctx, 1); + + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + lower_word_token() { + let localctx = new Lower_word_tokenContext(this, this._ctx, this.state); + this.enterRule(localctx, 458, TPTPParser.RULE_lower_word_token); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1791; + _la = this._input.LA(1); + if(!((((_la) & ~0x1f) === 0 && ((1 << _la) & 1986) !== 0) || ((((_la - 44)) & ~0x1f) === 0 && ((1 << (_la - 44)) & 32783) !== 0))) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + +} + +TPTPParser.EOF = antlr4.Token.EOF; +TPTPParser.T__0 = 1; +TPTPParser.T__1 = 2; +TPTPParser.T__2 = 3; +TPTPParser.T__3 = 4; +TPTPParser.T__4 = 5; +TPTPParser.T__5 = 6; +TPTPParser.T__6 = 7; +TPTPParser.T__7 = 8; +TPTPParser.T__8 = 9; +TPTPParser.T__9 = 10; +TPTPParser.T__10 = 11; +TPTPParser.T__11 = 12; +TPTPParser.T__12 = 13; +TPTPParser.T__13 = 14; +TPTPParser.T__14 = 15; +TPTPParser.T__15 = 16; +TPTPParser.T__16 = 17; +TPTPParser.T__17 = 18; +TPTPParser.T__18 = 19; +TPTPParser.T__19 = 20; +TPTPParser.T__20 = 21; +TPTPParser.T__21 = 22; +TPTPParser.T__22 = 23; +TPTPParser.T__23 = 24; +TPTPParser.T__24 = 25; +TPTPParser.T__25 = 26; +TPTPParser.T__26 = 27; +TPTPParser.T__27 = 28; +TPTPParser.T__28 = 29; +TPTPParser.T__29 = 30; +TPTPParser.T__30 = 31; +TPTPParser.T__31 = 32; +TPTPParser.T__32 = 33; +TPTPParser.T__33 = 34; +TPTPParser.T__34 = 35; +TPTPParser.T__35 = 36; +TPTPParser.T__36 = 37; +TPTPParser.T__37 = 38; +TPTPParser.T__38 = 39; +TPTPParser.T__39 = 40; +TPTPParser.T__40 = 41; +TPTPParser.T__41 = 42; +TPTPParser.T__42 = 43; +TPTPParser.T__43 = 44; +TPTPParser.T__44 = 45; +TPTPParser.T__45 = 46; +TPTPParser.T__46 = 47; +TPTPParser.T__47 = 48; +TPTPParser.T__48 = 49; +TPTPParser.T__49 = 50; +TPTPParser.T__50 = 51; +TPTPParser.T__51 = 52; +TPTPParser.Single_quoted = 53; +TPTPParser.Back_quoted = 54; +TPTPParser.Distinct_object = 55; +TPTPParser.Dollar_word = 56; +TPTPParser.Dollar_dollar_word = 57; +TPTPParser.Upper_word = 58; +TPTPParser.Lower_word = 59; +TPTPParser.Real = 60; +TPTPParser.Rational = 61; +TPTPParser.Integer = 62; +TPTPParser.Slash = 63; +TPTPParser.Slosh = 64; +TPTPParser.Vline = 65; +TPTPParser.Star = 66; +TPTPParser.Plus = 67; +TPTPParser.Arrow = 68; +TPTPParser.Less_sign = 69; +TPTPParser.Hash = 70; +TPTPParser.Comment = 71; +TPTPParser.Comment_line = 72; +TPTPParser.WS = 73; + +TPTPParser.RULE_tptp_file = 0; +TPTPParser.RULE_tptp_input = 1; +TPTPParser.RULE_annotated_formula = 2; +TPTPParser.RULE_tpi_annotated = 3; +TPTPParser.RULE_tpi_formula = 4; +TPTPParser.RULE_thf_annotated = 5; +TPTPParser.RULE_tff_annotated = 6; +TPTPParser.RULE_tcf_annotated = 7; +TPTPParser.RULE_fof_annotated = 8; +TPTPParser.RULE_cnf_annotated = 9; +TPTPParser.RULE_annotations = 10; +TPTPParser.RULE_formula_role = 11; +TPTPParser.RULE_thf_formula = 12; +TPTPParser.RULE_thf_logic_formula = 13; +TPTPParser.RULE_thf_binary_formula = 14; +TPTPParser.RULE_thf_binary_pair = 15; +TPTPParser.RULE_thf_binary_list = 16; +TPTPParser.RULE_thf_or_formula = 17; +TPTPParser.RULE_thf_and_formula = 18; +TPTPParser.RULE_thf_apply_formula = 19; +TPTPParser.RULE_thf_unit_formula = 20; +TPTPParser.RULE_thf_preunit_formula = 21; +TPTPParser.RULE_thf_unitary_formula = 22; +TPTPParser.RULE_thf_quantified_formula = 23; +TPTPParser.RULE_thf_quantification = 24; +TPTPParser.RULE_thf_variable_list = 25; +TPTPParser.RULE_thf_typed_variable = 26; +TPTPParser.RULE_thf_unary_formula = 27; +TPTPParser.RULE_thf_prefix_unary = 28; +TPTPParser.RULE_thf_infix_unary = 29; +TPTPParser.RULE_thf_atomic_formula = 30; +TPTPParser.RULE_thf_plain_atomic = 31; +TPTPParser.RULE_thf_defined_atomic = 32; +TPTPParser.RULE_thf_defined_term = 33; +TPTPParser.RULE_thf_defined_infix = 34; +TPTPParser.RULE_thf_system_atomic = 35; +TPTPParser.RULE_thf_let = 36; +TPTPParser.RULE_thf_let_types = 37; +TPTPParser.RULE_thf_atom_typing_list = 38; +TPTPParser.RULE_thf_let_defns = 39; +TPTPParser.RULE_thf_let_defn = 40; +TPTPParser.RULE_thf_let_defn_list = 41; +TPTPParser.RULE_thf_unitary_term = 42; +TPTPParser.RULE_thf_conn_term = 43; +TPTPParser.RULE_thf_tuple = 44; +TPTPParser.RULE_thf_fof_function = 45; +TPTPParser.RULE_thf_arguments = 46; +TPTPParser.RULE_thf_formula_list = 47; +TPTPParser.RULE_comma_thf_logic_formula = 48; +TPTPParser.RULE_thf_atom_typing = 49; +TPTPParser.RULE_thf_top_level_type = 50; +TPTPParser.RULE_thf_unitary_type = 51; +TPTPParser.RULE_thf_apply_type = 52; +TPTPParser.RULE_thf_binary_type = 53; +TPTPParser.RULE_thf_mapping_type = 54; +TPTPParser.RULE_thf_xprod_type = 55; +TPTPParser.RULE_thf_union_type = 56; +TPTPParser.RULE_thf_subtype = 57; +TPTPParser.RULE_thf_definition = 58; +TPTPParser.RULE_thf_sequent = 59; +TPTPParser.RULE_tff_formula = 60; +TPTPParser.RULE_tff_logic_formula = 61; +TPTPParser.RULE_tff_binary_formula = 62; +TPTPParser.RULE_tff_binary_pair = 63; +TPTPParser.RULE_tff_binary_list = 64; +TPTPParser.RULE_tff_or_formula = 65; +TPTPParser.RULE_tff_and_formula = 66; +TPTPParser.RULE_tff_unit_formula = 67; +TPTPParser.RULE_tff_preunit_formula = 68; +TPTPParser.RULE_tff_unitary_formula = 69; +TPTPParser.RULE_txf_unitary_formula = 70; +TPTPParser.RULE_tff_quantified_formula = 71; +TPTPParser.RULE_tff_variable_list = 72; +TPTPParser.RULE_tff_variable = 73; +TPTPParser.RULE_tff_typed_variable = 74; +TPTPParser.RULE_tff_unary_formula = 75; +TPTPParser.RULE_tff_prefix_unary = 76; +TPTPParser.RULE_tff_infix_unary = 77; +TPTPParser.RULE_tff_atomic_formula = 78; +TPTPParser.RULE_tff_plain_atomic = 79; +TPTPParser.RULE_tff_defined_atomic = 80; +TPTPParser.RULE_tff_defined_plain = 81; +TPTPParser.RULE_tff_defined_infix = 82; +TPTPParser.RULE_tff_system_atomic = 83; +TPTPParser.RULE_txf_let = 84; +TPTPParser.RULE_txf_let_types = 85; +TPTPParser.RULE_tff_atom_typing_list = 86; +TPTPParser.RULE_txf_let_defns = 87; +TPTPParser.RULE_txf_let_defn = 88; +TPTPParser.RULE_txf_let_lhs = 89; +TPTPParser.RULE_txf_let_defn_list = 90; +TPTPParser.RULE_nxf_atom = 91; +TPTPParser.RULE_tff_term = 92; +TPTPParser.RULE_tff_unitary_term = 93; +TPTPParser.RULE_txf_tuple = 94; +TPTPParser.RULE_tff_arguments = 95; +TPTPParser.RULE_comma_tff_term = 96; +TPTPParser.RULE_tff_atom_typing = 97; +TPTPParser.RULE_tff_top_level_type = 98; +TPTPParser.RULE_tff_non_atomic_type = 99; +TPTPParser.RULE_tf1_quantified_type = 100; +TPTPParser.RULE_tff_monotype = 101; +TPTPParser.RULE_tff_unitary_type = 102; +TPTPParser.RULE_tff_atomic_type = 103; +TPTPParser.RULE_tff_type_arguments = 104; +TPTPParser.RULE_tff_mapping_type = 105; +TPTPParser.RULE_tff_xprod_type = 106; +TPTPParser.RULE_txf_tuple_type = 107; +TPTPParser.RULE_tff_type_list = 108; +TPTPParser.RULE_tff_subtype = 109; +TPTPParser.RULE_txf_definition = 110; +TPTPParser.RULE_txf_sequent = 111; +TPTPParser.RULE_nhf_long_connective = 112; +TPTPParser.RULE_nhf_parameter_list = 113; +TPTPParser.RULE_nhf_parameter = 114; +TPTPParser.RULE_nhf_key_pair = 115; +TPTPParser.RULE_nxf_long_connective = 116; +TPTPParser.RULE_nxf_parameter_list = 117; +TPTPParser.RULE_nxf_parameter = 118; +TPTPParser.RULE_nxf_key_pair = 119; +TPTPParser.RULE_ntf_connective_name = 120; +TPTPParser.RULE_ntf_defined_connective = 121; +TPTPParser.RULE_ntf_index = 122; +TPTPParser.RULE_ntf_short_connective = 123; +TPTPParser.RULE_tcf_formula = 124; +TPTPParser.RULE_tcf_logic_formula = 125; +TPTPParser.RULE_tcf_quantified_formula = 126; +TPTPParser.RULE_fof_formula = 127; +TPTPParser.RULE_fof_logic_formula = 128; +TPTPParser.RULE_fof_binary_formula = 129; +TPTPParser.RULE_fof_binary_pair = 130; +TPTPParser.RULE_fof_binary_list = 131; +TPTPParser.RULE_fof_or_formula = 132; +TPTPParser.RULE_fof_and_formula = 133; +TPTPParser.RULE_fof_unary_formula = 134; +TPTPParser.RULE_fof_infix_unary = 135; +TPTPParser.RULE_fof_unit_formula = 136; +TPTPParser.RULE_fof_unitary_formula = 137; +TPTPParser.RULE_fof_quantified_formula = 138; +TPTPParser.RULE_fof_variable_list = 139; +TPTPParser.RULE_fof_atomic_formula = 140; +TPTPParser.RULE_fof_plain_atomic_formula = 141; +TPTPParser.RULE_fof_defined_atomic_formula = 142; +TPTPParser.RULE_fof_defined_plain_formula = 143; +TPTPParser.RULE_fof_defined_infix_formula = 144; +TPTPParser.RULE_fof_system_atomic_formula = 145; +TPTPParser.RULE_fof_plain_term = 146; +TPTPParser.RULE_fof_defined_term = 147; +TPTPParser.RULE_fof_defined_atomic_term = 148; +TPTPParser.RULE_fof_defined_plain_term = 149; +TPTPParser.RULE_fof_system_term = 150; +TPTPParser.RULE_fof_arguments = 151; +TPTPParser.RULE_fof_term = 152; +TPTPParser.RULE_fof_function_term = 153; +TPTPParser.RULE_fof_sequent = 154; +TPTPParser.RULE_fof_formula_tuple = 155; +TPTPParser.RULE_fof_formula_tuple_list = 156; +TPTPParser.RULE_comma_fof_logic_formula = 157; +TPTPParser.RULE_cnf_formula = 158; +TPTPParser.RULE_cnf_disjunction = 159; +TPTPParser.RULE_cnf_literal = 160; +TPTPParser.RULE_thf_quantifier = 161; +TPTPParser.RULE_thf_unary_connective = 162; +TPTPParser.RULE_th0_quantifier = 163; +TPTPParser.RULE_type_quantifier = 164; +TPTPParser.RULE_subtype_sign = 165; +TPTPParser.RULE_tff_unary_connective = 166; +TPTPParser.RULE_tff_quantifier = 167; +TPTPParser.RULE_fof_quantifier = 168; +TPTPParser.RULE_nonassoc_connective = 169; +TPTPParser.RULE_assoc_connective = 170; +TPTPParser.RULE_unary_connective = 171; +TPTPParser.RULE_gentzen_arrow = 172; +TPTPParser.RULE_assignment = 173; +TPTPParser.RULE_identical = 174; +TPTPParser.RULE_typeable_atom = 175; +TPTPParser.RULE_atomic_type = 176; +TPTPParser.RULE_type_constant = 177; +TPTPParser.RULE_type_functor = 178; +TPTPParser.RULE_defined_type = 179; +TPTPParser.RULE_system_type = 180; +TPTPParser.RULE_defined_infix_pred = 181; +TPTPParser.RULE_infix_equality = 182; +TPTPParser.RULE_infix_inequality = 183; +TPTPParser.RULE_constant = 184; +TPTPParser.RULE_functor = 185; +TPTPParser.RULE_defined_constant = 186; +TPTPParser.RULE_defined_functor = 187; +TPTPParser.RULE_system_constant = 188; +TPTPParser.RULE_system_functor = 189; +TPTPParser.RULE_th1_defined_term = 190; +TPTPParser.RULE_defined_term = 191; +TPTPParser.RULE_variable = 192; +TPTPParser.RULE_source = 193; +TPTPParser.RULE_sources = 194; +TPTPParser.RULE_dag_source = 195; +TPTPParser.RULE_inference_record = 196; +TPTPParser.RULE_inference_rule = 197; +TPTPParser.RULE_internal_source = 198; +TPTPParser.RULE_intro_type = 199; +TPTPParser.RULE_external_source = 200; +TPTPParser.RULE_file_source = 201; +TPTPParser.RULE_file_info = 202; +TPTPParser.RULE_parents = 203; +TPTPParser.RULE_parent_list = 204; +TPTPParser.RULE_comma_parent_info = 205; +TPTPParser.RULE_parent_info = 206; +TPTPParser.RULE_parent_details = 207; +TPTPParser.RULE_optional_info = 208; +TPTPParser.RULE_useful_info = 209; +TPTPParser.RULE_include = 210; +TPTPParser.RULE_include_optionals = 211; +TPTPParser.RULE_formula_selection = 212; +TPTPParser.RULE_name_list = 213; +TPTPParser.RULE_space_name = 214; +TPTPParser.RULE_general_term = 215; +TPTPParser.RULE_general_data = 216; +TPTPParser.RULE_general_function = 217; +TPTPParser.RULE_formula_data = 218; +TPTPParser.RULE_general_list = 219; +TPTPParser.RULE_general_terms = 220; +TPTPParser.RULE_comma_general_term = 221; +TPTPParser.RULE_name = 222; +TPTPParser.RULE_atomic_word = 223; +TPTPParser.RULE_atomic_defined_word = 224; +TPTPParser.RULE_atomic_system_word = 225; +TPTPParser.RULE_number = 226; +TPTPParser.RULE_file_name = 227; +TPTPParser.RULE_nothing = 228; +TPTPParser.RULE_lower_word_token = 229; + +class Tptp_fileContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tptp_file; + } + + EOF() { + return this.getToken(TPTPParser.EOF, 0); + }; + + tptp_input = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tptp_inputContext); + } else { + return this.getTypedRuleContext(Tptp_inputContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTptp_file(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTptp_file(this); + } + } + + +} + + + +class Tptp_inputContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tptp_input; + } + + annotated_formula() { + return this.getTypedRuleContext(Annotated_formulaContext,0); + }; + + include() { + return this.getTypedRuleContext(IncludeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTptp_input(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTptp_input(this); + } + } + + +} + + + +class Annotated_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_annotated_formula; + } + + thf_annotated() { + return this.getTypedRuleContext(Thf_annotatedContext,0); + }; + + tff_annotated() { + return this.getTypedRuleContext(Tff_annotatedContext,0); + }; + + tcf_annotated() { + return this.getTypedRuleContext(Tcf_annotatedContext,0); + }; + + fof_annotated() { + return this.getTypedRuleContext(Fof_annotatedContext,0); + }; + + cnf_annotated() { + return this.getTypedRuleContext(Cnf_annotatedContext,0); + }; + + tpi_annotated() { + return this.getTypedRuleContext(Tpi_annotatedContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAnnotated_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAnnotated_formula(this); + } + } + + +} + + + +class Tpi_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tpi_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + tpi_formula() { + return this.getTypedRuleContext(Tpi_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTpi_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTpi_annotated(this); + } + } + + +} + + + +class Tpi_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tpi_formula; + } + + fof_formula() { + return this.getTypedRuleContext(Fof_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTpi_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTpi_formula(this); + } + } + + +} + + + +class Thf_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + thf_formula() { + return this.getTypedRuleContext(Thf_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_annotated(this); + } + } + + +} + + + +class Tff_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + tff_formula() { + return this.getTypedRuleContext(Tff_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_annotated(this); + } + } + + +} + + + +class Tcf_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tcf_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + tcf_formula() { + return this.getTypedRuleContext(Tcf_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTcf_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTcf_annotated(this); + } + } + + +} + + + +class Fof_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + fof_formula() { + return this.getTypedRuleContext(Fof_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_annotated(this); + } + } + + +} + + + +class Cnf_annotatedContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_cnf_annotated; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + formula_role() { + return this.getTypedRuleContext(Formula_roleContext,0); + }; + + cnf_formula() { + return this.getTypedRuleContext(Cnf_formulaContext,0); + }; + + annotations() { + return this.getTypedRuleContext(AnnotationsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterCnf_annotated(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitCnf_annotated(this); + } + } + + +} + + + +class AnnotationsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_annotations; + } + + source() { + return this.getTypedRuleContext(SourceContext,0); + }; + + optional_info() { + return this.getTypedRuleContext(Optional_infoContext,0); + }; + + nothing() { + return this.getTypedRuleContext(NothingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAnnotations(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAnnotations(this); + } + } + + +} + + + +class Formula_roleContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_formula_role; + } + + lower_word_token() { + return this.getTypedRuleContext(Lower_word_tokenContext,0); + }; + + general_term() { + return this.getTypedRuleContext(General_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFormula_role(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFormula_role(this); + } + } + + +} + + + +class Thf_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_formula; + } + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + thf_atom_typing() { + return this.getTypedRuleContext(Thf_atom_typingContext,0); + }; + + thf_subtype() { + return this.getTypedRuleContext(Thf_subtypeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_formula(this); + } + } + + +} + + + +class Thf_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_logic_formula; + } + + thf_unitary_formula() { + return this.getTypedRuleContext(Thf_unitary_formulaContext,0); + }; + + thf_unary_formula() { + return this.getTypedRuleContext(Thf_unary_formulaContext,0); + }; + + thf_binary_formula() { + return this.getTypedRuleContext(Thf_binary_formulaContext,0); + }; + + thf_defined_infix() { + return this.getTypedRuleContext(Thf_defined_infixContext,0); + }; + + thf_definition() { + return this.getTypedRuleContext(Thf_definitionContext,0); + }; + + thf_sequent() { + return this.getTypedRuleContext(Thf_sequentContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_logic_formula(this); + } + } + + +} + + + +class Thf_binary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_binary_formula; + } + + thf_binary_pair() { + return this.getTypedRuleContext(Thf_binary_pairContext,0); + }; + + thf_binary_list() { + return this.getTypedRuleContext(Thf_binary_listContext,0); + }; + + thf_binary_type() { + return this.getTypedRuleContext(Thf_binary_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_binary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_binary_formula(this); + } + } + + +} + + + +class Thf_binary_pairContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_binary_pair; + } + + thf_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unit_formulaContext); + } else { + return this.getTypedRuleContext(Thf_unit_formulaContext,i); + } + }; + + nonassoc_connective() { + return this.getTypedRuleContext(Nonassoc_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_binary_pair(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_binary_pair(this); + } + } + + +} + + + +class Thf_binary_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_binary_list; + } + + thf_or_formula() { + return this.getTypedRuleContext(Thf_or_formulaContext,0); + }; + + thf_and_formula() { + return this.getTypedRuleContext(Thf_and_formulaContext,0); + }; + + thf_apply_formula() { + return this.getTypedRuleContext(Thf_apply_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_binary_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_binary_list(this); + } + } + + +} + + + +class Thf_or_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_or_formula; + } + + thf_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unit_formulaContext); + } else { + return this.getTypedRuleContext(Thf_unit_formulaContext,i); + } + }; + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + thf_or_formula() { + return this.getTypedRuleContext(Thf_or_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_or_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_or_formula(this); + } + } + + +} + + + +class Thf_and_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_and_formula; + } + + thf_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unit_formulaContext); + } else { + return this.getTypedRuleContext(Thf_unit_formulaContext,i); + } + }; + + thf_and_formula() { + return this.getTypedRuleContext(Thf_and_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_and_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_and_formula(this); + } + } + + +} + + + +class Thf_apply_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_apply_formula; + } + + thf_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unit_formulaContext); + } else { + return this.getTypedRuleContext(Thf_unit_formulaContext,i); + } + }; + + thf_apply_formula() { + return this.getTypedRuleContext(Thf_apply_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_apply_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_apply_formula(this); + } + } + + +} + + + +class Thf_unit_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unit_formula; + } + + thf_unitary_formula() { + return this.getTypedRuleContext(Thf_unitary_formulaContext,0); + }; + + thf_unary_formula() { + return this.getTypedRuleContext(Thf_unary_formulaContext,0); + }; + + thf_defined_infix() { + return this.getTypedRuleContext(Thf_defined_infixContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unit_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unit_formula(this); + } + } + + +} + + + +class Thf_preunit_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_preunit_formula; + } + + thf_unitary_formula() { + return this.getTypedRuleContext(Thf_unitary_formulaContext,0); + }; + + thf_prefix_unary() { + return this.getTypedRuleContext(Thf_prefix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_preunit_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_preunit_formula(this); + } + } + + +} + + + +class Thf_unitary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unitary_formula; + } + + thf_quantified_formula() { + return this.getTypedRuleContext(Thf_quantified_formulaContext,0); + }; + + thf_atomic_formula() { + return this.getTypedRuleContext(Thf_atomic_formulaContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unitary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unitary_formula(this); + } + } + + +} + + + +class Thf_quantified_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_quantified_formula; + } + + thf_quantification() { + return this.getTypedRuleContext(Thf_quantificationContext,0); + }; + + thf_unit_formula() { + return this.getTypedRuleContext(Thf_unit_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_quantified_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_quantified_formula(this); + } + } + + +} + + + +class Thf_quantificationContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_quantification; + } + + thf_quantifier() { + return this.getTypedRuleContext(Thf_quantifierContext,0); + }; + + thf_variable_list() { + return this.getTypedRuleContext(Thf_variable_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_quantification(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_quantification(this); + } + } + + +} + + + +class Thf_variable_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_variable_list; + } + + thf_typed_variable() { + return this.getTypedRuleContext(Thf_typed_variableContext,0); + }; + + thf_variable_list() { + return this.getTypedRuleContext(Thf_variable_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_variable_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_variable_list(this); + } + } + + +} + + + +class Thf_typed_variableContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_typed_variable; + } + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + thf_top_level_type() { + return this.getTypedRuleContext(Thf_top_level_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_typed_variable(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_typed_variable(this); + } + } + + +} + + + +class Thf_unary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unary_formula; + } + + thf_prefix_unary() { + return this.getTypedRuleContext(Thf_prefix_unaryContext,0); + }; + + thf_infix_unary() { + return this.getTypedRuleContext(Thf_infix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unary_formula(this); + } + } + + +} + + + +class Thf_prefix_unaryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_prefix_unary; + } + + thf_unary_connective() { + return this.getTypedRuleContext(Thf_unary_connectiveContext,0); + }; + + thf_preunit_formula() { + return this.getTypedRuleContext(Thf_preunit_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_prefix_unary(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_prefix_unary(this); + } + } + + +} + + + +class Thf_infix_unaryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_infix_unary; + } + + thf_unitary_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unitary_termContext); + } else { + return this.getTypedRuleContext(Thf_unitary_termContext,i); + } + }; + + infix_inequality() { + return this.getTypedRuleContext(Infix_inequalityContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_infix_unary(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_infix_unary(this); + } + } + + +} + + + +class Thf_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_atomic_formula; + } + + thf_plain_atomic() { + return this.getTypedRuleContext(Thf_plain_atomicContext,0); + }; + + thf_defined_atomic() { + return this.getTypedRuleContext(Thf_defined_atomicContext,0); + }; + + thf_system_atomic() { + return this.getTypedRuleContext(Thf_system_atomicContext,0); + }; + + thf_fof_function() { + return this.getTypedRuleContext(Thf_fof_functionContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_atomic_formula(this); + } + } + + +} + + + +class Thf_plain_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_plain_atomic; + } + + constant() { + return this.getTypedRuleContext(ConstantContext,0); + }; + + thf_tuple() { + return this.getTypedRuleContext(Thf_tupleContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_plain_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_plain_atomic(this); + } + } + + +} + + + +class Thf_defined_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_defined_atomic; + } + + defined_constant() { + return this.getTypedRuleContext(Defined_constantContext,0); + }; + + thf_defined_term() { + return this.getTypedRuleContext(Thf_defined_termContext,0); + }; + + thf_conn_term() { + return this.getTypedRuleContext(Thf_conn_termContext,0); + }; + + nhf_long_connective() { + return this.getTypedRuleContext(Nhf_long_connectiveContext,0); + }; + + thf_let() { + return this.getTypedRuleContext(Thf_letContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_defined_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_defined_atomic(this); + } + } + + +} + + + +class Thf_defined_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_defined_term; + } + + defined_term() { + return this.getTypedRuleContext(Defined_termContext,0); + }; + + th1_defined_term() { + return this.getTypedRuleContext(Th1_defined_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_defined_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_defined_term(this); + } + } + + +} + + + +class Thf_defined_infixContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_defined_infix; + } + + thf_unitary_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unitary_termContext); + } else { + return this.getTypedRuleContext(Thf_unitary_termContext,i); + } + }; + + defined_infix_pred() { + return this.getTypedRuleContext(Defined_infix_predContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_defined_infix(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_defined_infix(this); + } + } + + +} + + + +class Thf_system_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_system_atomic; + } + + system_constant() { + return this.getTypedRuleContext(System_constantContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_system_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_system_atomic(this); + } + } + + +} + + + +class Thf_letContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_let; + } + + thf_let_types() { + return this.getTypedRuleContext(Thf_let_typesContext,0); + }; + + thf_let_defns() { + return this.getTypedRuleContext(Thf_let_defnsContext,0); + }; + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_let(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_let(this); + } + } + + +} + + + +class Thf_let_typesContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_let_types; + } + + thf_atom_typing() { + return this.getTypedRuleContext(Thf_atom_typingContext,0); + }; + + thf_atom_typing_list() { + return this.getTypedRuleContext(Thf_atom_typing_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_let_types(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_let_types(this); + } + } + + +} + + + +class Thf_atom_typing_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_atom_typing_list; + } + + thf_atom_typing() { + return this.getTypedRuleContext(Thf_atom_typingContext,0); + }; + + thf_atom_typing_list() { + return this.getTypedRuleContext(Thf_atom_typing_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_atom_typing_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_atom_typing_list(this); + } + } + + +} + + + +class Thf_let_defnsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_let_defns; + } + + thf_let_defn() { + return this.getTypedRuleContext(Thf_let_defnContext,0); + }; + + thf_let_defn_list() { + return this.getTypedRuleContext(Thf_let_defn_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_let_defns(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_let_defns(this); + } + } + + +} + + + +class Thf_let_defnContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_let_defn; + } + + thf_logic_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_logic_formulaContext); + } else { + return this.getTypedRuleContext(Thf_logic_formulaContext,i); + } + }; + + assignment() { + return this.getTypedRuleContext(AssignmentContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_let_defn(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_let_defn(this); + } + } + + +} + + + +class Thf_let_defn_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_let_defn_list; + } + + thf_let_defn() { + return this.getTypedRuleContext(Thf_let_defnContext,0); + }; + + thf_let_defn_list() { + return this.getTypedRuleContext(Thf_let_defn_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_let_defn_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_let_defn_list(this); + } + } + + +} + + + +class Thf_unitary_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unitary_term; + } + + thf_atomic_formula() { + return this.getTypedRuleContext(Thf_atomic_formulaContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unitary_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unitary_term(this); + } + } + + +} + + + +class Thf_conn_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_conn_term; + } + + nonassoc_connective() { + return this.getTypedRuleContext(Nonassoc_connectiveContext,0); + }; + + assoc_connective() { + return this.getTypedRuleContext(Assoc_connectiveContext,0); + }; + + infix_equality() { + return this.getTypedRuleContext(Infix_equalityContext,0); + }; + + infix_inequality() { + return this.getTypedRuleContext(Infix_inequalityContext,0); + }; + + thf_unary_connective() { + return this.getTypedRuleContext(Thf_unary_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_conn_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_conn_term(this); + } + } + + +} + + + +class Thf_tupleContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_tuple; + } + + thf_formula_list() { + return this.getTypedRuleContext(Thf_formula_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_tuple(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_tuple(this); + } + } + + +} + + + +class Thf_fof_functionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_fof_function; + } + + defined_functor() { + return this.getTypedRuleContext(Defined_functorContext,0); + }; + + thf_arguments() { + return this.getTypedRuleContext(Thf_argumentsContext,0); + }; + + system_functor() { + return this.getTypedRuleContext(System_functorContext,0); + }; + + functor() { + return this.getTypedRuleContext(FunctorContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_fof_function(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_fof_function(this); + } + } + + +} + + + +class Thf_argumentsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_arguments; + } + + thf_formula_list() { + return this.getTypedRuleContext(Thf_formula_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_arguments(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_arguments(this); + } + } + + +} + + + +class Thf_formula_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_formula_list; + } + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + comma_thf_logic_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Comma_thf_logic_formulaContext); + } else { + return this.getTypedRuleContext(Comma_thf_logic_formulaContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_formula_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_formula_list(this); + } + } + + +} + + + +class Comma_thf_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_comma_thf_logic_formula; + } + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterComma_thf_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitComma_thf_logic_formula(this); + } + } + + +} + + + +class Thf_atom_typingContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_atom_typing; + } + + typeable_atom() { + return this.getTypedRuleContext(Typeable_atomContext,0); + }; + + thf_top_level_type() { + return this.getTypedRuleContext(Thf_top_level_typeContext,0); + }; + + thf_atom_typing() { + return this.getTypedRuleContext(Thf_atom_typingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_atom_typing(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_atom_typing(this); + } + } + + +} + + + +class Thf_top_level_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_top_level_type; + } + + thf_unitary_type() { + return this.getTypedRuleContext(Thf_unitary_typeContext,0); + }; + + thf_mapping_type() { + return this.getTypedRuleContext(Thf_mapping_typeContext,0); + }; + + thf_apply_type() { + return this.getTypedRuleContext(Thf_apply_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_top_level_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_top_level_type(this); + } + } + + +} + + + +class Thf_unitary_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unitary_type; + } + + thf_unitary_formula() { + return this.getTypedRuleContext(Thf_unitary_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unitary_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unitary_type(this); + } + } + + +} + + + +class Thf_apply_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_apply_type; + } + + thf_apply_formula() { + return this.getTypedRuleContext(Thf_apply_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_apply_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_apply_type(this); + } + } + + +} + + + +class Thf_binary_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_binary_type; + } + + thf_mapping_type() { + return this.getTypedRuleContext(Thf_mapping_typeContext,0); + }; + + thf_xprod_type() { + return this.getTypedRuleContext(Thf_xprod_typeContext,0); + }; + + thf_union_type() { + return this.getTypedRuleContext(Thf_union_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_binary_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_binary_type(this); + } + } + + +} + + + +class Thf_mapping_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_mapping_type; + } + + thf_unitary_type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unitary_typeContext); + } else { + return this.getTypedRuleContext(Thf_unitary_typeContext,i); + } + }; + + Arrow() { + return this.getToken(TPTPParser.Arrow, 0); + }; + + thf_mapping_type() { + return this.getTypedRuleContext(Thf_mapping_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_mapping_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_mapping_type(this); + } + } + + +} + + + +class Thf_xprod_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_xprod_type; + } + + thf_unitary_type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unitary_typeContext); + } else { + return this.getTypedRuleContext(Thf_unitary_typeContext,i); + } + }; + + Star() { + return this.getToken(TPTPParser.Star, 0); + }; + + thf_xprod_type() { + return this.getTypedRuleContext(Thf_xprod_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_xprod_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_xprod_type(this); + } + } + + +} + + + +class Thf_union_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_union_type; + } + + thf_unitary_type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_unitary_typeContext); + } else { + return this.getTypedRuleContext(Thf_unitary_typeContext,i); + } + }; + + Plus() { + return this.getToken(TPTPParser.Plus, 0); + }; + + thf_union_type() { + return this.getTypedRuleContext(Thf_union_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_union_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_union_type(this); + } + } + + +} + + + +class Thf_subtypeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_subtype; + } + + atomic_type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Atomic_typeContext); + } else { + return this.getTypedRuleContext(Atomic_typeContext,i); + } + }; + + subtype_sign() { + return this.getTypedRuleContext(Subtype_signContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_subtype(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_subtype(this); + } + } + + +} + + + +class Thf_definitionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_definition; + } + + thf_atomic_formula() { + return this.getTypedRuleContext(Thf_atomic_formulaContext,0); + }; + + identical() { + return this.getTypedRuleContext(IdenticalContext,0); + }; + + thf_logic_formula() { + return this.getTypedRuleContext(Thf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_definition(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_definition(this); + } + } + + +} + + + +class Thf_sequentContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_sequent; + } + + thf_tuple = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Thf_tupleContext); + } else { + return this.getTypedRuleContext(Thf_tupleContext,i); + } + }; + + gentzen_arrow() { + return this.getTypedRuleContext(Gentzen_arrowContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_sequent(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_sequent(this); + } + } + + +} + + + +class Tff_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_formula; + } + + tff_logic_formula() { + return this.getTypedRuleContext(Tff_logic_formulaContext,0); + }; + + tff_atom_typing() { + return this.getTypedRuleContext(Tff_atom_typingContext,0); + }; + + tff_subtype() { + return this.getTypedRuleContext(Tff_subtypeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_formula(this); + } + } + + +} + + + +class Tff_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_logic_formula; + } + + tff_unitary_formula() { + return this.getTypedRuleContext(Tff_unitary_formulaContext,0); + }; + + tff_unary_formula() { + return this.getTypedRuleContext(Tff_unary_formulaContext,0); + }; + + tff_binary_formula() { + return this.getTypedRuleContext(Tff_binary_formulaContext,0); + }; + + tff_defined_infix() { + return this.getTypedRuleContext(Tff_defined_infixContext,0); + }; + + txf_definition() { + return this.getTypedRuleContext(Txf_definitionContext,0); + }; + + txf_sequent() { + return this.getTypedRuleContext(Txf_sequentContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_logic_formula(this); + } + } + + +} + + + +class Tff_binary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_binary_formula; + } + + tff_binary_pair() { + return this.getTypedRuleContext(Tff_binary_pairContext,0); + }; + + tff_binary_list() { + return this.getTypedRuleContext(Tff_binary_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_binary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_binary_formula(this); + } + } + + +} + + + +class Tff_binary_pairContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_binary_pair; + } + + tff_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unit_formulaContext); + } else { + return this.getTypedRuleContext(Tff_unit_formulaContext,i); + } + }; + + nonassoc_connective() { + return this.getTypedRuleContext(Nonassoc_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_binary_pair(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_binary_pair(this); + } + } + + +} + + + +class Tff_binary_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_binary_list; + } + + tff_or_formula() { + return this.getTypedRuleContext(Tff_or_formulaContext,0); + }; + + tff_and_formula() { + return this.getTypedRuleContext(Tff_and_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_binary_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_binary_list(this); + } + } + + +} + + + +class Tff_or_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_or_formula; + } + + tff_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unit_formulaContext); + } else { + return this.getTypedRuleContext(Tff_unit_formulaContext,i); + } + }; + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + tff_or_formula() { + return this.getTypedRuleContext(Tff_or_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_or_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_or_formula(this); + } + } + + +} + + + +class Tff_and_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_and_formula; + } + + tff_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unit_formulaContext); + } else { + return this.getTypedRuleContext(Tff_unit_formulaContext,i); + } + }; + + tff_and_formula() { + return this.getTypedRuleContext(Tff_and_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_and_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_and_formula(this); + } + } + + +} + + + +class Tff_unit_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unit_formula; + } + + tff_unitary_formula() { + return this.getTypedRuleContext(Tff_unitary_formulaContext,0); + }; + + tff_unary_formula() { + return this.getTypedRuleContext(Tff_unary_formulaContext,0); + }; + + tff_defined_infix() { + return this.getTypedRuleContext(Tff_defined_infixContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unit_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unit_formula(this); + } + } + + +} + + + +class Tff_preunit_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_preunit_formula; + } + + tff_unitary_formula() { + return this.getTypedRuleContext(Tff_unitary_formulaContext,0); + }; + + tff_prefix_unary() { + return this.getTypedRuleContext(Tff_prefix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_preunit_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_preunit_formula(this); + } + } + + +} + + + +class Tff_unitary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unitary_formula; + } + + tff_quantified_formula() { + return this.getTypedRuleContext(Tff_quantified_formulaContext,0); + }; + + tff_atomic_formula() { + return this.getTypedRuleContext(Tff_atomic_formulaContext,0); + }; + + txf_unitary_formula() { + return this.getTypedRuleContext(Txf_unitary_formulaContext,0); + }; + + tff_logic_formula() { + return this.getTypedRuleContext(Tff_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unitary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unitary_formula(this); + } + } + + +} + + + +class Txf_unitary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_unitary_formula; + } + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_unitary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_unitary_formula(this); + } + } + + +} + + + +class Tff_quantified_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_quantified_formula; + } + + tff_quantifier() { + return this.getTypedRuleContext(Tff_quantifierContext,0); + }; + + tff_variable_list() { + return this.getTypedRuleContext(Tff_variable_listContext,0); + }; + + tff_unit_formula() { + return this.getTypedRuleContext(Tff_unit_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_quantified_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_quantified_formula(this); + } + } + + +} + + + +class Tff_variable_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_variable_list; + } + + tff_variable() { + return this.getTypedRuleContext(Tff_variableContext,0); + }; + + tff_variable_list() { + return this.getTypedRuleContext(Tff_variable_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_variable_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_variable_list(this); + } + } + + +} + + + +class Tff_variableContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_variable; + } + + tff_typed_variable() { + return this.getTypedRuleContext(Tff_typed_variableContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_variable(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_variable(this); + } + } + + +} + + + +class Tff_typed_variableContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_typed_variable; + } + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_typed_variable(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_typed_variable(this); + } + } + + +} + + + +class Tff_unary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unary_formula; + } + + tff_prefix_unary() { + return this.getTypedRuleContext(Tff_prefix_unaryContext,0); + }; + + tff_infix_unary() { + return this.getTypedRuleContext(Tff_infix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unary_formula(this); + } + } + + +} + + + +class Tff_prefix_unaryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_prefix_unary; + } + + tff_unary_connective() { + return this.getTypedRuleContext(Tff_unary_connectiveContext,0); + }; + + tff_preunit_formula() { + return this.getTypedRuleContext(Tff_preunit_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_prefix_unary(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_prefix_unary(this); + } + } + + +} + + + +class Tff_infix_unaryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_infix_unary; + } + + tff_unitary_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unitary_termContext); + } else { + return this.getTypedRuleContext(Tff_unitary_termContext,i); + } + }; + + infix_inequality() { + return this.getTypedRuleContext(Infix_inequalityContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_infix_unary(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_infix_unary(this); + } + } + + +} + + + +class Tff_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_atomic_formula; + } + + tff_plain_atomic() { + return this.getTypedRuleContext(Tff_plain_atomicContext,0); + }; + + tff_defined_atomic() { + return this.getTypedRuleContext(Tff_defined_atomicContext,0); + }; + + tff_system_atomic() { + return this.getTypedRuleContext(Tff_system_atomicContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_atomic_formula(this); + } + } + + +} + + + +class Tff_plain_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_plain_atomic; + } + + constant() { + return this.getTypedRuleContext(ConstantContext,0); + }; + + functor() { + return this.getTypedRuleContext(FunctorContext,0); + }; + + tff_arguments() { + return this.getTypedRuleContext(Tff_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_plain_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_plain_atomic(this); + } + } + + +} + + + +class Tff_defined_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_defined_atomic; + } + + tff_defined_plain() { + return this.getTypedRuleContext(Tff_defined_plainContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_defined_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_defined_atomic(this); + } + } + + +} + + + +class Tff_defined_plainContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_defined_plain; + } + + defined_constant() { + return this.getTypedRuleContext(Defined_constantContext,0); + }; + + defined_functor() { + return this.getTypedRuleContext(Defined_functorContext,0); + }; + + tff_arguments() { + return this.getTypedRuleContext(Tff_argumentsContext,0); + }; + + nxf_atom() { + return this.getTypedRuleContext(Nxf_atomContext,0); + }; + + txf_let() { + return this.getTypedRuleContext(Txf_letContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_defined_plain(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_defined_plain(this); + } + } + + +} + + + +class Tff_defined_infixContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_defined_infix; + } + + tff_unitary_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Tff_unitary_termContext); + } else { + return this.getTypedRuleContext(Tff_unitary_termContext,i); + } + }; + + defined_infix_pred() { + return this.getTypedRuleContext(Defined_infix_predContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_defined_infix(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_defined_infix(this); + } + } + + +} + + + +class Tff_system_atomicContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_system_atomic; + } + + system_constant() { + return this.getTypedRuleContext(System_constantContext,0); + }; + + system_functor() { + return this.getTypedRuleContext(System_functorContext,0); + }; + + tff_arguments() { + return this.getTypedRuleContext(Tff_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_system_atomic(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_system_atomic(this); + } + } + + +} + + + +class Txf_letContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let; + } + + txf_let_types() { + return this.getTypedRuleContext(Txf_let_typesContext,0); + }; + + txf_let_defns() { + return this.getTypedRuleContext(Txf_let_defnsContext,0); + }; + + tff_term() { + return this.getTypedRuleContext(Tff_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let(this); + } + } + + +} + + + +class Txf_let_typesContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let_types; + } + + tff_atom_typing() { + return this.getTypedRuleContext(Tff_atom_typingContext,0); + }; + + tff_atom_typing_list() { + return this.getTypedRuleContext(Tff_atom_typing_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let_types(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let_types(this); + } + } + + +} + + + +class Tff_atom_typing_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_atom_typing_list; + } + + tff_atom_typing() { + return this.getTypedRuleContext(Tff_atom_typingContext,0); + }; + + tff_atom_typing_list() { + return this.getTypedRuleContext(Tff_atom_typing_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_atom_typing_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_atom_typing_list(this); + } + } + + +} + + + +class Txf_let_defnsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let_defns; + } + + txf_let_defn() { + return this.getTypedRuleContext(Txf_let_defnContext,0); + }; + + txf_let_defn_list() { + return this.getTypedRuleContext(Txf_let_defn_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let_defns(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let_defns(this); + } + } + + +} + + + +class Txf_let_defnContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let_defn; + } + + txf_let_lhs() { + return this.getTypedRuleContext(Txf_let_lhsContext,0); + }; + + assignment() { + return this.getTypedRuleContext(AssignmentContext,0); + }; + + tff_term() { + return this.getTypedRuleContext(Tff_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let_defn(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let_defn(this); + } + } + + +} + + + +class Txf_let_lhsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let_lhs; + } + + tff_plain_atomic() { + return this.getTypedRuleContext(Tff_plain_atomicContext,0); + }; + + txf_tuple() { + return this.getTypedRuleContext(Txf_tupleContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let_lhs(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let_lhs(this); + } + } + + +} + + + +class Txf_let_defn_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_let_defn_list; + } + + txf_let_defn() { + return this.getTypedRuleContext(Txf_let_defnContext,0); + }; + + txf_let_defn_list() { + return this.getTypedRuleContext(Txf_let_defn_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_let_defn_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_let_defn_list(this); + } + } + + +} + + + +class Nxf_atomContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nxf_atom; + } + + nxf_long_connective() { + return this.getTypedRuleContext(Nxf_long_connectiveContext,0); + }; + + tff_arguments() { + return this.getTypedRuleContext(Tff_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNxf_atom(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNxf_atom(this); + } + } + + +} + + + +class Tff_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_term; + } + + tff_logic_formula() { + return this.getTypedRuleContext(Tff_logic_formulaContext,0); + }; + + defined_term() { + return this.getTypedRuleContext(Defined_termContext,0); + }; + + txf_tuple() { + return this.getTypedRuleContext(Txf_tupleContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_term(this); + } + } + + +} + + + +class Tff_unitary_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unitary_term; + } + + tff_atomic_formula() { + return this.getTypedRuleContext(Tff_atomic_formulaContext,0); + }; + + defined_term() { + return this.getTypedRuleContext(Defined_termContext,0); + }; + + txf_tuple() { + return this.getTypedRuleContext(Txf_tupleContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + tff_logic_formula() { + return this.getTypedRuleContext(Tff_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unitary_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unitary_term(this); + } + } + + +} + + + +class Txf_tupleContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_tuple; + } + + tff_arguments() { + return this.getTypedRuleContext(Tff_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_tuple(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_tuple(this); + } + } + + +} + + + +class Tff_argumentsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_arguments; + } + + tff_term() { + return this.getTypedRuleContext(Tff_termContext,0); + }; + + comma_tff_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Comma_tff_termContext); + } else { + return this.getTypedRuleContext(Comma_tff_termContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_arguments(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_arguments(this); + } + } + + +} + + + +class Comma_tff_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_comma_tff_term; + } + + tff_term() { + return this.getTypedRuleContext(Tff_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterComma_tff_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitComma_tff_term(this); + } + } + + +} + + + +class Tff_atom_typingContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_atom_typing; + } + + typeable_atom() { + return this.getTypedRuleContext(Typeable_atomContext,0); + }; + + tff_top_level_type() { + return this.getTypedRuleContext(Tff_top_level_typeContext,0); + }; + + tff_atom_typing() { + return this.getTypedRuleContext(Tff_atom_typingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_atom_typing(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_atom_typing(this); + } + } + + +} + + + +class Tff_top_level_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_top_level_type; + } + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + tff_non_atomic_type() { + return this.getTypedRuleContext(Tff_non_atomic_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_top_level_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_top_level_type(this); + } + } + + +} + + + +class Tff_non_atomic_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_non_atomic_type; + } + + tff_mapping_type() { + return this.getTypedRuleContext(Tff_mapping_typeContext,0); + }; + + tf1_quantified_type() { + return this.getTypedRuleContext(Tf1_quantified_typeContext,0); + }; + + tff_non_atomic_type() { + return this.getTypedRuleContext(Tff_non_atomic_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_non_atomic_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_non_atomic_type(this); + } + } + + +} + + + +class Tf1_quantified_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tf1_quantified_type; + } + + type_quantifier() { + return this.getTypedRuleContext(Type_quantifierContext,0); + }; + + tff_variable_list() { + return this.getTypedRuleContext(Tff_variable_listContext,0); + }; + + tff_monotype() { + return this.getTypedRuleContext(Tff_monotypeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTf1_quantified_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTf1_quantified_type(this); + } + } + + +} + + + +class Tff_monotypeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_monotype; + } + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + tff_mapping_type() { + return this.getTypedRuleContext(Tff_mapping_typeContext,0); + }; + + tf1_quantified_type() { + return this.getTypedRuleContext(Tf1_quantified_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_monotype(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_monotype(this); + } + } + + +} + + + +class Tff_unitary_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unitary_type; + } + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + tff_xprod_type() { + return this.getTypedRuleContext(Tff_xprod_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unitary_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unitary_type(this); + } + } + + +} + + + +class Tff_atomic_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_atomic_type; + } + + type_constant() { + return this.getTypedRuleContext(Type_constantContext,0); + }; + + defined_type() { + return this.getTypedRuleContext(Defined_typeContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + type_functor() { + return this.getTypedRuleContext(Type_functorContext,0); + }; + + tff_type_arguments() { + return this.getTypedRuleContext(Tff_type_argumentsContext,0); + }; + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + txf_tuple_type() { + return this.getTypedRuleContext(Txf_tuple_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_atomic_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_atomic_type(this); + } + } + + +} + + + +class Tff_type_argumentsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_type_arguments; + } + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + tff_type_arguments() { + return this.getTypedRuleContext(Tff_type_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_type_arguments(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_type_arguments(this); + } + } + + +} + + + +class Tff_mapping_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_mapping_type; + } + + tff_unitary_type() { + return this.getTypedRuleContext(Tff_unitary_typeContext,0); + }; + + Arrow() { + return this.getToken(TPTPParser.Arrow, 0); + }; + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_mapping_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_mapping_type(this); + } + } + + +} + + + +class Tff_xprod_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_xprod_type; + } + + tff_unitary_type() { + return this.getTypedRuleContext(Tff_unitary_typeContext,0); + }; + + Star() { + return this.getToken(TPTPParser.Star, 0); + }; + + tff_atomic_type() { + return this.getTypedRuleContext(Tff_atomic_typeContext,0); + }; + + tff_xprod_type() { + return this.getTypedRuleContext(Tff_xprod_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_xprod_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_xprod_type(this); + } + } + + +} + + + +class Txf_tuple_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_tuple_type; + } + + tff_type_list() { + return this.getTypedRuleContext(Tff_type_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_tuple_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_tuple_type(this); + } + } + + +} + + + +class Tff_type_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_type_list; + } + + tff_top_level_type() { + return this.getTypedRuleContext(Tff_top_level_typeContext,0); + }; + + tff_type_list() { + return this.getTypedRuleContext(Tff_type_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_type_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_type_list(this); + } + } + + +} + + + +class Tff_subtypeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_subtype; + } + + atomic_type = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Atomic_typeContext); + } else { + return this.getTypedRuleContext(Atomic_typeContext,i); + } + }; + + subtype_sign() { + return this.getTypedRuleContext(Subtype_signContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_subtype(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_subtype(this); + } + } + + +} + + + +class Txf_definitionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_definition; + } + + tff_atomic_formula() { + return this.getTypedRuleContext(Tff_atomic_formulaContext,0); + }; + + identical() { + return this.getTypedRuleContext(IdenticalContext,0); + }; + + tff_term() { + return this.getTypedRuleContext(Tff_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_definition(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_definition(this); + } + } + + +} + + + +class Txf_sequentContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_txf_sequent; + } + + txf_tuple = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Txf_tupleContext); + } else { + return this.getTypedRuleContext(Txf_tupleContext,i); + } + }; + + gentzen_arrow() { + return this.getTypedRuleContext(Gentzen_arrowContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTxf_sequent(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTxf_sequent(this); + } + } + + +} + + + +class Nhf_long_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nhf_long_connective; + } + + ntf_connective_name() { + return this.getTypedRuleContext(Ntf_connective_nameContext,0); + }; + + nhf_parameter_list() { + return this.getTypedRuleContext(Nhf_parameter_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNhf_long_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNhf_long_connective(this); + } + } + + +} + + + +class Nhf_parameter_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nhf_parameter_list; + } + + nhf_parameter() { + return this.getTypedRuleContext(Nhf_parameterContext,0); + }; + + nhf_parameter_list() { + return this.getTypedRuleContext(Nhf_parameter_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNhf_parameter_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNhf_parameter_list(this); + } + } + + +} + + + +class Nhf_parameterContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nhf_parameter; + } + + ntf_index() { + return this.getTypedRuleContext(Ntf_indexContext,0); + }; + + nhf_key_pair() { + return this.getTypedRuleContext(Nhf_key_pairContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNhf_parameter(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNhf_parameter(this); + } + } + + +} + + + +class Nhf_key_pairContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nhf_key_pair; + } + + thf_definition() { + return this.getTypedRuleContext(Thf_definitionContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNhf_key_pair(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNhf_key_pair(this); + } + } + + +} + + + +class Nxf_long_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nxf_long_connective; + } + + ntf_connective_name() { + return this.getTypedRuleContext(Ntf_connective_nameContext,0); + }; + + nxf_parameter_list() { + return this.getTypedRuleContext(Nxf_parameter_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNxf_long_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNxf_long_connective(this); + } + } + + +} + + + +class Nxf_parameter_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nxf_parameter_list; + } + + nxf_parameter() { + return this.getTypedRuleContext(Nxf_parameterContext,0); + }; + + nxf_parameter_list() { + return this.getTypedRuleContext(Nxf_parameter_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNxf_parameter_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNxf_parameter_list(this); + } + } + + +} + + + +class Nxf_parameterContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nxf_parameter; + } + + ntf_index() { + return this.getTypedRuleContext(Ntf_indexContext,0); + }; + + nxf_key_pair() { + return this.getTypedRuleContext(Nxf_key_pairContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNxf_parameter(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNxf_parameter(this); + } + } + + +} + + + +class Nxf_key_pairContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nxf_key_pair; + } + + txf_definition() { + return this.getTypedRuleContext(Txf_definitionContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNxf_key_pair(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNxf_key_pair(this); + } + } + + +} + + + +class Ntf_connective_nameContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_ntf_connective_name; + } + + ntf_defined_connective() { + return this.getTypedRuleContext(Ntf_defined_connectiveContext,0); + }; + + atomic_system_word() { + return this.getTypedRuleContext(Atomic_system_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNtf_connective_name(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNtf_connective_name(this); + } + } + + +} + + + +class Ntf_defined_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_ntf_defined_connective; + } + + atomic_defined_word() { + return this.getTypedRuleContext(Atomic_defined_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNtf_defined_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNtf_defined_connective(this); + } + } + + +} + + + +class Ntf_indexContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_ntf_index; + } + + Hash() { + return this.getToken(TPTPParser.Hash, 0); + }; + + tff_unitary_term() { + return this.getTypedRuleContext(Tff_unitary_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNtf_index(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNtf_index(this); + } + } + + +} + + + +class Ntf_short_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_ntf_short_connective; + } + + Less_sign() { + return this.getToken(TPTPParser.Less_sign, 0); + }; + + Arrow() { + return this.getToken(TPTPParser.Arrow, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNtf_short_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNtf_short_connective(this); + } + } + + +} + + + +class Tcf_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tcf_formula; + } + + tcf_logic_formula() { + return this.getTypedRuleContext(Tcf_logic_formulaContext,0); + }; + + tff_atom_typing() { + return this.getTypedRuleContext(Tff_atom_typingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTcf_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTcf_formula(this); + } + } + + +} + + + +class Tcf_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tcf_logic_formula; + } + + tcf_quantified_formula() { + return this.getTypedRuleContext(Tcf_quantified_formulaContext,0); + }; + + cnf_formula() { + return this.getTypedRuleContext(Cnf_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTcf_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTcf_logic_formula(this); + } + } + + +} + + + +class Tcf_quantified_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tcf_quantified_formula; + } + + tff_variable_list() { + return this.getTypedRuleContext(Tff_variable_listContext,0); + }; + + tcf_logic_formula() { + return this.getTypedRuleContext(Tcf_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTcf_quantified_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTcf_quantified_formula(this); + } + } + + +} + + + +class Fof_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_formula; + } + + fof_logic_formula() { + return this.getTypedRuleContext(Fof_logic_formulaContext,0); + }; + + fof_sequent() { + return this.getTypedRuleContext(Fof_sequentContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_formula(this); + } + } + + +} + + + +class Fof_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_logic_formula; + } + + fof_binary_formula() { + return this.getTypedRuleContext(Fof_binary_formulaContext,0); + }; + + fof_unary_formula() { + return this.getTypedRuleContext(Fof_unary_formulaContext,0); + }; + + fof_unitary_formula() { + return this.getTypedRuleContext(Fof_unitary_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_logic_formula(this); + } + } + + +} + + + +class Fof_binary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_binary_formula; + } + + fof_binary_pair() { + return this.getTypedRuleContext(Fof_binary_pairContext,0); + }; + + fof_binary_list() { + return this.getTypedRuleContext(Fof_binary_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_binary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_binary_formula(this); + } + } + + +} + + + +class Fof_binary_pairContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_binary_pair; + } + + fof_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_unit_formulaContext); + } else { + return this.getTypedRuleContext(Fof_unit_formulaContext,i); + } + }; + + nonassoc_connective() { + return this.getTypedRuleContext(Nonassoc_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_binary_pair(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_binary_pair(this); + } + } + + +} + + + +class Fof_binary_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_binary_list; + } + + fof_or_formula() { + return this.getTypedRuleContext(Fof_or_formulaContext,0); + }; + + fof_and_formula() { + return this.getTypedRuleContext(Fof_and_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_binary_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_binary_list(this); + } + } + + +} + + + +class Fof_or_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_or_formula; + } + + fof_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_unit_formulaContext); + } else { + return this.getTypedRuleContext(Fof_unit_formulaContext,i); + } + }; + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + fof_or_formula() { + return this.getTypedRuleContext(Fof_or_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_or_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_or_formula(this); + } + } + + +} + + + +class Fof_and_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_and_formula; + } + + fof_unit_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_unit_formulaContext); + } else { + return this.getTypedRuleContext(Fof_unit_formulaContext,i); + } + }; + + fof_and_formula() { + return this.getTypedRuleContext(Fof_and_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_and_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_and_formula(this); + } + } + + +} + + + +class Fof_unary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_unary_formula; + } + + unary_connective() { + return this.getTypedRuleContext(Unary_connectiveContext,0); + }; + + fof_unit_formula() { + return this.getTypedRuleContext(Fof_unit_formulaContext,0); + }; + + fof_infix_unary() { + return this.getTypedRuleContext(Fof_infix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_unary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_unary_formula(this); + } + } + + +} + + + +class Fof_infix_unaryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_infix_unary; + } + + fof_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_termContext); + } else { + return this.getTypedRuleContext(Fof_termContext,i); + } + }; + + infix_inequality() { + return this.getTypedRuleContext(Infix_inequalityContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_infix_unary(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_infix_unary(this); + } + } + + +} + + + +class Fof_unit_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_unit_formula; + } + + fof_unitary_formula() { + return this.getTypedRuleContext(Fof_unitary_formulaContext,0); + }; + + fof_unary_formula() { + return this.getTypedRuleContext(Fof_unary_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_unit_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_unit_formula(this); + } + } + + +} + + + +class Fof_unitary_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_unitary_formula; + } + + fof_quantified_formula() { + return this.getTypedRuleContext(Fof_quantified_formulaContext,0); + }; + + fof_atomic_formula() { + return this.getTypedRuleContext(Fof_atomic_formulaContext,0); + }; + + fof_logic_formula() { + return this.getTypedRuleContext(Fof_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_unitary_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_unitary_formula(this); + } + } + + +} + + + +class Fof_quantified_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_quantified_formula; + } + + fof_quantifier() { + return this.getTypedRuleContext(Fof_quantifierContext,0); + }; + + fof_variable_list() { + return this.getTypedRuleContext(Fof_variable_listContext,0); + }; + + fof_unit_formula() { + return this.getTypedRuleContext(Fof_unit_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_quantified_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_quantified_formula(this); + } + } + + +} + + + +class Fof_variable_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_variable_list; + } + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + fof_variable_list() { + return this.getTypedRuleContext(Fof_variable_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_variable_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_variable_list(this); + } + } + + +} + + + +class Fof_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_atomic_formula; + } + + fof_plain_atomic_formula() { + return this.getTypedRuleContext(Fof_plain_atomic_formulaContext,0); + }; + + fof_defined_atomic_formula() { + return this.getTypedRuleContext(Fof_defined_atomic_formulaContext,0); + }; + + fof_system_atomic_formula() { + return this.getTypedRuleContext(Fof_system_atomic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_atomic_formula(this); + } + } + + +} + + + +class Fof_plain_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_plain_atomic_formula; + } + + fof_plain_term() { + return this.getTypedRuleContext(Fof_plain_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_plain_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_plain_atomic_formula(this); + } + } + + +} + + + +class Fof_defined_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_atomic_formula; + } + + fof_defined_plain_formula() { + return this.getTypedRuleContext(Fof_defined_plain_formulaContext,0); + }; + + fof_defined_infix_formula() { + return this.getTypedRuleContext(Fof_defined_infix_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_atomic_formula(this); + } + } + + +} + + + +class Fof_defined_plain_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_plain_formula; + } + + fof_defined_plain_term() { + return this.getTypedRuleContext(Fof_defined_plain_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_plain_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_plain_formula(this); + } + } + + +} + + + +class Fof_defined_infix_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_infix_formula; + } + + fof_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_termContext); + } else { + return this.getTypedRuleContext(Fof_termContext,i); + } + }; + + defined_infix_pred() { + return this.getTypedRuleContext(Defined_infix_predContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_infix_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_infix_formula(this); + } + } + + +} + + + +class Fof_system_atomic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_system_atomic_formula; + } + + fof_system_term() { + return this.getTypedRuleContext(Fof_system_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_system_atomic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_system_atomic_formula(this); + } + } + + +} + + + +class Fof_plain_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_plain_term; + } + + constant() { + return this.getTypedRuleContext(ConstantContext,0); + }; + + functor() { + return this.getTypedRuleContext(FunctorContext,0); + }; + + fof_arguments() { + return this.getTypedRuleContext(Fof_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_plain_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_plain_term(this); + } + } + + +} + + + +class Fof_defined_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_term; + } + + defined_term() { + return this.getTypedRuleContext(Defined_termContext,0); + }; + + fof_defined_atomic_term() { + return this.getTypedRuleContext(Fof_defined_atomic_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_term(this); + } + } + + +} + + + +class Fof_defined_atomic_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_atomic_term; + } + + fof_defined_plain_term() { + return this.getTypedRuleContext(Fof_defined_plain_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_atomic_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_atomic_term(this); + } + } + + +} + + + +class Fof_defined_plain_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_defined_plain_term; + } + + defined_constant() { + return this.getTypedRuleContext(Defined_constantContext,0); + }; + + defined_functor() { + return this.getTypedRuleContext(Defined_functorContext,0); + }; + + fof_arguments() { + return this.getTypedRuleContext(Fof_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_defined_plain_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_defined_plain_term(this); + } + } + + +} + + + +class Fof_system_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_system_term; + } + + system_constant() { + return this.getTypedRuleContext(System_constantContext,0); + }; + + system_functor() { + return this.getTypedRuleContext(System_functorContext,0); + }; + + fof_arguments() { + return this.getTypedRuleContext(Fof_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_system_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_system_term(this); + } + } + + +} + + + +class Fof_argumentsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_arguments; + } + + fof_term() { + return this.getTypedRuleContext(Fof_termContext,0); + }; + + fof_arguments() { + return this.getTypedRuleContext(Fof_argumentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_arguments(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_arguments(this); + } + } + + +} + + + +class Fof_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_term; + } + + fof_function_term() { + return this.getTypedRuleContext(Fof_function_termContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_term(this); + } + } + + +} + + + +class Fof_function_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_function_term; + } + + fof_plain_term() { + return this.getTypedRuleContext(Fof_plain_termContext,0); + }; + + fof_defined_term() { + return this.getTypedRuleContext(Fof_defined_termContext,0); + }; + + fof_system_term() { + return this.getTypedRuleContext(Fof_system_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_function_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_function_term(this); + } + } + + +} + + + +class Fof_sequentContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_sequent; + } + + fof_formula_tuple = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Fof_formula_tupleContext); + } else { + return this.getTypedRuleContext(Fof_formula_tupleContext,i); + } + }; + + gentzen_arrow() { + return this.getTypedRuleContext(Gentzen_arrowContext,0); + }; + + fof_sequent() { + return this.getTypedRuleContext(Fof_sequentContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_sequent(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_sequent(this); + } + } + + +} + + + +class Fof_formula_tupleContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_formula_tuple; + } + + fof_formula_tuple_list() { + return this.getTypedRuleContext(Fof_formula_tuple_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_formula_tuple(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_formula_tuple(this); + } + } + + +} + + + +class Fof_formula_tuple_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_formula_tuple_list; + } + + fof_logic_formula() { + return this.getTypedRuleContext(Fof_logic_formulaContext,0); + }; + + comma_fof_logic_formula = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Comma_fof_logic_formulaContext); + } else { + return this.getTypedRuleContext(Comma_fof_logic_formulaContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_formula_tuple_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_formula_tuple_list(this); + } + } + + +} + + + +class Comma_fof_logic_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_comma_fof_logic_formula; + } + + fof_logic_formula() { + return this.getTypedRuleContext(Fof_logic_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterComma_fof_logic_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitComma_fof_logic_formula(this); + } + } + + +} + + + +class Cnf_formulaContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_cnf_formula; + } + + cnf_disjunction() { + return this.getTypedRuleContext(Cnf_disjunctionContext,0); + }; + + cnf_formula() { + return this.getTypedRuleContext(Cnf_formulaContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterCnf_formula(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitCnf_formula(this); + } + } + + +} + + + +class Cnf_disjunctionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_cnf_disjunction; + } + + cnf_literal() { + return this.getTypedRuleContext(Cnf_literalContext,0); + }; + + cnf_disjunction() { + return this.getTypedRuleContext(Cnf_disjunctionContext,0); + }; + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterCnf_disjunction(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitCnf_disjunction(this); + } + } + + +} + + + +class Cnf_literalContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_cnf_literal; + } + + fof_atomic_formula() { + return this.getTypedRuleContext(Fof_atomic_formulaContext,0); + }; + + fof_infix_unary() { + return this.getTypedRuleContext(Fof_infix_unaryContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterCnf_literal(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitCnf_literal(this); + } + } + + +} + + + +class Thf_quantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_quantifier; + } + + tff_quantifier() { + return this.getTypedRuleContext(Tff_quantifierContext,0); + }; + + th0_quantifier() { + return this.getTypedRuleContext(Th0_quantifierContext,0); + }; + + type_quantifier() { + return this.getTypedRuleContext(Type_quantifierContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_quantifier(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_quantifier(this); + } + } + + +} + + + +class Thf_unary_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_thf_unary_connective; + } + + unary_connective() { + return this.getTypedRuleContext(Unary_connectiveContext,0); + }; + + ntf_short_connective() { + return this.getTypedRuleContext(Ntf_short_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterThf_unary_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_unary_connective(this); + } + } + + +} + + + +class Th0_quantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_th0_quantifier; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTh0_quantifier(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTh0_quantifier(this); + } + } + + +} + + + +class Type_quantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_type_quantifier; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterType_quantifier(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitType_quantifier(this); + } + } + + +} + + + +class Subtype_signContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_subtype_sign; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSubtype_sign(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSubtype_sign(this); + } + } + + +} + + + +class Tff_unary_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_unary_connective; + } + + unary_connective() { + return this.getTypedRuleContext(Unary_connectiveContext,0); + }; + + ntf_short_connective() { + return this.getTypedRuleContext(Ntf_short_connectiveContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_unary_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_unary_connective(this); + } + } + + +} + + + +class Tff_quantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_tff_quantifier; + } + + fof_quantifier() { + return this.getTypedRuleContext(Fof_quantifierContext,0); + }; + + Hash() { + return this.getToken(TPTPParser.Hash, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTff_quantifier(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_quantifier(this); + } + } + + +} + + + +class Fof_quantifierContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_fof_quantifier; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFof_quantifier(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_quantifier(this); + } + } + + +} + + + +class Nonassoc_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nonassoc_connective; + } + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNonassoc_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNonassoc_connective(this); + } + } + + +} + + + +class Assoc_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_assoc_connective; + } + + Vline() { + return this.getToken(TPTPParser.Vline, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAssoc_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAssoc_connective(this); + } + } + + +} + + + +class Unary_connectiveContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_unary_connective; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterUnary_connective(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitUnary_connective(this); + } + } + + +} + + + +class Gentzen_arrowContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_gentzen_arrow; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGentzen_arrow(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGentzen_arrow(this); + } + } + + +} + + + +class AssignmentContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_assignment; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAssignment(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAssignment(this); + } + } + + +} + + + +class IdenticalContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_identical; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterIdentical(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitIdentical(this); + } + } + + +} + + + +class Typeable_atomContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_typeable_atom; + } + + constant() { + return this.getTypedRuleContext(ConstantContext,0); + }; + + Distinct_object() { + return this.getToken(TPTPParser.Distinct_object, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTypeable_atom(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTypeable_atom(this); + } + } + + +} + + + +class Atomic_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_atomic_type; + } + + typeable_atom() { + return this.getTypedRuleContext(Typeable_atomContext,0); + }; + + defined_constant() { + return this.getTypedRuleContext(Defined_constantContext,0); + }; + + system_type() { + return this.getTypedRuleContext(System_typeContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAtomic_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAtomic_type(this); + } + } + + +} + + + +class Type_constantContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_type_constant; + } + + type_functor() { + return this.getTypedRuleContext(Type_functorContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterType_constant(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitType_constant(this); + } + } + + +} + + + +class Type_functorContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_type_functor; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterType_functor(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitType_functor(this); + } + } + + +} + + + +class Defined_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_defined_type; + } + + atomic_defined_word() { + return this.getTypedRuleContext(Atomic_defined_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDefined_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDefined_type(this); + } + } + + +} + + + +class System_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_system_type; + } + + atomic_system_word() { + return this.getTypedRuleContext(Atomic_system_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSystem_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSystem_type(this); + } + } + + +} + + + +class Defined_infix_predContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_defined_infix_pred; + } + + infix_equality() { + return this.getTypedRuleContext(Infix_equalityContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDefined_infix_pred(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDefined_infix_pred(this); + } + } + + +} + + + +class Infix_equalityContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_infix_equality; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInfix_equality(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInfix_equality(this); + } + } + + +} + + + +class Infix_inequalityContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_infix_inequality; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInfix_inequality(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInfix_inequality(this); + } + } + + +} + + + +class ConstantContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_constant; + } + + functor() { + return this.getTypedRuleContext(FunctorContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterConstant(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitConstant(this); + } + } + + +} + + + +class FunctorContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_functor; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFunctor(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFunctor(this); + } + } + + +} + + + +class Defined_constantContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_defined_constant; + } + + defined_functor() { + return this.getTypedRuleContext(Defined_functorContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDefined_constant(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDefined_constant(this); + } + } + + +} + + + +class Defined_functorContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_defined_functor; + } + + atomic_defined_word() { + return this.getTypedRuleContext(Atomic_defined_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDefined_functor(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDefined_functor(this); + } + } + + +} + + + +class System_constantContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_system_constant; + } + + system_functor() { + return this.getTypedRuleContext(System_functorContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSystem_constant(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSystem_constant(this); + } + } + + +} + + + +class System_functorContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_system_functor; + } + + atomic_system_word() { + return this.getTypedRuleContext(Atomic_system_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSystem_functor(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSystem_functor(this); + } + } + + +} + + + +class Th1_defined_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_th1_defined_term; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTh1_defined_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTh1_defined_term(this); + } + } + + +} + + + +class Defined_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_defined_term; + } + + number() { + return this.getTypedRuleContext(NumberContext,0); + }; + + Distinct_object() { + return this.getToken(TPTPParser.Distinct_object, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDefined_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDefined_term(this); + } + } + + +} + + + +class VariableContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_variable; + } + + Upper_word() { + return this.getToken(TPTPParser.Upper_word, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterVariable(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitVariable(this); + } + } + + +} + + + +class SourceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_source; + } + + dag_source() { + return this.getTypedRuleContext(Dag_sourceContext,0); + }; + + internal_source() { + return this.getTypedRuleContext(Internal_sourceContext,0); + }; + + external_source() { + return this.getTypedRuleContext(External_sourceContext,0); + }; + + sources() { + return this.getTypedRuleContext(SourcesContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSource(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSource(this); + } + } + + +} + + + +class SourcesContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_sources; + } + + source() { + return this.getTypedRuleContext(SourceContext,0); + }; + + sources() { + return this.getTypedRuleContext(SourcesContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSources(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSources(this); + } + } + + +} + + + +class Dag_sourceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_dag_source; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + inference_record() { + return this.getTypedRuleContext(Inference_recordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterDag_source(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitDag_source(this); + } + } + + +} + + + +class Inference_recordContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_inference_record; + } + + inference_rule() { + return this.getTypedRuleContext(Inference_ruleContext,0); + }; + + useful_info() { + return this.getTypedRuleContext(Useful_infoContext,0); + }; + + parents() { + return this.getTypedRuleContext(ParentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInference_record(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInference_record(this); + } + } + + +} + + + +class Inference_ruleContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_inference_rule; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInference_rule(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInference_rule(this); + } + } + + +} + + + +class Internal_sourceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_internal_source; + } + + intro_type() { + return this.getTypedRuleContext(Intro_typeContext,0); + }; + + useful_info() { + return this.getTypedRuleContext(Useful_infoContext,0); + }; + + parents() { + return this.getTypedRuleContext(ParentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInternal_source(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInternal_source(this); + } + } + + +} + + + +class Intro_typeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_intro_type; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterIntro_type(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitIntro_type(this); + } + } + + +} + + + +class External_sourceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_external_source; + } + + file_source() { + return this.getTypedRuleContext(File_sourceContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterExternal_source(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitExternal_source(this); + } + } + + +} + + + +class File_sourceContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_file_source; + } + + file_name() { + return this.getTypedRuleContext(File_nameContext,0); + }; + + file_info() { + return this.getTypedRuleContext(File_infoContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFile_source(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFile_source(this); + } + } + + +} + + + +class File_infoContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_file_info; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + nothing() { + return this.getTypedRuleContext(NothingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFile_info(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFile_info(this); + } + } + + +} + + + +class ParentsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_parents; + } + + parent_list() { + return this.getTypedRuleContext(Parent_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterParents(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitParents(this); + } + } + + +} + + + +class Parent_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_parent_list; + } + + parent_info() { + return this.getTypedRuleContext(Parent_infoContext,0); + }; + + comma_parent_info = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Comma_parent_infoContext); + } else { + return this.getTypedRuleContext(Comma_parent_infoContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterParent_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitParent_list(this); + } + } + + +} + + + +class Comma_parent_infoContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_comma_parent_info; + } + + parent_info() { + return this.getTypedRuleContext(Parent_infoContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterComma_parent_info(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitComma_parent_info(this); + } + } + + +} + + + +class Parent_infoContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_parent_info; + } + + source() { + return this.getTypedRuleContext(SourceContext,0); + }; + + parent_details() { + return this.getTypedRuleContext(Parent_detailsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterParent_info(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitParent_info(this); + } + } + + +} + + + +class Parent_detailsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_parent_details; + } + + general_term() { + return this.getTypedRuleContext(General_termContext,0); + }; + + nothing() { + return this.getTypedRuleContext(NothingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterParent_details(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitParent_details(this); + } + } + + +} + + + +class Optional_infoContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_optional_info; + } + + useful_info() { + return this.getTypedRuleContext(Useful_infoContext,0); + }; + + nothing() { + return this.getTypedRuleContext(NothingContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterOptional_info(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitOptional_info(this); + } + } + + +} + + + +class Useful_infoContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_useful_info; + } + + general_list() { + return this.getTypedRuleContext(General_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterUseful_info(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitUseful_info(this); + } + } + + +} + + + +class IncludeContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_include; + } + + file_name() { + return this.getTypedRuleContext(File_nameContext,0); + }; + + include_optionals() { + return this.getTypedRuleContext(Include_optionalsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInclude(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInclude(this); + } + } + + +} + + + +class Include_optionalsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_include_optionals; + } + + nothing() { + return this.getTypedRuleContext(NothingContext,0); + }; + + formula_selection() { + return this.getTypedRuleContext(Formula_selectionContext,0); + }; + + space_name() { + return this.getTypedRuleContext(Space_nameContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterInclude_optionals(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitInclude_optionals(this); + } + } + + +} + + + +class Formula_selectionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_formula_selection; + } + + name_list() { + return this.getTypedRuleContext(Name_listContext,0); + }; + + Star() { + return this.getToken(TPTPParser.Star, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFormula_selection(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFormula_selection(this); + } + } + + +} + + + +class Name_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_name_list; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + name_list() { + return this.getTypedRuleContext(Name_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterName_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitName_list(this); + } + } + + +} + + + +class Space_nameContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_space_name; + } + + name() { + return this.getTypedRuleContext(NameContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterSpace_name(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitSpace_name(this); + } + } + + +} + + + +class General_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_general_term; + } + + general_data() { + return this.getTypedRuleContext(General_dataContext,0); + }; + + general_term() { + return this.getTypedRuleContext(General_termContext,0); + }; + + general_list() { + return this.getTypedRuleContext(General_listContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGeneral_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGeneral_term(this); + } + } + + +} + + + +class General_dataContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_general_data; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + general_function() { + return this.getTypedRuleContext(General_functionContext,0); + }; + + variable() { + return this.getTypedRuleContext(VariableContext,0); + }; + + number() { + return this.getTypedRuleContext(NumberContext,0); + }; + + Distinct_object() { + return this.getToken(TPTPParser.Distinct_object, 0); + }; + + formula_data() { + return this.getTypedRuleContext(Formula_dataContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGeneral_data(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGeneral_data(this); + } + } + + +} + + + +class General_functionContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_general_function; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + general_terms() { + return this.getTypedRuleContext(General_termsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGeneral_function(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGeneral_function(this); + } + } + + +} + + + +class Formula_dataContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_formula_data; + } + + thf_formula() { + return this.getTypedRuleContext(Thf_formulaContext,0); + }; + + tff_formula() { + return this.getTypedRuleContext(Tff_formulaContext,0); + }; + + fof_formula() { + return this.getTypedRuleContext(Fof_formulaContext,0); + }; + + cnf_formula() { + return this.getTypedRuleContext(Cnf_formulaContext,0); + }; + + fof_term() { + return this.getTypedRuleContext(Fof_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFormula_data(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFormula_data(this); + } + } + + +} + + + +class General_listContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_general_list; + } + + general_terms() { + return this.getTypedRuleContext(General_termsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGeneral_list(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGeneral_list(this); + } + } + + +} + + + +class General_termsContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_general_terms; + } + + general_term() { + return this.getTypedRuleContext(General_termContext,0); + }; + + comma_general_term = function(i) { + if(i===undefined) { + i = null; + } + if(i===null) { + return this.getTypedRuleContexts(Comma_general_termContext); + } else { + return this.getTypedRuleContext(Comma_general_termContext,i); + } + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterGeneral_terms(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitGeneral_terms(this); + } + } + + +} + + + +class Comma_general_termContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_comma_general_term; + } + + general_term() { + return this.getTypedRuleContext(General_termContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterComma_general_term(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitComma_general_term(this); + } + } + + +} + + + +class NameContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_name; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + Integer() { + return this.getToken(TPTPParser.Integer, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterName(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitName(this); + } + } + + +} + + + +class Atomic_wordContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_atomic_word; + } + + lower_word_token() { + return this.getTypedRuleContext(Lower_word_tokenContext,0); + }; + + Single_quoted() { + return this.getToken(TPTPParser.Single_quoted, 0); + }; + + Back_quoted() { + return this.getToken(TPTPParser.Back_quoted, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAtomic_word(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAtomic_word(this); + } + } + + +} + + + +class Atomic_defined_wordContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_atomic_defined_word; + } + + Dollar_word() { + return this.getToken(TPTPParser.Dollar_word, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAtomic_defined_word(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAtomic_defined_word(this); + } + } + + +} + + + +class Atomic_system_wordContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_atomic_system_word; + } + + Dollar_dollar_word() { + return this.getToken(TPTPParser.Dollar_dollar_word, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAtomic_system_word(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAtomic_system_word(this); + } + } + + +} + + + +class NumberContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_number; + } + + Integer() { + return this.getToken(TPTPParser.Integer, 0); + }; + + Rational() { + return this.getToken(TPTPParser.Rational, 0); + }; + + Real() { + return this.getToken(TPTPParser.Real, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNumber(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNumber(this); + } + } + + +} + + + +class File_nameContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_file_name; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterFile_name(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFile_name(this); + } + } + + +} + + + +class NothingContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_nothing; + } + + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterNothing(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitNothing(this); + } + } + + +} + + + +class Lower_word_tokenContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_lower_word_token; + } + + Lower_word() { + return this.getToken(TPTPParser.Lower_word, 0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterLower_word_token(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitLower_word_token(this); + } + } + + +} + + + + +TPTPParser.Tptp_fileContext = Tptp_fileContext; +TPTPParser.Tptp_inputContext = Tptp_inputContext; +TPTPParser.Annotated_formulaContext = Annotated_formulaContext; +TPTPParser.Tpi_annotatedContext = Tpi_annotatedContext; +TPTPParser.Tpi_formulaContext = Tpi_formulaContext; +TPTPParser.Thf_annotatedContext = Thf_annotatedContext; +TPTPParser.Tff_annotatedContext = Tff_annotatedContext; +TPTPParser.Tcf_annotatedContext = Tcf_annotatedContext; +TPTPParser.Fof_annotatedContext = Fof_annotatedContext; +TPTPParser.Cnf_annotatedContext = Cnf_annotatedContext; +TPTPParser.AnnotationsContext = AnnotationsContext; +TPTPParser.Formula_roleContext = Formula_roleContext; +TPTPParser.Thf_formulaContext = Thf_formulaContext; +TPTPParser.Thf_logic_formulaContext = Thf_logic_formulaContext; +TPTPParser.Thf_binary_formulaContext = Thf_binary_formulaContext; +TPTPParser.Thf_binary_pairContext = Thf_binary_pairContext; +TPTPParser.Thf_binary_listContext = Thf_binary_listContext; +TPTPParser.Thf_or_formulaContext = Thf_or_formulaContext; +TPTPParser.Thf_and_formulaContext = Thf_and_formulaContext; +TPTPParser.Thf_apply_formulaContext = Thf_apply_formulaContext; +TPTPParser.Thf_unit_formulaContext = Thf_unit_formulaContext; +TPTPParser.Thf_preunit_formulaContext = Thf_preunit_formulaContext; +TPTPParser.Thf_unitary_formulaContext = Thf_unitary_formulaContext; +TPTPParser.Thf_quantified_formulaContext = Thf_quantified_formulaContext; +TPTPParser.Thf_quantificationContext = Thf_quantificationContext; +TPTPParser.Thf_variable_listContext = Thf_variable_listContext; +TPTPParser.Thf_typed_variableContext = Thf_typed_variableContext; +TPTPParser.Thf_unary_formulaContext = Thf_unary_formulaContext; +TPTPParser.Thf_prefix_unaryContext = Thf_prefix_unaryContext; +TPTPParser.Thf_infix_unaryContext = Thf_infix_unaryContext; +TPTPParser.Thf_atomic_formulaContext = Thf_atomic_formulaContext; +TPTPParser.Thf_plain_atomicContext = Thf_plain_atomicContext; +TPTPParser.Thf_defined_atomicContext = Thf_defined_atomicContext; +TPTPParser.Thf_defined_termContext = Thf_defined_termContext; +TPTPParser.Thf_defined_infixContext = Thf_defined_infixContext; +TPTPParser.Thf_system_atomicContext = Thf_system_atomicContext; +TPTPParser.Thf_letContext = Thf_letContext; +TPTPParser.Thf_let_typesContext = Thf_let_typesContext; +TPTPParser.Thf_atom_typing_listContext = Thf_atom_typing_listContext; +TPTPParser.Thf_let_defnsContext = Thf_let_defnsContext; +TPTPParser.Thf_let_defnContext = Thf_let_defnContext; +TPTPParser.Thf_let_defn_listContext = Thf_let_defn_listContext; +TPTPParser.Thf_unitary_termContext = Thf_unitary_termContext; +TPTPParser.Thf_conn_termContext = Thf_conn_termContext; +TPTPParser.Thf_tupleContext = Thf_tupleContext; +TPTPParser.Thf_fof_functionContext = Thf_fof_functionContext; +TPTPParser.Thf_argumentsContext = Thf_argumentsContext; +TPTPParser.Thf_formula_listContext = Thf_formula_listContext; +TPTPParser.Comma_thf_logic_formulaContext = Comma_thf_logic_formulaContext; +TPTPParser.Thf_atom_typingContext = Thf_atom_typingContext; +TPTPParser.Thf_top_level_typeContext = Thf_top_level_typeContext; +TPTPParser.Thf_unitary_typeContext = Thf_unitary_typeContext; +TPTPParser.Thf_apply_typeContext = Thf_apply_typeContext; +TPTPParser.Thf_binary_typeContext = Thf_binary_typeContext; +TPTPParser.Thf_mapping_typeContext = Thf_mapping_typeContext; +TPTPParser.Thf_xprod_typeContext = Thf_xprod_typeContext; +TPTPParser.Thf_union_typeContext = Thf_union_typeContext; +TPTPParser.Thf_subtypeContext = Thf_subtypeContext; +TPTPParser.Thf_definitionContext = Thf_definitionContext; +TPTPParser.Thf_sequentContext = Thf_sequentContext; +TPTPParser.Tff_formulaContext = Tff_formulaContext; +TPTPParser.Tff_logic_formulaContext = Tff_logic_formulaContext; +TPTPParser.Tff_binary_formulaContext = Tff_binary_formulaContext; +TPTPParser.Tff_binary_pairContext = Tff_binary_pairContext; +TPTPParser.Tff_binary_listContext = Tff_binary_listContext; +TPTPParser.Tff_or_formulaContext = Tff_or_formulaContext; +TPTPParser.Tff_and_formulaContext = Tff_and_formulaContext; +TPTPParser.Tff_unit_formulaContext = Tff_unit_formulaContext; +TPTPParser.Tff_preunit_formulaContext = Tff_preunit_formulaContext; +TPTPParser.Tff_unitary_formulaContext = Tff_unitary_formulaContext; +TPTPParser.Txf_unitary_formulaContext = Txf_unitary_formulaContext; +TPTPParser.Tff_quantified_formulaContext = Tff_quantified_formulaContext; +TPTPParser.Tff_variable_listContext = Tff_variable_listContext; +TPTPParser.Tff_variableContext = Tff_variableContext; +TPTPParser.Tff_typed_variableContext = Tff_typed_variableContext; +TPTPParser.Tff_unary_formulaContext = Tff_unary_formulaContext; +TPTPParser.Tff_prefix_unaryContext = Tff_prefix_unaryContext; +TPTPParser.Tff_infix_unaryContext = Tff_infix_unaryContext; +TPTPParser.Tff_atomic_formulaContext = Tff_atomic_formulaContext; +TPTPParser.Tff_plain_atomicContext = Tff_plain_atomicContext; +TPTPParser.Tff_defined_atomicContext = Tff_defined_atomicContext; +TPTPParser.Tff_defined_plainContext = Tff_defined_plainContext; +TPTPParser.Tff_defined_infixContext = Tff_defined_infixContext; +TPTPParser.Tff_system_atomicContext = Tff_system_atomicContext; +TPTPParser.Txf_letContext = Txf_letContext; +TPTPParser.Txf_let_typesContext = Txf_let_typesContext; +TPTPParser.Tff_atom_typing_listContext = Tff_atom_typing_listContext; +TPTPParser.Txf_let_defnsContext = Txf_let_defnsContext; +TPTPParser.Txf_let_defnContext = Txf_let_defnContext; +TPTPParser.Txf_let_lhsContext = Txf_let_lhsContext; +TPTPParser.Txf_let_defn_listContext = Txf_let_defn_listContext; +TPTPParser.Nxf_atomContext = Nxf_atomContext; +TPTPParser.Tff_termContext = Tff_termContext; +TPTPParser.Tff_unitary_termContext = Tff_unitary_termContext; +TPTPParser.Txf_tupleContext = Txf_tupleContext; +TPTPParser.Tff_argumentsContext = Tff_argumentsContext; +TPTPParser.Comma_tff_termContext = Comma_tff_termContext; +TPTPParser.Tff_atom_typingContext = Tff_atom_typingContext; +TPTPParser.Tff_top_level_typeContext = Tff_top_level_typeContext; +TPTPParser.Tff_non_atomic_typeContext = Tff_non_atomic_typeContext; +TPTPParser.Tf1_quantified_typeContext = Tf1_quantified_typeContext; +TPTPParser.Tff_monotypeContext = Tff_monotypeContext; +TPTPParser.Tff_unitary_typeContext = Tff_unitary_typeContext; +TPTPParser.Tff_atomic_typeContext = Tff_atomic_typeContext; +TPTPParser.Tff_type_argumentsContext = Tff_type_argumentsContext; +TPTPParser.Tff_mapping_typeContext = Tff_mapping_typeContext; +TPTPParser.Tff_xprod_typeContext = Tff_xprod_typeContext; +TPTPParser.Txf_tuple_typeContext = Txf_tuple_typeContext; +TPTPParser.Tff_type_listContext = Tff_type_listContext; +TPTPParser.Tff_subtypeContext = Tff_subtypeContext; +TPTPParser.Txf_definitionContext = Txf_definitionContext; +TPTPParser.Txf_sequentContext = Txf_sequentContext; +TPTPParser.Nhf_long_connectiveContext = Nhf_long_connectiveContext; +TPTPParser.Nhf_parameter_listContext = Nhf_parameter_listContext; +TPTPParser.Nhf_parameterContext = Nhf_parameterContext; +TPTPParser.Nhf_key_pairContext = Nhf_key_pairContext; +TPTPParser.Nxf_long_connectiveContext = Nxf_long_connectiveContext; +TPTPParser.Nxf_parameter_listContext = Nxf_parameter_listContext; +TPTPParser.Nxf_parameterContext = Nxf_parameterContext; +TPTPParser.Nxf_key_pairContext = Nxf_key_pairContext; +TPTPParser.Ntf_connective_nameContext = Ntf_connective_nameContext; +TPTPParser.Ntf_defined_connectiveContext = Ntf_defined_connectiveContext; +TPTPParser.Ntf_indexContext = Ntf_indexContext; +TPTPParser.Ntf_short_connectiveContext = Ntf_short_connectiveContext; +TPTPParser.Tcf_formulaContext = Tcf_formulaContext; +TPTPParser.Tcf_logic_formulaContext = Tcf_logic_formulaContext; +TPTPParser.Tcf_quantified_formulaContext = Tcf_quantified_formulaContext; +TPTPParser.Fof_formulaContext = Fof_formulaContext; +TPTPParser.Fof_logic_formulaContext = Fof_logic_formulaContext; +TPTPParser.Fof_binary_formulaContext = Fof_binary_formulaContext; +TPTPParser.Fof_binary_pairContext = Fof_binary_pairContext; +TPTPParser.Fof_binary_listContext = Fof_binary_listContext; +TPTPParser.Fof_or_formulaContext = Fof_or_formulaContext; +TPTPParser.Fof_and_formulaContext = Fof_and_formulaContext; +TPTPParser.Fof_unary_formulaContext = Fof_unary_formulaContext; +TPTPParser.Fof_infix_unaryContext = Fof_infix_unaryContext; +TPTPParser.Fof_unit_formulaContext = Fof_unit_formulaContext; +TPTPParser.Fof_unitary_formulaContext = Fof_unitary_formulaContext; +TPTPParser.Fof_quantified_formulaContext = Fof_quantified_formulaContext; +TPTPParser.Fof_variable_listContext = Fof_variable_listContext; +TPTPParser.Fof_atomic_formulaContext = Fof_atomic_formulaContext; +TPTPParser.Fof_plain_atomic_formulaContext = Fof_plain_atomic_formulaContext; +TPTPParser.Fof_defined_atomic_formulaContext = Fof_defined_atomic_formulaContext; +TPTPParser.Fof_defined_plain_formulaContext = Fof_defined_plain_formulaContext; +TPTPParser.Fof_defined_infix_formulaContext = Fof_defined_infix_formulaContext; +TPTPParser.Fof_system_atomic_formulaContext = Fof_system_atomic_formulaContext; +TPTPParser.Fof_plain_termContext = Fof_plain_termContext; +TPTPParser.Fof_defined_termContext = Fof_defined_termContext; +TPTPParser.Fof_defined_atomic_termContext = Fof_defined_atomic_termContext; +TPTPParser.Fof_defined_plain_termContext = Fof_defined_plain_termContext; +TPTPParser.Fof_system_termContext = Fof_system_termContext; +TPTPParser.Fof_argumentsContext = Fof_argumentsContext; +TPTPParser.Fof_termContext = Fof_termContext; +TPTPParser.Fof_function_termContext = Fof_function_termContext; +TPTPParser.Fof_sequentContext = Fof_sequentContext; +TPTPParser.Fof_formula_tupleContext = Fof_formula_tupleContext; +TPTPParser.Fof_formula_tuple_listContext = Fof_formula_tuple_listContext; +TPTPParser.Comma_fof_logic_formulaContext = Comma_fof_logic_formulaContext; +TPTPParser.Cnf_formulaContext = Cnf_formulaContext; +TPTPParser.Cnf_disjunctionContext = Cnf_disjunctionContext; +TPTPParser.Cnf_literalContext = Cnf_literalContext; +TPTPParser.Thf_quantifierContext = Thf_quantifierContext; +TPTPParser.Thf_unary_connectiveContext = Thf_unary_connectiveContext; +TPTPParser.Th0_quantifierContext = Th0_quantifierContext; +TPTPParser.Type_quantifierContext = Type_quantifierContext; +TPTPParser.Subtype_signContext = Subtype_signContext; +TPTPParser.Tff_unary_connectiveContext = Tff_unary_connectiveContext; +TPTPParser.Tff_quantifierContext = Tff_quantifierContext; +TPTPParser.Fof_quantifierContext = Fof_quantifierContext; +TPTPParser.Nonassoc_connectiveContext = Nonassoc_connectiveContext; +TPTPParser.Assoc_connectiveContext = Assoc_connectiveContext; +TPTPParser.Unary_connectiveContext = Unary_connectiveContext; +TPTPParser.Gentzen_arrowContext = Gentzen_arrowContext; +TPTPParser.AssignmentContext = AssignmentContext; +TPTPParser.IdenticalContext = IdenticalContext; +TPTPParser.Typeable_atomContext = Typeable_atomContext; +TPTPParser.Atomic_typeContext = Atomic_typeContext; +TPTPParser.Type_constantContext = Type_constantContext; +TPTPParser.Type_functorContext = Type_functorContext; +TPTPParser.Defined_typeContext = Defined_typeContext; +TPTPParser.System_typeContext = System_typeContext; +TPTPParser.Defined_infix_predContext = Defined_infix_predContext; +TPTPParser.Infix_equalityContext = Infix_equalityContext; +TPTPParser.Infix_inequalityContext = Infix_inequalityContext; +TPTPParser.ConstantContext = ConstantContext; +TPTPParser.FunctorContext = FunctorContext; +TPTPParser.Defined_constantContext = Defined_constantContext; +TPTPParser.Defined_functorContext = Defined_functorContext; +TPTPParser.System_constantContext = System_constantContext; +TPTPParser.System_functorContext = System_functorContext; +TPTPParser.Th1_defined_termContext = Th1_defined_termContext; +TPTPParser.Defined_termContext = Defined_termContext; +TPTPParser.VariableContext = VariableContext; +TPTPParser.SourceContext = SourceContext; +TPTPParser.SourcesContext = SourcesContext; +TPTPParser.Dag_sourceContext = Dag_sourceContext; +TPTPParser.Inference_recordContext = Inference_recordContext; +TPTPParser.Inference_ruleContext = Inference_ruleContext; +TPTPParser.Internal_sourceContext = Internal_sourceContext; +TPTPParser.Intro_typeContext = Intro_typeContext; +TPTPParser.External_sourceContext = External_sourceContext; +TPTPParser.File_sourceContext = File_sourceContext; +TPTPParser.File_infoContext = File_infoContext; +TPTPParser.ParentsContext = ParentsContext; +TPTPParser.Parent_listContext = Parent_listContext; +TPTPParser.Comma_parent_infoContext = Comma_parent_infoContext; +TPTPParser.Parent_infoContext = Parent_infoContext; +TPTPParser.Parent_detailsContext = Parent_detailsContext; +TPTPParser.Optional_infoContext = Optional_infoContext; +TPTPParser.Useful_infoContext = Useful_infoContext; +TPTPParser.IncludeContext = IncludeContext; +TPTPParser.Include_optionalsContext = Include_optionalsContext; +TPTPParser.Formula_selectionContext = Formula_selectionContext; +TPTPParser.Name_listContext = Name_listContext; +TPTPParser.Space_nameContext = Space_nameContext; +TPTPParser.General_termContext = General_termContext; +TPTPParser.General_dataContext = General_dataContext; +TPTPParser.General_functionContext = General_functionContext; +TPTPParser.Formula_dataContext = Formula_dataContext; +TPTPParser.General_listContext = General_listContext; +TPTPParser.General_termsContext = General_termsContext; +TPTPParser.Comma_general_termContext = Comma_general_termContext; +TPTPParser.NameContext = NameContext; +TPTPParser.Atomic_wordContext = Atomic_wordContext; +TPTPParser.Atomic_defined_wordContext = Atomic_defined_wordContext; +TPTPParser.Atomic_system_wordContext = Atomic_system_wordContext; +TPTPParser.NumberContext = NumberContext; +TPTPParser.File_nameContext = File_nameContext; +TPTPParser.NothingContext = NothingContext; +TPTPParser.Lower_word_tokenContext = Lower_word_tokenContext; diff --git a/tptplus/server/parser/vendor/tptp-antlr/package.json b/tptplus/server/parser/vendor/tptp-antlr/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/tptplus/server/src/parser/tptpAntlrParser.ts b/tptplus/server/src/parser/tptpAntlrParser.ts new file mode 100644 index 0000000..b4a2489 --- /dev/null +++ b/tptplus/server/src/parser/tptpAntlrParser.ts @@ -0,0 +1,195 @@ +import * as path from 'path'; +import { pathToFileURL } from 'url'; +import { + Diagnostic, + DiagnosticSeverity, +} from 'vscode-languageserver/node'; + +export interface TptpAntlrParseSummary { + elapsedMs: number; + syntaxErrorCount: number; +} + +export interface TptpAntlrParseResult { + ok: boolean; + diagnostics: Diagnostic[]; + summary: TptpAntlrParseSummary; +} + +interface AntlrRuntime { + InputStream: new (input: string) => unknown; + CommonTokenStream: new (lexer: unknown) => unknown; +} + +interface TptpAntlrRuntime { + antlr4: AntlrRuntime; + TPTPLexer: new (input: unknown) => AntlrRecognizer; + TPTPParser: new (tokens: unknown) => AntlrRecognizer & { + buildParseTrees: boolean; + tptp_file: () => unknown; + }; +} + +interface AntlrRecognizer { + removeErrorListeners: () => void; + addErrorListener: (listener: AntlrErrorListener) => void; +} + +interface AntlrErrorListener { + syntaxError: ( + recognizer: unknown, + offendingSymbol: AntlrOffendingSymbol | null, + line: number, + column: number, + msg: string, + error: unknown + ) => void; +} + +interface AntlrOffendingSymbol { + text?: string; +} + +interface AntlrSyntaxError { + line: number; + column: number; + message: string; + offendingSymbol: AntlrOffendingSymbol | null; +} + +type NativeImport = (specifier: string) => Promise; + +const nativeImport = new Function('specifier', 'return import(specifier)') as NativeImport; + +const runtimePromises = new Map>(); + +export async function parseTptpDocument( + text: string, + useOptimizedGrammar = true +): Promise { + const startedAt = Date.now(); + const lines = text.split(/\r?\n/); + + try { + const runtime = await loadTptpAntlrRuntime(useOptimizedGrammar); + const syntaxErrors: AntlrSyntaxError[] = []; + const errorListener = createErrorListener(syntaxErrors); + + const chars = new runtime.antlr4.InputStream(text); + const lexer = new runtime.TPTPLexer(chars); + lexer.removeErrorListeners(); + lexer.addErrorListener(errorListener); + + const tokens = new runtime.antlr4.CommonTokenStream(lexer); + const parser = new runtime.TPTPParser(tokens); + parser.buildParseTrees = false; + parser.removeErrorListeners(); + parser.addErrorListener(errorListener); + parser.tptp_file(); + + const diagnostics = syntaxErrors.map(error => toDiagnostic(error, lines)); + return { + ok: diagnostics.length === 0, + diagnostics, + summary: { + elapsedMs: Date.now() - startedAt, + syntaxErrorCount: diagnostics.length, + }, + }; + } catch (error) { + const diagnostic = createRuntimeDiagnostic(error); + return { + ok: false, + diagnostics: [diagnostic], + summary: { + elapsedMs: Date.now() - startedAt, + syntaxErrorCount: 1, + }, + }; + } +} + +async function loadTptpAntlrRuntime(useOptimizedGrammar: boolean): Promise { + let runtimePromise = runtimePromises.get(useOptimizedGrammar); + if (!runtimePromise) { + runtimePromise = loadTptpAntlrRuntimeUncached(useOptimizedGrammar); + runtimePromises.set(useOptimizedGrammar, runtimePromise); + } + return runtimePromise; +} + +async function loadTptpAntlrRuntimeUncached(useOptimizedGrammar: boolean): Promise { + const vendorDir = path.resolve( + __dirname, '..', '..', 'parser', 'vendor', 'tptp-antlr', + useOptimizedGrammar ? 'optimized' : 'original' + ); + const lexerUrl = pathToFileURL(path.join(vendorDir, 'TPTPLexer.js')).href; + const parserUrl = pathToFileURL(path.join(vendorDir, 'TPTPParser.js')).href; + + const antlrModule = await nativeImport<{ default: AntlrRuntime }>('antlr4'); + const lexerModule = await nativeImport<{ default: TptpAntlrRuntime['TPTPLexer'] }>(lexerUrl); + const parserModule = await nativeImport<{ default: TptpAntlrRuntime['TPTPParser'] }>(parserUrl); + + return { + antlr4: antlrModule.default, + TPTPLexer: lexerModule.default, + TPTPParser: parserModule.default, + }; +} + +function createErrorListener(syntaxErrors: AntlrSyntaxError[]): AntlrErrorListener { + return { + syntaxError: ( + _recognizer, + offendingSymbol, + line, + column, + msg, + _error + ) => { + syntaxErrors.push({ + line, + column, + message: msg, + offendingSymbol, + }); + }, + }; +} + +function toDiagnostic(error: AntlrSyntaxError, lines: string[]): Diagnostic { + const line = clamp(error.line - 1, 0, Math.max(lines.length - 1, 0)); + const lineText = lines[line] ?? ''; + const startCharacter = clamp(error.column, 0, lineText.length); + const tokenText = error.offendingSymbol?.text; + const tokenLength = tokenText && tokenText !== '' ? tokenText.length : 1; + const boundedEndCharacter = Math.min(lineText.length, startCharacter + tokenLength); + const endCharacter = boundedEndCharacter > startCharacter ? boundedEndCharacter : startCharacter; + + return { + severity: DiagnosticSeverity.Error, + range: { + start: { line, character: startCharacter }, + end: { line, character: endCharacter }, + }, + message: `TPTP ANTLR parser: ${error.message}`, + source: 'tptp-antlr', + }; +} + +function createRuntimeDiagnostic(error: unknown): Diagnostic { + const message = error instanceof Error ? error.message : String(error); + return { + severity: DiagnosticSeverity.Error, + range: { + start: { line: 0, character: 0 }, + end: { line: 0, character: 1 }, + }, + message: `Unable to run TPTP ANTLR parser: ${message}`, + source: 'tptp-antlr', + }; +} + +function clamp(value: number, min: number, max: number): number { + return Math.min(Math.max(value, min), max); +} diff --git a/tptplus/server/src/parser/tptpAntlrWorker.ts b/tptplus/server/src/parser/tptpAntlrWorker.ts new file mode 100644 index 0000000..fdb7c16 --- /dev/null +++ b/tptplus/server/src/parser/tptpAntlrWorker.ts @@ -0,0 +1,12 @@ +import { parentPort, workerData } from 'worker_threads'; + +import { parseTptpDocument } from './tptpAntlrParser'; +import type { TptpAntlrWorkerData } from './tptpAntlrWorkerRunner'; + +if (!parentPort) { + throw new Error('The ANTLR parser worker must run in a worker thread.'); +} + +const port = parentPort; +const { text, useOptimizedGrammar } = workerData as TptpAntlrWorkerData; +void parseTptpDocument(text, useOptimizedGrammar).then(result => port.postMessage(result)); diff --git a/tptplus/server/src/parser/tptpAntlrWorkerRunner.ts b/tptplus/server/src/parser/tptpAntlrWorkerRunner.ts new file mode 100644 index 0000000..7defe80 --- /dev/null +++ b/tptplus/server/src/parser/tptpAntlrWorkerRunner.ts @@ -0,0 +1,69 @@ +import * as path from 'path'; +import { Worker } from 'worker_threads'; +import { + CancellationToken, + Disposable, + LSPErrorCodes, + ResponseError, +} from 'vscode-languageserver/node'; + +import type { TptpAntlrParseResult } from './tptpAntlrParser'; + +export interface TptpAntlrWorkerData { + text: string; + useOptimizedGrammar: boolean; +} + +function cancelled(): ResponseError { + return new ResponseError(LSPErrorCodes.RequestCancelled, 'ANTLR parse cancelled.'); +} + +/** Runs CPU-bound parsing off the server thread, with cancellation and no deadline. */ +export function parseTptpDocumentInWorker( + text: string, + token: CancellationToken, + useOptimizedGrammar = true +): Promise { + if (token.isCancellationRequested) { + return Promise.reject(cancelled()); + } + + return new Promise((resolve, reject) => { + const data: TptpAntlrWorkerData = { text, useOptimizedGrammar }; + const worker = new Worker(path.join(__dirname, 'tptpAntlrWorker.js'), { + workerData: data, + }); + let settled = false; + let cancellation: Disposable | undefined; + + const finish = (complete: () => void): void => { + if (settled) { + return; + } + settled = true; + cancellation?.dispose(); + // Termination interrupts synchronous ANTLR work; a message to the worker + // could only be handled after parsing finishes. Wait for it to exit before + // settling the request, including on success and failure. + void worker.terminate().then(complete, reject); + }; + + worker.once('message', (result: TptpAntlrParseResult) => { + if (token.isCancellationRequested) { + finish(() => reject(cancelled())); + } else { + finish(() => resolve(result)); + } + }); + worker.once('error', error => finish(() => reject(error))); + worker.once('exit', code => { + finish(() => reject(new Error( + `ANTLR parser worker exited without returning a result (code ${code}).` + ))); + }); + cancellation = token.onCancellationRequested(() => finish(() => reject(cancelled()))); + if (token.isCancellationRequested) { + finish(() => reject(cancelled())); + } + }); +} diff --git a/tptplus/server/src/server.ts b/tptplus/server/src/server.ts index d9f32f2..d8f8966 100644 --- a/tptplus/server/src/server.ts +++ b/tptplus/server/src/server.ts @@ -12,12 +12,16 @@ import { TextDocumentPositionParams, TextDocumentSyncKind, InitializeResult, + CancellationToken, } from 'vscode-languageserver/node'; import { TextDocument } from 'vscode-languageserver-textdocument'; +import type { TptpAntlrParseResult } from './parser/tptpAntlrParser'; +import { parseTptpDocumentInWorker } from './parser/tptpAntlrWorkerRunner'; + // Create connection and document manager const connection = createConnection(ProposedFeatures.all); const documents: TextDocuments = new TextDocuments(TextDocument); @@ -440,6 +444,41 @@ async function validateTextDocument(textDocument: TextDocument): Promise { connection.sendDiagnostics({ uri: textDocument.uri, diagnostics }); } +interface ParseWithAntlrParams { + uri: string; + useOptimizedGrammar?: boolean; +} + +connection.onRequest( + 'tptp/parseWithAntlr', + async ( + params: ParseWithAntlrParams, + token: CancellationToken + ): Promise => { + const document = documents.get(params.uri); + if (!document) { + return { + ok: false, + diagnostics: [{ + severity: DiagnosticSeverity.Error, + range: { + start: { line: 0, character: 0 }, + end: { line: 0, character: 1 }, + }, + message: 'Unable to parse with TPTP ANTLR parser: document is not open in the language server', + source: 'tptp-antlr', + }], + summary: { + elapsedMs: 0, + syntaxErrorCount: 1, + }, + }; + } + + return parseTptpDocumentInWorker(document.getText(), token, params.useOptimizedGrammar); + } +); + // Basic completion support connection.onCompletion( (_textDocumentPosition: TextDocumentPositionParams): CompletionItem[] => { diff --git a/tptplus/server/test/tptpAntlrParser.test.js b/tptplus/server/test/tptpAntlrParser.test.js new file mode 100644 index 0000000..50b0e7c --- /dev/null +++ b/tptplus/server/test/tptpAntlrParser.test.js @@ -0,0 +1,120 @@ +const assert = require('node:assert/strict'); +const test = require('node:test'); + +const { parseTptpDocument } = require('../out/parser/tptpAntlrParser'); + +test('loads and caches the requested parser independently for each grammar', async () => { + const { default: OriginalParser } = await import('../parser/vendor/tptp-antlr/original/TPTPParser.js'); + const { default: OptimizedParser } = await import('../parser/vendor/tptp-antlr/optimized/TPTPParser.js'); + const calls = []; + const original = OriginalParser.prototype.tptp_file; + const optimized = OptimizedParser.prototype.tptp_file; + OriginalParser.prototype.tptp_file = function () { + calls.push('original'); + return original.call(this); + }; + OptimizedParser.prototype.tptp_file = function () { + calls.push('optimized'); + return optimized.call(this); + }; + + try { + for (const useOptimizedGrammar of [true, false, true, false]) { + const result = await parseTptpDocument('tff(a,axiom,(p => q)).', useOptimizedGrammar); + assert.equal(result.ok, true, JSON.stringify(result.diagnostics)); + } + assert.deepEqual(calls, ['optimized', 'original', 'optimized', 'original']); + } finally { + OriginalParser.prototype.tptp_file = original; + OptimizedParser.prototype.tptp_file = optimized; + } +}); + +test('accepts the DAT016_1 conjecture with integer arithmetic and nested quantifiers', async () => { + const result = await parseTptpDocument(` +% Includes axioms for arrays +include('Axioms/DAT001_0.ax'). +tff(co1,conjecture, + ! [U: array] : + ( ! [V: $int] : + ( ( $lesseq(20,V) + & $lesseq(V,30) ) + => ( read(U,V) = $sum($product(2,V),3) ) ) + => ? [W: $int] : ( read(U,W) = 53 ) ) ). +`); + + assert.equal(result.ok, true, JSON.stringify(result.diagnostics)); + assert.equal(result.summary.syntaxErrorCount, 0); + assert.deepEqual(result.diagnostics, []); +}); + +test('reports a missing arithmetic argument at its source line', async () => { + const result = await parseTptpDocument('% invalid formula\ntff(bad,axiom,$less(20,)).\n'); + + assert.equal(result.ok, false); + assert.ok(result.summary.syntaxErrorCount > 0); + assert.equal(result.summary.syntaxErrorCount, result.diagnostics.length); + assert.equal(result.diagnostics[0].source, 'tptp-antlr'); + assert.equal(result.diagnostics[0].range.start.line, 1); + assert.match(result.diagnostics[0].message, /^TPTP ANTLR parser:/); +}); + +test('rejects invalid input after a complete formula', async () => { + const result = await parseTptpDocument('fof(valid,axiom,p).\n@\n'); + + assert.equal(result.ok, false); + assert.ok(result.summary.syntaxErrorCount > 0); + assert.equal(result.diagnostics[0].range.start.line, 1); +}); + +test('accepts TFF constructs preserved by the factoring pass', async t => { + for (const formula of [ + 'X', + '1 = 2', + '1 != 2', + '[] = [p,q]', + '(p & q) = r', + 'p = (~q)', + 'f(p & q)', + 'f(! [X:$i] : p(X))', + 'p == q', + '([p] --> [q])', + 'p & q & r', + 'p | q | r', + '! [X:$i] : p(X) & q', + '[.] p', + ]) { + await t.test(formula, async () => { + const result = await parseTptpDocument(`tff(a,axiom,(${formula})).`); + + assert.equal(result.ok, true, JSON.stringify(result.diagnostics)); + assert.equal(result.summary.syntaxErrorCount, 0); + assert.deepEqual(result.diagnostics, []); + }); + } +}); + +test('rejects invalid TFF operands and connective scopes after factoring', async t => { + for (const formula of [ + '1', + '[]', + 'p | q & r', + 'p => q => r', + 'p = q = r', + 'p = ~q', + '~p = q', + 'X == q', + '(p) == q', + ]) { + await t.test(formula, async () => { + const result = await parseTptpDocument(`tff(a,axiom,(${formula})).`); + + assert.equal(result.ok, false, formula); + assert.ok(result.summary.syntaxErrorCount > 0); + assert.equal(result.summary.syntaxErrorCount, result.diagnostics.length); + for (const diagnostic of result.diagnostics) { + assert.match(diagnostic.message, /^TPTP ANTLR parser:/); + } + }); + } +}); diff --git a/tptplus/server/test/tptpAntlrWorkerRunner.test.js b/tptplus/server/test/tptpAntlrWorkerRunner.test.js new file mode 100644 index 0000000..bc27d77 --- /dev/null +++ b/tptplus/server/test/tptpAntlrWorkerRunner.test.js @@ -0,0 +1,130 @@ +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const test = require('node:test'); +const { setTimeout: delay } = require('node:timers/promises'); +const vm = require('node:vm'); +const { Worker } = require('node:worker_threads'); +const { + CancellationToken, + CancellationTokenSource, + LSPErrorCodes, +} = require('vscode-languageserver/node'); + +const { parseTptpDocumentInWorker } = require('../out/parser/tptpAntlrWorkerRunner'); + +test('parses valid text in a worker', async () => { + const result = await parseTptpDocumentInWorker('fof(valid,axiom,p).', CancellationToken.None); + + assert.equal(result.ok, true, JSON.stringify(result.diagnostics)); + assert.deepEqual(result.diagnostics, []); + assert.equal(result.summary.syntaxErrorCount, 0); +}); + +test('returns source diagnostics from the worker', async () => { + const result = await parseTptpDocumentInWorker( + '% invalid formula\ntff(bad,axiom,$less(20,)).\n', + CancellationToken.None + ); + + assert.equal(result.ok, false); + assert.equal(result.summary.syntaxErrorCount, result.diagnostics.length); + assert.equal(result.diagnostics[0].range.start.line, 1); + assert.equal(result.diagnostics[0].source, 'tptp-antlr'); + assert.match(result.diagnostics[0].message, /^TPTP ANTLR parser:/); +}); + +test('runs either grammar in the worker and reports syntax errors', async t => { + for (const useOptimizedGrammar of [true, false]) { + await t.test(useOptimizedGrammar ? 'optimized' : 'original', async () => { + const result = await parseTptpDocumentInWorker( + 'tff(a,axiom,(p => q)).', CancellationToken.None, useOptimizedGrammar + ); + assert.equal(result.ok, true, JSON.stringify(result.diagnostics)); + assert.deepEqual(result.diagnostics, []); + + const malformed = await parseTptpDocumentInWorker( + '% invalid formula\ntff(a,axiom,1).', CancellationToken.None, useOptimizedGrammar + ); + assert.equal(malformed.ok, false); + assert.ok(malformed.summary.syntaxErrorCount > 0); + assert.equal(malformed.diagnostics[0].range.start.line, 1); + assert.match(malformed.diagnostics[0].message, /^TPTP ANTLR parser:/); + }); + } +}); + +test('rejects an already cancelled request without parsing', async () => { + await assert.rejects( + parseTptpDocumentInWorker('fof(valid,axiom,p).', CancellationToken.Cancelled), + error => error.code === LSPErrorCodes.RequestCancelled + ); +}); + +test('parses deeply nested TFF implications in a worker', { timeout: 10000 }, async t => { + const source = new CancellationTokenSource(); + t.after(() => { + source.cancel(); + source.dispose(); + }); + const text = 'tff(nested,axiom,' + '(p => '.repeat(107) + 'q' + ')'.repeat(107) + ').'; + const result = await parseTptpDocumentInWorker(text, source.token); + + assert.equal(result.ok, true, JSON.stringify(result.diagnostics)); + assert.equal(result.summary.syntaxErrorCount, 0); + assert.deepEqual(result.diagnostics, []); + + const malformed = await parseTptpDocumentInWorker(text.slice(0, -1), source.token); + assert.equal(malformed.ok, false); + assert.ok(malformed.summary.syntaxErrorCount > 0); + assert.match(malformed.diagnostics[0].message, /^TPTP ANTLR parser:/); +}); + +test('keeps the server event loop responsive and terminates a cancelled parse', { timeout: 10000 }, async () => { + // Use a busy real worker so cancellation never depends on grammar performance. + let markStarted; + const started = new Promise(resolve => { markStarted = resolve; }); + let workerData; + class BusyWorker extends Worker { + constructor(_filename, options) { + super('while (true) {}', { eval: true }); + workerData = options.workerData; + this.once('online', markStarted); + } + } + const filename = require.resolve('../out/parser/tptpAntlrWorkerRunner'); + const module = { exports: {} }; + vm.runInNewContext(fs.readFileSync(filename, 'utf8'), { + exports: module.exports, + module, + __dirname: path.dirname(filename), + require(id) { + return id === 'worker_threads' ? { Worker: BusyWorker } : require(id); + }, + }, { filename }); + + const source = new CancellationTokenSource(); + let settled = false; + const parsing = module.exports.parseTptpDocumentInWorker('fof(valid,axiom,p).', source.token, false); + const cancelled = assert.rejects(parsing, error => { + assert.equal(error.code, LSPErrorCodes.RequestCancelled); + return true; + }); + void parsing.then(() => { settled = true; }, () => { settled = true; }); + + try { + await started; + // This timer must run while the worker is busy with synchronous work. + await delay(20); + assert.equal(settled, false); + assert.equal(workerData.text, 'fof(valid,axiom,p).'); + assert.equal(workerData.useOptimizedGrammar, false); + } finally { + source.cancel(); + await cancelled; + source.dispose(); + } + + const result = await parseTptpDocumentInWorker('fof(next,axiom,q).', CancellationToken.None); + assert.equal(result.ok, true); +});