From 460fab2a73790acc4a9497402363b672d5490200 Mon Sep 17 00:00:00 2001 From: jzxia Date: Tue, 14 Jul 2026 21:03:55 +0800 Subject: [PATCH] experiment: Add experimental TPTP ANTLR parser command --- tptplus/client/src/antlrParser/command.ts | 107 + tptplus/client/src/antlrParser/diagnostics.ts | 34 + tptplus/client/src/antlrParser/types.ts | 25 + tptplus/client/src/extension.ts | 4 +- tptplus/package.json | 16 +- tptplus/server/package-lock.json | 10 + tptplus/server/package.json | 3 +- .../parser/vendor/tptp-antlr/TPTPLexer.js | 430 + .../parser/vendor/tptp-antlr/TPTPListener.js | 2079 ++ .../parser/vendor/tptp-antlr/TPTPParser.js | 19418 ++++++++++++++++ .../parser/vendor/tptp-antlr/VENDORED.md | 52 + .../parser/vendor/tptp-antlr/package.json | 3 + tptplus/server/src/parser/tptpAntlrParser.ts | 185 + tptplus/server/src/server.ts | 36 + 14 files changed, 22399 insertions(+), 3 deletions(-) create mode 100644 tptplus/client/src/antlrParser/command.ts create mode 100644 tptplus/client/src/antlrParser/diagnostics.ts create mode 100644 tptplus/client/src/antlrParser/types.ts create mode 100644 tptplus/server/parser/vendor/tptp-antlr/TPTPLexer.js create mode 100644 tptplus/server/parser/vendor/tptp-antlr/TPTPListener.js create mode 100644 tptplus/server/parser/vendor/tptp-antlr/TPTPParser.js create mode 100644 tptplus/server/parser/vendor/tptp-antlr/VENDORED.md create mode 100644 tptplus/server/parser/vendor/tptp-antlr/package.json create mode 100644 tptplus/server/src/parser/tptpAntlrParser.ts diff --git a/tptplus/client/src/antlrParser/command.ts b/tptplus/client/src/antlrParser/command.ts new file mode 100644 index 0000000..6df9633 --- /dev/null +++ b/tptplus/client/src/antlrParser/command.ts @@ -0,0 +1,107 @@ +import * as vscode from 'vscode'; +import type { LanguageClient } from 'vscode-languageclient/node'; + +import { toVsCodeDiagnostic } from './diagnostics'; +import type { ExperimentalParseWithAntlrResult } from './types'; + +const ANTLR_PARSE_COMMAND = 'tptp.experimentalParseWithAntlr'; +const ANTLR_PARSE_REQUEST = 'tptp/experimentalParseWithAntlr'; + +function writeTptpAntlrParseLog( + output: vscode.OutputChannel, + document: vscode.TextDocument, + result: ExperimentalParseWithAntlrResult +): void { + output.appendLine(`[${new Date().toISOString()}] ${document.uri.fsPath}`); + 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 { + return async (): Promise => { + const editor = vscode.window.activeTextEditor; + if (!editor || editor.document.languageId !== 'tptp') { + vscode.window.showErrorMessage('No active TPTP file open'); + return; + } + + if (editor.document.uri.scheme !== 'file') { + vscode.window.showErrorMessage( + 'The experimental TPTP ANTLR parser currently supports file-backed TPTP documents only.' + ); + return; + } + + try { + await clientReady; + const result = await client.sendRequest( + ANTLR_PARSE_REQUEST, + { uri: editor.document.uri.toString() } + ); + + diagnostics.set( + editor.document.uri, + result.diagnostics.map(toVsCodeDiagnostic) + ); + writeTptpAntlrParseLog(output, editor.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).` + ); + output.show(true); + } + } 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}`); + } + }; +} + +/** Registers the experimental ANTLR parser command and its diagnostic lifecycle. */ +export function registerAntlrParserCommand( + client: LanguageClient, + clientReady: Promise +): vscode.Disposable { + const diagnostics = vscode.languages.createDiagnosticCollection('tptpAntlrExperimental'); + 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..5f8cd13 --- /dev/null +++ b/tptplus/client/src/antlrParser/diagnostics.ts @@ -0,0 +1,34 @@ +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; +} diff --git a/tptplus/client/src/antlrParser/types.ts b/tptplus/client/src/antlrParser/types.ts new file mode 100644 index 0000000..f8fd2f2 --- /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 ExperimentalParseWithAntlrResult { + 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/package.json b/tptplus/package.json index 85441dc..7d9515e 100644 --- a/tptplus/package.json +++ b/tptplus/package.json @@ -68,6 +68,14 @@ "dark": "./images/icons/Type.png" } }, + { + "command": "tptp.experimentalParseWithAntlr", + "title": "TPTP: Experimental Parse with ANTLR", + "icon": { + "light": "./images/icons/Syntax.png", + "dark": "./images/icons/Syntax.png" + } + }, { "command": "tptp.proveProblem", "title": "TPTP: Prove Problem" @@ -101,9 +109,14 @@ "group": "navigation@1" }, { - "command": "tptp.typeCheck", + "command": "tptp.experimentalParseWithAntlr", "when": "editorLangId == tptp", "group": "navigation@2" + }, + { + "command": "tptp.typeCheck", + "when": "editorLangId == tptp", + "group": "navigation@3" } ], "editor/context": [ @@ -174,6 +187,7 @@ "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 ..", 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/TPTPLexer.js b/tptplus/server/parser/vendor/tptp-antlr/TPTPLexer.js new file mode 100644 index 0000000..a3dc73a --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/TPTPLexer.js @@ -0,0 +1,430 @@ +// Generated from ANTLRGrammar/TPTP.g4 by ANTLR 4.13.2 +// jshint ignore: start +import antlr4 from 'antlr4'; + + +const serializedATN = [4,0,108,718,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,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,1,0,1,0, +1,0,1,0,1,0,1,1,1,1,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4, +1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,8,1,8,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,16,1,17,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,20,1, +21,1,21,1,21,1,21,1,22,1,22,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,25, +1,25,1,26,1,26,1,27,1,27,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,32,1,32,1,32,1,33,1,33,1,34,1,34,1,34,1,34,1,35,1,35,1,35, +1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1, +40,1,40,1,40,1,41,1,41,1,41,1,42,1,42,1,43,1,43,1,43,1,44,1,44,1,44,1,45, +1,45,1,45,1,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,49,1, +49,1,49,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50, +1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1, +51,1,52,1,52,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53, +1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1,55,1,55,1, +55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57,1,57, +1,57,1,58,1,58,1,58,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,59,1,59,1,60,1, +60,1,60,1,60,1,60,1,60,1,61,4,61,483,8,61,11,61,12,61,484,1,61,1,61,1,62, +1,62,5,62,491,8,62,10,62,12,62,494,9,62,1,62,1,62,1,63,1,63,1,63,1,63,5, +63,502,8,63,10,63,12,63,505,9,63,1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64, +5,64,515,8,64,10,64,12,64,518,9,64,1,64,1,64,1,65,1,65,1,65,1,66,1,66,5, +66,527,8,66,10,66,12,66,530,9,66,1,66,1,66,1,67,1,67,5,67,536,8,67,10,67, +12,67,539,9,67,1,68,1,68,1,68,5,68,544,8,68,10,68,12,68,547,9,68,1,69,1, +69,5,69,551,8,69,10,69,12,69,554,9,69,1,70,1,70,5,70,558,8,70,10,70,12,70, +561,9,70,1,71,1,71,3,71,565,8,71,1,72,1,72,1,72,1,73,1,73,3,73,572,8,73, +1,74,1,74,3,74,576,8,74,1,74,1,74,1,74,1,75,1,75,1,75,1,75,1,76,1,76,3,76, +587,8,76,1,77,1,77,1,77,1,78,1,78,3,78,594,8,78,1,79,1,79,1,79,1,80,1,80, +1,80,1,80,1,81,1,81,3,81,605,8,81,1,82,1,82,1,82,1,83,1,83,3,83,612,8,83, +1,84,1,84,5,84,616,8,84,10,84,12,84,619,9,84,1,85,1,85,5,85,623,8,85,10, +85,12,85,626,9,85,1,86,1,86,1,87,1,87,1,88,1,88,1,89,1,89,1,90,1,90,1,91, +1,91,1,92,1,92,1,93,1,93,1,94,5,94,645,8,94,10,94,12,94,648,9,94,1,94,1, +94,1,94,1,94,5,94,654,8,94,10,94,12,94,657,9,94,1,95,1,95,1,96,1,96,1,97, +1,97,1,97,3,97,666,8,97,1,98,1,98,1,99,1,99,1,100,1,100,1,100,1,100,1,100, +3,100,677,8,100,1,101,1,101,1,102,1,102,1,103,1,103,1,104,1,104,1,105,1, +105,1,105,1,106,1,106,1,107,1,107,1,108,1,108,1,109,1,109,1,110,1,110,1, +111,1,111,1,112,1,112,3,112,704,8,112,1,113,1,113,1,113,1,113,3,113,710, +8,113,1,114,1,114,1,115,1,115,1,116,1,116,1,116,1,503,0,117,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,61,123,62,125,63, +127,64,129,65,131,66,133,67,135,68,137,69,139,70,141,71,143,72,145,73,147, +74,149,75,151,76,153,77,155,78,157,79,159,80,161,81,163,82,165,83,167,84, +169,85,171,86,173,87,175,88,177,89,179,90,181,91,183,92,185,93,187,94,189, +95,191,96,193,97,195,0,197,98,199,99,201,0,203,0,205,100,207,0,209,101,211, +102,213,103,215,0,217,0,219,0,221,0,223,104,225,105,227,0,229,106,231,107, +233,108,1,0,22,3,0,9,10,13,13,32,32,2,0,10,10,13,13,1,0,124,124,1,0,42,42, +2,0,42,42,47,47,1,0,37,37,1,0,34,34,3,0,32,33,35,91,93,126,2,0,34,34,92, +92,1,0,96,96,3,0,32,38,40,91,93,126,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,735,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,121,1,0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0, +0,0,0,131,1,0,0,0,0,133,1,0,0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0, +0,0,141,1,0,0,0,0,143,1,0,0,0,0,145,1,0,0,0,0,147,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,169,1,0,0,0,0,171, +1,0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0,181,1, +0,0,0,0,183,1,0,0,0,0,185,1,0,0,0,0,187,1,0,0,0,0,189,1,0,0,0,0,191,1,0, +0,0,0,193,1,0,0,0,0,197,1,0,0,0,0,199,1,0,0,0,0,205,1,0,0,0,0,209,1,0,0, +0,0,211,1,0,0,0,0,213,1,0,0,0,0,223,1,0,0,0,0,225,1,0,0,0,0,229,1,0,0,0, +0,231,1,0,0,0,0,233,1,0,0,0,1,235,1,0,0,0,3,240,1,0,0,0,5,242,1,0,0,0,7, +245,1,0,0,0,9,250,1,0,0,0,11,255,1,0,0,0,13,260,1,0,0,0,15,265,1,0,0,0,17, +270,1,0,0,0,19,272,1,0,0,0,21,274,1,0,0,0,23,276,1,0,0,0,25,278,1,0,0,0, +27,280,1,0,0,0,29,282,1,0,0,0,31,284,1,0,0,0,33,286,1,0,0,0,35,292,1,0,0, +0,37,295,1,0,0,0,39,297,1,0,0,0,41,299,1,0,0,0,43,302,1,0,0,0,45,306,1,0, +0,0,47,308,1,0,0,0,49,312,1,0,0,0,51,316,1,0,0,0,53,318,1,0,0,0,55,320,1, +0,0,0,57,322,1,0,0,0,59,325,1,0,0,0,61,328,1,0,0,0,63,331,1,0,0,0,65,334, +1,0,0,0,67,337,1,0,0,0,69,339,1,0,0,0,71,343,1,0,0,0,73,346,1,0,0,0,75,349, +1,0,0,0,77,353,1,0,0,0,79,356,1,0,0,0,81,360,1,0,0,0,83,363,1,0,0,0,85,366, +1,0,0,0,87,368,1,0,0,0,89,371,1,0,0,0,91,374,1,0,0,0,93,377,1,0,0,0,95,381, +1,0,0,0,97,385,1,0,0,0,99,388,1,0,0,0,101,396,1,0,0,0,103,407,1,0,0,0,105, +419,1,0,0,0,107,425,1,0,0,0,109,433,1,0,0,0,111,442,1,0,0,0,113,451,1,0, +0,0,115,457,1,0,0,0,117,463,1,0,0,0,119,469,1,0,0,0,121,475,1,0,0,0,123, +482,1,0,0,0,125,488,1,0,0,0,127,497,1,0,0,0,129,511,1,0,0,0,131,521,1,0, +0,0,133,524,1,0,0,0,135,533,1,0,0,0,137,540,1,0,0,0,139,548,1,0,0,0,141, +555,1,0,0,0,143,564,1,0,0,0,145,566,1,0,0,0,147,571,1,0,0,0,149,575,1,0, +0,0,151,580,1,0,0,0,153,586,1,0,0,0,155,588,1,0,0,0,157,593,1,0,0,0,159, +595,1,0,0,0,161,598,1,0,0,0,163,604,1,0,0,0,165,606,1,0,0,0,167,611,1,0, +0,0,169,613,1,0,0,0,171,620,1,0,0,0,173,627,1,0,0,0,175,629,1,0,0,0,177, +631,1,0,0,0,179,633,1,0,0,0,181,635,1,0,0,0,183,637,1,0,0,0,185,639,1,0, +0,0,187,641,1,0,0,0,189,646,1,0,0,0,191,658,1,0,0,0,193,660,1,0,0,0,195, +665,1,0,0,0,197,667,1,0,0,0,199,669,1,0,0,0,201,676,1,0,0,0,203,678,1,0, +0,0,205,680,1,0,0,0,207,682,1,0,0,0,209,684,1,0,0,0,211,686,1,0,0,0,213, +689,1,0,0,0,215,691,1,0,0,0,217,693,1,0,0,0,219,695,1,0,0,0,221,697,1,0, +0,0,223,699,1,0,0,0,225,703,1,0,0,0,227,709,1,0,0,0,229,711,1,0,0,0,231, +713,1,0,0,0,233,715,1,0,0,0,235,236,5,116,0,0,236,237,5,112,0,0,237,238, +5,105,0,0,238,239,5,40,0,0,239,2,1,0,0,0,240,241,5,44,0,0,241,4,1,0,0,0, +242,243,5,41,0,0,243,244,5,46,0,0,244,6,1,0,0,0,245,246,5,116,0,0,246,247, +5,104,0,0,247,248,5,102,0,0,248,249,5,40,0,0,249,8,1,0,0,0,250,251,5,116, +0,0,251,252,5,102,0,0,252,253,5,102,0,0,253,254,5,40,0,0,254,10,1,0,0,0, +255,256,5,116,0,0,256,257,5,99,0,0,257,258,5,102,0,0,258,259,5,40,0,0,259, +12,1,0,0,0,260,261,5,102,0,0,261,262,5,111,0,0,262,263,5,102,0,0,263,264, +5,40,0,0,264,14,1,0,0,0,265,266,5,99,0,0,266,267,5,110,0,0,267,268,5,102, +0,0,268,269,5,40,0,0,269,16,1,0,0,0,270,271,5,45,0,0,271,18,1,0,0,0,272, +273,5,38,0,0,273,20,1,0,0,0,274,275,5,64,0,0,275,22,1,0,0,0,276,277,5,40, +0,0,277,24,1,0,0,0,278,279,5,41,0,0,279,26,1,0,0,0,280,281,5,91,0,0,281, +28,1,0,0,0,282,283,5,93,0,0,283,30,1,0,0,0,284,285,5,58,0,0,285,32,1,0,0, +0,286,287,5,36,0,0,287,288,5,108,0,0,288,289,5,101,0,0,289,290,5,116,0,0, +290,291,5,40,0,0,291,34,1,0,0,0,292,293,5,91,0,0,293,294,5,93,0,0,294,36, +1,0,0,0,295,296,5,123,0,0,296,38,1,0,0,0,297,298,5,125,0,0,298,40,1,0,0, +0,299,300,5,41,0,0,300,301,5,125,0,0,301,42,1,0,0,0,302,303,5,91,0,0,303, +304,5,46,0,0,304,305,5,93,0,0,305,44,1,0,0,0,306,307,5,46,0,0,307,46,1,0, +0,0,308,309,5,123,0,0,309,310,5,46,0,0,310,311,5,125,0,0,311,48,1,0,0,0, +312,313,5,40,0,0,313,314,5,46,0,0,314,315,5,41,0,0,315,50,1,0,0,0,316,317, +5,33,0,0,317,52,1,0,0,0,318,319,5,126,0,0,319,54,1,0,0,0,320,321,5,94,0, +0,321,56,1,0,0,0,322,323,5,64,0,0,323,324,5,43,0,0,324,58,1,0,0,0,325,326, +5,64,0,0,326,327,5,45,0,0,327,60,1,0,0,0,328,329,5,33,0,0,329,330,5,62,0, +0,330,62,1,0,0,0,331,332,5,63,0,0,332,333,5,42,0,0,333,64,1,0,0,0,334,335, +5,60,0,0,335,336,5,60,0,0,336,66,1,0,0,0,337,338,5,63,0,0,338,68,1,0,0,0, +339,340,5,60,0,0,340,341,5,61,0,0,341,342,5,62,0,0,342,70,1,0,0,0,343,344, +5,61,0,0,344,345,5,62,0,0,345,72,1,0,0,0,346,347,5,60,0,0,347,348,5,61,0, +0,348,74,1,0,0,0,349,350,5,60,0,0,350,351,5,126,0,0,351,352,5,62,0,0,352, +76,1,0,0,0,353,354,5,126,0,0,354,355,5,38,0,0,355,78,1,0,0,0,356,357,5,45, +0,0,357,358,5,45,0,0,358,359,5,62,0,0,359,80,1,0,0,0,360,361,5,58,0,0,361, +362,5,61,0,0,362,82,1,0,0,0,363,364,5,61,0,0,364,365,5,61,0,0,365,84,1,0, +0,0,366,367,5,61,0,0,367,86,1,0,0,0,368,369,5,33,0,0,369,370,5,61,0,0,370, +88,1,0,0,0,371,372,5,33,0,0,372,373,5,33,0,0,373,90,1,0,0,0,374,375,5,63, +0,0,375,376,5,63,0,0,376,92,1,0,0,0,377,378,5,64,0,0,378,379,5,64,0,0,379, +380,5,43,0,0,380,94,1,0,0,0,381,382,5,64,0,0,382,383,5,64,0,0,383,384,5, +45,0,0,384,96,1,0,0,0,385,386,5,64,0,0,386,387,5,61,0,0,387,98,1,0,0,0,388, +389,5,117,0,0,389,390,5,110,0,0,390,391,5,107,0,0,391,392,5,110,0,0,392, +393,5,111,0,0,393,394,5,119,0,0,394,395,5,110,0,0,395,100,1,0,0,0,396,397, +5,105,0,0,397,398,5,110,0,0,398,399,5,102,0,0,399,400,5,101,0,0,400,401, +5,114,0,0,401,402,5,101,0,0,402,403,5,110,0,0,403,404,5,99,0,0,404,405,5, +101,0,0,405,406,5,40,0,0,406,102,1,0,0,0,407,408,5,105,0,0,408,409,5,110, +0,0,409,410,5,116,0,0,410,411,5,114,0,0,411,412,5,111,0,0,412,413,5,100, +0,0,413,414,5,117,0,0,414,415,5,99,0,0,415,416,5,101,0,0,416,417,5,100,0, +0,417,418,5,40,0,0,418,104,1,0,0,0,419,420,5,102,0,0,420,421,5,105,0,0,421, +422,5,108,0,0,422,423,5,101,0,0,423,424,5,40,0,0,424,106,1,0,0,0,425,426, +5,116,0,0,426,427,5,104,0,0,427,428,5,101,0,0,428,429,5,111,0,0,429,430, +5,114,0,0,430,431,5,121,0,0,431,432,5,40,0,0,432,108,1,0,0,0,433,434,5,99, +0,0,434,435,5,114,0,0,435,436,5,101,0,0,436,437,5,97,0,0,437,438,5,116,0, +0,438,439,5,111,0,0,439,440,5,114,0,0,440,441,5,40,0,0,441,110,1,0,0,0,442, +443,5,105,0,0,443,444,5,110,0,0,444,445,5,99,0,0,445,446,5,108,0,0,446,447, +5,117,0,0,447,448,5,100,0,0,448,449,5,101,0,0,449,450,5,40,0,0,450,112,1, +0,0,0,451,452,5,36,0,0,452,453,5,116,0,0,453,454,5,104,0,0,454,455,5,102, +0,0,455,456,5,40,0,0,456,114,1,0,0,0,457,458,5,36,0,0,458,459,5,116,0,0, +459,460,5,102,0,0,460,461,5,102,0,0,461,462,5,40,0,0,462,116,1,0,0,0,463, +464,5,36,0,0,464,465,5,102,0,0,465,466,5,111,0,0,466,467,5,102,0,0,467,468, +5,40,0,0,468,118,1,0,0,0,469,470,5,36,0,0,470,471,5,99,0,0,471,472,5,110, +0,0,472,473,5,102,0,0,473,474,5,40,0,0,474,120,1,0,0,0,475,476,5,36,0,0, +476,477,5,102,0,0,477,478,5,111,0,0,478,479,5,116,0,0,479,480,5,40,0,0,480, +122,1,0,0,0,481,483,7,0,0,0,482,481,1,0,0,0,483,484,1,0,0,0,484,482,1,0, +0,0,484,485,1,0,0,0,485,486,1,0,0,0,486,487,6,61,0,0,487,124,1,0,0,0,488, +492,5,37,0,0,489,491,8,1,0,0,490,489,1,0,0,0,491,494,1,0,0,0,492,490,1,0, +0,0,492,493,1,0,0,0,493,495,1,0,0,0,494,492,1,0,0,0,495,496,6,62,0,0,496, +126,1,0,0,0,497,498,5,47,0,0,498,499,5,42,0,0,499,503,1,0,0,0,500,502,9, +0,0,0,501,500,1,0,0,0,502,505,1,0,0,0,503,504,1,0,0,0,503,501,1,0,0,0,504, +506,1,0,0,0,505,503,1,0,0,0,506,507,5,42,0,0,507,508,5,47,0,0,508,509,1, +0,0,0,509,510,6,63,0,0,510,128,1,0,0,0,511,512,3,197,98,0,512,516,3,201, +100,0,513,515,3,201,100,0,514,513,1,0,0,0,515,518,1,0,0,0,516,514,1,0,0, +0,516,517,1,0,0,0,517,519,1,0,0,0,518,516,1,0,0,0,519,520,3,197,98,0,520, +130,1,0,0,0,521,522,3,199,99,0,522,523,3,139,69,0,523,132,1,0,0,0,524,528, +3,193,96,0,525,527,3,195,97,0,526,525,1,0,0,0,527,530,1,0,0,0,528,526,1, +0,0,0,528,529,1,0,0,0,529,531,1,0,0,0,530,528,1,0,0,0,531,532,3,193,96,0, +532,134,1,0,0,0,533,537,3,229,114,0,534,536,3,227,113,0,535,534,1,0,0,0, +536,539,1,0,0,0,537,535,1,0,0,0,537,538,1,0,0,0,538,136,1,0,0,0,539,537, +1,0,0,0,540,541,3,229,114,0,541,545,3,229,114,0,542,544,3,227,113,0,543, +542,1,0,0,0,544,547,1,0,0,0,545,543,1,0,0,0,545,546,1,0,0,0,546,138,1,0, +0,0,547,545,1,0,0,0,548,552,3,221,110,0,549,551,3,227,113,0,550,549,1,0, +0,0,551,554,1,0,0,0,552,550,1,0,0,0,552,553,1,0,0,0,553,140,1,0,0,0,554, +552,1,0,0,0,555,559,3,219,109,0,556,558,3,227,113,0,557,556,1,0,0,0,558, +561,1,0,0,0,559,557,1,0,0,0,559,560,1,0,0,0,560,142,1,0,0,0,561,559,1,0, +0,0,562,565,3,145,72,0,563,565,3,147,73,0,564,562,1,0,0,0,564,563,1,0,0, +0,565,144,1,0,0,0,566,567,3,203,101,0,567,568,3,147,73,0,568,146,1,0,0,0, +569,572,3,151,75,0,570,572,3,149,74,0,571,569,1,0,0,0,571,570,1,0,0,0,572, +148,1,0,0,0,573,576,3,171,85,0,574,576,3,151,75,0,575,573,1,0,0,0,575,574, +1,0,0,0,576,577,1,0,0,0,577,578,3,207,103,0,578,579,3,153,76,0,579,150,1, +0,0,0,580,581,3,167,83,0,581,582,3,205,102,0,582,583,3,171,85,0,583,152, +1,0,0,0,584,587,3,155,77,0,585,587,3,171,85,0,586,584,1,0,0,0,586,585,1, +0,0,0,587,154,1,0,0,0,588,589,3,203,101,0,589,590,3,171,85,0,590,156,1,0, +0,0,591,594,3,159,79,0,592,594,3,161,80,0,593,591,1,0,0,0,593,592,1,0,0, +0,594,158,1,0,0,0,595,596,3,203,101,0,596,597,3,161,80,0,597,160,1,0,0,0, +598,599,3,167,83,0,599,600,3,173,86,0,600,601,3,169,84,0,601,162,1,0,0,0, +602,605,3,165,82,0,603,605,3,167,83,0,604,602,1,0,0,0,604,603,1,0,0,0,605, +164,1,0,0,0,606,607,3,203,101,0,607,608,3,167,83,0,608,166,1,0,0,0,609,612, +3,213,106,0,610,612,3,169,84,0,611,609,1,0,0,0,611,610,1,0,0,0,612,168,1, +0,0,0,613,617,3,215,107,0,614,616,3,217,108,0,615,614,1,0,0,0,616,619,1, +0,0,0,617,615,1,0,0,0,617,618,1,0,0,0,618,170,1,0,0,0,619,617,1,0,0,0,620, +624,3,217,108,0,621,623,3,217,108,0,622,621,1,0,0,0,623,626,1,0,0,0,624, +622,1,0,0,0,624,625,1,0,0,0,625,172,1,0,0,0,626,624,1,0,0,0,627,628,3,209, +104,0,628,174,1,0,0,0,629,630,3,211,105,0,630,176,1,0,0,0,631,632,7,2,0, +0,632,178,1,0,0,0,633,634,7,3,0,0,634,180,1,0,0,0,635,636,5,43,0,0,636,182, +1,0,0,0,637,638,5,62,0,0,638,184,1,0,0,0,639,640,5,60,0,0,640,186,1,0,0, +0,641,642,5,35,0,0,642,188,1,0,0,0,643,645,8,3,0,0,644,643,1,0,0,0,645,648, +1,0,0,0,646,644,1,0,0,0,646,647,1,0,0,0,647,649,1,0,0,0,648,646,1,0,0,0, +649,650,5,42,0,0,650,651,5,42,0,0,651,655,1,0,0,0,652,654,8,4,0,0,653,652, +1,0,0,0,654,657,1,0,0,0,655,653,1,0,0,0,655,656,1,0,0,0,656,190,1,0,0,0, +657,655,1,0,0,0,658,659,7,5,0,0,659,192,1,0,0,0,660,661,7,6,0,0,661,194, +1,0,0,0,662,666,7,7,0,0,663,664,5,92,0,0,664,666,7,8,0,0,665,662,1,0,0,0, +665,663,1,0,0,0,666,196,1,0,0,0,667,668,5,39,0,0,668,198,1,0,0,0,669,670, +7,9,0,0,670,200,1,0,0,0,671,677,7,10,0,0,672,673,5,92,0,0,673,677,5,92,0, +0,674,675,5,92,0,0,675,677,5,39,0,0,676,671,1,0,0,0,676,672,1,0,0,0,676, +674,1,0,0,0,677,202,1,0,0,0,678,679,7,11,0,0,679,204,1,0,0,0,680,681,7,12, +0,0,681,206,1,0,0,0,682,683,7,13,0,0,683,208,1,0,0,0,684,685,7,14,0,0,685, +210,1,0,0,0,686,687,5,92,0,0,687,688,5,92,0,0,688,212,1,0,0,0,689,690,7, +15,0,0,690,214,1,0,0,0,691,692,7,16,0,0,692,216,1,0,0,0,693,694,7,17,0,0, +694,218,1,0,0,0,695,696,7,18,0,0,696,220,1,0,0,0,697,698,7,19,0,0,698,222, +1,0,0,0,699,700,7,20,0,0,700,224,1,0,0,0,701,704,3,219,109,0,702,704,3,221, +110,0,703,701,1,0,0,0,703,702,1,0,0,0,704,226,1,0,0,0,705,710,3,219,109, +0,706,710,3,221,110,0,707,710,3,217,108,0,708,710,5,95,0,0,709,705,1,0,0, +0,709,706,1,0,0,0,709,707,1,0,0,0,709,708,1,0,0,0,710,228,1,0,0,0,711,712, +7,21,0,0,712,230,1,0,0,0,713,714,9,0,0,0,714,232,1,0,0,0,715,716,5,46,0, +0,716,717,5,10,0,0,717,234,1,0,0,0,25,0,484,492,503,516,528,537,545,552, +559,564,571,575,586,593,604,611,617,624,646,655,665,676,703,709,1,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('", "'[]'", + "'{'", "'}'", "')}'", "'[.]'", "'.'", "'{.}'", + "'(.)'", "'!'", "'~'", "'^'", "'@+'", "'@-'", "'!>'", + "'?*'", "'<<'", "'?'", "'<=>'", "'=>'", "'<='", + "'<~>'", "'~&'", "'-->'", "':='", "'=='", "'='", + "'!='", "'!!'", "'??'", "'@@+'", "'@@-'", "'@='", + "'unknown'", "'inference('", "'introduced('", "'file('", + "'theory('", "'creator('", "'include('", "'$thf('", + "'$tff('", "'$fof('", "'$cnf('", "'$fot('", 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, "'.\\n'" ]; + 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, null, null, null, + null, null, null, null, null, null, "WS", "Comment_line", + "Comment_block", "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", "Not_star_slash", + "Percentage_sign", "Double_quote", "Single_quote", + "Back_quote", "Dot", "Slash_char", "Slosh_char", + "Zero_numeric", "Underscore", "Alpha", "Dollar", + "Printable_char", "Viewable_char" ]; + 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", "T__52", "T__53", "T__54", + "T__55", "T__56", "T__57", "T__58", "T__59", "T__60", + "WS", "Comment_line", "Comment_block", "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", "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", "Printable_char", + "Viewable_char" ]; + + 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.T__52 = 53; +TPTPLexer.T__53 = 54; +TPTPLexer.T__54 = 55; +TPTPLexer.T__55 = 56; +TPTPLexer.T__56 = 57; +TPTPLexer.T__57 = 58; +TPTPLexer.T__58 = 59; +TPTPLexer.T__59 = 60; +TPTPLexer.T__60 = 61; +TPTPLexer.WS = 62; +TPTPLexer.Comment_line = 63; +TPTPLexer.Comment_block = 64; +TPTPLexer.Single_quoted = 65; +TPTPLexer.Back_quoted = 66; +TPTPLexer.Distinct_object = 67; +TPTPLexer.Dollar_word = 68; +TPTPLexer.Dollar_dollar_word = 69; +TPTPLexer.Upper_word = 70; +TPTPLexer.Lower_word = 71; +TPTPLexer.Real = 72; +TPTPLexer.Signed_real = 73; +TPTPLexer.Unsigned_real = 74; +TPTPLexer.Decimal_exponent = 75; +TPTPLexer.Decimal_fraction = 76; +TPTPLexer.Exp_integer = 77; +TPTPLexer.Signed_exp_integer = 78; +TPTPLexer.Rational = 79; +TPTPLexer.Signed_rational = 80; +TPTPLexer.Unsigned_rational = 81; +TPTPLexer.Integer = 82; +TPTPLexer.Signed_integer = 83; +TPTPLexer.Unsigned_integer = 84; +TPTPLexer.Positive_integer = 85; +TPTPLexer.Integer_digits = 86; +TPTPLexer.Slash = 87; +TPTPLexer.Slosh = 88; +TPTPLexer.Vline = 89; +TPTPLexer.Star = 90; +TPTPLexer.Plus = 91; +TPTPLexer.Arrow = 92; +TPTPLexer.Less_sign = 93; +TPTPLexer.Hash = 94; +TPTPLexer.Not_star_slash = 95; +TPTPLexer.Percentage_sign = 96; +TPTPLexer.Double_quote = 97; +TPTPLexer.Single_quote = 98; +TPTPLexer.Back_quote = 99; +TPTPLexer.Dot = 100; +TPTPLexer.Slash_char = 101; +TPTPLexer.Slosh_char = 102; +TPTPLexer.Zero_numeric = 103; +TPTPLexer.Underscore = 104; +TPTPLexer.Alpha = 105; +TPTPLexer.Dollar = 106; +TPTPLexer.Printable_char = 107; +TPTPLexer.Viewable_char = 108; + + + diff --git a/tptplus/server/parser/vendor/tptp-antlr/TPTPListener.js b/tptplus/server/parser/vendor/tptp-antlr/TPTPListener.js new file mode 100644 index 0000000..a2e5e95 --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/TPTPListener.js @@ -0,0 +1,2079 @@ +// Generated from ANTLRGrammar/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_nonassoc. + enterThf_binary_nonassoc(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_binary_nonassoc. + exitThf_binary_nonassoc(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#thf_binary_assoc. + enterThf_binary_assoc(ctx) { + } + + // Exit a parse tree produced by TPTPParser#thf_binary_assoc. + exitThf_binary_assoc(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_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_nonassoc. + enterTff_binary_nonassoc(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_binary_nonassoc. + exitTff_binary_nonassoc(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#tff_binary_assoc. + enterTff_binary_assoc(ctx) { + } + + // Exit a parse tree produced by TPTPParser#tff_binary_assoc. + exitTff_binary_assoc(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_nonassoc. + enterFof_binary_nonassoc(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_binary_nonassoc. + exitFof_binary_nonassoc(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#fof_binary_assoc. + enterFof_binary_assoc(ctx) { + } + + // Exit a parse tree produced by TPTPParser#fof_binary_assoc. + exitFof_binary_assoc(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#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#atom. + enterAtom(ctx) { + } + + // Exit a parse tree produced by TPTPParser#atom. + exitAtom(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#untyped_atom. + enterUntyped_atom(ctx) { + } + + // Exit a parse tree produced by TPTPParser#untyped_atom. + exitUntyped_atom(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#theory. + enterTheory(ctx) { + } + + // Exit a parse tree produced by TPTPParser#theory. + exitTheory(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#theory_name. + enterTheory_name(ctx) { + } + + // Exit a parse tree produced by TPTPParser#theory_name. + exitTheory_name(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#creator_source. + enterCreator_source(ctx) { + } + + // Exit a parse tree produced by TPTPParser#creator_source. + exitCreator_source(ctx) { + } + + + // Enter a parse tree produced by TPTPParser#creator_name. + enterCreator_name(ctx) { + } + + // Exit a parse tree produced by TPTPParser#creator_name. + exitCreator_name(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) { + } + + + +} \ No newline at end of file diff --git a/tptplus/server/parser/vendor/tptp-antlr/TPTPParser.js b/tptplus/server/parser/vendor/tptp-antlr/TPTPParser.js new file mode 100644 index 0000000..61c4251 --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/TPTPParser.js @@ -0,0 +1,19418 @@ +// Generated from ANTLRGrammar/TPTP.g4 by ANTLR 4.13.2 +// jshint ignore: start +import antlr4 from 'antlr4'; +import TPTPListener from './TPTPListener.js'; +const serializedATN = [4,1,108,1749,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,4,1,4,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,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,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,542,8,10,1,11,1,11,1,11,1,11,3,11, +548,8,11,1,12,1,12,1,12,3,12,553,8,12,1,13,1,13,1,13,1,13,1,13,1,13,3,13, +561,8,13,1,14,1,14,1,14,3,14,566,8,14,1,15,1,15,1,15,1,15,1,16,1,16,1,16, +3,16,575,8,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,5,17,585,8,17,10,17, +12,17,588,9,17,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,5,18,598,8,18,10, +18,12,18,601,9,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,5,19,611,8,19, +10,19,12,19,614,9,19,1,20,1,20,1,20,3,20,619,8,20,1,21,1,21,3,21,623,8,21, +1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,632,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,648,8,25,1,26,1,26,1,26, +1,26,1,27,1,27,3,27,656,8,27,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,30,1,30, +1,30,3,30,668,8,30,1,31,1,31,3,31,672,8,31,1,32,1,32,1,32,1,32,1,32,1,32, +1,32,1,32,3,32,682,8,32,1,33,1,33,3,33,686,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,37,1,37,1,37,1,37,1,37,3, +37,707,8,37,1,38,1,38,1,38,1,38,1,38,3,38,714,8,38,1,39,1,39,1,39,1,39,1, +39,3,39,721,8,39,1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,41,3,41,732,8, +41,1,42,1,42,1,42,1,42,1,42,1,42,3,42,740,8,42,1,43,1,43,1,43,1,43,1,43, +3,43,747,8,43,1,44,1,44,1,44,1,44,1,44,3,44,754,8,44,1,45,1,45,5,45,758, +8,45,10,45,12,45,761,9,45,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,47,1,47,1, +47,1,47,3,47,774,8,47,1,48,1,48,1,48,3,48,779,8,48,1,49,1,49,1,50,1,50,1, +51,1,51,1,51,3,51,788,8,51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,3,52, +798,8,52,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,5,53,808,8,53,10,53,12, +53,811,9,53,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,5,54,821,8,54,10,54, +12,54,824,9,54,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1, +57,1,58,1,58,1,58,3,58,841,8,58,1,59,1,59,1,59,1,59,1,59,1,59,3,59,849,8, +59,1,60,1,60,3,60,853,8,60,1,61,1,61,1,61,1,61,1,62,1,62,3,62,861,8,62,1, +63,1,63,1,63,1,63,1,63,1,63,1,63,1,63,5,63,871,8,63,10,63,12,63,874,9,63, +1,64,1,64,1,64,1,64,1,64,1,64,1,64,1,64,5,64,884,8,64,10,64,12,64,887,9, +64,1,65,1,65,1,65,3,65,892,8,65,1,66,1,66,3,66,896,8,66,1,67,1,67,1,67,1, +67,1,67,1,67,1,67,3,67,905,8,67,1,68,1,68,1,69,1,69,1,69,1,69,1,69,1,69, +1,69,1,70,1,70,1,70,1,70,1,70,3,70,921,8,70,1,71,1,71,3,71,925,8,71,1,72, +1,72,1,72,1,72,1,73,1,73,3,73,933,8,73,1,74,1,74,1,74,1,75,1,75,1,75,1,75, +1,76,1,76,1,76,3,76,945,8,76,1,77,1,77,1,77,1,77,1,77,1,77,3,77,953,8,77, +1,78,1,78,1,79,1,79,1,79,1,79,1,79,1,79,1,79,1,79,3,79,965,8,79,1,80,1,80, +1,80,1,80,1,81,1,81,1,81,1,81,1,81,1,81,3,81,977,8,81,1,82,1,82,1,82,1,82, +1,82,1,82,1,82,1,82,1,83,1,83,1,83,1,83,1,83,3,83,992,8,83,1,84,1,84,1,84, +1,84,1,84,3,84,999,8,84,1,85,1,85,1,85,1,85,1,85,3,85,1006,8,85,1,86,1,86, +1,86,1,86,1,87,1,87,3,87,1014,8,87,1,88,1,88,1,88,1,88,1,88,3,88,1021,8, +88,1,89,1,89,1,89,1,89,1,89,1,89,1,90,1,90,1,90,3,90,1032,8,90,1,91,1,91, +1,91,1,91,1,91,1,91,1,91,1,91,3,91,1042,8,91,1,92,1,92,1,92,1,92,1,92,3, +92,1049,8,92,1,93,1,93,5,93,1053,8,93,10,93,12,93,1056,9,93,1,94,1,94,1, +94,1,95,1,95,1,95,1,95,1,95,1,95,1,95,1,95,3,95,1069,8,95,1,96,1,96,3,96, +1073,8,96,1,97,1,97,1,97,1,97,1,97,1,97,3,97,1081,8,97,1,98,1,98,1,98,1, +98,1,98,1,98,1,98,1,99,1,99,1,99,1,99,1,99,1,99,3,99,1096,8,99,1,100,1,100, +1,100,1,100,1,100,3,100,1103,8,100,1,101,1,101,1,101,1,101,1,101,1,101,1, +101,1,101,1,101,1,101,1,101,1,101,1,101,3,101,1118,8,101,1,102,1,102,1,102, +1,102,1,102,3,102,1125,8,102,1,103,1,103,1,103,1,103,1,104,1,104,1,104,1, +104,1,104,1,104,1,104,1,104,5,104,1139,8,104,10,104,12,104,1142,9,104,1, +105,1,105,1,105,1,105,1,106,1,106,1,106,1,106,1,106,3,106,1153,8,106,1,107, +1,107,1,107,1,107,1,108,1,108,1,108,1,108,1,109,1,109,1,109,1,109,1,110, +1,110,1,110,1,110,1,110,1,110,1,110,1,110,1,110,1,110,3,110,1177,8,110,1, +111,1,111,1,111,1,111,1,111,3,111,1184,8,111,1,112,1,112,3,112,1188,8,112, +1,113,1,113,1,114,1,114,1,114,1,114,1,114,1,114,1,114,1,114,1,114,1,114, +3,114,1202,8,114,1,115,1,115,1,115,1,115,1,115,3,115,1209,8,115,1,116,1, +116,3,116,1213,8,116,1,117,1,117,1,118,1,118,3,118,1219,8,118,1,119,1,119, +1,120,1,120,1,120,1,121,1,121,1,121,1,121,1,121,1,121,3,121,1232,8,121,1, +122,1,122,3,122,1236,8,122,1,123,1,123,3,123,1240,8,123,1,124,1,124,1,124, +1,124,1,124,1,124,1,124,1,125,1,125,3,125,1251,8,125,1,126,1,126,1,126,3, +126,1256,8,126,1,127,1,127,3,127,1260,8,127,1,128,1,128,1,128,1,128,1,129, +1,129,3,129,1268,8,129,1,130,1,130,1,130,1,130,1,130,1,130,1,130,1,130,5, +130,1278,8,130,10,130,12,130,1281,9,130,1,131,1,131,1,131,1,131,1,131,1, +131,1,131,1,131,5,131,1291,8,131,10,131,12,131,1294,9,131,1,132,1,132,1, +132,1,132,3,132,1300,8,132,1,133,1,133,1,133,1,133,1,134,1,134,3,134,1308, +8,134,1,135,1,135,1,135,1,135,1,135,1,135,3,135,1316,8,135,1,136,1,136,1, +136,1,136,1,136,1,136,1,136,1,137,1,137,1,137,1,137,1,137,3,137,1330,8,137, +1,138,1,138,1,138,3,138,1335,8,138,1,139,1,139,1,140,1,140,3,140,1341,8, +140,1,141,1,141,1,142,1,142,1,142,1,142,1,143,1,143,1,144,1,144,1,144,1, +144,1,144,1,144,3,144,1357,8,144,1,145,1,145,3,145,1361,8,145,1,146,1,146, +1,147,1,147,1,147,1,147,1,147,1,147,3,147,1371,8,147,1,148,1,148,1,148,1, +148,1,148,1,148,3,148,1379,8,148,1,149,1,149,1,149,1,149,1,149,3,149,1386, +8,149,1,150,1,150,3,150,1390,8,150,1,151,1,151,1,151,3,151,1395,8,151,1, +152,1,152,1,152,1,152,1,152,1,152,1,152,1,152,3,152,1405,8,152,1,153,1,153, +1,153,1,153,1,153,3,153,1412,8,153,1,154,1,154,5,154,1416,8,154,10,154,12, +154,1419,9,154,1,155,1,155,1,155,1,156,1,156,1,156,1,156,1,156,3,156,1429, +8,156,1,157,1,157,1,157,1,157,1,157,1,157,5,157,1437,8,157,10,157,12,157, +1440,9,157,1,158,1,158,1,158,1,158,1,158,1,158,1,158,1,158,1,158,3,158,1451, +8,158,1,159,1,159,1,159,3,159,1456,8,159,1,160,1,160,3,160,1460,8,160,1, +161,1,161,1,162,1,162,1,163,1,163,1,164,1,164,3,164,1470,8,164,1,165,1,165, +3,165,1474,8,165,1,166,1,166,1,167,1,167,1,167,1,167,1,167,1,167,1,167,3, +167,1485,8,167,1,168,1,168,1,169,1,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,1,176,1,176,3,176,1505,8,176,1,177,1, +177,3,177,1509,8,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,3,188,1533,8,188,1,189,1,189,1,190,1,190,1,190,1,190,1,190,1,190,1, +190,1,190,3,190,1545,8,190,1,191,1,191,1,191,1,191,1,191,3,191,1552,8,191, +1,192,1,192,3,192,1556,8,192,1,193,1,193,1,193,1,193,1,193,1,193,1,193,1, +193,1,194,1,194,1,195,1,195,1,195,1,195,1,195,1,195,1,195,1,195,1,196,1, +196,1,197,1,197,1,197,3,197,1581,8,197,1,198,1,198,1,198,1,198,1,198,1,199, +1,199,1,199,3,199,1591,8,199,1,200,1,200,1,200,1,200,1,200,1,201,1,201,1, +202,1,202,1,202,1,202,1,202,1,202,1,202,1,202,1,203,1,203,1,204,1,204,1, +204,1,204,1,204,3,204,1615,8,204,1,205,1,205,5,205,1619,8,205,10,205,12, +205,1622,9,205,1,206,1,206,1,206,1,207,1,207,1,207,1,208,1,208,1,208,3,208, +1633,8,208,1,209,1,209,1,209,3,209,1638,8,209,1,210,1,210,1,211,1,211,1, +211,1,211,1,211,1,212,1,212,1,212,1,212,1,212,1,212,1,212,1,212,3,212,1655, +8,212,1,213,1,213,1,213,1,213,1,213,3,213,1662,8,213,1,214,1,214,1,214,1, +214,1,214,3,214,1669,8,214,1,215,1,215,1,216,1,216,1,216,1,216,1,216,1,216, +3,216,1679,8,216,1,217,1,217,1,217,1,217,1,217,1,217,3,217,1687,8,217,1, +218,1,218,1,218,1,218,1,218,1,219,1,219,1,219,1,219,1,219,1,219,1,219,1, +219,1,219,1,219,1,219,1,219,1,219,1,219,1,219,1,219,1,219,1,219,1,219,1, +219,3,219,1714,8,219,1,220,1,220,1,220,1,220,1,220,3,220,1721,8,220,1,221, +1,221,5,221,1725,8,221,10,221,12,221,1728,9,221,1,222,1,222,1,222,1,223, +1,223,3,223,1735,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,106,108,126,128,208,260,262,314, +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,28,30,1,0,31,32,2,0,26,26,34,34,2,0,10,10,89,89,1,0,45,49,2,0,65, +66,71,71,3,0,72,72,79,79,82,82,1719,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,489,1,0,0,0,10,491,1,0,0,0,12,500,1,0,0,0,14,509,1, +0,0,0,16,518,1,0,0,0,18,527,1,0,0,0,20,541,1,0,0,0,22,547,1,0,0,0,24,552, +1,0,0,0,26,560,1,0,0,0,28,565,1,0,0,0,30,567,1,0,0,0,32,574,1,0,0,0,34,576, +1,0,0,0,36,589,1,0,0,0,38,602,1,0,0,0,40,618,1,0,0,0,42,622,1,0,0,0,44,631, +1,0,0,0,46,633,1,0,0,0,48,636,1,0,0,0,50,647,1,0,0,0,52,649,1,0,0,0,54,655, +1,0,0,0,56,657,1,0,0,0,58,660,1,0,0,0,60,667,1,0,0,0,62,671,1,0,0,0,64,681, +1,0,0,0,66,685,1,0,0,0,68,687,1,0,0,0,70,691,1,0,0,0,72,693,1,0,0,0,74,706, +1,0,0,0,76,713,1,0,0,0,78,720,1,0,0,0,80,722,1,0,0,0,82,731,1,0,0,0,84,739, +1,0,0,0,86,746,1,0,0,0,88,753,1,0,0,0,90,755,1,0,0,0,92,762,1,0,0,0,94,773, +1,0,0,0,96,778,1,0,0,0,98,780,1,0,0,0,100,782,1,0,0,0,102,787,1,0,0,0,104, +797,1,0,0,0,106,799,1,0,0,0,108,812,1,0,0,0,110,825,1,0,0,0,112,829,1,0, +0,0,114,833,1,0,0,0,116,840,1,0,0,0,118,848,1,0,0,0,120,852,1,0,0,0,122, +854,1,0,0,0,124,860,1,0,0,0,126,862,1,0,0,0,128,875,1,0,0,0,130,891,1,0, +0,0,132,895,1,0,0,0,134,904,1,0,0,0,136,906,1,0,0,0,138,908,1,0,0,0,140, +920,1,0,0,0,142,924,1,0,0,0,144,926,1,0,0,0,146,932,1,0,0,0,148,934,1,0, +0,0,150,937,1,0,0,0,152,944,1,0,0,0,154,952,1,0,0,0,156,954,1,0,0,0,158, +964,1,0,0,0,160,966,1,0,0,0,162,976,1,0,0,0,164,978,1,0,0,0,166,991,1,0, +0,0,168,998,1,0,0,0,170,1005,1,0,0,0,172,1007,1,0,0,0,174,1013,1,0,0,0,176, +1020,1,0,0,0,178,1022,1,0,0,0,180,1031,1,0,0,0,182,1041,1,0,0,0,184,1048, +1,0,0,0,186,1050,1,0,0,0,188,1057,1,0,0,0,190,1068,1,0,0,0,192,1072,1,0, +0,0,194,1080,1,0,0,0,196,1082,1,0,0,0,198,1095,1,0,0,0,200,1102,1,0,0,0, +202,1117,1,0,0,0,204,1124,1,0,0,0,206,1126,1,0,0,0,208,1130,1,0,0,0,210, +1143,1,0,0,0,212,1152,1,0,0,0,214,1154,1,0,0,0,216,1158,1,0,0,0,218,1162, +1,0,0,0,220,1176,1,0,0,0,222,1183,1,0,0,0,224,1187,1,0,0,0,226,1189,1,0, +0,0,228,1201,1,0,0,0,230,1208,1,0,0,0,232,1212,1,0,0,0,234,1214,1,0,0,0, +236,1218,1,0,0,0,238,1220,1,0,0,0,240,1222,1,0,0,0,242,1231,1,0,0,0,244, +1235,1,0,0,0,246,1239,1,0,0,0,248,1241,1,0,0,0,250,1250,1,0,0,0,252,1255, +1,0,0,0,254,1259,1,0,0,0,256,1261,1,0,0,0,258,1267,1,0,0,0,260,1269,1,0, +0,0,262,1282,1,0,0,0,264,1299,1,0,0,0,266,1301,1,0,0,0,268,1307,1,0,0,0, +270,1315,1,0,0,0,272,1317,1,0,0,0,274,1329,1,0,0,0,276,1334,1,0,0,0,278, +1336,1,0,0,0,280,1340,1,0,0,0,282,1342,1,0,0,0,284,1344,1,0,0,0,286,1348, +1,0,0,0,288,1356,1,0,0,0,290,1360,1,0,0,0,292,1362,1,0,0,0,294,1370,1,0, +0,0,296,1378,1,0,0,0,298,1385,1,0,0,0,300,1389,1,0,0,0,302,1394,1,0,0,0, +304,1404,1,0,0,0,306,1411,1,0,0,0,308,1413,1,0,0,0,310,1420,1,0,0,0,312, +1428,1,0,0,0,314,1430,1,0,0,0,316,1450,1,0,0,0,318,1455,1,0,0,0,320,1459, +1,0,0,0,322,1461,1,0,0,0,324,1463,1,0,0,0,326,1465,1,0,0,0,328,1469,1,0, +0,0,330,1473,1,0,0,0,332,1475,1,0,0,0,334,1484,1,0,0,0,336,1486,1,0,0,0, +338,1488,1,0,0,0,340,1490,1,0,0,0,342,1492,1,0,0,0,344,1494,1,0,0,0,346, +1496,1,0,0,0,348,1498,1,0,0,0,350,1500,1,0,0,0,352,1504,1,0,0,0,354,1508, +1,0,0,0,356,1510,1,0,0,0,358,1512,1,0,0,0,360,1514,1,0,0,0,362,1516,1,0, +0,0,364,1518,1,0,0,0,366,1520,1,0,0,0,368,1522,1,0,0,0,370,1524,1,0,0,0, +372,1526,1,0,0,0,374,1528,1,0,0,0,376,1532,1,0,0,0,378,1534,1,0,0,0,380, +1544,1,0,0,0,382,1551,1,0,0,0,384,1555,1,0,0,0,386,1557,1,0,0,0,388,1565, +1,0,0,0,390,1567,1,0,0,0,392,1575,1,0,0,0,394,1580,1,0,0,0,396,1582,1,0, +0,0,398,1590,1,0,0,0,400,1592,1,0,0,0,402,1597,1,0,0,0,404,1599,1,0,0,0, +406,1607,1,0,0,0,408,1614,1,0,0,0,410,1616,1,0,0,0,412,1623,1,0,0,0,414, +1626,1,0,0,0,416,1632,1,0,0,0,418,1637,1,0,0,0,420,1639,1,0,0,0,422,1641, +1,0,0,0,424,1654,1,0,0,0,426,1661,1,0,0,0,428,1668,1,0,0,0,430,1670,1,0, +0,0,432,1678,1,0,0,0,434,1686,1,0,0,0,436,1688,1,0,0,0,438,1713,1,0,0,0, +440,1720,1,0,0,0,442,1722,1,0,0,0,444,1729,1,0,0,0,446,1734,1,0,0,0,448, +1736,1,0,0,0,450,1738,1,0,0,0,452,1740,1,0,0,0,454,1742,1,0,0,0,456,1744, +1,0,0,0,458,1746,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,422,211,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,3,446,223,0,482,483,5,2,0, +0,483,484,3,22,11,0,484,485,5,2,0,0,485,486,3,8,4,0,486,487,3,20,10,0,487, +488,5,3,0,0,488,7,1,0,0,0,489,490,3,250,125,0,490,9,1,0,0,0,491,492,5,4, +0,0,492,493,3,446,223,0,493,494,5,2,0,0,494,495,3,22,11,0,495,496,5,2,0, +0,496,497,3,24,12,0,497,498,3,20,10,0,498,499,5,3,0,0,499,11,1,0,0,0,500, +501,5,5,0,0,501,502,3,446,223,0,502,503,5,2,0,0,503,504,3,22,11,0,504,505, +5,2,0,0,505,506,3,116,58,0,506,507,3,20,10,0,507,508,5,3,0,0,508,13,1,0, +0,0,509,510,5,6,0,0,510,511,3,446,223,0,511,512,5,2,0,0,512,513,3,22,11, +0,513,514,5,2,0,0,514,515,3,244,122,0,515,516,3,20,10,0,516,517,5,3,0,0, +517,15,1,0,0,0,518,519,5,7,0,0,519,520,3,446,223,0,520,521,5,2,0,0,521,522, +3,22,11,0,522,523,5,2,0,0,523,524,3,250,125,0,524,525,3,20,10,0,525,526, +5,3,0,0,526,17,1,0,0,0,527,528,5,8,0,0,528,529,3,446,223,0,529,530,5,2,0, +0,530,531,3,22,11,0,531,532,5,2,0,0,532,533,3,312,156,0,533,534,3,20,10, +0,534,535,5,3,0,0,535,19,1,0,0,0,536,537,5,2,0,0,537,538,3,380,190,0,538, +539,3,418,209,0,539,542,1,0,0,0,540,542,3,458,229,0,541,536,1,0,0,0,541, +540,1,0,0,0,542,21,1,0,0,0,543,548,5,71,0,0,544,545,5,71,0,0,545,546,5,9, +0,0,546,548,3,432,216,0,547,543,1,0,0,0,547,544,1,0,0,0,548,23,1,0,0,0,549, +553,3,26,13,0,550,553,3,94,47,0,551,553,3,110,55,0,552,549,1,0,0,0,552,550, +1,0,0,0,552,551,1,0,0,0,553,25,1,0,0,0,554,561,3,44,22,0,555,561,3,54,27, +0,556,561,3,28,14,0,557,561,3,68,34,0,558,561,3,112,56,0,559,561,3,114,57, +0,560,554,1,0,0,0,560,555,1,0,0,0,560,556,1,0,0,0,560,557,1,0,0,0,560,558, +1,0,0,0,560,559,1,0,0,0,561,27,1,0,0,0,562,566,3,30,15,0,563,566,3,32,16, +0,564,566,3,102,51,0,565,562,1,0,0,0,565,563,1,0,0,0,565,564,1,0,0,0,566, +29,1,0,0,0,567,568,3,40,20,0,568,569,3,334,167,0,569,570,3,40,20,0,570,31, +1,0,0,0,571,575,3,34,17,0,572,575,3,36,18,0,573,575,3,38,19,0,574,571,1, +0,0,0,574,572,1,0,0,0,574,573,1,0,0,0,575,33,1,0,0,0,576,577,6,17,-1,0,577, +578,3,40,20,0,578,579,5,89,0,0,579,580,3,40,20,0,580,586,1,0,0,0,581,582, +10,1,0,0,582,583,5,89,0,0,583,585,3,40,20,0,584,581,1,0,0,0,585,588,1,0, +0,0,586,584,1,0,0,0,586,587,1,0,0,0,587,35,1,0,0,0,588,586,1,0,0,0,589,590, +6,18,-1,0,590,591,3,40,20,0,591,592,5,10,0,0,592,593,3,40,20,0,593,599,1, +0,0,0,594,595,10,1,0,0,595,596,5,10,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,37,1,0,0,0,601,599, +1,0,0,0,602,603,6,19,-1,0,603,604,3,40,20,0,604,605,5,11,0,0,605,606,3,40, +20,0,606,612,1,0,0,0,607,608,10,1,0,0,608,609,5,11,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,39,1, +0,0,0,614,612,1,0,0,0,615,619,3,44,22,0,616,619,3,54,27,0,617,619,3,68,34, +0,618,615,1,0,0,0,618,616,1,0,0,0,618,617,1,0,0,0,619,41,1,0,0,0,620,623, +3,44,22,0,621,623,3,56,28,0,622,620,1,0,0,0,622,621,1,0,0,0,623,43,1,0,0, +0,624,632,3,46,23,0,625,632,3,60,30,0,626,632,3,378,189,0,627,628,5,12,0, +0,628,629,3,26,13,0,629,630,5,13,0,0,630,632,1,0,0,0,631,624,1,0,0,0,631, +625,1,0,0,0,631,626,1,0,0,0,631,627,1,0,0,0,632,45,1,0,0,0,633,634,3,48, +24,0,634,635,3,40,20,0,635,47,1,0,0,0,636,637,3,318,159,0,637,638,5,14,0, +0,638,639,3,50,25,0,639,640,5,15,0,0,640,641,5,16,0,0,641,49,1,0,0,0,642, +648,3,52,26,0,643,644,3,52,26,0,644,645,5,2,0,0,645,646,3,50,25,0,646,648, +1,0,0,0,647,642,1,0,0,0,647,643,1,0,0,0,648,51,1,0,0,0,649,650,3,378,189, +0,650,651,5,16,0,0,651,652,3,96,48,0,652,53,1,0,0,0,653,656,3,56,28,0,654, +656,3,58,29,0,655,653,1,0,0,0,655,654,1,0,0,0,656,55,1,0,0,0,657,658,3,320, +160,0,658,659,3,42,21,0,659,57,1,0,0,0,660,661,3,84,42,0,661,662,3,360,180, +0,662,663,3,84,42,0,663,59,1,0,0,0,664,668,3,62,31,0,665,668,3,64,32,0,666, +668,3,70,35,0,667,664,1,0,0,0,667,665,1,0,0,0,667,666,1,0,0,0,668,61,1,0, +0,0,669,672,3,362,181,0,670,672,3,88,44,0,671,669,1,0,0,0,671,670,1,0,0, +0,672,63,1,0,0,0,673,682,3,366,183,0,674,682,3,66,33,0,675,676,5,12,0,0, +676,677,3,86,43,0,677,678,5,13,0,0,678,682,1,0,0,0,679,682,3,220,110,0,680, +682,3,72,36,0,681,673,1,0,0,0,681,674,1,0,0,0,681,675,1,0,0,0,681,679,1, +0,0,0,681,680,1,0,0,0,682,65,1,0,0,0,683,686,3,376,188,0,684,686,3,374,187, +0,685,683,1,0,0,0,685,684,1,0,0,0,686,67,1,0,0,0,687,688,3,84,42,0,688,689, +3,356,178,0,689,690,3,84,42,0,690,69,1,0,0,0,691,692,3,370,185,0,692,71, +1,0,0,0,693,694,5,17,0,0,694,695,3,74,37,0,695,696,5,2,0,0,696,697,3,78, +39,0,697,698,5,2,0,0,698,699,3,26,13,0,699,700,5,13,0,0,700,73,1,0,0,0,701, +707,3,94,47,0,702,703,5,14,0,0,703,704,3,76,38,0,704,705,5,15,0,0,705,707, +1,0,0,0,706,701,1,0,0,0,706,702,1,0,0,0,707,75,1,0,0,0,708,714,3,94,47,0, +709,710,3,94,47,0,710,711,5,2,0,0,711,712,3,76,38,0,712,714,1,0,0,0,713, +708,1,0,0,0,713,709,1,0,0,0,714,77,1,0,0,0,715,721,3,80,40,0,716,717,5,14, +0,0,717,718,3,82,41,0,718,719,5,15,0,0,719,721,1,0,0,0,720,715,1,0,0,0,720, +716,1,0,0,0,721,79,1,0,0,0,722,723,3,26,13,0,723,724,3,342,171,0,724,725, +3,26,13,0,725,81,1,0,0,0,726,732,3,80,40,0,727,728,3,80,40,0,728,729,5,2, +0,0,729,730,3,82,41,0,730,732,1,0,0,0,731,726,1,0,0,0,731,727,1,0,0,0,732, +83,1,0,0,0,733,740,3,60,30,0,734,740,3,378,189,0,735,736,5,12,0,0,736,737, +3,26,13,0,737,738,5,13,0,0,738,740,1,0,0,0,739,733,1,0,0,0,739,734,1,0,0, +0,739,735,1,0,0,0,740,85,1,0,0,0,741,747,3,334,167,0,742,747,3,336,168,0, +743,747,3,358,179,0,744,747,3,360,180,0,745,747,3,320,160,0,746,741,1,0, +0,0,746,742,1,0,0,0,746,743,1,0,0,0,746,744,1,0,0,0,746,745,1,0,0,0,747, +87,1,0,0,0,748,754,5,18,0,0,749,750,5,14,0,0,750,751,3,90,45,0,751,752,5, +15,0,0,752,754,1,0,0,0,753,748,1,0,0,0,753,749,1,0,0,0,754,89,1,0,0,0,755, +759,3,26,13,0,756,758,3,92,46,0,757,756,1,0,0,0,758,761,1,0,0,0,759,757, +1,0,0,0,759,760,1,0,0,0,760,91,1,0,0,0,761,759,1,0,0,0,762,763,5,2,0,0,763, +764,3,26,13,0,764,93,1,0,0,0,765,766,3,354,177,0,766,767,5,16,0,0,767,768, +3,96,48,0,768,774,1,0,0,0,769,770,5,12,0,0,770,771,3,94,47,0,771,772,5,13, +0,0,772,774,1,0,0,0,773,765,1,0,0,0,773,769,1,0,0,0,774,95,1,0,0,0,775,779, +3,98,49,0,776,779,3,104,52,0,777,779,3,100,50,0,778,775,1,0,0,0,778,776, +1,0,0,0,778,777,1,0,0,0,779,97,1,0,0,0,780,781,3,44,22,0,781,99,1,0,0,0, +782,783,3,38,19,0,783,101,1,0,0,0,784,788,3,104,52,0,785,788,3,106,53,0, +786,788,3,108,54,0,787,784,1,0,0,0,787,785,1,0,0,0,787,786,1,0,0,0,788,103, +1,0,0,0,789,790,3,98,49,0,790,791,5,92,0,0,791,792,3,98,49,0,792,798,1,0, +0,0,793,794,3,98,49,0,794,795,5,92,0,0,795,796,3,104,52,0,796,798,1,0,0, +0,797,789,1,0,0,0,797,793,1,0,0,0,798,105,1,0,0,0,799,800,6,53,-1,0,800, +801,3,98,49,0,801,802,5,90,0,0,802,803,3,98,49,0,803,809,1,0,0,0,804,805, +10,1,0,0,805,806,5,90,0,0,806,808,3,98,49,0,807,804,1,0,0,0,808,811,1,0, +0,0,809,807,1,0,0,0,809,810,1,0,0,0,810,107,1,0,0,0,811,809,1,0,0,0,812, +813,6,54,-1,0,813,814,3,98,49,0,814,815,5,91,0,0,815,816,3,98,49,0,816,822, +1,0,0,0,817,818,10,1,0,0,818,819,5,91,0,0,819,821,3,98,49,0,820,817,1,0, +0,0,821,824,1,0,0,0,822,820,1,0,0,0,822,823,1,0,0,0,823,109,1,0,0,0,824, +822,1,0,0,0,825,826,3,354,177,0,826,827,3,326,163,0,827,828,3,352,176,0, +828,111,1,0,0,0,829,830,3,60,30,0,830,831,3,344,172,0,831,832,3,26,13,0, +832,113,1,0,0,0,833,834,3,88,44,0,834,835,3,340,170,0,835,836,3,88,44,0, +836,115,1,0,0,0,837,841,3,118,59,0,838,841,3,190,95,0,839,841,3,214,107, +0,840,837,1,0,0,0,840,838,1,0,0,0,840,839,1,0,0,0,841,117,1,0,0,0,842,849, +3,134,67,0,843,849,3,146,73,0,844,849,3,120,60,0,845,849,3,160,80,0,846, +849,3,216,108,0,847,849,3,218,109,0,848,842,1,0,0,0,848,843,1,0,0,0,848, +844,1,0,0,0,848,845,1,0,0,0,848,846,1,0,0,0,848,847,1,0,0,0,849,119,1,0, +0,0,850,853,3,122,61,0,851,853,3,124,62,0,852,850,1,0,0,0,852,851,1,0,0, +0,853,121,1,0,0,0,854,855,3,130,65,0,855,856,3,334,167,0,856,857,3,130,65, +0,857,123,1,0,0,0,858,861,3,126,63,0,859,861,3,128,64,0,860,858,1,0,0,0, +860,859,1,0,0,0,861,125,1,0,0,0,862,863,6,63,-1,0,863,864,3,130,65,0,864, +865,5,89,0,0,865,866,3,130,65,0,866,872,1,0,0,0,867,868,10,1,0,0,868,869, +5,89,0,0,869,871,3,130,65,0,870,867,1,0,0,0,871,874,1,0,0,0,872,870,1,0, +0,0,872,873,1,0,0,0,873,127,1,0,0,0,874,872,1,0,0,0,875,876,6,64,-1,0,876, +877,3,130,65,0,877,878,5,10,0,0,878,879,3,130,65,0,879,885,1,0,0,0,880,881, +10,1,0,0,881,882,5,10,0,0,882,884,3,130,65,0,883,880,1,0,0,0,884,887,1,0, +0,0,885,883,1,0,0,0,885,886,1,0,0,0,886,129,1,0,0,0,887,885,1,0,0,0,888, +892,3,134,67,0,889,892,3,146,73,0,890,892,3,160,80,0,891,888,1,0,0,0,891, +889,1,0,0,0,891,890,1,0,0,0,892,131,1,0,0,0,893,896,3,134,67,0,894,896,3, +148,74,0,895,893,1,0,0,0,895,894,1,0,0,0,896,133,1,0,0,0,897,905,3,138,69, +0,898,905,3,152,76,0,899,905,3,136,68,0,900,901,5,12,0,0,901,902,3,118,59, +0,902,903,5,13,0,0,903,905,1,0,0,0,904,897,1,0,0,0,904,898,1,0,0,0,904,899, +1,0,0,0,904,900,1,0,0,0,905,135,1,0,0,0,906,907,3,378,189,0,907,137,1,0, +0,0,908,909,3,330,165,0,909,910,5,14,0,0,910,911,3,140,70,0,911,912,5,15, +0,0,912,913,5,16,0,0,913,914,3,130,65,0,914,139,1,0,0,0,915,921,3,142,71, +0,916,917,3,142,71,0,917,918,5,2,0,0,918,919,3,140,70,0,919,921,1,0,0,0, +920,915,1,0,0,0,920,916,1,0,0,0,921,141,1,0,0,0,922,925,3,144,72,0,923,925, +3,378,189,0,924,922,1,0,0,0,924,923,1,0,0,0,925,143,1,0,0,0,926,927,3,378, +189,0,927,928,5,16,0,0,928,929,3,202,101,0,929,145,1,0,0,0,930,933,3,148, +74,0,931,933,3,150,75,0,932,930,1,0,0,0,932,931,1,0,0,0,933,147,1,0,0,0, +934,935,3,328,164,0,935,936,3,132,66,0,936,149,1,0,0,0,937,938,3,182,91, +0,938,939,3,360,180,0,939,940,3,182,91,0,940,151,1,0,0,0,941,945,3,154,77, +0,942,945,3,156,78,0,943,945,3,162,81,0,944,941,1,0,0,0,944,942,1,0,0,0, +944,943,1,0,0,0,945,153,1,0,0,0,946,953,3,362,181,0,947,948,3,364,182,0, +948,949,5,12,0,0,949,950,3,186,93,0,950,951,5,13,0,0,951,953,1,0,0,0,952, +946,1,0,0,0,952,947,1,0,0,0,953,155,1,0,0,0,954,955,3,158,79,0,955,157,1, +0,0,0,956,965,3,366,183,0,957,958,3,368,184,0,958,959,5,12,0,0,959,960,3, +186,93,0,960,961,5,13,0,0,961,965,1,0,0,0,962,965,3,178,89,0,963,965,3,164, +82,0,964,956,1,0,0,0,964,957,1,0,0,0,964,962,1,0,0,0,964,963,1,0,0,0,965, +159,1,0,0,0,966,967,3,182,91,0,967,968,3,356,178,0,968,969,3,182,91,0,969, +161,1,0,0,0,970,977,3,370,185,0,971,972,3,372,186,0,972,973,5,12,0,0,973, +974,3,186,93,0,974,975,5,13,0,0,975,977,1,0,0,0,976,970,1,0,0,0,976,971, +1,0,0,0,977,163,1,0,0,0,978,979,5,17,0,0,979,980,3,166,83,0,980,981,5,2, +0,0,981,982,3,170,85,0,982,983,5,2,0,0,983,984,3,180,90,0,984,985,5,13,0, +0,985,165,1,0,0,0,986,992,3,190,95,0,987,988,5,14,0,0,988,989,3,168,84,0, +989,990,5,15,0,0,990,992,1,0,0,0,991,986,1,0,0,0,991,987,1,0,0,0,992,167, +1,0,0,0,993,999,3,190,95,0,994,995,3,190,95,0,995,996,5,2,0,0,996,997,3, +168,84,0,997,999,1,0,0,0,998,993,1,0,0,0,998,994,1,0,0,0,999,169,1,0,0,0, +1000,1006,3,172,86,0,1001,1002,5,14,0,0,1002,1003,3,176,88,0,1003,1004,5, +15,0,0,1004,1006,1,0,0,0,1005,1000,1,0,0,0,1005,1001,1,0,0,0,1006,171,1, +0,0,0,1007,1008,3,174,87,0,1008,1009,3,342,171,0,1009,1010,3,180,90,0,1010, +173,1,0,0,0,1011,1014,3,154,77,0,1012,1014,3,184,92,0,1013,1011,1,0,0,0, +1013,1012,1,0,0,0,1014,175,1,0,0,0,1015,1021,3,172,86,0,1016,1017,3,172, +86,0,1017,1018,5,2,0,0,1018,1019,3,176,88,0,1019,1021,1,0,0,0,1020,1015, +1,0,0,0,1020,1016,1,0,0,0,1021,177,1,0,0,0,1022,1023,3,228,114,0,1023,1024, +5,11,0,0,1024,1025,5,12,0,0,1025,1026,3,186,93,0,1026,1027,5,13,0,0,1027, +179,1,0,0,0,1028,1032,3,118,59,0,1029,1032,3,376,188,0,1030,1032,3,184,92, +0,1031,1028,1,0,0,0,1031,1029,1,0,0,0,1031,1030,1,0,0,0,1032,181,1,0,0,0, +1033,1042,3,152,76,0,1034,1042,3,376,188,0,1035,1042,3,184,92,0,1036,1042, +3,378,189,0,1037,1038,5,12,0,0,1038,1039,3,118,59,0,1039,1040,5,13,0,0,1040, +1042,1,0,0,0,1041,1033,1,0,0,0,1041,1034,1,0,0,0,1041,1035,1,0,0,0,1041, +1036,1,0,0,0,1041,1037,1,0,0,0,1042,183,1,0,0,0,1043,1049,5,18,0,0,1044, +1045,5,14,0,0,1045,1046,3,186,93,0,1046,1047,5,15,0,0,1047,1049,1,0,0,0, +1048,1043,1,0,0,0,1048,1044,1,0,0,0,1049,185,1,0,0,0,1050,1054,3,180,90, +0,1051,1053,3,188,94,0,1052,1051,1,0,0,0,1053,1056,1,0,0,0,1054,1052,1,0, +0,0,1054,1055,1,0,0,0,1055,187,1,0,0,0,1056,1054,1,0,0,0,1057,1058,5,2,0, +0,1058,1059,3,180,90,0,1059,189,1,0,0,0,1060,1061,3,354,177,0,1061,1062, +5,16,0,0,1062,1063,3,192,96,0,1063,1069,1,0,0,0,1064,1065,5,12,0,0,1065, +1066,3,190,95,0,1066,1067,5,13,0,0,1067,1069,1,0,0,0,1068,1060,1,0,0,0,1068, +1064,1,0,0,0,1069,191,1,0,0,0,1070,1073,3,202,101,0,1071,1073,3,194,97,0, +1072,1070,1,0,0,0,1072,1071,1,0,0,0,1073,193,1,0,0,0,1074,1081,3,206,103, +0,1075,1081,3,196,98,0,1076,1077,5,12,0,0,1077,1078,3,194,97,0,1078,1079, +5,13,0,0,1079,1081,1,0,0,0,1080,1074,1,0,0,0,1080,1075,1,0,0,0,1080,1076, +1,0,0,0,1081,195,1,0,0,0,1082,1083,3,324,162,0,1083,1084,5,14,0,0,1084,1085, +3,140,70,0,1085,1086,5,15,0,0,1086,1087,5,16,0,0,1087,1088,3,198,99,0,1088, +197,1,0,0,0,1089,1096,3,202,101,0,1090,1091,5,12,0,0,1091,1092,3,206,103, +0,1092,1093,5,13,0,0,1093,1096,1,0,0,0,1094,1096,3,196,98,0,1095,1089,1, +0,0,0,1095,1090,1,0,0,0,1095,1094,1,0,0,0,1096,199,1,0,0,0,1097,1103,3,202, +101,0,1098,1099,5,12,0,0,1099,1100,3,208,104,0,1100,1101,5,13,0,0,1101,1103, +1,0,0,0,1102,1097,1,0,0,0,1102,1098,1,0,0,0,1103,201,1,0,0,0,1104,1118,3, +346,173,0,1105,1118,3,350,175,0,1106,1118,3,378,189,0,1107,1108,3,348,174, +0,1108,1109,5,12,0,0,1109,1110,3,204,102,0,1110,1111,5,13,0,0,1111,1118, +1,0,0,0,1112,1113,5,12,0,0,1113,1114,3,202,101,0,1114,1115,5,13,0,0,1115, +1118,1,0,0,0,1116,1118,3,210,105,0,1117,1104,1,0,0,0,1117,1105,1,0,0,0,1117, +1106,1,0,0,0,1117,1107,1,0,0,0,1117,1112,1,0,0,0,1117,1116,1,0,0,0,1118, +203,1,0,0,0,1119,1125,3,202,101,0,1120,1121,3,202,101,0,1121,1122,5,2,0, +0,1122,1123,3,204,102,0,1123,1125,1,0,0,0,1124,1119,1,0,0,0,1124,1120,1, +0,0,0,1125,205,1,0,0,0,1126,1127,3,200,100,0,1127,1128,5,92,0,0,1128,1129, +3,202,101,0,1129,207,1,0,0,0,1130,1131,6,104,-1,0,1131,1132,3,200,100,0, +1132,1133,5,90,0,0,1133,1134,3,202,101,0,1134,1140,1,0,0,0,1135,1136,10, +1,0,0,1136,1137,5,90,0,0,1137,1139,3,202,101,0,1138,1135,1,0,0,0,1139,1142, +1,0,0,0,1140,1138,1,0,0,0,1140,1141,1,0,0,0,1141,209,1,0,0,0,1142,1140,1, +0,0,0,1143,1144,5,14,0,0,1144,1145,3,212,106,0,1145,1146,5,15,0,0,1146,211, +1,0,0,0,1147,1153,3,192,96,0,1148,1149,3,192,96,0,1149,1150,5,2,0,0,1150, +1151,3,212,106,0,1151,1153,1,0,0,0,1152,1147,1,0,0,0,1152,1148,1,0,0,0,1153, +213,1,0,0,0,1154,1155,3,354,177,0,1155,1156,3,326,163,0,1156,1157,3,352, +176,0,1157,215,1,0,0,0,1158,1159,3,152,76,0,1159,1160,3,344,172,0,1160,1161, +3,180,90,0,1161,217,1,0,0,0,1162,1163,3,184,92,0,1163,1164,3,340,170,0,1164, +1165,3,184,92,0,1165,219,1,0,0,0,1166,1167,5,19,0,0,1167,1168,3,236,118, +0,1168,1169,5,20,0,0,1169,1177,1,0,0,0,1170,1171,5,19,0,0,1171,1172,3,236, +118,0,1172,1173,5,12,0,0,1173,1174,3,222,111,0,1174,1175,5,21,0,0,1175,1177, +1,0,0,0,1176,1166,1,0,0,0,1176,1170,1,0,0,0,1177,221,1,0,0,0,1178,1184,3, +224,112,0,1179,1180,3,224,112,0,1180,1181,5,2,0,0,1181,1182,3,222,111,0, +1182,1184,1,0,0,0,1183,1178,1,0,0,0,1183,1179,1,0,0,0,1184,223,1,0,0,0,1185, +1188,3,240,120,0,1186,1188,3,226,113,0,1187,1185,1,0,0,0,1187,1186,1,0,0, +0,1188,225,1,0,0,0,1189,1190,3,112,56,0,1190,227,1,0,0,0,1191,1192,5,19, +0,0,1192,1193,3,236,118,0,1193,1194,5,20,0,0,1194,1202,1,0,0,0,1195,1196, +5,19,0,0,1196,1197,3,236,118,0,1197,1198,5,12,0,0,1198,1199,3,230,115,0, +1199,1200,5,21,0,0,1200,1202,1,0,0,0,1201,1191,1,0,0,0,1201,1195,1,0,0,0, +1202,229,1,0,0,0,1203,1209,3,232,116,0,1204,1205,3,232,116,0,1205,1206,5, +2,0,0,1206,1207,3,230,115,0,1207,1209,1,0,0,0,1208,1203,1,0,0,0,1208,1204, +1,0,0,0,1209,231,1,0,0,0,1210,1213,3,240,120,0,1211,1213,3,234,117,0,1212, +1210,1,0,0,0,1212,1211,1,0,0,0,1213,233,1,0,0,0,1214,1215,3,216,108,0,1215, +235,1,0,0,0,1216,1219,3,238,119,0,1217,1219,3,452,226,0,1218,1216,1,0,0, +0,1218,1217,1,0,0,0,1219,237,1,0,0,0,1220,1221,3,450,225,0,1221,239,1,0, +0,0,1222,1223,5,94,0,0,1223,1224,3,182,91,0,1224,241,1,0,0,0,1225,1232,5, +22,0,0,1226,1227,5,93,0,0,1227,1228,5,23,0,0,1228,1232,5,92,0,0,1229,1232, +5,24,0,0,1230,1232,5,25,0,0,1231,1225,1,0,0,0,1231,1226,1,0,0,0,1231,1229, +1,0,0,0,1231,1230,1,0,0,0,1232,243,1,0,0,0,1233,1236,3,246,123,0,1234,1236, +3,190,95,0,1235,1233,1,0,0,0,1235,1234,1,0,0,0,1236,245,1,0,0,0,1237,1240, +3,248,124,0,1238,1240,3,312,156,0,1239,1237,1,0,0,0,1239,1238,1,0,0,0,1240, +247,1,0,0,0,1241,1242,5,26,0,0,1242,1243,5,14,0,0,1243,1244,3,140,70,0,1244, +1245,5,15,0,0,1245,1246,5,16,0,0,1246,1247,3,246,123,0,1247,249,1,0,0,0, +1248,1251,3,252,126,0,1249,1251,3,304,152,0,1250,1248,1,0,0,0,1250,1249, +1,0,0,0,1251,251,1,0,0,0,1252,1256,3,254,127,0,1253,1256,3,264,132,0,1254, +1256,3,270,135,0,1255,1252,1,0,0,0,1255,1253,1,0,0,0,1255,1254,1,0,0,0,1256, +253,1,0,0,0,1257,1260,3,256,128,0,1258,1260,3,258,129,0,1259,1257,1,0,0, +0,1259,1258,1,0,0,0,1260,255,1,0,0,0,1261,1262,3,268,134,0,1262,1263,3,334, +167,0,1263,1264,3,268,134,0,1264,257,1,0,0,0,1265,1268,3,260,130,0,1266, +1268,3,262,131,0,1267,1265,1,0,0,0,1267,1266,1,0,0,0,1268,259,1,0,0,0,1269, +1270,6,130,-1,0,1270,1271,3,268,134,0,1271,1272,5,89,0,0,1272,1273,3,268, +134,0,1273,1279,1,0,0,0,1274,1275,10,1,0,0,1275,1276,5,89,0,0,1276,1278, +3,268,134,0,1277,1274,1,0,0,0,1278,1281,1,0,0,0,1279,1277,1,0,0,0,1279,1280, +1,0,0,0,1280,261,1,0,0,0,1281,1279,1,0,0,0,1282,1283,6,131,-1,0,1283,1284, +3,268,134,0,1284,1285,5,10,0,0,1285,1286,3,268,134,0,1286,1292,1,0,0,0,1287, +1288,10,1,0,0,1288,1289,5,10,0,0,1289,1291,3,268,134,0,1290,1287,1,0,0,0, +1291,1294,1,0,0,0,1292,1290,1,0,0,0,1292,1293,1,0,0,0,1293,263,1,0,0,0,1294, +1292,1,0,0,0,1295,1296,3,338,169,0,1296,1297,3,268,134,0,1297,1300,1,0,0, +0,1298,1300,3,266,133,0,1299,1295,1,0,0,0,1299,1298,1,0,0,0,1300,265,1,0, +0,0,1301,1302,3,300,150,0,1302,1303,3,360,180,0,1303,1304,3,300,150,0,1304, +267,1,0,0,0,1305,1308,3,270,135,0,1306,1308,3,264,132,0,1307,1305,1,0,0, +0,1307,1306,1,0,0,0,1308,269,1,0,0,0,1309,1316,3,272,136,0,1310,1316,3,276, +138,0,1311,1312,5,12,0,0,1312,1313,3,252,126,0,1313,1314,5,13,0,0,1314,1316, +1,0,0,0,1315,1309,1,0,0,0,1315,1310,1,0,0,0,1315,1311,1,0,0,0,1316,271,1, +0,0,0,1317,1318,3,332,166,0,1318,1319,5,14,0,0,1319,1320,3,274,137,0,1320, +1321,5,15,0,0,1321,1322,5,16,0,0,1322,1323,3,268,134,0,1323,273,1,0,0,0, +1324,1330,3,378,189,0,1325,1326,3,378,189,0,1326,1327,5,2,0,0,1327,1328, +3,274,137,0,1328,1330,1,0,0,0,1329,1324,1,0,0,0,1329,1325,1,0,0,0,1330,275, +1,0,0,0,1331,1335,3,278,139,0,1332,1335,3,280,140,0,1333,1335,3,286,143, +0,1334,1331,1,0,0,0,1334,1332,1,0,0,0,1334,1333,1,0,0,0,1335,277,1,0,0,0, +1336,1337,3,288,144,0,1337,279,1,0,0,0,1338,1341,3,282,141,0,1339,1341,3, +284,142,0,1340,1338,1,0,0,0,1340,1339,1,0,0,0,1341,281,1,0,0,0,1342,1343, +3,294,147,0,1343,283,1,0,0,0,1344,1345,3,300,150,0,1345,1346,3,356,178,0, +1346,1347,3,300,150,0,1347,285,1,0,0,0,1348,1349,3,296,148,0,1349,287,1, +0,0,0,1350,1357,3,362,181,0,1351,1352,3,364,182,0,1352,1353,5,12,0,0,1353, +1354,3,298,149,0,1354,1355,5,13,0,0,1355,1357,1,0,0,0,1356,1350,1,0,0,0, +1356,1351,1,0,0,0,1357,289,1,0,0,0,1358,1361,3,376,188,0,1359,1361,3,292, +146,0,1360,1358,1,0,0,0,1360,1359,1,0,0,0,1361,291,1,0,0,0,1362,1363,3,294, +147,0,1363,293,1,0,0,0,1364,1371,3,366,183,0,1365,1366,3,368,184,0,1366, +1367,5,12,0,0,1367,1368,3,298,149,0,1368,1369,5,13,0,0,1369,1371,1,0,0,0, +1370,1364,1,0,0,0,1370,1365,1,0,0,0,1371,295,1,0,0,0,1372,1379,3,370,185, +0,1373,1374,3,372,186,0,1374,1375,5,12,0,0,1375,1376,3,298,149,0,1376,1377, +5,13,0,0,1377,1379,1,0,0,0,1378,1372,1,0,0,0,1378,1373,1,0,0,0,1379,297, +1,0,0,0,1380,1386,3,300,150,0,1381,1382,3,300,150,0,1382,1383,5,2,0,0,1383, +1384,3,298,149,0,1384,1386,1,0,0,0,1385,1380,1,0,0,0,1385,1381,1,0,0,0,1386, +299,1,0,0,0,1387,1390,3,302,151,0,1388,1390,3,378,189,0,1389,1387,1,0,0, +0,1389,1388,1,0,0,0,1390,301,1,0,0,0,1391,1395,3,288,144,0,1392,1395,3,290, +145,0,1393,1395,3,296,148,0,1394,1391,1,0,0,0,1394,1392,1,0,0,0,1394,1393, +1,0,0,0,1395,303,1,0,0,0,1396,1397,3,306,153,0,1397,1398,3,340,170,0,1398, +1399,3,306,153,0,1399,1405,1,0,0,0,1400,1401,5,12,0,0,1401,1402,3,304,152, +0,1402,1403,5,13,0,0,1403,1405,1,0,0,0,1404,1396,1,0,0,0,1404,1400,1,0,0, +0,1405,305,1,0,0,0,1406,1412,5,18,0,0,1407,1408,5,14,0,0,1408,1409,3,308, +154,0,1409,1410,5,15,0,0,1410,1412,1,0,0,0,1411,1406,1,0,0,0,1411,1407,1, +0,0,0,1412,307,1,0,0,0,1413,1417,3,252,126,0,1414,1416,3,310,155,0,1415, +1414,1,0,0,0,1416,1419,1,0,0,0,1417,1415,1,0,0,0,1417,1418,1,0,0,0,1418, +309,1,0,0,0,1419,1417,1,0,0,0,1420,1421,5,2,0,0,1421,1422,3,252,126,0,1422, +311,1,0,0,0,1423,1429,3,314,157,0,1424,1425,5,12,0,0,1425,1426,3,312,156, +0,1426,1427,5,13,0,0,1427,1429,1,0,0,0,1428,1423,1,0,0,0,1428,1424,1,0,0, +0,1429,313,1,0,0,0,1430,1431,6,157,-1,0,1431,1432,3,316,158,0,1432,1438, +1,0,0,0,1433,1434,10,1,0,0,1434,1435,5,89,0,0,1435,1437,3,316,158,0,1436, +1433,1,0,0,0,1437,1440,1,0,0,0,1438,1436,1,0,0,0,1438,1439,1,0,0,0,1439, +315,1,0,0,0,1440,1438,1,0,0,0,1441,1451,3,276,138,0,1442,1443,5,27,0,0,1443, +1451,3,276,138,0,1444,1445,5,27,0,0,1445,1446,5,12,0,0,1446,1447,3,276,138, +0,1447,1448,5,13,0,0,1448,1451,1,0,0,0,1449,1451,3,266,133,0,1450,1441,1, +0,0,0,1450,1442,1,0,0,0,1450,1444,1,0,0,0,1450,1449,1,0,0,0,1451,317,1,0, +0,0,1452,1456,3,330,165,0,1453,1456,3,322,161,0,1454,1456,3,324,162,0,1455, +1452,1,0,0,0,1455,1453,1,0,0,0,1455,1454,1,0,0,0,1456,319,1,0,0,0,1457,1460, +3,338,169,0,1458,1460,3,242,121,0,1459,1457,1,0,0,0,1459,1458,1,0,0,0,1460, +321,1,0,0,0,1461,1462,7,0,0,0,1462,323,1,0,0,0,1463,1464,7,1,0,0,1464,325, +1,0,0,0,1465,1466,5,33,0,0,1466,327,1,0,0,0,1467,1470,3,338,169,0,1468,1470, +3,242,121,0,1469,1467,1,0,0,0,1469,1468,1,0,0,0,1470,329,1,0,0,0,1471,1474, +3,332,166,0,1472,1474,5,94,0,0,1473,1471,1,0,0,0,1473,1472,1,0,0,0,1474, +331,1,0,0,0,1475,1476,7,2,0,0,1476,333,1,0,0,0,1477,1485,5,35,0,0,1478,1485, +5,36,0,0,1479,1485,5,37,0,0,1480,1485,5,38,0,0,1481,1482,5,27,0,0,1482,1485, +5,89,0,0,1483,1485,5,39,0,0,1484,1477,1,0,0,0,1484,1478,1,0,0,0,1484,1479, +1,0,0,0,1484,1480,1,0,0,0,1484,1481,1,0,0,0,1484,1483,1,0,0,0,1485,335,1, +0,0,0,1486,1487,7,3,0,0,1487,337,1,0,0,0,1488,1489,5,27,0,0,1489,339,1,0, +0,0,1490,1491,5,40,0,0,1491,341,1,0,0,0,1492,1493,5,41,0,0,1493,343,1,0, +0,0,1494,1495,5,42,0,0,1495,345,1,0,0,0,1496,1497,3,348,174,0,1497,347,1, +0,0,0,1498,1499,3,448,224,0,1499,349,1,0,0,0,1500,1501,3,450,225,0,1501, +351,1,0,0,0,1502,1505,3,354,177,0,1503,1505,3,366,183,0,1504,1502,1,0,0, +0,1504,1503,1,0,0,0,1505,353,1,0,0,0,1506,1509,3,362,181,0,1507,1509,3,370, +185,0,1508,1506,1,0,0,0,1508,1507,1,0,0,0,1509,355,1,0,0,0,1510,1511,3,358, +179,0,1511,357,1,0,0,0,1512,1513,5,43,0,0,1513,359,1,0,0,0,1514,1515,5,44, +0,0,1515,361,1,0,0,0,1516,1517,3,364,182,0,1517,363,1,0,0,0,1518,1519,3, +448,224,0,1519,365,1,0,0,0,1520,1521,3,368,184,0,1521,367,1,0,0,0,1522,1523, +3,450,225,0,1523,369,1,0,0,0,1524,1525,3,372,186,0,1525,371,1,0,0,0,1526, +1527,3,452,226,0,1527,373,1,0,0,0,1528,1529,7,4,0,0,1529,375,1,0,0,0,1530, +1533,3,454,227,0,1531,1533,5,67,0,0,1532,1530,1,0,0,0,1532,1531,1,0,0,0, +1533,377,1,0,0,0,1534,1535,5,70,0,0,1535,379,1,0,0,0,1536,1545,3,384,192, +0,1537,1545,3,390,195,0,1538,1545,3,394,197,0,1539,1545,5,50,0,0,1540,1541, +5,14,0,0,1541,1542,3,382,191,0,1542,1543,5,15,0,0,1543,1545,1,0,0,0,1544, +1536,1,0,0,0,1544,1537,1,0,0,0,1544,1538,1,0,0,0,1544,1539,1,0,0,0,1544, +1540,1,0,0,0,1545,381,1,0,0,0,1546,1552,3,380,190,0,1547,1548,3,380,190, +0,1548,1549,5,2,0,0,1549,1550,3,382,191,0,1550,1552,1,0,0,0,1551,1546,1, +0,0,0,1551,1547,1,0,0,0,1552,383,1,0,0,0,1553,1556,3,446,223,0,1554,1556, +3,386,193,0,1555,1553,1,0,0,0,1555,1554,1,0,0,0,1556,385,1,0,0,0,1557,1558, +5,51,0,0,1558,1559,3,388,194,0,1559,1560,5,2,0,0,1560,1561,3,420,210,0,1561, +1562,5,2,0,0,1562,1563,3,408,204,0,1563,1564,5,13,0,0,1564,387,1,0,0,0,1565, +1566,3,448,224,0,1566,389,1,0,0,0,1567,1568,5,52,0,0,1568,1569,3,392,196, +0,1569,1570,5,2,0,0,1570,1571,3,420,210,0,1571,1572,5,2,0,0,1572,1573,3, +408,204,0,1573,1574,5,13,0,0,1574,391,1,0,0,0,1575,1576,3,448,224,0,1576, +393,1,0,0,0,1577,1581,3,396,198,0,1578,1581,3,400,200,0,1579,1581,3,404, +202,0,1580,1577,1,0,0,0,1580,1578,1,0,0,0,1580,1579,1,0,0,0,1581,395,1,0, +0,0,1582,1583,5,53,0,0,1583,1584,3,456,228,0,1584,1585,3,398,199,0,1585, +1586,5,13,0,0,1586,397,1,0,0,0,1587,1588,5,2,0,0,1588,1591,3,446,223,0,1589, +1591,3,458,229,0,1590,1587,1,0,0,0,1590,1589,1,0,0,0,1591,399,1,0,0,0,1592, +1593,5,54,0,0,1593,1594,3,402,201,0,1594,1595,3,418,209,0,1595,1596,5,13, +0,0,1596,401,1,0,0,0,1597,1598,3,448,224,0,1598,403,1,0,0,0,1599,1600,5, +55,0,0,1600,1601,3,406,203,0,1601,1602,5,2,0,0,1602,1603,3,420,210,0,1603, +1604,5,2,0,0,1604,1605,3,408,204,0,1605,1606,5,13,0,0,1606,405,1,0,0,0,1607, +1608,3,448,224,0,1608,407,1,0,0,0,1609,1615,5,18,0,0,1610,1611,5,14,0,0, +1611,1612,3,410,205,0,1612,1613,5,15,0,0,1613,1615,1,0,0,0,1614,1609,1,0, +0,0,1614,1610,1,0,0,0,1615,409,1,0,0,0,1616,1620,3,414,207,0,1617,1619,3, +412,206,0,1618,1617,1,0,0,0,1619,1622,1,0,0,0,1620,1618,1,0,0,0,1620,1621, +1,0,0,0,1621,411,1,0,0,0,1622,1620,1,0,0,0,1623,1624,5,2,0,0,1624,1625,3, +414,207,0,1625,413,1,0,0,0,1626,1627,3,380,190,0,1627,1628,3,416,208,0,1628, +415,1,0,0,0,1629,1630,5,16,0,0,1630,1633,3,432,216,0,1631,1633,3,458,229, +0,1632,1629,1,0,0,0,1632,1631,1,0,0,0,1633,417,1,0,0,0,1634,1635,5,2,0,0, +1635,1638,3,420,210,0,1636,1638,3,458,229,0,1637,1634,1,0,0,0,1637,1636, +1,0,0,0,1638,419,1,0,0,0,1639,1640,3,440,220,0,1640,421,1,0,0,0,1641,1642, +5,56,0,0,1642,1643,3,456,228,0,1643,1644,3,424,212,0,1644,1645,5,3,0,0,1645, +423,1,0,0,0,1646,1655,3,458,229,0,1647,1648,5,2,0,0,1648,1655,3,426,213, +0,1649,1650,5,2,0,0,1650,1651,3,426,213,0,1651,1652,5,2,0,0,1652,1653,3, +430,215,0,1653,1655,1,0,0,0,1654,1646,1,0,0,0,1654,1647,1,0,0,0,1654,1649, +1,0,0,0,1655,425,1,0,0,0,1656,1657,5,14,0,0,1657,1658,3,428,214,0,1658,1659, +5,15,0,0,1659,1662,1,0,0,0,1660,1662,5,90,0,0,1661,1656,1,0,0,0,1661,1660, +1,0,0,0,1662,427,1,0,0,0,1663,1669,3,446,223,0,1664,1665,3,446,223,0,1665, +1666,5,2,0,0,1666,1667,3,428,214,0,1667,1669,1,0,0,0,1668,1663,1,0,0,0,1668, +1664,1,0,0,0,1669,429,1,0,0,0,1670,1671,3,446,223,0,1671,431,1,0,0,0,1672, +1679,3,434,217,0,1673,1674,3,434,217,0,1674,1675,5,16,0,0,1675,1676,3,432, +216,0,1676,1679,1,0,0,0,1677,1679,3,440,220,0,1678,1672,1,0,0,0,1678,1673, +1,0,0,0,1678,1677,1,0,0,0,1679,433,1,0,0,0,1680,1687,3,448,224,0,1681,1687, +3,436,218,0,1682,1687,3,378,189,0,1683,1687,3,454,227,0,1684,1687,5,67,0, +0,1685,1687,3,438,219,0,1686,1680,1,0,0,0,1686,1681,1,0,0,0,1686,1682,1, +0,0,0,1686,1683,1,0,0,0,1686,1684,1,0,0,0,1686,1685,1,0,0,0,1687,435,1,0, +0,0,1688,1689,3,448,224,0,1689,1690,5,12,0,0,1690,1691,3,442,221,0,1691, +1692,5,13,0,0,1692,437,1,0,0,0,1693,1694,5,57,0,0,1694,1695,3,24,12,0,1695, +1696,5,13,0,0,1696,1714,1,0,0,0,1697,1698,5,58,0,0,1698,1699,3,116,58,0, +1699,1700,5,13,0,0,1700,1714,1,0,0,0,1701,1702,5,59,0,0,1702,1703,3,250, +125,0,1703,1704,5,13,0,0,1704,1714,1,0,0,0,1705,1706,5,60,0,0,1706,1707, +3,312,156,0,1707,1708,5,13,0,0,1708,1714,1,0,0,0,1709,1710,5,61,0,0,1710, +1711,3,300,150,0,1711,1712,5,13,0,0,1712,1714,1,0,0,0,1713,1693,1,0,0,0, +1713,1697,1,0,0,0,1713,1701,1,0,0,0,1713,1705,1,0,0,0,1713,1709,1,0,0,0, +1714,439,1,0,0,0,1715,1721,5,18,0,0,1716,1717,5,14,0,0,1717,1718,3,442,221, +0,1718,1719,5,15,0,0,1719,1721,1,0,0,0,1720,1715,1,0,0,0,1720,1716,1,0,0, +0,1721,441,1,0,0,0,1722,1726,3,432,216,0,1723,1725,3,444,222,0,1724,1723, +1,0,0,0,1725,1728,1,0,0,0,1726,1724,1,0,0,0,1726,1727,1,0,0,0,1727,443,1, +0,0,0,1728,1726,1,0,0,0,1729,1730,5,2,0,0,1730,1731,3,432,216,0,1731,445, +1,0,0,0,1732,1735,3,448,224,0,1733,1735,5,82,0,0,1734,1732,1,0,0,0,1734, +1733,1,0,0,0,1735,447,1,0,0,0,1736,1737,7,5,0,0,1737,449,1,0,0,0,1738,1739, +5,68,0,0,1739,451,1,0,0,0,1740,1741,5,69,0,0,1741,453,1,0,0,0,1742,1743, +7,6,0,0,1743,455,1,0,0,0,1744,1745,3,448,224,0,1745,457,1,0,0,0,1746,1747, +1,0,0,0,1747,459,1,0,0,0,130,463,470,478,541,547,552,560,565,574,586,599, +612,618,622,631,647,655,667,671,681,685,706,713,720,731,739,746,753,759, +773,778,787,797,809,822,840,848,852,860,872,885,891,895,904,920,924,932, +944,952,964,976,991,998,1005,1013,1020,1031,1041,1048,1054,1068,1072,1080, +1095,1102,1117,1124,1140,1152,1176,1183,1187,1201,1208,1212,1218,1231,1235, +1239,1250,1255,1259,1267,1279,1292,1299,1307,1315,1329,1334,1340,1356,1360, +1370,1378,1385,1389,1394,1404,1411,1417,1428,1438,1450,1455,1459,1469,1473, +1484,1504,1508,1532,1544,1551,1555,1580,1590,1614,1620,1632,1637,1654,1661, +1668,1678,1686,1713,1720,1726,1734]; + + +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('", + "'[]'", "'{'", "'}'", "')}'", "'[.]'", "'.'", + "'{.}'", "'(.)'", "'!'", "'~'", "'^'", "'@+'", + "'@-'", "'!>'", "'?*'", "'<<'", "'?'", "'<=>'", + "'=>'", "'<='", "'<~>'", "'~&'", "'-->'", "':='", + "'=='", "'='", "'!='", "'!!'", "'??'", "'@@+'", + "'@@-'", "'@='", "'unknown'", "'inference('", + "'introduced('", "'file('", "'theory('", "'creator('", + "'include('", "'$thf('", "'$tff('", "'$fof('", + "'$cnf('", "'$fot('", 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, "'.\\n'" ]; + 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, null, null, null, + null, null, null, null, null, null, "WS", "Comment_line", + "Comment_block", "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", + "Not_star_slash", "Percentage_sign", "Double_quote", + "Single_quote", "Back_quote", "Dot", "Slash_char", + "Slosh_char", "Zero_numeric", "Underscore", + "Alpha", "Dollar", "Printable_char", "Viewable_char" ]; + 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_nonassoc", "thf_binary_assoc", "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_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_nonassoc", + "tff_binary_assoc", "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_nonassoc", "fof_binary_assoc", "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", "type_constant", + "type_functor", "defined_type", "atom", "untyped_atom", + "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", "theory", "theory_name", + "creator_source", "creator_name", "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" ]; + + 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 53: + return this.thf_xprod_type_sempred(localctx, predIndex); + case 54: + return this.thf_union_type_sempred(localctx, predIndex); + case 63: + return this.tff_or_formula_sempred(localctx, predIndex); + case 64: + return this.tff_and_formula_sempred(localctx, predIndex); + case 104: + return this.tff_xprod_type_sempred(localctx, predIndex); + case 130: + return this.fof_or_formula_sempred(localctx, predIndex); + case 131: + return this.fof_and_formula_sempred(localctx, predIndex); + case 157: + 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) & 498) !== 0) || _la===56) { + 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 4: + case 5: + case 6: + case 7: + case 8: + this.enterOuterAlt(localctx, 1); + this.state = 468; + this.annotated_formula(); + break; + case 56: + 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 4: + this.enterOuterAlt(localctx, 1); + this.state = 472; + this.thf_annotated(); + break; + case 5: + this.enterOuterAlt(localctx, 2); + this.state = 473; + this.tff_annotated(); + break; + case 6: + this.enterOuterAlt(localctx, 3); + this.state = 474; + this.tcf_annotated(); + break; + case 7: + this.enterOuterAlt(localctx, 4); + this.state = 475; + this.fof_annotated(); + break; + case 8: + 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.name(); + this.state = 482; + this.match(TPTPParser.T__1); + this.state = 483; + this.formula_role(); + this.state = 484; + this.match(TPTPParser.T__1); + this.state = 485; + this.tpi_formula(); + this.state = 486; + this.annotations(); + this.state = 487; + this.match(TPTPParser.T__2); + } catch (re) { + if(re instanceof 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 = 489; + 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 = 491; + this.match(TPTPParser.T__3); + this.state = 492; + this.name(); + this.state = 493; + this.match(TPTPParser.T__1); + this.state = 494; + this.formula_role(); + this.state = 495; + this.match(TPTPParser.T__1); + this.state = 496; + this.thf_formula(); + this.state = 497; + this.annotations(); + this.state = 498; + this.match(TPTPParser.T__2); + } catch (re) { + if(re instanceof 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 = 500; + this.match(TPTPParser.T__4); + this.state = 501; + this.name(); + this.state = 502; + this.match(TPTPParser.T__1); + this.state = 503; + this.formula_role(); + this.state = 504; + this.match(TPTPParser.T__1); + this.state = 505; + this.tff_formula(); + this.state = 506; + this.annotations(); + this.state = 507; + this.match(TPTPParser.T__2); + } catch (re) { + if(re instanceof 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 = 509; + this.match(TPTPParser.T__5); + this.state = 510; + this.name(); + this.state = 511; + this.match(TPTPParser.T__1); + this.state = 512; + this.formula_role(); + this.state = 513; + this.match(TPTPParser.T__1); + this.state = 514; + this.tcf_formula(); + this.state = 515; + this.annotations(); + this.state = 516; + this.match(TPTPParser.T__2); + } catch (re) { + if(re instanceof 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 = 518; + this.match(TPTPParser.T__6); + this.state = 519; + this.name(); + this.state = 520; + this.match(TPTPParser.T__1); + this.state = 521; + this.formula_role(); + this.state = 522; + this.match(TPTPParser.T__1); + this.state = 523; + this.fof_formula(); + this.state = 524; + this.annotations(); + this.state = 525; + this.match(TPTPParser.T__2); + } catch (re) { + if(re instanceof 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 = 527; + this.match(TPTPParser.T__7); + this.state = 528; + this.name(); + this.state = 529; + this.match(TPTPParser.T__1); + this.state = 530; + this.formula_role(); + this.state = 531; + this.match(TPTPParser.T__1); + this.state = 532; + this.cnf_formula(); + this.state = 533; + this.annotations(); + this.state = 534; + this.match(TPTPParser.T__2); + } catch (re) { + if(re instanceof 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 = 541; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 2: + this.enterOuterAlt(localctx, 1); + this.state = 536; + this.match(TPTPParser.T__1); + this.state = 537; + this.source(); + this.state = 538; + this.optional_info(); + break; + case 3: + this.enterOuterAlt(localctx, 2); + this.state = 540; + 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 = 547; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,4,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 543; + this.match(TPTPParser.Lower_word); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 544; + this.match(TPTPParser.Lower_word); + this.state = 545; + this.match(TPTPParser.T__8); + this.state = 546; + 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 = 552; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,5,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 549; + this.thf_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 550; + this.thf_atom_typing(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 551; + 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 = 560; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,6,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 554; + this.thf_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 555; + this.thf_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 556; + this.thf_binary_formula(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 557; + this.thf_defined_infix(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 558; + this.thf_definition(); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 559; + 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 = 565; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,7,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 562; + this.thf_binary_nonassoc(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 563; + this.thf_binary_assoc(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 564; + 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_nonassoc() { + let localctx = new Thf_binary_nonassocContext(this, this._ctx, this.state); + this.enterRule(localctx, 30, TPTPParser.RULE_thf_binary_nonassoc); + try { + this.enterOuterAlt(localctx, 1); + this.state = 567; + this.thf_unit_formula(); + this.state = 568; + this.nonassoc_connective(); + this.state = 569; + 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_assoc() { + let localctx = new Thf_binary_assocContext(this, this._ctx, this.state); + this.enterRule(localctx, 32, TPTPParser.RULE_thf_binary_assoc); + try { + this.state = 574; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,8,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 571; + this.thf_or_formula(0); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 572; + this.thf_and_formula(0); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 573; + 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 = 577; + this.thf_unit_formula(); + this.state = 578; + this.match(TPTPParser.Vline); + this.state = 579; + this.thf_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 586; + 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 = 581; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 582; + this.match(TPTPParser.Vline); + this.state = 583; + this.thf_unit_formula(); + } + this.state = 588; + 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 = 590; + this.thf_unit_formula(); + this.state = 591; + this.match(TPTPParser.T__9); + 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,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 = 594; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 595; + this.match(TPTPParser.T__9); + this.state = 596; + this.thf_unit_formula(); + } + this.state = 601; + 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 = 603; + this.thf_unit_formula(); + this.state = 604; + this.match(TPTPParser.T__10); + 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,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 = 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__10); + this.state = 609; + this.thf_unit_formula(); + } + this.state = 614; + 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 = 618; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,12,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 615; + this.thf_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 616; + this.thf_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 617; + 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 = 622; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 12: + case 14: + case 17: + case 18: + case 19: + case 26: + case 28: + case 29: + case 30: + case 31: + case 32: + case 34: + case 45: + case 46: + case 47: + case 48: + case 49: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 79: + case 82: + case 94: + this.enterOuterAlt(localctx, 1); + this.state = 620; + this.thf_unitary_formula(); + break; + case 22: + case 24: + case 25: + case 27: + case 93: + this.enterOuterAlt(localctx, 2); + this.state = 621; + this.thf_prefix_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; + } + + + + 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 = 631; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,14,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 624; + this.thf_quantified_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 625; + this.thf_atomic_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 626; + this.variable(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 627; + this.match(TPTPParser.T__11); + this.state = 628; + this.thf_logic_formula(); + this.state = 629; + this.match(TPTPParser.T__12); + 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 = 633; + this.thf_quantification(); + this.state = 634; + 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 = 636; + this.thf_quantifier(); + this.state = 637; + this.match(TPTPParser.T__13); + this.state = 638; + this.thf_variable_list(); + this.state = 639; + this.match(TPTPParser.T__14); + this.state = 640; + 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 = 647; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,15,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 642; + this.thf_typed_variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 643; + this.thf_typed_variable(); + this.state = 644; + this.match(TPTPParser.T__1); + this.state = 645; + 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 = 649; + this.variable(); + this.state = 650; + this.match(TPTPParser.T__15); + this.state = 651; + 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 = 655; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 22: + case 24: + case 25: + case 27: + case 93: + this.enterOuterAlt(localctx, 1); + this.state = 653; + this.thf_prefix_unary(); + break; + case 12: + case 14: + case 17: + case 18: + case 19: + case 45: + case 46: + case 47: + case 48: + case 49: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 654; + this.thf_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; + } + + + + 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 = 657; + this.thf_unary_connective(); + this.state = 658; + 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 = 660; + this.thf_unitary_term(); + this.state = 661; + this.infix_inequality(); + this.state = 662; + 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 = 667; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 14: + case 18: + case 65: + case 66: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 664; + this.thf_plain_atomic(); + break; + case 12: + case 17: + case 19: + case 45: + case 46: + case 47: + case 48: + case 49: + case 67: + case 68: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 665; + this.thf_defined_atomic(); + break; + case 69: + this.enterOuterAlt(localctx, 3); + this.state = 666; + this.thf_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; + } + + + + 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 = 671; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 669; + this.constant(); + break; + case 14: + case 18: + this.enterOuterAlt(localctx, 2); + this.state = 670; + 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 = 681; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 68: + this.enterOuterAlt(localctx, 1); + this.state = 673; + this.defined_constant(); + break; + case 45: + case 46: + case 47: + case 48: + case 49: + case 67: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 674; + this.thf_defined_term(); + break; + case 12: + this.enterOuterAlt(localctx, 3); + this.state = 675; + this.match(TPTPParser.T__11); + this.state = 676; + this.thf_conn_term(); + this.state = 677; + this.match(TPTPParser.T__12); + break; + case 19: + this.enterOuterAlt(localctx, 4); + this.state = 679; + this.nhf_long_connective(); + break; + case 17: + this.enterOuterAlt(localctx, 5); + this.state = 680; + 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 = 685; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 67: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 1); + this.state = 683; + this.defined_term(); + break; + case 45: + case 46: + case 47: + case 48: + case 49: + this.enterOuterAlt(localctx, 2); + this.state = 684; + 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 = 687; + this.thf_unitary_term(); + this.state = 688; + this.defined_infix_pred(); + this.state = 689; + 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 = 691; + 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 = 693; + this.match(TPTPParser.T__16); + this.state = 694; + this.thf_let_types(); + this.state = 695; + this.match(TPTPParser.T__1); + this.state = 696; + this.thf_let_defns(); + this.state = 697; + this.match(TPTPParser.T__1); + this.state = 698; + this.thf_logic_formula(); + this.state = 699; + this.match(TPTPParser.T__12); + } catch (re) { + if(re instanceof 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 = 706; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 12: + case 65: + case 66: + case 69: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 701; + this.thf_atom_typing(); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 702; + this.match(TPTPParser.T__13); + this.state = 703; + this.thf_atom_typing_list(); + this.state = 704; + 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 = 713; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,22,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 708; + this.thf_atom_typing(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 709; + this.thf_atom_typing(); + this.state = 710; + this.match(TPTPParser.T__1); + this.state = 711; + 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 = 720; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,23,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 715; + this.thf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 716; + this.match(TPTPParser.T__13); + this.state = 717; + this.thf_let_defn_list(); + this.state = 718; + 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 = 722; + this.thf_logic_formula(); + this.state = 723; + this.assignment(); + this.state = 724; + 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 = 731; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,24,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 726; + this.thf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 727; + this.thf_let_defn(); + this.state = 728; + this.match(TPTPParser.T__1); + this.state = 729; + 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 = 739; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,25,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 733; + this.thf_atomic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 734; + this.variable(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 735; + this.match(TPTPParser.T__11); + this.state = 736; + this.thf_logic_formula(); + this.state = 737; + this.match(TPTPParser.T__12); + 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 = 746; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,26,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 741; + this.nonassoc_connective(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 742; + this.assoc_connective(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 743; + this.infix_equality(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 744; + this.infix_inequality(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 745; + 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 = 753; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 18: + this.enterOuterAlt(localctx, 1); + this.state = 748; + this.match(TPTPParser.T__17); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 749; + this.match(TPTPParser.T__13); + this.state = 750; + this.thf_formula_list(); + this.state = 751; + 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_formula_list() { + let localctx = new Thf_formula_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 90, TPTPParser.RULE_thf_formula_list); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 755; + this.thf_logic_formula(); + this.state = 759; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===2) { + this.state = 756; + this.comma_thf_logic_formula(); + this.state = 761; + 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, 92, TPTPParser.RULE_comma_thf_logic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 762; + this.match(TPTPParser.T__1); + this.state = 763; + 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, 94, TPTPParser.RULE_thf_atom_typing); + try { + this.state = 773; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 69: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 765; + this.untyped_atom(); + this.state = 766; + this.match(TPTPParser.T__15); + this.state = 767; + this.thf_top_level_type(); + break; + case 12: + this.enterOuterAlt(localctx, 2); + this.state = 769; + this.match(TPTPParser.T__11); + this.state = 770; + this.thf_atom_typing(); + this.state = 771; + this.match(TPTPParser.T__12); + 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, 96, TPTPParser.RULE_thf_top_level_type); + try { + this.state = 778; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,30,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 775; + this.thf_unitary_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 776; + this.thf_mapping_type(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 777; + 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, 98, TPTPParser.RULE_thf_unitary_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 780; + 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, 100, TPTPParser.RULE_thf_apply_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 782; + 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, 102, TPTPParser.RULE_thf_binary_type); + try { + this.state = 787; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,31,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 784; + this.thf_mapping_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 785; + this.thf_xprod_type(0); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 786; + 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, 104, TPTPParser.RULE_thf_mapping_type); + try { + this.state = 797; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,32,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 789; + this.thf_unitary_type(); + this.state = 790; + this.match(TPTPParser.Arrow); + this.state = 791; + this.thf_unitary_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 793; + this.thf_unitary_type(); + this.state = 794; + this.match(TPTPParser.Arrow); + this.state = 795; + 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 = 106; + this.enterRecursionRule(localctx, 106, TPTPParser.RULE_thf_xprod_type, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 800; + this.thf_unitary_type(); + this.state = 801; + this.match(TPTPParser.Star); + this.state = 802; + this.thf_unitary_type(); + this._ctx.stop = this._input.LT(-1); + this.state = 809; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,33,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 = 804; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 805; + this.match(TPTPParser.Star); + this.state = 806; + this.thf_unitary_type(); + } + this.state = 811; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,33,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 = 108; + this.enterRecursionRule(localctx, 108, TPTPParser.RULE_thf_union_type, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 813; + this.thf_unitary_type(); + this.state = 814; + this.match(TPTPParser.Plus); + this.state = 815; + this.thf_unitary_type(); + this._ctx.stop = this._input.LT(-1); + this.state = 822; + 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_union_typeContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_thf_union_type); + this.state = 817; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 818; + this.match(TPTPParser.Plus); + this.state = 819; + this.thf_unitary_type(); + } + this.state = 824; + 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_subtype() { + let localctx = new Thf_subtypeContext(this, this._ctx, this.state); + this.enterRule(localctx, 110, TPTPParser.RULE_thf_subtype); + try { + this.enterOuterAlt(localctx, 1); + this.state = 825; + this.untyped_atom(); + this.state = 826; + this.subtype_sign(); + this.state = 827; + this.atom(); + } catch (re) { + if(re instanceof 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, 112, TPTPParser.RULE_thf_definition); + try { + this.enterOuterAlt(localctx, 1); + this.state = 829; + this.thf_atomic_formula(); + this.state = 830; + this.identical(); + this.state = 831; + 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, 114, TPTPParser.RULE_thf_sequent); + try { + this.enterOuterAlt(localctx, 1); + this.state = 833; + this.thf_tuple(); + this.state = 834; + this.gentzen_arrow(); + this.state = 835; + 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, 116, TPTPParser.RULE_tff_formula); + try { + this.state = 840; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,35,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 837; + this.tff_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 838; + this.tff_atom_typing(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 839; + 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, 118, TPTPParser.RULE_tff_logic_formula); + try { + this.state = 848; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,36,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 842; + this.tff_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 843; + this.tff_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 844; + this.tff_binary_formula(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 845; + this.tff_defined_infix(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 846; + this.txf_definition(); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 847; + 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, 120, TPTPParser.RULE_tff_binary_formula); + try { + this.state = 852; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,37,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 850; + this.tff_binary_nonassoc(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 851; + this.tff_binary_assoc(); + 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_nonassoc() { + let localctx = new Tff_binary_nonassocContext(this, this._ctx, this.state); + this.enterRule(localctx, 122, TPTPParser.RULE_tff_binary_nonassoc); + try { + this.enterOuterAlt(localctx, 1); + this.state = 854; + this.tff_unit_formula(); + this.state = 855; + this.nonassoc_connective(); + this.state = 856; + 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_assoc() { + let localctx = new Tff_binary_assocContext(this, this._ctx, this.state); + this.enterRule(localctx, 124, TPTPParser.RULE_tff_binary_assoc); + try { + this.state = 860; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,38,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 858; + this.tff_or_formula(0); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 859; + 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 = 126; + this.enterRecursionRule(localctx, 126, TPTPParser.RULE_tff_or_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 863; + this.tff_unit_formula(); + this.state = 864; + this.match(TPTPParser.Vline); + this.state = 865; + this.tff_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 872; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,39,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 = 867; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 868; + this.match(TPTPParser.Vline); + this.state = 869; + this.tff_unit_formula(); + } + this.state = 874; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,39,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 = 128; + this.enterRecursionRule(localctx, 128, TPTPParser.RULE_tff_and_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 876; + this.tff_unit_formula(); + this.state = 877; + this.match(TPTPParser.T__9); + this.state = 878; + this.tff_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 885; + 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_and_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_tff_and_formula); + this.state = 880; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 881; + this.match(TPTPParser.T__9); + this.state = 882; + this.tff_unit_formula(); + } + this.state = 887; + 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_unit_formula() { + let localctx = new Tff_unit_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 130, TPTPParser.RULE_tff_unit_formula); + try { + this.state = 891; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,41,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 888; + this.tff_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 889; + this.tff_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 890; + 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, 132, TPTPParser.RULE_tff_preunit_formula); + try { + this.state = 895; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 12: + case 17: + case 19: + case 26: + case 34: + case 65: + case 66: + case 68: + case 69: + case 70: + case 71: + case 94: + this.enterOuterAlt(localctx, 1); + this.state = 893; + this.tff_unitary_formula(); + break; + case 22: + case 24: + case 25: + case 27: + case 93: + this.enterOuterAlt(localctx, 2); + this.state = 894; + this.tff_prefix_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; + } + + + + tff_unitary_formula() { + let localctx = new Tff_unitary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 134, TPTPParser.RULE_tff_unitary_formula); + try { + this.state = 904; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 26: + case 34: + case 94: + this.enterOuterAlt(localctx, 1); + this.state = 897; + this.tff_quantified_formula(); + break; + case 17: + case 19: + case 65: + case 66: + case 68: + case 69: + case 71: + this.enterOuterAlt(localctx, 2); + this.state = 898; + this.tff_atomic_formula(); + break; + case 70: + this.enterOuterAlt(localctx, 3); + this.state = 899; + this.txf_unitary_formula(); + break; + case 12: + this.enterOuterAlt(localctx, 4); + this.state = 900; + this.match(TPTPParser.T__11); + this.state = 901; + this.tff_logic_formula(); + this.state = 902; + this.match(TPTPParser.T__12); + 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, 136, TPTPParser.RULE_txf_unitary_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 906; + 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, 138, TPTPParser.RULE_tff_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 908; + this.tff_quantifier(); + this.state = 909; + this.match(TPTPParser.T__13); + this.state = 910; + this.tff_variable_list(); + this.state = 911; + this.match(TPTPParser.T__14); + this.state = 912; + this.match(TPTPParser.T__15); + this.state = 913; + 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, 140, TPTPParser.RULE_tff_variable_list); + try { + this.state = 920; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,44,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 915; + this.tff_variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 916; + this.tff_variable(); + this.state = 917; + this.match(TPTPParser.T__1); + this.state = 918; + 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, 142, TPTPParser.RULE_tff_variable); + try { + this.state = 924; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,45,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 922; + this.tff_typed_variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 923; + 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, 144, TPTPParser.RULE_tff_typed_variable); + try { + this.enterOuterAlt(localctx, 1); + this.state = 926; + this.variable(); + this.state = 927; + this.match(TPTPParser.T__15); + this.state = 928; + 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, 146, TPTPParser.RULE_tff_unary_formula); + try { + this.state = 932; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 22: + case 24: + case 25: + case 27: + case 93: + this.enterOuterAlt(localctx, 1); + this.state = 930; + this.tff_prefix_unary(); + break; + case 12: + case 14: + case 17: + case 18: + case 19: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 931; + this.tff_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; + } + + + + tff_prefix_unary() { + let localctx = new Tff_prefix_unaryContext(this, this._ctx, this.state); + this.enterRule(localctx, 148, TPTPParser.RULE_tff_prefix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 934; + this.tff_unary_connective(); + this.state = 935; + 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, 150, TPTPParser.RULE_tff_infix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 937; + this.tff_unitary_term(); + this.state = 938; + this.infix_inequality(); + this.state = 939; + 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, 152, TPTPParser.RULE_tff_atomic_formula); + try { + this.state = 944; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 941; + this.tff_plain_atomic(); + break; + case 17: + case 19: + case 68: + this.enterOuterAlt(localctx, 2); + this.state = 942; + this.tff_defined_atomic(); + break; + case 69: + this.enterOuterAlt(localctx, 3); + this.state = 943; + 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, 154, TPTPParser.RULE_tff_plain_atomic); + try { + this.state = 952; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,48,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 946; + this.constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 947; + this.functor(); + this.state = 948; + this.match(TPTPParser.T__11); + this.state = 949; + this.tff_arguments(); + this.state = 950; + this.match(TPTPParser.T__12); + 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, 156, TPTPParser.RULE_tff_defined_atomic); + try { + this.enterOuterAlt(localctx, 1); + this.state = 954; + 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, 158, TPTPParser.RULE_tff_defined_plain); + try { + this.state = 964; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,49,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 956; + this.defined_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 957; + this.defined_functor(); + this.state = 958; + this.match(TPTPParser.T__11); + this.state = 959; + this.tff_arguments(); + this.state = 960; + this.match(TPTPParser.T__12); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 962; + this.nxf_atom(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 963; + 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, 160, TPTPParser.RULE_tff_defined_infix); + try { + this.enterOuterAlt(localctx, 1); + this.state = 966; + this.tff_unitary_term(); + this.state = 967; + this.defined_infix_pred(); + this.state = 968; + 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, 162, TPTPParser.RULE_tff_system_atomic); + try { + this.state = 976; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,50,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 970; + this.system_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 971; + this.system_functor(); + this.state = 972; + this.match(TPTPParser.T__11); + this.state = 973; + this.tff_arguments(); + this.state = 974; + this.match(TPTPParser.T__12); + 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, 164, TPTPParser.RULE_txf_let); + try { + this.enterOuterAlt(localctx, 1); + this.state = 978; + this.match(TPTPParser.T__16); + this.state = 979; + this.txf_let_types(); + this.state = 980; + this.match(TPTPParser.T__1); + this.state = 981; + this.txf_let_defns(); + this.state = 982; + this.match(TPTPParser.T__1); + this.state = 983; + this.tff_term(); + this.state = 984; + this.match(TPTPParser.T__12); + } catch (re) { + if(re instanceof 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, 166, TPTPParser.RULE_txf_let_types); + try { + this.state = 991; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 12: + case 65: + case 66: + case 69: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 986; + this.tff_atom_typing(); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 987; + this.match(TPTPParser.T__13); + this.state = 988; + this.tff_atom_typing_list(); + this.state = 989; + 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, 168, TPTPParser.RULE_tff_atom_typing_list); + try { + this.state = 998; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,52,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 993; + this.tff_atom_typing(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 994; + this.tff_atom_typing(); + this.state = 995; + this.match(TPTPParser.T__1); + this.state = 996; + 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, 170, TPTPParser.RULE_txf_let_defns); + try { + this.state = 1005; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,53,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1000; + this.txf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1001; + this.match(TPTPParser.T__13); + this.state = 1002; + this.txf_let_defn_list(); + this.state = 1003; + 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, 172, TPTPParser.RULE_txf_let_defn); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1007; + this.txf_let_LHS(); + this.state = 1008; + this.assignment(); + this.state = 1009; + 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, 174, TPTPParser.RULE_txf_let_LHS); + try { + this.state = 1013; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 1011; + this.tff_plain_atomic(); + break; + case 14: + case 18: + this.enterOuterAlt(localctx, 2); + this.state = 1012; + 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, 176, TPTPParser.RULE_txf_let_defn_list); + try { + this.state = 1020; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,55,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1015; + this.txf_let_defn(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1016; + this.txf_let_defn(); + this.state = 1017; + this.match(TPTPParser.T__1); + this.state = 1018; + 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, 178, TPTPParser.RULE_nxf_atom); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1022; + this.nxf_long_connective(); + this.state = 1023; + this.match(TPTPParser.T__10); + this.state = 1024; + this.match(TPTPParser.T__11); + this.state = 1025; + this.tff_arguments(); + this.state = 1026; + this.match(TPTPParser.T__12); + } catch (re) { + if(re instanceof 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, 180, TPTPParser.RULE_tff_term); + try { + this.state = 1031; + 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.tff_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1029; + this.defined_term(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1030; + 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, 182, TPTPParser.RULE_tff_unitary_term); + try { + this.state = 1041; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 17: + case 19: + case 65: + case 66: + case 68: + case 69: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 1033; + this.tff_atomic_formula(); + break; + case 67: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 1034; + this.defined_term(); + break; + case 14: + case 18: + this.enterOuterAlt(localctx, 3); + this.state = 1035; + this.txf_tuple(); + break; + case 70: + this.enterOuterAlt(localctx, 4); + this.state = 1036; + this.variable(); + break; + case 12: + this.enterOuterAlt(localctx, 5); + this.state = 1037; + this.match(TPTPParser.T__11); + this.state = 1038; + this.tff_logic_formula(); + this.state = 1039; + this.match(TPTPParser.T__12); + 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, 184, TPTPParser.RULE_txf_tuple); + try { + this.state = 1048; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 18: + this.enterOuterAlt(localctx, 1); + this.state = 1043; + this.match(TPTPParser.T__17); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 1044; + this.match(TPTPParser.T__13); + this.state = 1045; + this.tff_arguments(); + this.state = 1046; + 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_arguments() { + let localctx = new Tff_argumentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 186, TPTPParser.RULE_tff_arguments); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1050; + this.tff_term(); + this.state = 1054; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===2) { + this.state = 1051; + this.comma_tff_term(); + this.state = 1056; + 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, 188, TPTPParser.RULE_comma_tff_term); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1057; + this.match(TPTPParser.T__1); + this.state = 1058; + 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, 190, TPTPParser.RULE_tff_atom_typing); + try { + this.state = 1068; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 69: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 1060; + this.untyped_atom(); + this.state = 1061; + this.match(TPTPParser.T__15); + this.state = 1062; + this.tff_top_level_type(); + break; + case 12: + this.enterOuterAlt(localctx, 2); + this.state = 1064; + this.match(TPTPParser.T__11); + this.state = 1065; + this.tff_atom_typing(); + this.state = 1066; + this.match(TPTPParser.T__12); + 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, 192, TPTPParser.RULE_tff_top_level_type); + try { + this.state = 1072; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,61,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1070; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1071; + 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, 194, TPTPParser.RULE_tff_non_atomic_type); + try { + this.state = 1080; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,62,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1074; + this.tff_mapping_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1075; + this.tf1_quantified_type(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1076; + this.match(TPTPParser.T__11); + this.state = 1077; + this.tff_non_atomic_type(); + this.state = 1078; + this.match(TPTPParser.T__12); + 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, 196, TPTPParser.RULE_tf1_quantified_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1082; + this.type_quantifier(); + this.state = 1083; + this.match(TPTPParser.T__13); + this.state = 1084; + this.tff_variable_list(); + this.state = 1085; + this.match(TPTPParser.T__14); + this.state = 1086; + this.match(TPTPParser.T__15); + this.state = 1087; + 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, 198, TPTPParser.RULE_tff_monotype); + try { + this.state = 1095; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,63,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1089; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1090; + this.match(TPTPParser.T__11); + this.state = 1091; + this.tff_mapping_type(); + this.state = 1092; + this.match(TPTPParser.T__12); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1094; + 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, 200, TPTPParser.RULE_tff_unitary_type); + try { + this.state = 1102; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,64,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1097; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1098; + this.match(TPTPParser.T__11); + this.state = 1099; + this.tff_xprod_type(0); + this.state = 1100; + this.match(TPTPParser.T__12); + 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, 202, TPTPParser.RULE_tff_atomic_type); + try { + this.state = 1117; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,65,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1104; + this.type_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1105; + this.defined_type(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1106; + this.variable(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1107; + this.type_functor(); + this.state = 1108; + this.match(TPTPParser.T__11); + this.state = 1109; + this.tff_type_arguments(); + this.state = 1110; + this.match(TPTPParser.T__12); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 1112; + this.match(TPTPParser.T__11); + this.state = 1113; + this.tff_atomic_type(); + this.state = 1114; + this.match(TPTPParser.T__12); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 1116; + 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, 204, TPTPParser.RULE_tff_type_arguments); + try { + this.state = 1124; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,66,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1119; + this.tff_atomic_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1120; + this.tff_atomic_type(); + this.state = 1121; + this.match(TPTPParser.T__1); + this.state = 1122; + 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, 206, TPTPParser.RULE_tff_mapping_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1126; + this.tff_unitary_type(); + this.state = 1127; + this.match(TPTPParser.Arrow); + this.state = 1128; + 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 = 208; + this.enterRecursionRule(localctx, 208, TPTPParser.RULE_tff_xprod_type, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1131; + this.tff_unitary_type(); + this.state = 1132; + this.match(TPTPParser.Star); + this.state = 1133; + this.tff_atomic_type(); + this._ctx.stop = this._input.LT(-1); + this.state = 1140; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,67,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 = 1135; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1136; + this.match(TPTPParser.Star); + this.state = 1137; + this.tff_atomic_type(); + } + this.state = 1142; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,67,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, 210, TPTPParser.RULE_txf_tuple_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1143; + this.match(TPTPParser.T__13); + this.state = 1144; + this.tff_type_list(); + this.state = 1145; + 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, 212, TPTPParser.RULE_tff_type_list); + try { + this.state = 1152; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,68,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1147; + this.tff_top_level_type(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1148; + this.tff_top_level_type(); + this.state = 1149; + this.match(TPTPParser.T__1); + this.state = 1150; + 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, 214, TPTPParser.RULE_tff_subtype); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1154; + this.untyped_atom(); + this.state = 1155; + this.subtype_sign(); + this.state = 1156; + this.atom(); + } catch (re) { + if(re instanceof 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, 216, TPTPParser.RULE_txf_definition); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1158; + this.tff_atomic_formula(); + this.state = 1159; + this.identical(); + this.state = 1160; + 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, 218, TPTPParser.RULE_txf_sequent); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1162; + this.txf_tuple(); + this.state = 1163; + this.gentzen_arrow(); + this.state = 1164; + 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, 220, TPTPParser.RULE_nhf_long_connective); + try { + this.state = 1176; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,69,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1166; + this.match(TPTPParser.T__18); + this.state = 1167; + this.ntf_connective_name(); + this.state = 1168; + this.match(TPTPParser.T__19); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1170; + this.match(TPTPParser.T__18); + this.state = 1171; + this.ntf_connective_name(); + this.state = 1172; + this.match(TPTPParser.T__11); + this.state = 1173; + this.nhf_parameter_list(); + this.state = 1174; + this.match(TPTPParser.T__20); + 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, 222, TPTPParser.RULE_nhf_parameter_list); + try { + this.state = 1183; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,70,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1178; + this.nhf_parameter(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1179; + this.nhf_parameter(); + this.state = 1180; + this.match(TPTPParser.T__1); + this.state = 1181; + 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, 224, TPTPParser.RULE_nhf_parameter); + try { + this.state = 1187; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 94: + this.enterOuterAlt(localctx, 1); + this.state = 1185; + this.ntf_index(); + break; + case 12: + case 14: + case 17: + case 18: + case 19: + case 45: + case 46: + case 47: + case 48: + case 49: + case 65: + case 66: + case 67: + case 68: + case 69: + case 71: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 1186; + 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, 226, TPTPParser.RULE_nhf_key_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1189; + 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, 228, TPTPParser.RULE_nxf_long_connective); + try { + this.state = 1201; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,72,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1191; + this.match(TPTPParser.T__18); + this.state = 1192; + this.ntf_connective_name(); + this.state = 1193; + this.match(TPTPParser.T__19); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1195; + this.match(TPTPParser.T__18); + this.state = 1196; + this.ntf_connective_name(); + this.state = 1197; + this.match(TPTPParser.T__11); + this.state = 1198; + this.nxf_parameter_list(); + this.state = 1199; + this.match(TPTPParser.T__20); + 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, 230, TPTPParser.RULE_nxf_parameter_list); + try { + this.state = 1208; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,73,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1203; + this.nxf_parameter(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1204; + this.nxf_parameter(); + this.state = 1205; + this.match(TPTPParser.T__1); + this.state = 1206; + 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, 232, TPTPParser.RULE_nxf_parameter); + try { + this.state = 1212; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 94: + this.enterOuterAlt(localctx, 1); + this.state = 1210; + this.ntf_index(); + break; + case 17: + case 19: + case 65: + case 66: + case 68: + case 69: + case 71: + this.enterOuterAlt(localctx, 2); + this.state = 1211; + 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, 234, TPTPParser.RULE_nxf_key_pair); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1214; + 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, 236, TPTPParser.RULE_ntf_connective_name); + try { + this.state = 1218; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 68: + this.enterOuterAlt(localctx, 1); + this.state = 1216; + this.ntf_defined_connective(); + break; + case 69: + this.enterOuterAlt(localctx, 2); + this.state = 1217; + 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, 238, TPTPParser.RULE_ntf_defined_connective); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1220; + 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, 240, TPTPParser.RULE_ntf_index); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1222; + this.match(TPTPParser.Hash); + this.state = 1223; + 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, 242, TPTPParser.RULE_ntf_short_connective); + try { + this.state = 1231; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 22: + this.enterOuterAlt(localctx, 1); + this.state = 1225; + this.match(TPTPParser.T__21); + break; + case 93: + this.enterOuterAlt(localctx, 2); + this.state = 1226; + this.match(TPTPParser.Less_sign); + this.state = 1227; + this.match(TPTPParser.T__22); + this.state = 1228; + this.match(TPTPParser.Arrow); + break; + case 24: + this.enterOuterAlt(localctx, 3); + this.state = 1229; + this.match(TPTPParser.T__23); + break; + case 25: + this.enterOuterAlt(localctx, 4); + this.state = 1230; + this.match(TPTPParser.T__24); + 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, 244, TPTPParser.RULE_tcf_formula); + try { + this.state = 1235; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,77,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1233; + this.tcf_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1234; + 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, 246, TPTPParser.RULE_tcf_logic_formula); + try { + this.state = 1239; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 26: + this.enterOuterAlt(localctx, 1); + this.state = 1237; + this.tcf_quantified_formula(); + break; + case 12: + case 27: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 1238; + 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, 248, TPTPParser.RULE_tcf_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1241; + this.match(TPTPParser.T__25); + this.state = 1242; + this.match(TPTPParser.T__13); + this.state = 1243; + this.tff_variable_list(); + this.state = 1244; + this.match(TPTPParser.T__14); + this.state = 1245; + this.match(TPTPParser.T__15); + this.state = 1246; + 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, 250, TPTPParser.RULE_fof_formula); + try { + this.state = 1250; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,79,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1248; + this.fof_logic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1249; + 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, 252, TPTPParser.RULE_fof_logic_formula); + try { + this.state = 1255; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,80,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1252; + this.fof_binary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1253; + this.fof_unary_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1254; + 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, 254, TPTPParser.RULE_fof_binary_formula); + try { + this.state = 1259; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,81,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1257; + this.fof_binary_nonassoc(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1258; + this.fof_binary_assoc(); + 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_nonassoc() { + let localctx = new Fof_binary_nonassocContext(this, this._ctx, this.state); + this.enterRule(localctx, 256, TPTPParser.RULE_fof_binary_nonassoc); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1261; + this.fof_unit_formula(); + this.state = 1262; + this.nonassoc_connective(); + this.state = 1263; + 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_assoc() { + let localctx = new Fof_binary_assocContext(this, this._ctx, this.state); + this.enterRule(localctx, 258, TPTPParser.RULE_fof_binary_assoc); + try { + this.state = 1267; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,82,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1265; + this.fof_or_formula(0); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1266; + 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 = 260; + this.enterRecursionRule(localctx, 260, TPTPParser.RULE_fof_or_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1270; + this.fof_unit_formula(); + this.state = 1271; + this.match(TPTPParser.Vline); + this.state = 1272; + this.fof_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 1279; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,83,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 = 1274; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1275; + this.match(TPTPParser.Vline); + this.state = 1276; + this.fof_unit_formula(); + } + this.state = 1281; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,83,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 = 262; + this.enterRecursionRule(localctx, 262, TPTPParser.RULE_fof_and_formula, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1283; + this.fof_unit_formula(); + this.state = 1284; + this.match(TPTPParser.T__9); + this.state = 1285; + this.fof_unit_formula(); + this._ctx.stop = this._input.LT(-1); + this.state = 1292; + 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_and_formulaContext(this, _parentctx, _parentState); + this.pushNewRecursionContext(localctx, _startState, TPTPParser.RULE_fof_and_formula); + this.state = 1287; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1288; + this.match(TPTPParser.T__9); + this.state = 1289; + this.fof_unit_formula(); + } + this.state = 1294; + 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_unary_formula() { + let localctx = new Fof_unary_formulaContext(this, this._ctx, this.state); + this.enterRule(localctx, 264, TPTPParser.RULE_fof_unary_formula); + try { + this.state = 1299; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 27: + this.enterOuterAlt(localctx, 1); + this.state = 1295; + this.unary_connective(); + this.state = 1296; + this.fof_unit_formula(); + break; + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 1298; + 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, 266, TPTPParser.RULE_fof_infix_unary); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1301; + this.fof_term(); + this.state = 1302; + this.infix_inequality(); + this.state = 1303; + 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, 268, TPTPParser.RULE_fof_unit_formula); + try { + this.state = 1307; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,86,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1305; + this.fof_unitary_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1306; + 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, 270, TPTPParser.RULE_fof_unitary_formula); + try { + this.state = 1315; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 26: + case 34: + this.enterOuterAlt(localctx, 1); + this.state = 1309; + this.fof_quantified_formula(); + break; + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 1310; + this.fof_atomic_formula(); + break; + case 12: + this.enterOuterAlt(localctx, 3); + this.state = 1311; + this.match(TPTPParser.T__11); + this.state = 1312; + this.fof_logic_formula(); + this.state = 1313; + this.match(TPTPParser.T__12); + 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, 272, TPTPParser.RULE_fof_quantified_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1317; + this.fof_quantifier(); + this.state = 1318; + this.match(TPTPParser.T__13); + this.state = 1319; + this.fof_variable_list(); + this.state = 1320; + this.match(TPTPParser.T__14); + this.state = 1321; + this.match(TPTPParser.T__15); + this.state = 1322; + 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, 274, TPTPParser.RULE_fof_variable_list); + try { + this.state = 1329; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,88,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1324; + this.variable(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1325; + this.variable(); + this.state = 1326; + this.match(TPTPParser.T__1); + this.state = 1327; + 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, 276, TPTPParser.RULE_fof_atomic_formula); + try { + this.state = 1334; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,89,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1331; + this.fof_plain_atomic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1332; + this.fof_defined_atomic_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1333; + 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, 278, TPTPParser.RULE_fof_plain_atomic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1336; + 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, 280, TPTPParser.RULE_fof_defined_atomic_formula); + try { + this.state = 1340; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,90,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1338; + this.fof_defined_plain_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1339; + 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, 282, TPTPParser.RULE_fof_defined_plain_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1342; + 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, 284, TPTPParser.RULE_fof_defined_infix_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1344; + this.fof_term(); + this.state = 1345; + this.defined_infix_pred(); + this.state = 1346; + 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, 286, TPTPParser.RULE_fof_system_atomic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1348; + 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, 288, TPTPParser.RULE_fof_plain_term); + try { + this.state = 1356; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,91,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1350; + this.constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1351; + this.functor(); + this.state = 1352; + this.match(TPTPParser.T__11); + this.state = 1353; + this.fof_arguments(); + this.state = 1354; + this.match(TPTPParser.T__12); + 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, 290, TPTPParser.RULE_fof_defined_term); + try { + this.state = 1360; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 67: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 1); + this.state = 1358; + this.defined_term(); + break; + case 68: + this.enterOuterAlt(localctx, 2); + this.state = 1359; + 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, 292, TPTPParser.RULE_fof_defined_atomic_term); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1362; + 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, 294, TPTPParser.RULE_fof_defined_plain_term); + try { + this.state = 1370; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,93,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1364; + this.defined_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1365; + this.defined_functor(); + this.state = 1366; + this.match(TPTPParser.T__11); + this.state = 1367; + this.fof_arguments(); + this.state = 1368; + this.match(TPTPParser.T__12); + 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, 296, TPTPParser.RULE_fof_system_term); + try { + this.state = 1378; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,94,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1372; + this.system_constant(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1373; + this.system_functor(); + this.state = 1374; + this.match(TPTPParser.T__11); + this.state = 1375; + this.fof_arguments(); + this.state = 1376; + this.match(TPTPParser.T__12); + 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, 298, TPTPParser.RULE_fof_arguments); + try { + this.state = 1385; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,95,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1380; + this.fof_term(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1381; + this.fof_term(); + this.state = 1382; + this.match(TPTPParser.T__1); + this.state = 1383; + 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, 300, TPTPParser.RULE_fof_term); + try { + this.state = 1389; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 67: + case 68: + case 69: + case 71: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 1); + this.state = 1387; + this.fof_function_term(); + break; + case 70: + this.enterOuterAlt(localctx, 2); + this.state = 1388; + 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, 302, TPTPParser.RULE_fof_function_term); + try { + this.state = 1394; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 1391; + this.fof_plain_term(); + break; + case 67: + case 68: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 1392; + this.fof_defined_term(); + break; + case 69: + this.enterOuterAlt(localctx, 3); + this.state = 1393; + 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, 304, TPTPParser.RULE_fof_sequent); + try { + this.state = 1404; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 14: + case 18: + this.enterOuterAlt(localctx, 1); + this.state = 1396; + this.fof_formula_tuple(); + this.state = 1397; + this.gentzen_arrow(); + this.state = 1398; + this.fof_formula_tuple(); + break; + case 12: + this.enterOuterAlt(localctx, 2); + this.state = 1400; + this.match(TPTPParser.T__11); + this.state = 1401; + this.fof_sequent(); + this.state = 1402; + this.match(TPTPParser.T__12); + 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, 306, TPTPParser.RULE_fof_formula_tuple); + try { + this.state = 1411; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 18: + this.enterOuterAlt(localctx, 1); + this.state = 1406; + this.match(TPTPParser.T__17); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 1407; + this.match(TPTPParser.T__13); + this.state = 1408; + this.fof_formula_tuple_list(); + this.state = 1409; + 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; + } + + + + fof_formula_tuple_list() { + let localctx = new Fof_formula_tuple_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 308, TPTPParser.RULE_fof_formula_tuple_list); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1413; + this.fof_logic_formula(); + this.state = 1417; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===2) { + this.state = 1414; + this.comma_fof_logic_formula(); + this.state = 1419; + 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, 310, TPTPParser.RULE_comma_fof_logic_formula); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1420; + this.match(TPTPParser.T__1); + this.state = 1421; + 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, 312, TPTPParser.RULE_cnf_formula); + try { + this.state = 1428; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 27: + case 65: + case 66: + case 67: + case 68: + case 69: + case 70: + case 71: + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 1); + this.state = 1423; + this.cnf_disjunction(0); + break; + case 12: + this.enterOuterAlt(localctx, 2); + this.state = 1424; + this.match(TPTPParser.T__11); + this.state = 1425; + this.cnf_formula(); + this.state = 1426; + this.match(TPTPParser.T__12); + 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 = 314; + this.enterRecursionRule(localctx, 314, TPTPParser.RULE_cnf_disjunction, _p); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1431; + this.cnf_literal(); + this._ctx.stop = this._input.LT(-1); + this.state = 1438; + this._errHandler.sync(this); + var _alt = this._interp.adaptivePredict(this._input,102,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 = 1433; + if (!( this.precpred(this._ctx, 1))) { + throw new antlr4.error.FailedPredicateException(this, "this.precpred(this._ctx, 1)"); + } + this.state = 1434; + this.match(TPTPParser.Vline); + this.state = 1435; + this.cnf_literal(); + } + this.state = 1440; + this._errHandler.sync(this); + _alt = this._interp.adaptivePredict(this._input,102,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, 316, TPTPParser.RULE_cnf_literal); + try { + this.state = 1450; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,103,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1441; + this.fof_atomic_formula(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1442; + this.match(TPTPParser.T__26); + this.state = 1443; + this.fof_atomic_formula(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1444; + this.match(TPTPParser.T__26); + this.state = 1445; + this.match(TPTPParser.T__11); + this.state = 1446; + this.fof_atomic_formula(); + this.state = 1447; + this.match(TPTPParser.T__12); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1449; + 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, 318, TPTPParser.RULE_thf_quantifier); + try { + this.state = 1455; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 26: + case 34: + case 94: + this.enterOuterAlt(localctx, 1); + this.state = 1452; + this.tff_quantifier(); + break; + case 28: + case 29: + case 30: + this.enterOuterAlt(localctx, 2); + this.state = 1453; + this.th0_quantifier(); + break; + case 31: + case 32: + this.enterOuterAlt(localctx, 3); + this.state = 1454; + 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, 320, TPTPParser.RULE_thf_unary_connective); + try { + this.state = 1459; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 27: + this.enterOuterAlt(localctx, 1); + this.state = 1457; + this.unary_connective(); + break; + case 22: + case 24: + case 25: + case 93: + this.enterOuterAlt(localctx, 2); + this.state = 1458; + 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, 322, TPTPParser.RULE_th0_quantifier); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1461; + _la = this._input.LA(1); + if(!((((_la) & ~0x1f) === 0 && ((1 << _la) & 1879048192) !== 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, 324, TPTPParser.RULE_type_quantifier); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1463; + _la = this._input.LA(1); + if(!(_la===31 || _la===32)) { + 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, 326, TPTPParser.RULE_subtype_sign); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1465; + this.match(TPTPParser.T__32); + } catch (re) { + if(re instanceof 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, 328, TPTPParser.RULE_tff_unary_connective); + try { + this.state = 1469; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 27: + this.enterOuterAlt(localctx, 1); + this.state = 1467; + this.unary_connective(); + break; + case 22: + case 24: + case 25: + case 93: + this.enterOuterAlt(localctx, 2); + this.state = 1468; + 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, 330, TPTPParser.RULE_tff_quantifier); + try { + this.state = 1473; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 26: + case 34: + this.enterOuterAlt(localctx, 1); + this.state = 1471; + this.fof_quantifier(); + break; + case 94: + this.enterOuterAlt(localctx, 2); + this.state = 1472; + 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, 332, TPTPParser.RULE_fof_quantifier); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1475; + _la = this._input.LA(1); + if(!(_la===26 || _la===34)) { + 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, 334, TPTPParser.RULE_nonassoc_connective); + try { + this.state = 1484; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 35: + this.enterOuterAlt(localctx, 1); + this.state = 1477; + this.match(TPTPParser.T__34); + break; + case 36: + this.enterOuterAlt(localctx, 2); + this.state = 1478; + this.match(TPTPParser.T__35); + break; + case 37: + this.enterOuterAlt(localctx, 3); + this.state = 1479; + this.match(TPTPParser.T__36); + break; + case 38: + this.enterOuterAlt(localctx, 4); + this.state = 1480; + this.match(TPTPParser.T__37); + break; + case 27: + this.enterOuterAlt(localctx, 5); + this.state = 1481; + this.match(TPTPParser.T__26); + this.state = 1482; + this.match(TPTPParser.Vline); + break; + case 39: + this.enterOuterAlt(localctx, 6); + this.state = 1483; + this.match(TPTPParser.T__38); + 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, 336, TPTPParser.RULE_assoc_connective); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1486; + _la = this._input.LA(1); + if(!(_la===10 || _la===89)) { + 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, 338, TPTPParser.RULE_unary_connective); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1488; + 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; + } + + + + gentzen_arrow() { + let localctx = new Gentzen_arrowContext(this, this._ctx, this.state); + this.enterRule(localctx, 340, TPTPParser.RULE_gentzen_arrow); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1490; + this.match(TPTPParser.T__39); + } catch (re) { + if(re instanceof 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, 342, TPTPParser.RULE_assignment); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1492; + this.match(TPTPParser.T__40); + } catch (re) { + if(re instanceof 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, 344, TPTPParser.RULE_identical); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1494; + this.match(TPTPParser.T__41); + } catch (re) { + if(re instanceof 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, 346, TPTPParser.RULE_type_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1496; + 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, 348, TPTPParser.RULE_type_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1498; + 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, 350, TPTPParser.RULE_defined_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1500; + 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; + } + + + + atom() { + let localctx = new AtomContext(this, this._ctx, this.state); + this.enterRule(localctx, 352, TPTPParser.RULE_atom); + try { + this.state = 1504; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 69: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 1502; + this.untyped_atom(); + break; + case 68: + this.enterOuterAlt(localctx, 2); + this.state = 1503; + this.defined_constant(); + 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; + } + + + + untyped_atom() { + let localctx = new Untyped_atomContext(this, this._ctx, this.state); + this.enterRule(localctx, 354, TPTPParser.RULE_untyped_atom); + try { + this.state = 1508; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 1506; + this.constant(); + break; + case 69: + this.enterOuterAlt(localctx, 2); + this.state = 1507; + this.system_constant(); + 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; + } + + + + defined_infix_pred() { + let localctx = new Defined_infix_predContext(this, this._ctx, this.state); + this.enterRule(localctx, 356, TPTPParser.RULE_defined_infix_pred); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1510; + 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, 358, TPTPParser.RULE_infix_equality); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1512; + this.match(TPTPParser.T__42); + } catch (re) { + if(re instanceof 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, 360, TPTPParser.RULE_infix_inequality); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1514; + this.match(TPTPParser.T__43); + } catch (re) { + if(re instanceof 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, 362, TPTPParser.RULE_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1516; + 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, 364, TPTPParser.RULE_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1518; + 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, 366, TPTPParser.RULE_defined_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1520; + 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, 368, TPTPParser.RULE_defined_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1522; + 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, 370, TPTPParser.RULE_system_constant); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1524; + 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, 372, TPTPParser.RULE_system_functor); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1526; + 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, 374, TPTPParser.RULE_th1_defined_term); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1528; + _la = this._input.LA(1); + if(!(((((_la - 45)) & ~0x1f) === 0 && ((1 << (_la - 45)) & 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, 376, TPTPParser.RULE_defined_term); + try { + this.state = 1532; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 72: + case 79: + case 82: + this.enterOuterAlt(localctx, 1); + this.state = 1530; + this.number(); + break; + case 67: + this.enterOuterAlt(localctx, 2); + this.state = 1531; + 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, 378, TPTPParser.RULE_variable); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1534; + 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, 380, TPTPParser.RULE_source); + try { + this.state = 1544; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 51: + case 65: + case 66: + case 71: + case 82: + this.enterOuterAlt(localctx, 1); + this.state = 1536; + this.dag_source(); + break; + case 52: + this.enterOuterAlt(localctx, 2); + this.state = 1537; + this.internal_source(); + break; + case 53: + case 54: + case 55: + this.enterOuterAlt(localctx, 3); + this.state = 1538; + this.external_source(); + break; + case 50: + this.enterOuterAlt(localctx, 4); + this.state = 1539; + this.match(TPTPParser.T__49); + break; + case 14: + this.enterOuterAlt(localctx, 5); + this.state = 1540; + this.match(TPTPParser.T__13); + this.state = 1541; + this.sources(); + this.state = 1542; + 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; + } + + + + sources() { + let localctx = new SourcesContext(this, this._ctx, this.state); + this.enterRule(localctx, 382, TPTPParser.RULE_sources); + try { + this.state = 1551; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,113,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1546; + this.source(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1547; + this.source(); + this.state = 1548; + this.match(TPTPParser.T__1); + this.state = 1549; + 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, 384, TPTPParser.RULE_dag_source); + try { + this.state = 1555; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 71: + case 82: + this.enterOuterAlt(localctx, 1); + this.state = 1553; + this.name(); + break; + case 51: + this.enterOuterAlt(localctx, 2); + this.state = 1554; + this.inference_record(); + 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; + } + + + + inference_record() { + let localctx = new Inference_recordContext(this, this._ctx, this.state); + this.enterRule(localctx, 386, TPTPParser.RULE_inference_record); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1557; + this.match(TPTPParser.T__50); + this.state = 1558; + this.inference_rule(); + this.state = 1559; + this.match(TPTPParser.T__1); + this.state = 1560; + this.useful_info(); + this.state = 1561; + this.match(TPTPParser.T__1); + this.state = 1562; + this.parents(); + this.state = 1563; + this.match(TPTPParser.T__12); + } catch (re) { + if(re instanceof 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, 388, TPTPParser.RULE_inference_rule); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1565; + 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, 390, TPTPParser.RULE_internal_source); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1567; + this.match(TPTPParser.T__51); + this.state = 1568; + this.intro_type(); + this.state = 1569; + this.match(TPTPParser.T__1); + this.state = 1570; + this.useful_info(); + this.state = 1571; + this.match(TPTPParser.T__1); + this.state = 1572; + this.parents(); + this.state = 1573; + this.match(TPTPParser.T__12); + } catch (re) { + if(re instanceof 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, 392, TPTPParser.RULE_intro_type); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1575; + 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, 394, TPTPParser.RULE_external_source); + try { + this.state = 1580; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 53: + this.enterOuterAlt(localctx, 1); + this.state = 1577; + this.file_source(); + break; + case 54: + this.enterOuterAlt(localctx, 2); + this.state = 1578; + this.theory(); + break; + case 55: + this.enterOuterAlt(localctx, 3); + this.state = 1579; + this.creator_source(); + 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; + } + + + + file_source() { + let localctx = new File_sourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 396, TPTPParser.RULE_file_source); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1582; + this.match(TPTPParser.T__52); + this.state = 1583; + this.file_name(); + this.state = 1584; + this.file_info(); + this.state = 1585; + this.match(TPTPParser.T__12); + } catch (re) { + if(re instanceof 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, 398, TPTPParser.RULE_file_info); + try { + this.state = 1590; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 2: + this.enterOuterAlt(localctx, 1); + this.state = 1587; + this.match(TPTPParser.T__1); + this.state = 1588; + this.name(); + break; + case 13: + this.enterOuterAlt(localctx, 2); + this.state = 1589; + 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; + } + + + + theory() { + let localctx = new TheoryContext(this, this._ctx, this.state); + this.enterRule(localctx, 400, TPTPParser.RULE_theory); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1592; + this.match(TPTPParser.T__53); + this.state = 1593; + this.theory_name(); + this.state = 1594; + this.optional_info(); + this.state = 1595; + this.match(TPTPParser.T__12); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + theory_name() { + let localctx = new Theory_nameContext(this, this._ctx, this.state); + this.enterRule(localctx, 402, TPTPParser.RULE_theory_name); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1597; + 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; + } + + + + creator_source() { + let localctx = new Creator_sourceContext(this, this._ctx, this.state); + this.enterRule(localctx, 404, TPTPParser.RULE_creator_source); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1599; + this.match(TPTPParser.T__54); + this.state = 1600; + this.creator_name(); + this.state = 1601; + this.match(TPTPParser.T__1); + this.state = 1602; + this.useful_info(); + this.state = 1603; + this.match(TPTPParser.T__1); + this.state = 1604; + this.parents(); + this.state = 1605; + this.match(TPTPParser.T__12); + } catch (re) { + if(re instanceof antlr4.error.RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } finally { + this.exitRule(); + } + return localctx; + } + + + + creator_name() { + let localctx = new Creator_nameContext(this, this._ctx, this.state); + this.enterRule(localctx, 406, TPTPParser.RULE_creator_name); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1607; + 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; + } + + + + parents() { + let localctx = new ParentsContext(this, this._ctx, this.state); + this.enterRule(localctx, 408, TPTPParser.RULE_parents); + try { + this.state = 1614; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 18: + this.enterOuterAlt(localctx, 1); + this.state = 1609; + this.match(TPTPParser.T__17); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 1610; + this.match(TPTPParser.T__13); + this.state = 1611; + this.parent_list(); + this.state = 1612; + 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; + } + + + + parent_list() { + let localctx = new Parent_listContext(this, this._ctx, this.state); + this.enterRule(localctx, 410, TPTPParser.RULE_parent_list); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1616; + this.parent_info(); + this.state = 1620; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===2) { + this.state = 1617; + this.comma_parent_info(); + this.state = 1622; + 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, 412, TPTPParser.RULE_comma_parent_info); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1623; + this.match(TPTPParser.T__1); + this.state = 1624; + 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, 414, TPTPParser.RULE_parent_info); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1626; + this.source(); + this.state = 1627; + 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, 416, TPTPParser.RULE_parent_details); + try { + this.state = 1632; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 16: + this.enterOuterAlt(localctx, 1); + this.state = 1629; + this.match(TPTPParser.T__15); + this.state = 1630; + this.general_term(); + break; + case 2: + case 15: + this.enterOuterAlt(localctx, 2); + this.state = 1631; + 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, 418, TPTPParser.RULE_optional_info); + try { + this.state = 1637; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 2: + this.enterOuterAlt(localctx, 1); + this.state = 1634; + this.match(TPTPParser.T__1); + this.state = 1635; + this.useful_info(); + break; + case 3: + case 13: + this.enterOuterAlt(localctx, 2); + this.state = 1636; + 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, 420, TPTPParser.RULE_useful_info); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1639; + 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, 422, TPTPParser.RULE_include); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1641; + this.match(TPTPParser.T__55); + this.state = 1642; + this.file_name(); + this.state = 1643; + this.include_optionals(); + this.state = 1644; + this.match(TPTPParser.T__2); + } catch (re) { + if(re instanceof 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, 424, TPTPParser.RULE_include_optionals); + try { + this.state = 1654; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,121,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1646; + this.nothing(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1647; + this.match(TPTPParser.T__1); + this.state = 1648; + this.formula_selection(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1649; + this.match(TPTPParser.T__1); + this.state = 1650; + this.formula_selection(); + this.state = 1651; + this.match(TPTPParser.T__1); + this.state = 1652; + 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, 426, TPTPParser.RULE_formula_selection); + try { + this.state = 1661; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 14: + this.enterOuterAlt(localctx, 1); + this.state = 1656; + this.match(TPTPParser.T__13); + this.state = 1657; + this.name_list(); + this.state = 1658; + this.match(TPTPParser.T__14); + break; + case 90: + this.enterOuterAlt(localctx, 2); + this.state = 1660; + 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, 428, TPTPParser.RULE_name_list); + try { + this.state = 1668; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,123,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1663; + this.name(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1664; + this.name(); + this.state = 1665; + this.match(TPTPParser.T__1); + this.state = 1666; + 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, 430, TPTPParser.RULE_space_name); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1670; + 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, 432, TPTPParser.RULE_general_term); + try { + this.state = 1678; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,124,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1672; + this.general_data(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1673; + this.general_data(); + this.state = 1674; + this.match(TPTPParser.T__15); + this.state = 1675; + this.general_term(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1677; + 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, 434, TPTPParser.RULE_general_data); + try { + this.state = 1686; + this._errHandler.sync(this); + var la_ = this._interp.adaptivePredict(this._input,125,this._ctx); + switch(la_) { + case 1: + this.enterOuterAlt(localctx, 1); + this.state = 1680; + this.atomic_word(); + break; + + case 2: + this.enterOuterAlt(localctx, 2); + this.state = 1681; + this.general_function(); + break; + + case 3: + this.enterOuterAlt(localctx, 3); + this.state = 1682; + this.variable(); + break; + + case 4: + this.enterOuterAlt(localctx, 4); + this.state = 1683; + this.number(); + break; + + case 5: + this.enterOuterAlt(localctx, 5); + this.state = 1684; + this.match(TPTPParser.Distinct_object); + break; + + case 6: + this.enterOuterAlt(localctx, 6); + this.state = 1685; + 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, 436, TPTPParser.RULE_general_function); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1688; + this.atomic_word(); + this.state = 1689; + this.match(TPTPParser.T__11); + this.state = 1690; + this.general_terms(); + this.state = 1691; + this.match(TPTPParser.T__12); + } catch (re) { + if(re instanceof 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, 438, TPTPParser.RULE_formula_data); + try { + this.state = 1713; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 57: + this.enterOuterAlt(localctx, 1); + this.state = 1693; + this.match(TPTPParser.T__56); + this.state = 1694; + this.thf_formula(); + this.state = 1695; + this.match(TPTPParser.T__12); + break; + case 58: + this.enterOuterAlt(localctx, 2); + this.state = 1697; + this.match(TPTPParser.T__57); + this.state = 1698; + this.tff_formula(); + this.state = 1699; + this.match(TPTPParser.T__12); + break; + case 59: + this.enterOuterAlt(localctx, 3); + this.state = 1701; + this.match(TPTPParser.T__58); + this.state = 1702; + this.fof_formula(); + this.state = 1703; + this.match(TPTPParser.T__12); + break; + case 60: + this.enterOuterAlt(localctx, 4); + this.state = 1705; + this.match(TPTPParser.T__59); + this.state = 1706; + this.cnf_formula(); + this.state = 1707; + this.match(TPTPParser.T__12); + break; + case 61: + this.enterOuterAlt(localctx, 5); + this.state = 1709; + this.match(TPTPParser.T__60); + this.state = 1710; + this.fof_term(); + this.state = 1711; + this.match(TPTPParser.T__12); + 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, 440, TPTPParser.RULE_general_list); + try { + this.state = 1720; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 18: + this.enterOuterAlt(localctx, 1); + this.state = 1715; + this.match(TPTPParser.T__17); + break; + case 14: + this.enterOuterAlt(localctx, 2); + this.state = 1716; + this.match(TPTPParser.T__13); + this.state = 1717; + this.general_terms(); + this.state = 1718; + 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; + } + + + + general_terms() { + let localctx = new General_termsContext(this, this._ctx, this.state); + this.enterRule(localctx, 442, TPTPParser.RULE_general_terms); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1722; + this.general_term(); + this.state = 1726; + this._errHandler.sync(this); + _la = this._input.LA(1); + while(_la===2) { + this.state = 1723; + this.comma_general_term(); + this.state = 1728; + 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, 444, TPTPParser.RULE_comma_general_term); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1729; + this.match(TPTPParser.T__1); + this.state = 1730; + 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, 446, TPTPParser.RULE_name); + try { + this.state = 1734; + this._errHandler.sync(this); + switch(this._input.LA(1)) { + case 65: + case 66: + case 71: + this.enterOuterAlt(localctx, 1); + this.state = 1732; + this.atomic_word(); + break; + case 82: + this.enterOuterAlt(localctx, 2); + this.state = 1733; + 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, 448, TPTPParser.RULE_atomic_word); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1736; + _la = this._input.LA(1); + if(!(((((_la - 65)) & ~0x1f) === 0 && ((1 << (_la - 65)) & 67) !== 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; + } + + + + atomic_defined_word() { + let localctx = new Atomic_defined_wordContext(this, this._ctx, this.state); + this.enterRule(localctx, 450, TPTPParser.RULE_atomic_defined_word); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1738; + 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, 452, TPTPParser.RULE_atomic_system_word); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1740; + 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, 454, TPTPParser.RULE_number); + var _la = 0; + try { + this.enterOuterAlt(localctx, 1); + this.state = 1742; + _la = this._input.LA(1); + if(!(((((_la - 72)) & ~0x1f) === 0 && ((1 << (_la - 72)) & 1153) !== 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, 456, TPTPParser.RULE_file_name); + try { + this.enterOuterAlt(localctx, 1); + this.state = 1744; + 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, 458, 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; + } + + +} + +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.T__52 = 53; +TPTPParser.T__53 = 54; +TPTPParser.T__54 = 55; +TPTPParser.T__55 = 56; +TPTPParser.T__56 = 57; +TPTPParser.T__57 = 58; +TPTPParser.T__58 = 59; +TPTPParser.T__59 = 60; +TPTPParser.T__60 = 61; +TPTPParser.WS = 62; +TPTPParser.Comment_line = 63; +TPTPParser.Comment_block = 64; +TPTPParser.Single_quoted = 65; +TPTPParser.Back_quoted = 66; +TPTPParser.Distinct_object = 67; +TPTPParser.Dollar_word = 68; +TPTPParser.Dollar_dollar_word = 69; +TPTPParser.Upper_word = 70; +TPTPParser.Lower_word = 71; +TPTPParser.Real = 72; +TPTPParser.Signed_real = 73; +TPTPParser.Unsigned_real = 74; +TPTPParser.Decimal_exponent = 75; +TPTPParser.Decimal_fraction = 76; +TPTPParser.Exp_integer = 77; +TPTPParser.Signed_exp_integer = 78; +TPTPParser.Rational = 79; +TPTPParser.Signed_rational = 80; +TPTPParser.Unsigned_rational = 81; +TPTPParser.Integer = 82; +TPTPParser.Signed_integer = 83; +TPTPParser.Unsigned_integer = 84; +TPTPParser.Positive_integer = 85; +TPTPParser.Integer_digits = 86; +TPTPParser.Slash = 87; +TPTPParser.Slosh = 88; +TPTPParser.Vline = 89; +TPTPParser.Star = 90; +TPTPParser.Plus = 91; +TPTPParser.Arrow = 92; +TPTPParser.Less_sign = 93; +TPTPParser.Hash = 94; +TPTPParser.Not_star_slash = 95; +TPTPParser.Percentage_sign = 96; +TPTPParser.Double_quote = 97; +TPTPParser.Single_quote = 98; +TPTPParser.Back_quote = 99; +TPTPParser.Dot = 100; +TPTPParser.Slash_char = 101; +TPTPParser.Slosh_char = 102; +TPTPParser.Zero_numeric = 103; +TPTPParser.Underscore = 104; +TPTPParser.Alpha = 105; +TPTPParser.Dollar = 106; +TPTPParser.Printable_char = 107; +TPTPParser.Viewable_char = 108; + +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_nonassoc = 15; +TPTPParser.RULE_thf_binary_assoc = 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_formula_list = 45; +TPTPParser.RULE_comma_thf_logic_formula = 46; +TPTPParser.RULE_thf_atom_typing = 47; +TPTPParser.RULE_thf_top_level_type = 48; +TPTPParser.RULE_thf_unitary_type = 49; +TPTPParser.RULE_thf_apply_type = 50; +TPTPParser.RULE_thf_binary_type = 51; +TPTPParser.RULE_thf_mapping_type = 52; +TPTPParser.RULE_thf_xprod_type = 53; +TPTPParser.RULE_thf_union_type = 54; +TPTPParser.RULE_thf_subtype = 55; +TPTPParser.RULE_thf_definition = 56; +TPTPParser.RULE_thf_sequent = 57; +TPTPParser.RULE_tff_formula = 58; +TPTPParser.RULE_tff_logic_formula = 59; +TPTPParser.RULE_tff_binary_formula = 60; +TPTPParser.RULE_tff_binary_nonassoc = 61; +TPTPParser.RULE_tff_binary_assoc = 62; +TPTPParser.RULE_tff_or_formula = 63; +TPTPParser.RULE_tff_and_formula = 64; +TPTPParser.RULE_tff_unit_formula = 65; +TPTPParser.RULE_tff_preunit_formula = 66; +TPTPParser.RULE_tff_unitary_formula = 67; +TPTPParser.RULE_txf_unitary_formula = 68; +TPTPParser.RULE_tff_quantified_formula = 69; +TPTPParser.RULE_tff_variable_list = 70; +TPTPParser.RULE_tff_variable = 71; +TPTPParser.RULE_tff_typed_variable = 72; +TPTPParser.RULE_tff_unary_formula = 73; +TPTPParser.RULE_tff_prefix_unary = 74; +TPTPParser.RULE_tff_infix_unary = 75; +TPTPParser.RULE_tff_atomic_formula = 76; +TPTPParser.RULE_tff_plain_atomic = 77; +TPTPParser.RULE_tff_defined_atomic = 78; +TPTPParser.RULE_tff_defined_plain = 79; +TPTPParser.RULE_tff_defined_infix = 80; +TPTPParser.RULE_tff_system_atomic = 81; +TPTPParser.RULE_txf_let = 82; +TPTPParser.RULE_txf_let_types = 83; +TPTPParser.RULE_tff_atom_typing_list = 84; +TPTPParser.RULE_txf_let_defns = 85; +TPTPParser.RULE_txf_let_defn = 86; +TPTPParser.RULE_txf_let_LHS = 87; +TPTPParser.RULE_txf_let_defn_list = 88; +TPTPParser.RULE_nxf_atom = 89; +TPTPParser.RULE_tff_term = 90; +TPTPParser.RULE_tff_unitary_term = 91; +TPTPParser.RULE_txf_tuple = 92; +TPTPParser.RULE_tff_arguments = 93; +TPTPParser.RULE_comma_tff_term = 94; +TPTPParser.RULE_tff_atom_typing = 95; +TPTPParser.RULE_tff_top_level_type = 96; +TPTPParser.RULE_tff_non_atomic_type = 97; +TPTPParser.RULE_tf1_quantified_type = 98; +TPTPParser.RULE_tff_monotype = 99; +TPTPParser.RULE_tff_unitary_type = 100; +TPTPParser.RULE_tff_atomic_type = 101; +TPTPParser.RULE_tff_type_arguments = 102; +TPTPParser.RULE_tff_mapping_type = 103; +TPTPParser.RULE_tff_xprod_type = 104; +TPTPParser.RULE_txf_tuple_type = 105; +TPTPParser.RULE_tff_type_list = 106; +TPTPParser.RULE_tff_subtype = 107; +TPTPParser.RULE_txf_definition = 108; +TPTPParser.RULE_txf_sequent = 109; +TPTPParser.RULE_nhf_long_connective = 110; +TPTPParser.RULE_nhf_parameter_list = 111; +TPTPParser.RULE_nhf_parameter = 112; +TPTPParser.RULE_nhf_key_pair = 113; +TPTPParser.RULE_nxf_long_connective = 114; +TPTPParser.RULE_nxf_parameter_list = 115; +TPTPParser.RULE_nxf_parameter = 116; +TPTPParser.RULE_nxf_key_pair = 117; +TPTPParser.RULE_ntf_connective_name = 118; +TPTPParser.RULE_ntf_defined_connective = 119; +TPTPParser.RULE_ntf_index = 120; +TPTPParser.RULE_ntf_short_connective = 121; +TPTPParser.RULE_tcf_formula = 122; +TPTPParser.RULE_tcf_logic_formula = 123; +TPTPParser.RULE_tcf_quantified_formula = 124; +TPTPParser.RULE_fof_formula = 125; +TPTPParser.RULE_fof_logic_formula = 126; +TPTPParser.RULE_fof_binary_formula = 127; +TPTPParser.RULE_fof_binary_nonassoc = 128; +TPTPParser.RULE_fof_binary_assoc = 129; +TPTPParser.RULE_fof_or_formula = 130; +TPTPParser.RULE_fof_and_formula = 131; +TPTPParser.RULE_fof_unary_formula = 132; +TPTPParser.RULE_fof_infix_unary = 133; +TPTPParser.RULE_fof_unit_formula = 134; +TPTPParser.RULE_fof_unitary_formula = 135; +TPTPParser.RULE_fof_quantified_formula = 136; +TPTPParser.RULE_fof_variable_list = 137; +TPTPParser.RULE_fof_atomic_formula = 138; +TPTPParser.RULE_fof_plain_atomic_formula = 139; +TPTPParser.RULE_fof_defined_atomic_formula = 140; +TPTPParser.RULE_fof_defined_plain_formula = 141; +TPTPParser.RULE_fof_defined_infix_formula = 142; +TPTPParser.RULE_fof_system_atomic_formula = 143; +TPTPParser.RULE_fof_plain_term = 144; +TPTPParser.RULE_fof_defined_term = 145; +TPTPParser.RULE_fof_defined_atomic_term = 146; +TPTPParser.RULE_fof_defined_plain_term = 147; +TPTPParser.RULE_fof_system_term = 148; +TPTPParser.RULE_fof_arguments = 149; +TPTPParser.RULE_fof_term = 150; +TPTPParser.RULE_fof_function_term = 151; +TPTPParser.RULE_fof_sequent = 152; +TPTPParser.RULE_fof_formula_tuple = 153; +TPTPParser.RULE_fof_formula_tuple_list = 154; +TPTPParser.RULE_comma_fof_logic_formula = 155; +TPTPParser.RULE_cnf_formula = 156; +TPTPParser.RULE_cnf_disjunction = 157; +TPTPParser.RULE_cnf_literal = 158; +TPTPParser.RULE_thf_quantifier = 159; +TPTPParser.RULE_thf_unary_connective = 160; +TPTPParser.RULE_th0_quantifier = 161; +TPTPParser.RULE_type_quantifier = 162; +TPTPParser.RULE_subtype_sign = 163; +TPTPParser.RULE_tff_unary_connective = 164; +TPTPParser.RULE_tff_quantifier = 165; +TPTPParser.RULE_fof_quantifier = 166; +TPTPParser.RULE_nonassoc_connective = 167; +TPTPParser.RULE_assoc_connective = 168; +TPTPParser.RULE_unary_connective = 169; +TPTPParser.RULE_gentzen_arrow = 170; +TPTPParser.RULE_assignment = 171; +TPTPParser.RULE_identical = 172; +TPTPParser.RULE_type_constant = 173; +TPTPParser.RULE_type_functor = 174; +TPTPParser.RULE_defined_type = 175; +TPTPParser.RULE_atom = 176; +TPTPParser.RULE_untyped_atom = 177; +TPTPParser.RULE_defined_infix_pred = 178; +TPTPParser.RULE_infix_equality = 179; +TPTPParser.RULE_infix_inequality = 180; +TPTPParser.RULE_constant = 181; +TPTPParser.RULE_functor = 182; +TPTPParser.RULE_defined_constant = 183; +TPTPParser.RULE_defined_functor = 184; +TPTPParser.RULE_system_constant = 185; +TPTPParser.RULE_system_functor = 186; +TPTPParser.RULE_th1_defined_term = 187; +TPTPParser.RULE_defined_term = 188; +TPTPParser.RULE_variable = 189; +TPTPParser.RULE_source = 190; +TPTPParser.RULE_sources = 191; +TPTPParser.RULE_dag_source = 192; +TPTPParser.RULE_inference_record = 193; +TPTPParser.RULE_inference_rule = 194; +TPTPParser.RULE_internal_source = 195; +TPTPParser.RULE_intro_type = 196; +TPTPParser.RULE_external_source = 197; +TPTPParser.RULE_file_source = 198; +TPTPParser.RULE_file_info = 199; +TPTPParser.RULE_theory = 200; +TPTPParser.RULE_theory_name = 201; +TPTPParser.RULE_creator_source = 202; +TPTPParser.RULE_creator_name = 203; +TPTPParser.RULE_parents = 204; +TPTPParser.RULE_parent_list = 205; +TPTPParser.RULE_comma_parent_info = 206; +TPTPParser.RULE_parent_info = 207; +TPTPParser.RULE_parent_details = 208; +TPTPParser.RULE_optional_info = 209; +TPTPParser.RULE_useful_info = 210; +TPTPParser.RULE_include = 211; +TPTPParser.RULE_include_optionals = 212; +TPTPParser.RULE_formula_selection = 213; +TPTPParser.RULE_name_list = 214; +TPTPParser.RULE_space_name = 215; +TPTPParser.RULE_general_term = 216; +TPTPParser.RULE_general_data = 217; +TPTPParser.RULE_general_function = 218; +TPTPParser.RULE_formula_data = 219; +TPTPParser.RULE_general_list = 220; +TPTPParser.RULE_general_terms = 221; +TPTPParser.RULE_comma_general_term = 222; +TPTPParser.RULE_name = 223; +TPTPParser.RULE_atomic_word = 224; +TPTPParser.RULE_atomic_defined_word = 225; +TPTPParser.RULE_atomic_system_word = 226; +TPTPParser.RULE_number = 227; +TPTPParser.RULE_file_name = 228; +TPTPParser.RULE_nothing = 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() { + return this.getToken(TPTPParser.Lower_word, 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_nonassoc() { + return this.getTypedRuleContext(Thf_binary_nonassocContext,0); + }; + + thf_binary_assoc() { + return this.getTypedRuleContext(Thf_binary_assocContext,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_nonassocContext extends antlr4.ParserRuleContext { + + constructor(parser, 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_nonassoc; + } + + 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_nonassoc(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_binary_nonassoc(this); + } + } + + +} + + + +class Thf_binary_assocContext extends antlr4.ParserRuleContext { + + constructor(parser, 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_assoc; + } + + 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_assoc(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitThf_binary_assoc(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); + }; + + 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_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; + } + + untyped_atom() { + return this.getTypedRuleContext(Untyped_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; + } + + untyped_atom() { + return this.getTypedRuleContext(Untyped_atomContext,0); + }; + + subtype_sign() { + return this.getTypedRuleContext(Subtype_signContext,0); + }; + + atom() { + return this.getTypedRuleContext(AtomContext,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_nonassoc() { + return this.getTypedRuleContext(Tff_binary_nonassocContext,0); + }; + + tff_binary_assoc() { + return this.getTypedRuleContext(Tff_binary_assocContext,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_nonassocContext extends antlr4.ParserRuleContext { + + constructor(parser, 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_nonassoc; + } + + 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_nonassoc(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_binary_nonassoc(this); + } + } + + +} + + + +class Tff_binary_assocContext extends antlr4.ParserRuleContext { + + constructor(parser, 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_assoc; + } + + 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_assoc(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTff_binary_assoc(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; + } + + untyped_atom() { + return this.getTypedRuleContext(Untyped_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; + } + + untyped_atom() { + return this.getTypedRuleContext(Untyped_atomContext,0); + }; + + subtype_sign() { + return this.getTypedRuleContext(Subtype_signContext,0); + }; + + atom() { + return this.getTypedRuleContext(AtomContext,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_nonassoc() { + return this.getTypedRuleContext(Fof_binary_nonassocContext,0); + }; + + fof_binary_assoc() { + return this.getTypedRuleContext(Fof_binary_assocContext,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_nonassocContext extends antlr4.ParserRuleContext { + + constructor(parser, 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_nonassoc; + } + + 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_nonassoc(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_binary_nonassoc(this); + } + } + + +} + + + +class Fof_binary_assocContext extends antlr4.ParserRuleContext { + + constructor(parser, 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_assoc; + } + + 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_assoc(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitFof_binary_assoc(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 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 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_atom; + } + + untyped_atom() { + return this.getTypedRuleContext(Untyped_atomContext,0); + }; + + defined_constant() { + return this.getTypedRuleContext(Defined_constantContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterAtom(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitAtom(this); + } + } + + +} + + + +class Untyped_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_untyped_atom; + } + + constant() { + return this.getTypedRuleContext(ConstantContext,0); + }; + + system_constant() { + return this.getTypedRuleContext(System_constantContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterUntyped_atom(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitUntyped_atom(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); + }; + + theory() { + return this.getTypedRuleContext(TheoryContext,0); + }; + + creator_source() { + return this.getTypedRuleContext(Creator_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 TheoryContext extends antlr4.ParserRuleContext { + + constructor(parser, parent, invokingState) { + if(parent===undefined) { + parent = null; + } + if(invokingState===undefined || invokingState===null) { + invokingState = -1; + } + super(parent, invokingState); + this.parser = parser; + this.ruleIndex = TPTPParser.RULE_theory; + } + + theory_name() { + return this.getTypedRuleContext(Theory_nameContext,0); + }; + + optional_info() { + return this.getTypedRuleContext(Optional_infoContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTheory(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTheory(this); + } + } + + +} + + + +class Theory_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_theory_name; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterTheory_name(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitTheory_name(this); + } + } + + +} + + + +class Creator_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_creator_source; + } + + creator_name() { + return this.getTypedRuleContext(Creator_nameContext,0); + }; + + useful_info() { + return this.getTypedRuleContext(Useful_infoContext,0); + }; + + parents() { + return this.getTypedRuleContext(ParentsContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterCreator_source(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitCreator_source(this); + } + } + + +} + + + +class Creator_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_creator_name; + } + + atomic_word() { + return this.getTypedRuleContext(Atomic_wordContext,0); + }; + + enterRule(listener) { + if(listener instanceof TPTPListener ) { + listener.enterCreator_name(this); + } + } + + exitRule(listener) { + if(listener instanceof TPTPListener ) { + listener.exitCreator_name(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() { + return this.getToken(TPTPParser.Lower_word, 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); + } + } + + +} + + + + +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_nonassocContext = Thf_binary_nonassocContext; +TPTPParser.Thf_binary_assocContext = Thf_binary_assocContext; +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_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_nonassocContext = Tff_binary_nonassocContext; +TPTPParser.Tff_binary_assocContext = Tff_binary_assocContext; +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_nonassocContext = Fof_binary_nonassocContext; +TPTPParser.Fof_binary_assocContext = Fof_binary_assocContext; +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.Type_constantContext = Type_constantContext; +TPTPParser.Type_functorContext = Type_functorContext; +TPTPParser.Defined_typeContext = Defined_typeContext; +TPTPParser.AtomContext = AtomContext; +TPTPParser.Untyped_atomContext = Untyped_atomContext; +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.TheoryContext = TheoryContext; +TPTPParser.Theory_nameContext = Theory_nameContext; +TPTPParser.Creator_sourceContext = Creator_sourceContext; +TPTPParser.Creator_nameContext = Creator_nameContext; +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; 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..a6da75c --- /dev/null +++ b/tptplus/server/parser/vendor/tptp-antlr/VENDORED.md @@ -0,0 +1,52 @@ +# TPTP ANTLR Parser + +These files are vendored from: + +- Repository: https://github.com/TPTPWorld/SyntaxBNF +- Path: `ANTLRParsers/JavaScriptParser` +- Upstream commit: `da4fbddc9da7b066f03a4fd47edb148fa6e17c91` +- Fetched on: 2026-07-10 +- Generator: ANTLR 4.13.2, as recorded in the generated file headers + +Vendored files: + +- `TPTPLexer.js` +- `TPTPParser.js` +- `TPTPListener.js` + +The local `package.json` marks this folder as ESM so the generated parser 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 + [TPTPWorld/SyntaxBNF](https://github.com/TPTPWorld/SyntaxBNF). Do not vendor + files from a moving branch name. +2. Download these files from `ANTLRParsers/JavaScriptParser` at that commit into + a temporary directory: + - `TPTPLexer.js` + - `TPTPParser.js` + - `TPTPListener.js` +3. Check that all three generated-file headers report the same ANTLR version. +4. Replace only the three generated files listed above. Keep the local + `package.json`, which provides the required ESM boundary. +5. Update the upstream commit, fetch date, and generator version at the top of + this file. +6. If the generator version changed, update the matching JavaScript runtime and + lockfile from the repository root: + + ```sh + npm install --prefix server --save-exact antlr4@ + ``` + +7. Review the generated-code diff, then compile and exercise the Syntax command + with both a valid TPTP document and a document containing a known syntax + error: + + ```sh + npm run compile + ``` + +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. 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..8a476ed --- /dev/null +++ b/tptplus/server/src/parser/tptpAntlrParser.ts @@ -0,0 +1,185 @@ +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; + +let runtimePromise: Promise | undefined; + +export async function parseTptpDocument(text: string): Promise { + const startedAt = Date.now(); + const lines = text.split(/\r?\n/); + + try { + const runtime = await loadTptpAntlrRuntime(); + 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 = true; + 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(): Promise { + runtimePromise ??= loadTptpAntlrRuntimeUncached(); + return runtimePromise; +} + +async function loadTptpAntlrRuntimeUncached(): Promise { + const vendorDir = path.resolve(__dirname, '..', '..', 'parser', 'vendor', 'tptp-antlr'); + 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-experimental', + }; +} + +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-experimental', + }; +} + +function clamp(value: number, min: number, max: number): number { + return Math.min(Math.max(value, min), max); +} diff --git a/tptplus/server/src/server.ts b/tptplus/server/src/server.ts index d9f32f2..97ffae5 100644 --- a/tptplus/server/src/server.ts +++ b/tptplus/server/src/server.ts @@ -18,6 +18,11 @@ import { TextDocument } from 'vscode-languageserver-textdocument'; +import { + parseTptpDocument, + TptpAntlrParseResult, +} from './parser/tptpAntlrParser'; + // Create connection and document manager const connection = createConnection(ProposedFeatures.all); const documents: TextDocuments = new TextDocuments(TextDocument); @@ -440,6 +445,37 @@ async function validateTextDocument(textDocument: TextDocument): Promise { connection.sendDiagnostics({ uri: textDocument.uri, diagnostics }); } +interface ExperimentalParseWithAntlrParams { + uri: string; +} + +connection.onRequest( + 'tptp/experimentalParseWithAntlr', + async (params: ExperimentalParseWithAntlrParams): 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-experimental', + }], + summary: { + elapsedMs: 0, + syntaxErrorCount: 1, + }, + }; + } + + return parseTptpDocument(document.getText()); + } +); + // Basic completion support connection.onCompletion( (_textDocumentPosition: TextDocumentPositionParams): CompletionItem[] => {