From b4f1ccff9b8e065be389c7eb1b757145dfa46c78 Mon Sep 17 00:00:00 2001 From: standash Date: Thu, 24 Aug 2017 17:37:25 +0200 Subject: [PATCH] Added the modules and everything --- .gitignore | 7 + molerat/pom.xml | 136 + .../main/java/it/unitn/molerat/cmd/Main.java | 267 + .../cmd/experiments/AbstractExperiment.java | 16 + .../CalculateAllChangesExperiment.java | 61 + .../ChangeEvdPerformanceExperiment.java | 53 + .../VulnEvdPerformanceExperiment.java | 45 + .../molerat/data/csv/AbstractDataPoint.java | 68 + .../data/csv/ChangeStatsDataPoint.java | 25 + .../molerat/data/csv/FixStatsDataPoint.java | 21 + .../molerat/data/csv/InputDataPoint.java | 23 + .../molerat/data/csv/OutputDataPoint.java | 26 + .../molerat/data/csv/PerfOutputDataPoint.java | 21 + .../data/csv/VulnEvidenceDataPoint.java | 22 + .../unitn/molerat/data/db/MongoWrapper.java | 245 + .../molerat/data/memory/AnalysisEntry.java | 74 + .../VulnerabilityEvidencePrinter.java | 46 + .../molerat/evidence/ChangeEvidence.java | 45 + .../it/unitn/molerat/evidence/Changes.java | 93 + .../molerat/evidence/GenericEvidence.java | 30 + .../evidence/VulnerabilityEvidence.java | 32 + .../trackers/AbstractEvidenceTracker.java | 56 + .../changes/ChangeEvidenceTracker.java | 108 + .../changes/FullChangeEvidenceTracker.java | 13 + .../DeletionVulnerabilityEvidenceTracker.java | 92 + ...dDeletionVulnerabilityEvidenceTracker.java | 72 + ...tatisticsVulnerabilityEvidenceTracker.java | 71 + .../vuln/PatchedMethodBodyTracker.java | 148 + ...liceDecayVulnerabilityEvidenceTracker.java | 85 + .../SliceVulnerabilityEvidenceTracker.java | 139 + .../vuln/VulnerabilityEvidenceTracker.java | 234 + .../VulnerabilityEvidenceTrackerFactory.java | 73 + .../molerat/repos/utils/CommitMetrics.java | 98 + .../unitn/molerat/repos/utils/IORoutines.java | 150 + .../repos/utils/SignatureExtractor.java | 233 + .../repos/wrappers/GitRepoWrapper.java | 204 + .../molerat/repos/wrappers/RepoWrapper.java | 161 + .../repos/wrappers/SvnRepoWrapper.java | 185 + pom.xml | 20 + repoman/pom.xml | 69 + .../main/java/it/unitn/repoman/cmd/Main.java | 87 + .../core/exceptions/InvalidLineException.java | 9 + .../repoman/core/lang/LanguageFactory.java | 59 + .../repoman/core/lang/parsers/c/C.tokens | 221 + .../core/lang/parsers/c/CBaseListener.java | 1048 ++ .../repoman/core/lang/parsers/c/CLexer.java | 618 ++ .../repoman/core/lang/parsers/c/CLexer.tokens | 221 + .../core/lang/parsers/c/CListener.java | 852 ++ .../repoman/core/lang/parsers/c/CParser.java | 7491 +++++++++++++++ .../core/lang/parsers/java/Java.tokens | 201 + .../lang/parsers/java/JavaBaseListener.java | 1252 +++ .../core/lang/parsers/java/JavaLexer.java | 545 ++ .../core/lang/parsers/java/JavaLexer.tokens | 201 + .../core/lang/parsers/java/JavaListener.java | 1021 ++ .../core/lang/parsers/java/JavaParser.java | 8421 +++++++++++++++++ .../traversals/c/CMethodCallTraversal.java | 110 + .../AssignmentSymbolExtractTraversal.java | 56 + .../generic/ConditionTraversal.java | 25 + .../lang/traversals/generic/DFSTraversal.java | 58 + .../generic/DotSymbolTraversal.java | 51 + .../generic/FormalParameterTraversal.java | 52 + .../generic/MethodCallTraversal.java | 64 + .../generic/MethodDeclarationTraversal.java | 69 + .../generic/NodeContainmentTraversal.java | 27 + .../traversals/generic/ScopesTraversal.java | 56 + .../traversals/generic/SeedTraversal.java | 39 + .../generic/StatementMappingTraversal.java | 31 + .../generic/SymbolExtractTraversal.java | 42 + .../lang/traversals/generic/Traversal.java | 9 + .../java/JavaAPISignatureTraversal.java | 125 + .../java/JavaMethodCallTraversal.java | 114 + .../core/lang/wrappers/c/CWrapper.java | 103 + .../core/lang/wrappers/generic/Wrapper.java | 137 + .../core/lang/wrappers/java/JavaWrapper.java | 114 + .../core/slicers/LightweightSlice.java | 124 + .../slicers/LightweightSlicePessimist.java | 35 + .../slicers/tainters/AbstractTainter.java | 73 + .../slicers/tainters/BackwardTainter.java | 75 + .../tainters/BackwardTainterPessimist.java | 104 + .../core/slicers/tainters/ForwardTainter.java | 140 + .../tainters/ForwardTainterPessimist.java | 119 + .../slicers/tainters/MethodCallTainter.java | 38 + .../slicers/tainters/TaintedVariable.java | 29 + .../slicers/tainters/TaintedVariableSet.java | 95 + .../printers/ConsolePrinterListener.java | 102 + .../core/utils/printers/HTMLPrinter.java | 18 + .../utils/printers/TextPrinterListener.java | 73 + 87 files changed, 28121 insertions(+) create mode 100755 .gitignore create mode 100644 molerat/pom.xml create mode 100644 molerat/src/main/java/it/unitn/molerat/cmd/Main.java create mode 100644 molerat/src/main/java/it/unitn/molerat/cmd/experiments/AbstractExperiment.java create mode 100644 molerat/src/main/java/it/unitn/molerat/cmd/experiments/CalculateAllChangesExperiment.java create mode 100644 molerat/src/main/java/it/unitn/molerat/cmd/experiments/ChangeEvdPerformanceExperiment.java create mode 100644 molerat/src/main/java/it/unitn/molerat/cmd/experiments/VulnEvdPerformanceExperiment.java create mode 100644 molerat/src/main/java/it/unitn/molerat/data/csv/AbstractDataPoint.java create mode 100644 molerat/src/main/java/it/unitn/molerat/data/csv/ChangeStatsDataPoint.java create mode 100644 molerat/src/main/java/it/unitn/molerat/data/csv/FixStatsDataPoint.java create mode 100644 molerat/src/main/java/it/unitn/molerat/data/csv/InputDataPoint.java create mode 100644 molerat/src/main/java/it/unitn/molerat/data/csv/OutputDataPoint.java create mode 100644 molerat/src/main/java/it/unitn/molerat/data/csv/PerfOutputDataPoint.java create mode 100644 molerat/src/main/java/it/unitn/molerat/data/csv/VulnEvidenceDataPoint.java create mode 100644 molerat/src/main/java/it/unitn/molerat/data/db/MongoWrapper.java create mode 100644 molerat/src/main/java/it/unitn/molerat/data/memory/AnalysisEntry.java create mode 100644 molerat/src/main/java/it/unitn/molerat/data/printers/VulnerabilityEvidencePrinter.java create mode 100644 molerat/src/main/java/it/unitn/molerat/evidence/ChangeEvidence.java create mode 100644 molerat/src/main/java/it/unitn/molerat/evidence/Changes.java create mode 100644 molerat/src/main/java/it/unitn/molerat/evidence/GenericEvidence.java create mode 100644 molerat/src/main/java/it/unitn/molerat/evidence/VulnerabilityEvidence.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/AbstractEvidenceTracker.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/changes/ChangeEvidenceTracker.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/changes/FullChangeEvidenceTracker.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/DeletionVulnerabilityEvidenceTracker.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/EnhancedDeletionVulnerabilityEvidenceTracker.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/FixStatisticsVulnerabilityEvidenceTracker.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/PatchedMethodBodyTracker.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/SliceDecayVulnerabilityEvidenceTracker.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/SliceVulnerabilityEvidenceTracker.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/VulnerabilityEvidenceTracker.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/VulnerabilityEvidenceTrackerFactory.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/utils/CommitMetrics.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/utils/IORoutines.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/utils/SignatureExtractor.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/wrappers/GitRepoWrapper.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/wrappers/RepoWrapper.java create mode 100644 molerat/src/main/java/it/unitn/molerat/repos/wrappers/SvnRepoWrapper.java create mode 100644 pom.xml create mode 100644 repoman/pom.xml create mode 100755 repoman/src/main/java/it/unitn/repoman/cmd/Main.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/exceptions/InvalidLineException.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/LanguageFactory.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/C.tokens create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CBaseListener.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CLexer.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CLexer.tokens create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CListener.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CParser.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/Java.tokens create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaBaseListener.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaLexer.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaLexer.tokens create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaListener.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaParser.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/c/CMethodCallTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/AssignmentSymbolExtractTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/ConditionTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/DFSTraversal.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/DotSymbolTraversal.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/FormalParameterTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/MethodCallTraversal.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/MethodDeclarationTraversal.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/NodeContainmentTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/ScopesTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/SeedTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/StatementMappingTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/SymbolExtractTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/Traversal.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/java/JavaAPISignatureTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/traversals/java/JavaMethodCallTraversal.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/c/CWrapper.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/generic/Wrapper.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/java/JavaWrapper.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/slicers/LightweightSlice.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/slicers/LightweightSlicePessimist.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/AbstractTainter.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/BackwardTainter.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/BackwardTainterPessimist.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/ForwardTainter.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/ForwardTainterPessimist.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/MethodCallTainter.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/TaintedVariable.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/TaintedVariableSet.java create mode 100755 repoman/src/main/java/it/unitn/repoman/core/utils/printers/ConsolePrinterListener.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/utils/printers/HTMLPrinter.java create mode 100644 repoman/src/main/java/it/unitn/repoman/core/utils/printers/TextPrinterListener.java diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..efcb6d8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.classpath +.project +*.iml +*.ipr +*.iws +.idea/ +target/ diff --git a/molerat/pom.xml b/molerat/pom.xml new file mode 100644 index 0000000..df3c0bd --- /dev/null +++ b/molerat/pom.xml @@ -0,0 +1,136 @@ + + + + + it.unitn + foss-vuln-tracker + 1.0-SNAPSHOT + + 4.0.0 + it.unitn.molerat + molerat + 1.0-SNAPSHOT + jar + + + + + org.antlr + antlr4-runtime + 4.7 + + + org.mongodb + bson + 3.4.2 + + + commons-cli + commons-cli + 1.4 + + + it.unitn.repoman + repoman + 1.0-SNAPSHOT + + + commons-io + commons-io + 2.5 + + + org.apache.commons + commons-lang3 + 3.4 + + + org.mongodb + mongodb-driver + 3.4.2 + + + org.mongodb + mongodb-driver-core + 3.4.2 + + + org.eclipse.jgit + org.eclipse.jgit + 4.2.0.201601211800-r + + + org.slf4j + slf4j-api + 1.7.25 + + + org.slf4j + slf4j-nop + 1.7.25 + + + org.tmatesoft.svnkit + svnkit-cli + 1.8.13 + + + org.tmatesoft.svnkit + svnkit + 1.8.13 + + + org.tmatesoft.svnkit + svnkit-javahl16 + 1.8.13 + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.1 + + + copy-dependencies + prepare-package + + copy-dependencies + + + + ${project.build.directory}/libs + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + + true + libs/ + it.unitn.molerat.cmd.Main + + + + + + + diff --git a/molerat/src/main/java/it/unitn/molerat/cmd/Main.java b/molerat/src/main/java/it/unitn/molerat/cmd/Main.java new file mode 100644 index 0000000..8e0a3eb --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/cmd/Main.java @@ -0,0 +1,267 @@ +package it.unitn.molerat.cmd; + +import it.unitn.molerat.data.csv.InputDataPoint; +import it.unitn.molerat.data.csv.VulnEvidenceDataPoint; +import it.unitn.molerat.data.db.MongoWrapper; +import it.unitn.molerat.data.memory.AnalysisEntry; +import it.unitn.molerat.evidence.VulnerabilityEvidence; +import it.unitn.molerat.repos.trackers.vuln.VulnerabilityEvidenceTracker; +import it.unitn.molerat.repos.trackers.vuln.VulnerabilityEvidenceTrackerFactory; +import it.unitn.molerat.repos.utils.IORoutines; + +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Set; +import org.apache.commons.cli.*; +import org.bson.types.ObjectId; + +public class Main { + + private static MongoWrapper db = new MongoWrapper("molerat"); + + public static void main(String[] args) { + Options opts = new Options(); + + Option listTrackersOpt = Option.builder() + .longOpt("list-trackers") + .desc("List the available trackers for vulnerability molerat.evidence") + .build(); + opts.addOption(listTrackersOpt); + + Option projectNameOpt = Option.builder() + .longOpt("project-name") + .desc("The name of the project") + .hasArg() + .build(); + opts.addOption(projectNameOpt); + + Option repoTypeOpt = Option.builder() + .longOpt("repo-type") + .desc("The type of the source code repository ('git' or 'svn')") + .hasArg() + .build(); + opts.addOption(repoTypeOpt); + + Option repoPathOpt = Option.builder() + .longOpt("repo-path") + .desc("The path of the working copy of the source code repository") + .hasArg() + .build(); + opts.addOption(repoPathOpt); + + Option cveIdOpt = Option.builder() + .longOpt("cve-id") + .desc("The CVE identifier of a vulnerability") + .hasArg() + .build(); + opts.addOption(cveIdOpt); + + Option fixCommitOpt = Option.builder() + .longOpt("fix-commit") + .desc("The commit that fixed a vulnerability") + .hasArg() + .build(); + opts.addOption(fixCommitOpt); + + Option trackerTypeOpt = Option.builder() + .longOpt("tracker-type") + .desc("The type of the vulnerability molerat.evidence tracker") + .hasArg() + .build(); + opts.addOption(trackerTypeOpt); + + Option inputFileOpt = Option.builder() + .longOpt("input-file") + .desc("Path to the input .csv file") + .hasArg() + .argName("input-file-path") + .build(); + opts.addOption(inputFileOpt); + + Option outputFileOpt = Option.builder() + .longOpt("output-file") + .desc("Path to the output .csv file") + .hasArg() + .argName("output-file-path") + .build(); + opts.addOption(outputFileOpt); + + CommandLineParser cmdParser = new DefaultParser(); + HelpFormatter helpFormatter = new HelpFormatter(); + CommandLine cmd; + try { + cmd = cmdParser.parse(opts, args); + if (cmd.getOptions().length == 0) { + throw new ParseException("Arguments are not specified"); + } + + if (cmd.hasOption("list-trackers")) { + System.out.println(VulnerabilityEvidenceTrackerFactory.getTrackersList()); + return; + } + + if (cmd.hasOption("input-file")) { + String i = cmd.getOptionValue("input-file"); + collectVulnEvidence(i); + } + if (cmd.hasOption("output-file")) { + String o = cmd.getOptionValue("output-file"); + generateCsv(o); + } + + if (!cmd.hasOption("input-file") && !cmd.hasOption("output-file")) { + String projectName = null; + String repoType = null; + String repoPath = null; + String cveId = null; + String fixCommit = null; + String trackerType = null; + + if (cmd.hasOption("project-name")) { + projectName = cmd.getOptionValue("project-name"); + } + if (cmd.hasOption("repo-type")) { + repoType = cmd.getOptionValue("repo-type"); + } + if(cmd.hasOption("repo-path")) { + repoPath = cmd.getOptionValue("repo-path"); + } + if(cmd.hasOption("cve-id")) { + cveId = cmd.getOptionValue("cve-id"); + } + if(cmd.hasOption("fix-commit")) { + fixCommit = cmd.getOptionValue("fix-commit"); + } + if(cmd.hasOption("tracker-type")) { + trackerType = cmd.getOptionValue("tracker-type"); + } + if (projectName == null) { + throw new ParseException("The 'project-name' parameter is not specified"); + } + if (repoType == null) { + throw new ParseException("The 'repo-type' parameter is not specified"); + } + if (repoPath == null) { + throw new ParseException("The 'repo-path' parameter is not specified"); + } + if (cveId == null) { + throw new ParseException("The 'cve-id' parameter is not specified"); + } + if (fixCommit == null) { + throw new ParseException("The 'fix-commit' parameter is not specified"); + } + if (trackerType == null) { + throw new ParseException("The 'tracker-type' parameter is not specified"); + } + collect(projectName, repoType, repoPath, cveId, fixCommit, trackerType); + } + } + catch (ParseException e) { + System.out.println("ERROR: " + e.getMessage()); + helpFormatter.printHelp("utility-name", opts); + } + } + + private static void collectVulnEvidence(String inputCsvPath) { + try { + Set inputs = IORoutines.readInputDataPoints(inputCsvPath); + for (InputDataPoint ip : inputs) { + collect(ip.PROJECTID, + ip.REPO_TYPE, + ip.REPO_ROOT, + ip.CVEID, + ip.FIX_REV, + ip.TRACKER_TYPE); + } + } catch (Exception e) { + System.out.println("ERROR: " + e.getMessage()); + } + } + + private static void collect(String projectName, String repositoryType, + String repositoryPath, String cveName, String fixCommit, String trackerType) { + try { + boolean entryExists = db.analysisEntryExists(projectName, cveName, repositoryType, repositoryPath); + if (entryExists) { + System.out.format("WARNING: The analysis entry for '%s' from '%s' already exists, skipping\n", cveName, projectName); + return; + } + + System.out.format("INFO: Collecting the molerat.evidence for '%s' from '%s'\n", cveName, projectName); + VulnerabilityEvidenceTracker vulnTracker = VulnerabilityEvidenceTrackerFactory.getTracker( + repositoryPath, + fixCommit, + repositoryType, + trackerType + ); + vulnTracker.trackEvidence(); + + AnalysisEntry entry = new AnalysisEntry( + cveName, + projectName, + repositoryType, + repositoryPath, + fixCommit, + vulnTracker.getProcessedCommits(), + vulnTracker.getEvidences(), + null // we're not tracking any changes so far + ); + boolean isSuccessful = db.insertAnalysisEntry(entry); + if (!isSuccessful) { + System.out.format("WARNING: Could not get any molerat.evidence for '%s' in '%s'\n", cveName, projectName); + } + System.out.println("INFO: Done!"); + } + catch (Exception e) { + System.out.println("ERROR: " + e.getMessage()); + } + } + + private static void generateCsv(String outFilePath) { + System.out.format("INFO: generating the .csv file '%s'\n", outFilePath); + String csvHeader = new VulnEvidenceDataPoint().getHeader() + "\n"; + try { + IORoutines.writeFile(outFilePath, csvHeader); + Set cveIds = db.getAllCveIds(); + for (ObjectId cveId : cveIds) { + AnalysisEntry analysis = db.getAnalysisEntry(cveId); + if (analysis == null) { + continue; + } + String projectName = analysis.getProjectName(); + String cveName = analysis.getCveName(); + + System.out.format("INFO: writing the entries for '%s'\n", cveName); + Set evidences = analysis.getVulnEvidencesSet(); + if (evidences.size() == 0) { + throw new Exception(String.format("There is no molerat.evidence for '%s' in the database", cveName)); + } + Map locsCount = new LinkedHashMap<>(); + for (VulnerabilityEvidence evd : evidences) { + if (locsCount.containsKey(evd.getCommit())) { + int count = locsCount.get(evd.getCommit()); + locsCount.remove(evd.getCommit()); + locsCount.put(evd.getCommit(), ++count); + } else { + locsCount.put(evd.getCommit(), 1); + } + } + int timestamp = 0; + for (Map.Entry entry : locsCount.entrySet()) { + VulnEvidenceDataPoint dp = new VulnEvidenceDataPoint(new String[]{ + projectName, + cveName, + entry.getKey(), + String.valueOf(timestamp--), + String.valueOf(entry.getValue()) + }); + IORoutines.writeFile(outFilePath, dp.toString() + "\n"); + } + + } + } catch (Exception e) { + System.out.println("ERROR: " + e.getMessage()); + } + } +} + diff --git a/molerat/src/main/java/it/unitn/molerat/cmd/experiments/AbstractExperiment.java b/molerat/src/main/java/it/unitn/molerat/cmd/experiments/AbstractExperiment.java new file mode 100644 index 0000000..8b8d339 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/cmd/experiments/AbstractExperiment.java @@ -0,0 +1,16 @@ +package it.unitn.molerat.cmd.experiments; + +import it.unitn.molerat.data.csv.InputDataPoint; +import it.unitn.molerat.repos.utils.IORoutines; +import java.util.Set; + +public class AbstractExperiment { + + protected static Set readInputDataPoints(String path) throws Exception { + return IORoutines.readInputDataPoints(path); + } + + protected static void saveOutput(String path, String output) throws Exception { + IORoutines.writeFile(path, output + "\n"); + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/cmd/experiments/CalculateAllChangesExperiment.java b/molerat/src/main/java/it/unitn/molerat/cmd/experiments/CalculateAllChangesExperiment.java new file mode 100644 index 0000000..151139b --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/cmd/experiments/CalculateAllChangesExperiment.java @@ -0,0 +1,61 @@ +package it.unitn.molerat.cmd.experiments; + +import it.unitn.molerat.data.csv.InputDataPoint; +import it.unitn.molerat.data.csv.OutputDataPoint; +import it.unitn.molerat.data.csv.PerfOutputDataPoint; +import it.unitn.molerat.repos.utils.CommitMetrics; +import it.unitn.molerat.repos.wrappers.GitRepoWrapper; +import it.unitn.molerat.repos.wrappers.RepoWrapper; + +import java.util.Set; + +public class CalculateAllChangesExperiment extends AbstractExperiment { + public static void main(String[] args) { + if (args.length < 2) { + System.out.println("USAGE: [input.csv] [output.csv]"); + return; + } + String inputCsvPath = args[0]; + String outputCsvPath = args[1]; + + try { + Set inputs = readInputDataPoints(inputCsvPath); + saveOutput(outputCsvPath, new PerfOutputDataPoint().getHeader()); + for (InputDataPoint idp : inputs) { + + System.out.println("Processing the " + idp.CVEID + "..."); + long timeNow = System.currentTimeMillis(); + + RepoWrapper wrapper = new GitRepoWrapper(idp.REPO_ROOT); + Set processedCommits = wrapper.getRevisionNumbers(idp.FIX_REV); + int timestamp = 0; + for (String commit : processedCommits) { + + int publicAPICount = CommitMetrics.getNumberOfPublicMethodsPerRevision(commit, wrapper); + int rem = CommitMetrics.getGlobalPublicMethodsRemoved(commit, idp.FIX_REV, wrapper); + double currentUntouched = (((double) publicAPICount - (double) rem) / (double) publicAPICount) * 100.0; + currentUntouched = Math.round(currentUntouched * 100.0) / 100.0; + + String[] output = new String[]{ + idp.CVEID, + idp.TRACKER_TYPE, + "empty", + commit, + String.valueOf(timestamp), + "empty", + String.valueOf(publicAPICount), + String.valueOf(rem), + String.valueOf(currentUntouched) + }; + OutputDataPoint odp = new OutputDataPoint(output); + saveOutput(outputCsvPath, odp.toString()); + timestamp--; + } + long timeAfter = System.currentTimeMillis(); + System.out.println("TIME (ms): " + (timeAfter - timeNow)); + } + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/cmd/experiments/ChangeEvdPerformanceExperiment.java b/molerat/src/main/java/it/unitn/molerat/cmd/experiments/ChangeEvdPerformanceExperiment.java new file mode 100644 index 0000000..25a9f6a --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/cmd/experiments/ChangeEvdPerformanceExperiment.java @@ -0,0 +1,53 @@ +package it.unitn.molerat.cmd.experiments; + +import it.unitn.molerat.data.csv.InputDataPoint; +import it.unitn.molerat.data.csv.PerfOutputDataPoint; +import it.unitn.molerat.repos.trackers.vuln.VulnerabilityEvidenceTracker; +import it.unitn.molerat.repos.trackers.vuln.VulnerabilityEvidenceTrackerFactory; +import it.unitn.molerat.repos.utils.CommitMetrics; +import java.util.Set; + +public class ChangeEvdPerformanceExperiment extends AbstractExperiment { + public static void main(String[] args) { + if (args.length < 2) { + System.out.println("USAGE: [input.csv] [output.csv]"); + return; + } + String inputCsvPath = args[0]; + String outputCsvPath = args[1]; + + try { + Set inputs = readInputDataPoints(inputCsvPath); + saveOutput(outputCsvPath, new PerfOutputDataPoint().getHeader()); + for (InputDataPoint idp : inputs) { + + System.out.println("Processing the " + idp.CVEID + "..."); + + VulnerabilityEvidenceTracker vulnTracker = VulnerabilityEvidenceTrackerFactory.getTracker(idp.REPO_ROOT, idp.FIX_REV, idp.REPO_TYPE, idp.TRACKER_TYPE); + vulnTracker.trackEvidence(); + + Set processedCommits = vulnTracker.getProcessedCommits(); + for (String commit : processedCommits) { + long timeNow = System.currentTimeMillis(); + + int publicAPICount = CommitMetrics.getNumberOfPublicMethodsPerRevision(commit, vulnTracker.getRepoWrapper()); + int rem = CommitMetrics.getGlobalPublicMethodsRemoved(commit, vulnTracker.getFixedRevision(), vulnTracker.getRepoWrapper()); + double currentUntouched = (((double) publicAPICount - (double) rem) / (double) publicAPICount) * 100.0; + currentUntouched = Math.round(currentUntouched * 100.0) / 100.0; + + long timeAfter = System.currentTimeMillis(); + String[] output = new String[]{ + idp.CVEID, + idp.TRACKER_TYPE, + String.valueOf(timeAfter - timeNow) + }; + PerfOutputDataPoint odp = new PerfOutputDataPoint(output); + saveOutput(outputCsvPath, odp.toString()); + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/cmd/experiments/VulnEvdPerformanceExperiment.java b/molerat/src/main/java/it/unitn/molerat/cmd/experiments/VulnEvdPerformanceExperiment.java new file mode 100644 index 0000000..7860763 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/cmd/experiments/VulnEvdPerformanceExperiment.java @@ -0,0 +1,45 @@ +package it.unitn.molerat.cmd.experiments; + +import it.unitn.molerat.data.csv.InputDataPoint; +import it.unitn.molerat.data.csv.PerfOutputDataPoint; +import it.unitn.molerat.repos.trackers.vuln.VulnerabilityEvidenceTracker; +import it.unitn.molerat.repos.trackers.vuln.VulnerabilityEvidenceTrackerFactory; +import java.util.Set; + +public class VulnEvdPerformanceExperiment extends AbstractExperiment { + + public static void main(String[] args) { + if (args.length < 2) { + System.out.println("USAGE: [input.csv] [output.csv]"); + return; + } + String inputCsvPath = args[0]; + String outputCsvPath = args[1]; + + try { + Set inputs = readInputDataPoints(inputCsvPath); + saveOutput(outputCsvPath, new PerfOutputDataPoint().getHeader()); + for (InputDataPoint idp : inputs) { + + System.out.println("Processing the " + idp.CVEID + "..."); + long timeNow = System.currentTimeMillis(); + + VulnerabilityEvidenceTracker vulnTracker = VulnerabilityEvidenceTrackerFactory.getTracker(idp.REPO_ROOT, idp.FIX_REV, idp.REPO_TYPE, idp.TRACKER_TYPE); + vulnTracker.trackEvidence(); + + long timeAfter = System.currentTimeMillis(); + + String[] output = new String[]{ + idp.CVEID, + idp.TRACKER_TYPE, + String.valueOf(timeAfter - timeNow) + }; + PerfOutputDataPoint odp = new PerfOutputDataPoint(output); + saveOutput(outputCsvPath, odp.toString()); + + } + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/data/csv/AbstractDataPoint.java b/molerat/src/main/java/it/unitn/molerat/data/csv/AbstractDataPoint.java new file mode 100644 index 0000000..54971e4 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/data/csv/AbstractDataPoint.java @@ -0,0 +1,68 @@ +package it.unitn.molerat.data.csv; + +import java.lang.reflect.Field; + +public abstract class AbstractDataPoint { + + public AbstractDataPoint(String[] entries) throws Exception { + Field[] fields = this.getClass().getFields(); + if (entries.length != fields.length) { + throw new Exception("Bad entries for initializing a molerat.data point!"); + } + int i = 0; + for (Field field : fields) { + if (!field.getName().equals("this$0")) { + try { + field.set(this, entries[i++]); + } catch (IllegalArgumentException e) { + System.out.println("ERROR: " + e.getMessage()); + } catch (IllegalAccessException e) { + System.out.println("ERROR: " + e.getMessage()); + } + } + } + } + + public AbstractDataPoint(String str) throws Exception { + this(str.replace(" ", "").split(",")); + } + + public AbstractDataPoint() { + + } + + @Override + public final String toString() { + StringBuilder builder = new StringBuilder(); + Field[] fields = this.getClass().getFields(); + for (Field field : fields) { + if (!field.getName().equals("this$0")) { + try { + builder.append(field.get(this) + ","); + } catch (IllegalArgumentException e) { + System.out.println("ERROR: " + e.getMessage()); + } catch (IllegalAccessException e) { + System.out.println("ERROR: " + e.getMessage()); + } + } + } + builder.deleteCharAt(builder.length()-1); + return builder.toString(); + } + + public final String getHeader() { + StringBuilder builder = new StringBuilder(); + Field[] fields = this.getClass().getFields(); + for (Field field : fields) { + if (!field.getName().equals("this$0")) { + try { + builder.append(field.getName() + ","); + } catch (IllegalArgumentException e) { + System.out.println("ERROR: " + e.getMessage()); + } + } + } + builder.deleteCharAt(builder.length()-1); + return builder.toString(); + } +} \ No newline at end of file diff --git a/molerat/src/main/java/it/unitn/molerat/data/csv/ChangeStatsDataPoint.java b/molerat/src/main/java/it/unitn/molerat/data/csv/ChangeStatsDataPoint.java new file mode 100644 index 0000000..516accf --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/data/csv/ChangeStatsDataPoint.java @@ -0,0 +1,25 @@ +package it.unitn.molerat.data.csv; + +/** + * Created by standash on 06/12/2016. + */ +public class ChangeStatsDataPoint extends AbstractDataPoint { + public String PROJECT; + public String CURRENT_COMMIT; + public String ADDED_LINES; + public String DELETED_LINES; + public String TOUCHED_METHODS; + public String TOUCHED_FILES; + + public ChangeStatsDataPoint(String[] entries) throws Exception { + super(entries); + } + + public ChangeStatsDataPoint(String str) throws Exception { + super(str); + } + + public ChangeStatsDataPoint() { + + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/data/csv/FixStatsDataPoint.java b/molerat/src/main/java/it/unitn/molerat/data/csv/FixStatsDataPoint.java new file mode 100644 index 0000000..753dbe8 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/data/csv/FixStatsDataPoint.java @@ -0,0 +1,21 @@ +package it.unitn.molerat.data.csv; + +public class FixStatsDataPoint extends AbstractDataPoint { + public String CVEID; + public String ADDED_LINES; + public String DELETED_LINES; + public String TOUCHED_METHODS; + public String TOUCHED_FILES; + + public FixStatsDataPoint(String[] entries) throws Exception { + super(entries); + } + + public FixStatsDataPoint(String str) throws Exception { + super(str); + } + + public FixStatsDataPoint() { + + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/data/csv/InputDataPoint.java b/molerat/src/main/java/it/unitn/molerat/data/csv/InputDataPoint.java new file mode 100644 index 0000000..0fcbb09 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/data/csv/InputDataPoint.java @@ -0,0 +1,23 @@ +package it.unitn.molerat.data.csv; + +public final class InputDataPoint extends AbstractDataPoint { + + public String PROJECTID; + public String CVEID; + public String REPO_TYPE; + public String REPO_ROOT; + public String FIX_REV; + public String TRACKER_TYPE; + + public InputDataPoint(String[] entries) throws Exception { + super(entries); + } + + public InputDataPoint(String str) throws Exception { + super(str); + } + + public InputDataPoint() { + + } +} \ No newline at end of file diff --git a/molerat/src/main/java/it/unitn/molerat/data/csv/OutputDataPoint.java b/molerat/src/main/java/it/unitn/molerat/data/csv/OutputDataPoint.java new file mode 100644 index 0000000..cb9d8b2 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/data/csv/OutputDataPoint.java @@ -0,0 +1,26 @@ +package it.unitn.molerat.data.csv; + +public class OutputDataPoint extends AbstractDataPoint { + + public String CVEID; + public String TRACKING_METHOD; + public String CURRENT_FILE; + public String CURRENT_REV; + public String TIMESTAMP; + public String EVIDENCE_LOC; + //public String GLOBAL_PUBLIC_API_COUNT; + //public String GLOBAL_PUBLIC_API_REMOVED; + //public String GLOBAL_PUBLIC_API_UNTOUCHED; + + public OutputDataPoint(String[] entries) throws Exception { + super(entries); + } + + public OutputDataPoint(String str) throws Exception { + super(str); + } + + public OutputDataPoint() { + + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/data/csv/PerfOutputDataPoint.java b/molerat/src/main/java/it/unitn/molerat/data/csv/PerfOutputDataPoint.java new file mode 100644 index 0000000..42df764 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/data/csv/PerfOutputDataPoint.java @@ -0,0 +1,21 @@ +package it.unitn.molerat.data.csv; + +public class PerfOutputDataPoint extends AbstractDataPoint { + + public String CVEID; + public String TRACKING_METHOD; + public String TIME_MS; + + public PerfOutputDataPoint(String[] entries) throws Exception { + super(entries); + } + + public PerfOutputDataPoint(String str) throws Exception { + super(str); + } + + public PerfOutputDataPoint() { + + } + +} diff --git a/molerat/src/main/java/it/unitn/molerat/data/csv/VulnEvidenceDataPoint.java b/molerat/src/main/java/it/unitn/molerat/data/csv/VulnEvidenceDataPoint.java new file mode 100644 index 0000000..e8b3e76 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/data/csv/VulnEvidenceDataPoint.java @@ -0,0 +1,22 @@ +package it.unitn.molerat.data.csv; + +public class VulnEvidenceDataPoint extends AbstractDataPoint { + + public String PROJECT_NAME; + public String CVEID; + public String CURRENT_REV; + public String TIMESTAMP; + public String EVIDENCE_LOC; + + public VulnEvidenceDataPoint(String[] entries) throws Exception { + super(entries); + } + + public VulnEvidenceDataPoint(String str) throws Exception { + super(str); + } + + public VulnEvidenceDataPoint() { + + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/data/db/MongoWrapper.java b/molerat/src/main/java/it/unitn/molerat/data/db/MongoWrapper.java new file mode 100644 index 0000000..201c58a --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/data/db/MongoWrapper.java @@ -0,0 +1,245 @@ +package it.unitn.molerat.data.db; + +import com.mongodb.BasicDBObject; +import com.mongodb.MongoClient; +import com.mongodb.client.FindIterable; +import com.mongodb.client.MongoCollection; +import com.mongodb.client.MongoDatabase; +import com.mongodb.client.model.Indexes; +import it.unitn.molerat.data.memory.AnalysisEntry; +import it.unitn.molerat.evidence.VulnerabilityEvidence; +import org.bson.Document; +import org.bson.types.ObjectId; +import java.util.*; + +public class MongoWrapper { + + private static final String projectCollection = "projects"; + private static final String vulnsCollection = "vulns"; + private static final String vulnEvdCollection = "vuln_evidences"; + + private MongoClient client = null; + private MongoDatabase db = null; + + public MongoWrapper(String dbName) { + this.client = new MongoClient(); + this.db = client.getDatabase(dbName); + } + + private FindIterable getEntries(BasicDBObject query, String collection) { + MongoCollection docs = db.getCollection(collection); + return docs.find(query); + } + + private Document getEntry(BasicDBObject query, String collection) { + return getEntries(query, collection).first(); + } + + private ObjectId getEntryId(Document doc) { + return (doc != null) ? doc.getObjectId("_id") : null; + } + + private Document getProjectEntry(String name, String repoType, String repoPath) { + BasicDBObject query = new BasicDBObject(); + query.put("name", name); + query.put("repo_type", repoType); + query.put("repo_path", repoPath); + return getEntry(query, projectCollection); + } + + private Document getProjectEntry(ObjectId projectId) { + BasicDBObject query = new BasicDBObject(); + query.put("_id", projectId); + return getEntry(query, projectCollection); + } + + private ObjectId getProjectId(String name, String repoType, String repoPath) { + return getEntryId(getProjectEntry(name, repoType, repoPath)); + } + + private ObjectId getProjectId(ObjectId cveId) { + return getCveEntry(cveId).getObjectId("owner_id"); + } + + private Document getCveEntry(ObjectId projectId, String cve) { + BasicDBObject query = new BasicDBObject(); + query.put("cve", cve); + query.put("owner_id", projectId); + return getEntry(query, vulnsCollection); + } + + private Document getCveEntry(ObjectId cveId) { + BasicDBObject query = new BasicDBObject(); + query.put("_id", cveId); + return getEntry(query, vulnsCollection); + } + + private ObjectId getCveId(ObjectId projectId, String cve) { + return getEntryId(getCveEntry(projectId, cve)); + } + + public Set getAllCveIds() { + Set ids = new LinkedHashSet<>(); + MongoCollection vulns = db.getCollection(vulnsCollection); + FindIterable docs = vulns.find(); + for (Document doc : docs) { + ids.add(doc.getObjectId("_id")); + } + return ids; + } + + private FindIterable getVulnEvidences(ObjectId cveId) { + BasicDBObject query = new BasicDBObject() ; + query.put("owner_id", cveId); + FindIterable result = getEntries(query, vulnEvdCollection); + result.sort(new BasicDBObject("order", -1)); + return result; + } + + private ObjectId insertProject(String name, String repoType, String repoPath) { + Document proj = getProjectEntry(name, repoType, repoPath); + if (proj == null) { + MongoCollection projects = db.getCollection(projectCollection); + proj = new Document("name", name) + .append("repo_type", repoType) + .append("repo_path", repoPath); + projects.insertOne(proj); + + } + return getEntryId(proj); + } + + private ObjectId insertCve(ObjectId projectId, String cve, String fixCommit) { + Document vuln = getCveEntry(projectId, cve); + if (vuln == null) { + MongoCollection vulns = db.getCollection(vulnsCollection); + vuln = new Document("cve", cve) + .append("fix_commit", fixCommit) + .append("owner_id", projectId) + .append("processed", false); + vulns.insertOne(vuln); + MongoCollection projects = db.getCollection(projectCollection); + projects.findOneAndUpdate(new BasicDBObject("_id", projectId), new BasicDBObject("$push", + new BasicDBObject("vulns", getEntryId(vuln)))); + } + return getEntryId(vuln); + } + + private boolean isVulnProcessed(ObjectId cveId) { + MongoCollection vulns = db.getCollection(vulnsCollection); + Document cve = vulns.find(new BasicDBObject("_id", cveId)).first(); + return (Boolean)cve.get("processed"); + } + + public boolean insertAnalysisEntry(AnalysisEntry entry) { + // if there's no molerat.evidence for some reason, return false + if (entry.getVulnEvidences().isEmpty()) { + return false; + } + + ObjectId projectId = insertProject(entry.getProjectName(), entry.getRepositoryType(), entry.getRepositoryPath()); + ObjectId cveId = insertCve(projectId, entry.getCveName(), entry.getFixCommit()); + MongoCollection vulns = db.getCollection(vulnsCollection); + MongoCollection evds = db.getCollection(vulnEvdCollection); + + if (isVulnProcessed(cveId)) { + vulns.updateOne( + new BasicDBObject("_id", cveId), + new BasicDBObject("$set", new BasicDBObject("processed", false)) + ); + evds.deleteMany(new BasicDBObject("owner_id", cveId)); + } + + List records = new LinkedList(); + int order= 0; + Set commits = entry.getCommits(); + for (String commit : commits) { + Set evidences = entry.getVulnEvidences().get(commit); + if (evidences != null) { + for (VulnerabilityEvidence e : evidences) { + BasicDBObject record = new BasicDBObject(); + record.put("owner_id", cveId); + record.put("revision", commit); + record.put("order", order); + record.put("file_path", e.getPath()); + record.put("container", e.getContainer()); + record.put("line_number", e.getLineNumber()); + record.put("line_contents", e.getLineContents()); + Document doc = new Document(record); + records.add(doc); + } + } + order--; + } + + evds.insertMany(records); + vulns.updateOne( + new BasicDBObject("_id", cveId), + new BasicDBObject("$set", new BasicDBObject("processed", true)) + ); + //create index + evds.createIndex(Indexes.descending("order")); + return true; + } + + public AnalysisEntry getAnalysisEntry(String projectName, String cveName, String repoType, String repoPath) { + ObjectId projectId = getProjectId(projectName, repoType, repoPath); + ObjectId cveId = getCveId(projectId, cveName); + return getAnalysisEntry(cveId); + } + + public boolean analysisEntryExists(String projectName, String cveName, String repoType, String repoPath) { + ObjectId projectId = getProjectId(projectName, repoType, repoPath); + ObjectId cveId = getCveId(projectId, cveName); + return (projectId != null && cveId != null); + } + + public Set getAnalysisEntries() { + Set entries = new LinkedHashSet<>(); + FindIterable cves = db.getCollection(vulnsCollection).find(); + for (Document cve : cves) { + ObjectId cveId = cve.getObjectId("_id"); + AnalysisEntry entry = getAnalysisEntry(cveId); + entries.add(entry); + } + return entries; + } + + public AnalysisEntry getAnalysisEntry(ObjectId cveId) { + if (!isVulnProcessed(cveId)) { + return null; + } + ObjectId projectId = getProjectId(cveId); + Document projectDoc = getProjectEntry(projectId); + String projectName = projectDoc.getString("name"); + String repoType = projectDoc.getString("repo_type"); + String repoPath = projectDoc.getString("repo_path"); + + Document cveDoc = getCveEntry(cveId); + String cveName = cveDoc.getString("cve"); + String fixCommit = cveDoc.getString("fix_commit"); + + Map> vulnEvidences = new LinkedHashMap<>(); + FindIterable docs = getVulnEvidences(cveId); + for (Document doc : docs) { + String filePath = doc.getString("file_path"); + String container = doc.getString("container"); + String revision = doc.getString("revision"); + int lineNumber = doc.getInteger("line_number"); + String lineContents = doc.getString("line_contents"); + VulnerabilityEvidence evidence = new VulnerabilityEvidence(filePath, revision, container, lineNumber, lineContents); + if (vulnEvidences.containsKey(revision)) { + vulnEvidences.get(revision).add(evidence); + } + else { + Set set = new LinkedHashSet<>(); + set.add(evidence); + vulnEvidences.put(evidence.getCommit(), set); + } + } + /* TODO: add stuff for getting the changes molerat.evidence + Map> chgEvidences = new TreeMap<>(); + */ + return new AnalysisEntry(cveName, projectName, repoType, repoPath, fixCommit, vulnEvidences.keySet(), vulnEvidences, null); + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/data/memory/AnalysisEntry.java b/molerat/src/main/java/it/unitn/molerat/data/memory/AnalysisEntry.java new file mode 100644 index 0000000..5f5a2be --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/data/memory/AnalysisEntry.java @@ -0,0 +1,74 @@ +package it.unitn.molerat.data.memory; + +import it.unitn.molerat.evidence.ChangeEvidence; +import it.unitn.molerat.evidence.VulnerabilityEvidence; + +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; + +public class AnalysisEntry { + private final String cveId; + private final String projectId; + private final String fixCommit; + private final String repositoryType; + private final String repositoryPath; + private final Set commits; + private final Map> vulnEvidences; + private final Map> changEvidences; + + public AnalysisEntry(String cveId, String projectId, String repositoryType, String repositoryPath, + String fixCommit, Set commits, + Map> vulnEvidences, + Map> changEvidences) { + this.cveId = cveId; + this.projectId = projectId; + this.repositoryType = repositoryType; + this.repositoryPath = repositoryPath; + this.commits = commits; + this.fixCommit = fixCommit; + this.vulnEvidences = vulnEvidences; + this.changEvidences = changEvidences; + } + + public String getCveName() { + return cveId; + } + + public Set getCommits() { + return commits; + } + + public String getFixCommit() { + return fixCommit; + } + + public String getRepositoryType() { + return repositoryType; + } + + public String getRepositoryPath() { + return repositoryPath; + } + + public Map> getVulnEvidences() { + return vulnEvidences; + } + + public Set getVulnEvidencesSet() { + Set evidences = new LinkedHashSet<>(); + for (Set eset : vulnEvidences.values()) { + evidences.addAll(eset); + } + return evidences; + } + + public Map> getChangEvidences() { + return changEvidences; + } + + public String getProjectName() { + return projectId; + } + +} diff --git a/molerat/src/main/java/it/unitn/molerat/data/printers/VulnerabilityEvidencePrinter.java b/molerat/src/main/java/it/unitn/molerat/data/printers/VulnerabilityEvidencePrinter.java new file mode 100644 index 0000000..0d87184 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/data/printers/VulnerabilityEvidencePrinter.java @@ -0,0 +1,46 @@ +package it.unitn.molerat.data.printers; + +import it.unitn.molerat.evidence.VulnerabilityEvidence; + +import java.util.*; + +public class VulnerabilityEvidencePrinter { + + private final StringBuilder builder = new StringBuilder(); + + public VulnerabilityEvidencePrinter(Set evidence) { + List sortedEvidence = new LinkedList<>(evidence); + Collections.sort(sortedEvidence, new Comparator() { + @Override + public int compare(VulnerabilityEvidence o1, VulnerabilityEvidence o2) { + if (o1.getLineNumber() < o2.getLineNumber()) { + return -1; + } else if (o1.getLineNumber() > o2.getLineNumber()) { + return 1; + } else { + return 0; + } + } + }); + + String path = ""; + String container = ""; + for (VulnerabilityEvidence e : sortedEvidence) { + if (!path.equals(e.getPath())) { + path = e.getPath(); + builder.append("<" + path + ">\n"); + } + if (!container.equals(e.getContainer())) { + container = e.getContainer(); + builder.append("\t" + container + "\n"); + } + builder.append("\t\t" + e.getLineNumber() + ": " + e.getLineContents() + "\n"); + } + } + + @Override + public String toString() { + return this.builder.toString(); + } + +} diff --git a/molerat/src/main/java/it/unitn/molerat/evidence/ChangeEvidence.java b/molerat/src/main/java/it/unitn/molerat/evidence/ChangeEvidence.java new file mode 100644 index 0000000..b3dea9f --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/evidence/ChangeEvidence.java @@ -0,0 +1,45 @@ +package it.unitn.molerat.evidence; + +public class ChangeEvidence extends GenericEvidence { + + private final boolean removed; + + public ChangeEvidence(String file, String commit, String container, boolean removed) { + super(file, commit, container); + this.removed = removed; + } + + public boolean isMethodOrConstructor() { + return this.container.contains("(") && this.container.contains(")"); + } + + public boolean isAbsentInFix() { + return removed; + } + + public String getAccessModifier() { + if (this.container.startsWith("public")) { + return "public"; + } + else if (this.container.startsWith("protected")) { + return "protected"; + } + else if (this.container.startsWith("private")) { + return "private"; + } + return ""; + } + + public boolean isPublicMethodOrConstructor() { + return this.isMethodOrConstructor() && this.getAccessModifier().equals("public"); + } + + public boolean isProtectedMethodOrConstructor() { + return this.isMethodOrConstructor() && this.getAccessModifier().equals("protected"); + } + + public boolean isPrivateMethodOrConstructor() { + return this.isMethodOrConstructor() && this.getAccessModifier().equals("private"); + } + +} diff --git a/molerat/src/main/java/it/unitn/molerat/evidence/Changes.java b/molerat/src/main/java/it/unitn/molerat/evidence/Changes.java new file mode 100644 index 0000000..2b0000f --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/evidence/Changes.java @@ -0,0 +1,93 @@ +package it.unitn.molerat.evidence; + +import java.util.Map; +import java.util.TreeMap; + +public class Changes { + + private final String path; + private final String leftRev; + private final String rightRev; + private final Map deletions; + private final Map additions; + private String renamedTo = ""; + + + public Changes(String path, String leftRev, String rightRev) { + this.path = path; + this.leftRev = leftRev; + this.rightRev = rightRev; + this.deletions = new TreeMap<>(); + this.additions = new TreeMap<>(); + } + + public Changes(String path, String renamedTo, String leftRev, String rightRev) { + this(path, leftRev, rightRev); + this.renamedTo = renamedTo; + } + + public Changes(Changes changes, String leftRev, String rightRev) { + this.path = changes.path; + this.leftRev = leftRev; + this.rightRev = rightRev; + this.deletions = changes.deletions; + this.additions = changes.additions; + } + + public String getRenamedTo() { + return renamedTo; + } + + public boolean wasRenamed() { + return !renamedTo.equals(""); + } + + public String getPath() { + return this.path; + } + + public String getLeftRevision() { + return this.leftRev; + } + + public String getRightRevision() { + return this.rightRev; + } + + public void putDeletedLine(int lineNumber, String line) { + this.deletions.put(lineNumber, line); + } + + public void putAddedLine(int lineNumber, String line) { + this.additions.put(lineNumber, line); + } + + public Map getDeletions() { + return this.deletions; + } + + public Map getAdditions() { + return this.additions; + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("CHANGES:\n"); + for (Map.Entry entry : this.deletions.entrySet()) { + builder.append("-, " + this.formatAsCSV(entry) + "\n"); + } + for (Map.Entry entry : this.additions.entrySet()) { + builder.append("+, " + this.formatAsCSV(entry) + "\n"); + } + return builder.toString(); + } + + private String formatAsCSV(Map.Entry entry) { + return this.leftRev + ", " + + this.path + ", " + + entry.getKey() + ", " + + entry.getValue(); + } + +} diff --git a/molerat/src/main/java/it/unitn/molerat/evidence/GenericEvidence.java b/molerat/src/main/java/it/unitn/molerat/evidence/GenericEvidence.java new file mode 100644 index 0000000..8f9583b --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/evidence/GenericEvidence.java @@ -0,0 +1,30 @@ +package it.unitn.molerat.evidence; + +public class GenericEvidence { + + protected final String commit; + protected final String container; + protected String path; + + protected GenericEvidence(String file, String commit, String container) { + this.path = file; + this.commit = commit; + this.container = container; + } + + public String getContainer() { + return this.container; + } + + public String getCommit() { + return this.commit; + } + + public String getPath() { + return this.path; + } + + public void setPath(String path) { + this.path = path; + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/evidence/VulnerabilityEvidence.java b/molerat/src/main/java/it/unitn/molerat/evidence/VulnerabilityEvidence.java new file mode 100644 index 0000000..2fcc221 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/evidence/VulnerabilityEvidence.java @@ -0,0 +1,32 @@ +package it.unitn.molerat.evidence; + +public class VulnerabilityEvidence extends GenericEvidence { + + protected final int lineNumber; + protected final String lineContents; + + public VulnerabilityEvidence(String file, String commit, String container, int lineNumber, String lineContents) { + super(file, commit, container); + this.lineNumber = lineNumber; + this.lineContents = lineContents + .trim() + .replace("\t",""); + } + + public int getLineNumber() { + return this.lineNumber; + } + + public String getLineContents() { + return this.lineContents; + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("<" + commit + ": " + path + ">\n"); + builder.append("\t" + container + "\n"); + builder.append("\t\t" + lineNumber + ": " + lineContents + "\n\t\n"); + return builder.toString(); + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/AbstractEvidenceTracker.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/AbstractEvidenceTracker.java new file mode 100644 index 0000000..7309af8 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/AbstractEvidenceTracker.java @@ -0,0 +1,56 @@ +package it.unitn.molerat.repos.trackers; + +import it.unitn.molerat.evidence.Changes; +import it.unitn.molerat.repos.wrappers.RepoWrapper; +import java.util.*; + +public abstract class AbstractEvidenceTracker { + protected final String fixedRevision; + protected final String vulnRevision; + protected final String repoPath; + protected final RepoWrapper repoWrapper; + protected Set changes; + protected Set commits = new LinkedHashSet<>(); + protected Set restOfCommits = new LinkedHashSet<>(); + + public AbstractEvidenceTracker(RepoWrapper wrapper, String fixedRev) throws Exception { + this.fixedRevision = fixedRev; + this.repoPath = wrapper.getBasePath(); + this.repoWrapper = wrapper; + Iterator commitsIter = repoWrapper.getRevisionNumbers(fixedRev).iterator(); + this.vulnRevision = commitsIter.next(); + while (commitsIter.hasNext()) { + restOfCommits.add(commitsIter.next()); + } + String initDiff = repoWrapper.doDiff(vulnRevision, fixedRevision); + this.changes = repoWrapper.inferChangesFromDiff(initDiff, vulnRevision, fixedRevision); + } + + public RepoWrapper getRepoWrapper() { + return this.repoWrapper; + } + + public String getFixedRevision() { + return this.fixedRevision; + } + + public Set getProcessedCommits() { + return this.commits; + } + + // apart from non-java files, filter the files that contain "test" in ther name as well + protected Set filterNonJavaChanges(Set changes) { + Set filteredChanges = new HashSet<>(); + for (Changes change : changes) { + if (!change.getPath().endsWith(".java") || change.getPath().toLowerCase().contains("test")) { + filteredChanges.add(change); + } + this.repoWrapper.filterCommentsAndBlanks(change.getDeletions()); + this.repoWrapper.filterCommentsAndBlanks(change.getAdditions()); + } + changes.removeAll(filteredChanges); + return changes; + } + + public abstract void trackEvidence() throws Exception; +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/changes/ChangeEvidenceTracker.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/changes/ChangeEvidenceTracker.java new file mode 100644 index 0000000..d1dc8ae --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/changes/ChangeEvidenceTracker.java @@ -0,0 +1,108 @@ +package it.unitn.molerat.repos.trackers.changes; + +import it.unitn.molerat.evidence.ChangeEvidence; +import it.unitn.molerat.repos.trackers.AbstractEvidenceTracker; +import it.unitn.molerat.repos.utils.CommitMetrics; +import it.unitn.molerat.repos.utils.SignatureExtractor; +import it.unitn.molerat.repos.wrappers.RepoWrapper; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +public class ChangeEvidenceTracker extends AbstractEvidenceTracker { + + protected final Map> evidences = new TreeMap<>(); + protected Map> fixConstructs; + + protected ChangeEvidenceTracker(RepoWrapper wrapper, String fixedRev) throws Exception { + super(wrapper, fixedRev); + } + + public ChangeEvidenceTracker(RepoWrapper repoWrapper, String fixedCommit, Set commits) throws Exception { + this(repoWrapper, fixedCommit); + this.commits = commits; + this.fixConstructs = extractSignatures(this.fixedRevision); + } + + protected Map> extractSignatures(String commit) throws Exception { + Map> result = new TreeMap<>(); + Map files = CommitMetrics.getFileContentsPerRevision(commit, this.repoWrapper); + for (Map.Entry file : files.entrySet()) { + SignatureExtractor se = new SignatureExtractor(file.getValue()); + Set signatures = new HashSet<>(); + for (String signature : se.getSignaturesWithLines().keySet()) { + signatures.add(signature); + } + result.put(file.getKey(), signatures); + } + return result; + } + + + @Override + public void trackEvidence() throws Exception { + for (String commit : this.commits) { +// long timeNow = System.currentTimeMillis(); + Map> currentSignatures = extractSignatures(commit); + for (Map.Entry> currentSignature : currentSignatures.entrySet()) { + Set temp = this.fixConstructs.get(currentSignature.getKey()); + if (temp == null) { + for (String sign : currentSignature.getValue()) { + ChangeEvidence evidence = new ChangeEvidence( + currentSignature.getKey(), + commit, + sign, + true + ); + if (evidence.isPublicMethodOrConstructor()) { + addEvidence(evidence); + } + } + } + else { + for (String sign : currentSignature.getValue()) { + boolean removed = true; + for (String fixSign : temp) { + if (sign.equals(fixSign)) { + removed = false; + break; + } + } + ChangeEvidence evidence = new ChangeEvidence( + currentSignature.getKey(), + commit, + sign, + removed + ); + if (evidence.isPublicMethodOrConstructor()) { + addEvidence(evidence); + } + } + } + + } + } + } + + protected void addEvidence(ChangeEvidence evidence) { + if (this.evidences.containsKey(evidence.getCommit())) { + this.evidences.get(evidence.getCommit()).add(evidence); + } + else { + Set set = new HashSet<>(); + set.add(evidence); + this.evidences.put(evidence.getCommit(), set); + } + } + + public Set getEvidence(String commit) { + Set evd = this.evidences.get(commit); + return (evd != null) ? evd : new HashSet<>(); + } + + public Map> getEvidences() { + return this.evidences; + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/changes/FullChangeEvidenceTracker.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/changes/FullChangeEvidenceTracker.java new file mode 100644 index 0000000..9437bd2 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/changes/FullChangeEvidenceTracker.java @@ -0,0 +1,13 @@ +package it.unitn.molerat.repos.trackers.changes; + + +import it.unitn.molerat.repos.wrappers.RepoWrapper; + +public class FullChangeEvidenceTracker extends ChangeEvidenceTracker { + + public FullChangeEvidenceTracker(RepoWrapper wrapper, String fixedRev) throws Exception { + super(wrapper, fixedRev); + this.commits = wrapper.getRevisionNumbers(fixedRev); + this.fixConstructs = extractSignatures(this.fixedRevision); + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/DeletionVulnerabilityEvidenceTracker.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/DeletionVulnerabilityEvidenceTracker.java new file mode 100644 index 0000000..650096a --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/DeletionVulnerabilityEvidenceTracker.java @@ -0,0 +1,92 @@ +package it.unitn.molerat.repos.trackers.vuln; + +import it.unitn.molerat.evidence.Changes; +import it.unitn.molerat.evidence.VulnerabilityEvidence; +import it.unitn.molerat.repos.wrappers.RepoWrapper; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +public class DeletionVulnerabilityEvidenceTracker extends VulnerabilityEvidenceTracker { + + public DeletionVulnerabilityEvidenceTracker(RepoWrapper wrapper, String fixedRev) throws Exception { + super(wrapper, fixedRev); + } + + @Override + protected Set getInitialVulnerabilityEvidence(Changes changes) throws Exception { + return this.recordVulnerabilityEvidence(changes.getDeletions(), changes); + } + + @Override + protected Set getVulnerabilityEvidence(String currentEvidenceCommit, String previousEvidenceCommit, Set changes) throws Exception { + Set newEvidences = new HashSet<>(); + Set previousEvidences = getEvidences(previousEvidenceCommit); + + Set changedEvidence = new HashSet<>(); + Set changesToProcess = new HashSet<>(); + Set stillEvidence = new HashSet<>(); + + // filter non-Java files + changes = filterNonJavaChanges(changes); + + if (previousEvidences == null) { + return newEvidences; + } + + for (VulnerabilityEvidence previousEvidence : previousEvidences) { + for (Changes change : changes ) { + // The file has been just renamed + if (change.wasRenamed()) { + if (change.getRenamedTo().equals(previousEvidence.getPath())) { + previousEvidence.setPath(change.getPath()); + } + } + // The file has been changed + else if (previousEvidence.getPath().equals(change.getPath())) { + changedEvidence.add(previousEvidence); + changesToProcess.add(change); + } + } + } + + stillEvidence.addAll(previousEvidences); + stillEvidence.removeAll(changedEvidence); + + // "Refresh" the molerat.evidence when a file was not changed + for (VulnerabilityEvidence e : stillEvidence) { + VulnerabilityEvidence newEvidence = new VulnerabilityEvidence( + e.getPath(), + currentEvidenceCommit, + e.getContainer(), + e.getLineNumber(), + e.getLineContents() + ); + newEvidences.add(newEvidence); + } + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////// + // "Triage" the molerat.evidence when a file was changed + for (Changes change : changesToProcess) { + Set retain = new HashSet<>(); + for (VulnerabilityEvidence e : changedEvidence) { + if (e.getPath().equals(change.getPath())) { + retain.add(e); + } + } + Map linesToKeep = this.updateChangedLines( + change.getPath(), + change.getLeftRevision(), + change.getRightRevision(), + retain, + change + ); + if (linesToKeep != null) { + newEvidences.addAll(this.recordVulnerabilityEvidence(linesToKeep, change)); + } + } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////// + return newEvidences; + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/EnhancedDeletionVulnerabilityEvidenceTracker.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/EnhancedDeletionVulnerabilityEvidenceTracker.java new file mode 100644 index 0000000..887ea10 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/EnhancedDeletionVulnerabilityEvidenceTracker.java @@ -0,0 +1,72 @@ +package it.unitn.molerat.repos.trackers.vuln; + +import it.unitn.molerat.evidence.Changes; +import it.unitn.molerat.evidence.VulnerabilityEvidence; +import it.unitn.molerat.repos.utils.SignatureExtractor; +import it.unitn.molerat.repos.wrappers.RepoWrapper; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +public class EnhancedDeletionVulnerabilityEvidenceTracker extends DeletionVulnerabilityEvidenceTracker{ + + public EnhancedDeletionVulnerabilityEvidenceTracker(RepoWrapper wrapper, String fixedRev) throws Exception { + super(wrapper, fixedRev); + } + + + @Override + protected Set getInitialVulnerabilityEvidence(Changes changes) throws Exception { + if (changes.getDeletions().size() != 0) { + return super.getInitialVulnerabilityEvidence(changes); + } + else { + SignatureExtractor se = new SignatureExtractor(repoWrapper.doCat(changes.getPath(), changes.getRightRevision())); + Map> rightSignatures = se.getSignaturesWithLines(); + + Set relevantSignatures = new HashSet<>(); + + for (int line : changes.getAdditions().keySet()) { + for (Map.Entry> entry : rightSignatures.entrySet()) { + if (entry.getValue().contains(line)) { + relevantSignatures.add(entry.getKey()); + } + } + } + + String leftFile = repoWrapper.doCat(changes.getPath(), changes.getLeftRevision()); + Map lineMappings = repoWrapper.getLineMappings(leftFile); + se = new SignatureExtractor(leftFile); + Map> leftSignatures = se.getSignaturesWithLines(); + + for (int line : changes.getDeletions().keySet()) { + for (Map.Entry> entry : leftSignatures.entrySet()) { + if (entry.getValue().contains(line)) { + relevantSignatures.add(entry.getKey()); + } + } + } + + Set initialEvidence = new HashSet<>(); + for (String signature : relevantSignatures) { + for (Map.Entry> entry : leftSignatures.entrySet()) { + if (signature.equals(entry.getKey())) { + for (int line : entry.getValue()) { + VulnerabilityEvidence evd = new VulnerabilityEvidence( + changes.getPath(), + changes.getLeftRevision(), + signature, + line, + lineMappings.get(line) + ); + initialEvidence.add(evd); + } + } + } + } + + return initialEvidence; + } + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/FixStatisticsVulnerabilityEvidenceTracker.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/FixStatisticsVulnerabilityEvidenceTracker.java new file mode 100644 index 0000000..f631932 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/FixStatisticsVulnerabilityEvidenceTracker.java @@ -0,0 +1,71 @@ +package it.unitn.molerat.repos.trackers.vuln; + +import it.unitn.molerat.evidence.Changes; +import it.unitn.molerat.evidence.VulnerabilityEvidence; +import it.unitn.molerat.repos.wrappers.RepoWrapper; + +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +public class FixStatisticsVulnerabilityEvidenceTracker extends VulnerabilityEvidenceTracker { + private int addedLines = 0; + private int deletedLines = 0; + private int touchedFiles = 0; + private int touchedMethods = 0; + + public FixStatisticsVulnerabilityEvidenceTracker(RepoWrapper wrapper, String fixedRev) throws Exception { + super(wrapper, fixedRev); + } + + @Override + protected Set getInitialVulnerabilityEvidence(Changes changes) throws Exception { + return null; + } + + @Override + protected Set getVulnerabilityEvidence(String currentEvidenceCommit, String previousEvidenceCommit, Set changes) throws Exception { + return null; + } + + @Override + public void trackEvidence() throws Exception { + this.changes = filterNonJavaChanges(this.changes); + Iterator it = changes.iterator(); + while (it.hasNext()) { + Changes currentChanges = it.next(); + touchedFiles++; + addedLines += currentChanges.getAdditions().size(); + deletedLines += currentChanges.getDeletions().size(); + + Set methods = new HashSet<>(); + Set evidences = recordVulnerabilityEvidenceForRightFile(currentChanges.getAdditions(), currentChanges); + evidences.addAll(recordVulnerabilityEvidence(currentChanges.getDeletions(), currentChanges)); + for (VulnerabilityEvidence evd : evidences) { + if (!evd.getLineContents().contains("private") && + !evd.getLineContents().contains("protected") && + !evd.getLineContents().contains("public")) { + methods.add(evd.getContainer()); + } + } + touchedMethods += methods.size(); + commits.add(currentChanges.getLeftRevision()); + } + } + + public int getNumberOfAddedLines() { + return addedLines; + } + + public int getNumberOfDeletedLines() { + return deletedLines; + } + + public int getNumberOfTouchedMethods() { + return touchedMethods; + } + + public int getNumberOfTouchedFiles() { + return touchedFiles; + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/PatchedMethodBodyTracker.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/PatchedMethodBodyTracker.java new file mode 100644 index 0000000..ec381d7 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/PatchedMethodBodyTracker.java @@ -0,0 +1,148 @@ +package it.unitn.molerat.repos.trackers.vuln; + +import it.unitn.molerat.evidence.Changes; +import it.unitn.molerat.evidence.VulnerabilityEvidence; +import it.unitn.molerat.repos.utils.SignatureExtractor; +import it.unitn.molerat.repos.wrappers.RepoWrapper; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +public class PatchedMethodBodyTracker extends VulnerabilityEvidenceTracker { + + public PatchedMethodBodyTracker(RepoWrapper wrapper, String fixedRev) throws Exception { + super(wrapper, fixedRev); + } + + @Override + protected Set getInitialVulnerabilityEvidence(Changes changes) throws Exception { + SignatureExtractor se = new SignatureExtractor(repoWrapper.doCat(changes.getPath(), changes.getRightRevision())); + Map> rightSignatures = se.getSignaturesWithLines(); + + Set relevantSignatures = new HashSet<>(); + + for (int line : changes.getAdditions().keySet()) { + for (Map.Entry> entry : rightSignatures.entrySet()) { + if (entry.getValue().contains(line)) { + relevantSignatures.add(entry.getKey()); + } + } + } + + String leftFile = repoWrapper.doCat(changes.getPath(), changes.getLeftRevision()); + Map lineMappings = repoWrapper.getLineMappings(leftFile); + se = new SignatureExtractor(leftFile); + Map> leftSignatures = se.getSignaturesWithLines(); + + for (int line : changes.getDeletions().keySet()) { + for (Map.Entry> entry : leftSignatures.entrySet()) { + if (entry.getValue().contains(line)) { + relevantSignatures.add(entry.getKey()); + } + } + } + + Set initialEvidence = new HashSet<>(); + for (String signature : relevantSignatures) { + for (Map.Entry> entry : leftSignatures.entrySet()) { + if (signature.equals(entry.getKey())) { + for (int line : entry.getValue()) { + VulnerabilityEvidence evd = new VulnerabilityEvidence( + changes.getPath(), + changes.getLeftRevision(), + signature, + line, + lineMappings.get(line) + ); + initialEvidence.add(evd); + } + } + } + } + + return initialEvidence; + } + + + @Override + protected Set getVulnerabilityEvidence(String currentEvidenceCommit, String previousEvidenceCommit, Set changes) throws Exception { + Set newEvidences = new HashSet<>(); + Set previousEvidences = getEvidences(previousEvidenceCommit); + + Set changedEvidence = new HashSet<>(); + Set changesToProcess = new HashSet<>(); + Set stillEvidence = new HashSet<>(); + + // filter non-Java files + changes = filterNonJavaChanges(changes); + + if (previousEvidences == null) { + return newEvidences; + } + + for (VulnerabilityEvidence previousEvidence : previousEvidences) { + for (Changes change : changes ) { + // The file has been just renamed + if (change.wasRenamed()) { + if (change.getRenamedTo().equals(previousEvidence.getPath())) { + previousEvidence.setPath(change.getPath()); + } + } + // The file has been changed + else if (previousEvidence.getPath().equals(change.getPath())) { + changedEvidence.add(previousEvidence); + changesToProcess.add(change); + } + } + } + + stillEvidence.addAll(previousEvidences); + stillEvidence.removeAll(changedEvidence); + + // "Refresh" the molerat.evidence when a file was not changed + for (VulnerabilityEvidence e : stillEvidence) { + VulnerabilityEvidence newEvidence = new VulnerabilityEvidence( + e.getPath(), + currentEvidenceCommit, + e.getContainer(), + e.getLineNumber(), + e.getLineContents() + ); + newEvidences.add(newEvidence); + } + + // "Triage" the molerat.evidence when a file was changed + for (Changes change : changesToProcess) { + Set relevantSignatures = new HashSet<>(); + for (VulnerabilityEvidence e : changedEvidence) { + relevantSignatures.add(e.getContainer()); + } + + String leftFile = repoWrapper.doCat(change.getPath(), change.getLeftRevision()); + Map lineMappings = repoWrapper.getLineMappings(leftFile); + SignatureExtractor se = new SignatureExtractor(leftFile); + Map> leftSignatures = se.getSignaturesWithLines(); + + for (String signature : relevantSignatures) { + for (Map.Entry> entry : leftSignatures.entrySet()) { + if (signature.equals(entry.getKey())) { + for (int line : entry.getValue()) { + VulnerabilityEvidence evd = new VulnerabilityEvidence( + change.getPath(), + change.getLeftRevision(), + signature, + line, + lineMappings.get(line) + ); + newEvidences.add(evd); + } + } + } + } + } + return newEvidences; + } + + +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/SliceDecayVulnerabilityEvidenceTracker.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/SliceDecayVulnerabilityEvidenceTracker.java new file mode 100644 index 0000000..68d587a --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/SliceDecayVulnerabilityEvidenceTracker.java @@ -0,0 +1,85 @@ +package it.unitn.molerat.repos.trackers.vuln; + +import it.unitn.molerat.evidence.Changes; +import it.unitn.molerat.evidence.VulnerabilityEvidence; +import it.unitn.molerat.repos.wrappers.RepoWrapper; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +public class SliceDecayVulnerabilityEvidenceTracker extends SliceVulnerabilityEvidenceTracker { + + public SliceDecayVulnerabilityEvidenceTracker(RepoWrapper wrapper, String fixedRev) throws Exception { + super(wrapper, fixedRev); + } + + @Override + protected Set getVulnerabilityEvidence(String currentEvidenceCommit, String previousEvidenceCommit, Set changes) throws Exception { + Set newEvidences = new HashSet<>(); + Set previousEvidences = getEvidences(previousEvidenceCommit); + Set changedEvidence = new HashSet<>(); + + Set changesToProcess = new HashSet<>(); + Set stillEvidence = new HashSet<>(); + + // filter non-Java files + changes = filterNonJavaChanges(changes); + + if (previousEvidences == null) { + return newEvidences; + } + + for (VulnerabilityEvidence previousEvidence : previousEvidences) { + for (Changes change : changes ) { + // The file has been just renamed + if (change.wasRenamed()) { + if (change.getRenamedTo().equals(previousEvidence.getPath())) { + previousEvidence.setPath(change.getPath()); + } + } + // The file has been changed + else if (previousEvidence.getPath().equals(change.getPath())) { + changedEvidence.add(previousEvidence); + changesToProcess.add(change); + } + } + } + + stillEvidence.addAll(previousEvidences); + stillEvidence.removeAll(changedEvidence); + + // "Refresh" the molerat.evidence when a file was not changed + for (VulnerabilityEvidence e : stillEvidence) { + VulnerabilityEvidence newEvidence = new VulnerabilityEvidence( + e.getPath(), + currentEvidenceCommit, + e.getContainer(), + e.getLineNumber(), + e.getLineContents() + ); + newEvidences.add(newEvidence); + } + + // "Triage" the molerat.evidence when a file was changed + for (Changes change : changesToProcess) { + Set retain = new HashSet<>(); + for (VulnerabilityEvidence e : changedEvidence) { + if (e.getPath().equals(change.getPath())) { + retain.add(e); + } + } + Map linesToKeep = this.updateChangedLines( + change.getPath(), + change.getLeftRevision(), + change.getRightRevision(), + retain, + change + ); + if (linesToKeep != null) { + newEvidences.addAll(this.recordVulnerabilityEvidence(linesToKeep, change)); + } + } + return newEvidences; + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/SliceVulnerabilityEvidenceTracker.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/SliceVulnerabilityEvidenceTracker.java new file mode 100644 index 0000000..38c37c1 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/SliceVulnerabilityEvidenceTracker.java @@ -0,0 +1,139 @@ +package it.unitn.molerat.repos.trackers.vuln; + +import it.unitn.molerat.evidence.Changes; +import it.unitn.molerat.evidence.VulnerabilityEvidence; +import it.unitn.molerat.repos.wrappers.RepoWrapper; +import it.unitn.repoman.core.lang.LanguageFactory; +import it.unitn.repoman.core.slicers.LightweightSlice; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; + +public class SliceVulnerabilityEvidenceTracker extends VulnerabilityEvidenceTracker { + + public SliceVulnerabilityEvidenceTracker(RepoWrapper wrapper, String fixedRev) throws Exception { + super(wrapper, fixedRev); + } + + @Override + protected Set getInitialVulnerabilityEvidence(Changes changes) throws Exception { + // 1. Take the added lines as the slicing criteria and obtain the slice on the fixed revision + Map slicingCriteria = changes.getAdditions(); + String rightFile = this.repoWrapper.doCat(changes.getPath(), changes.getRightRevision()); + Map sliced = this.doSlice(slicingCriteria, rightFile); + + Set slicedEvd = this.recordVulnerabilityEvidenceForRightFile(sliced, changes); + + // 2. we need to check which lines from the "fixed" slice are present in the vulnerable revision + // 2.1 we "correlate" the lines from the "fixed" slice to the vulnerable revision + Map propagated = this.updateChangedLines(changes.getPath(), changes.getLeftRevision(), + changes.getRightRevision(), slicedEvd, changes); + + // 2.2 take deleted lines + "correlated" changes from the fixed slice and take a new slice on the vulnerable revision + propagated.putAll(changes.getDeletions()); + + // 3.1 make the final slice on the vulnerable revision + slicingCriteria = propagated; + String leftFile = this.repoWrapper.doCat(changes.getPath(), changes.getLeftRevision()); + sliced = this.doSlice(slicingCriteria, leftFile); + propagated.putAll(sliced); + + Set initialEvidence = this.recordVulnerabilityEvidence(propagated, changes); + return initialEvidence; + } + + + + @Override + protected Set getVulnerabilityEvidence(String currentEvidenceCommit, String previousEvidenceCommit, Set changes) throws Exception { + Set newEvidences = new HashSet<>(); + Set previousEvidences = getEvidences(previousEvidenceCommit); + + Set changedEvidence = new HashSet<>(); + Set changesToProcess = new HashSet<>(); + Set stillEvidence = new HashSet<>(); + + // filter non-Java files + changes = filterNonJavaChanges(changes); + + if (previousEvidences == null) { + return newEvidences; + } + + for (VulnerabilityEvidence previousEvidence : previousEvidences) { + for (Changes change : changes ) { + // The file has been just renamed + if (change.wasRenamed()) { + if (change.getRenamedTo().equals(previousEvidence.getPath())) { + previousEvidence.setPath(change.getPath()); + } + } + // The file has been changed + else if (previousEvidence.getPath().equals(change.getPath())) { + changedEvidence.add(previousEvidence); + changesToProcess.add(change); + } + } + } + + stillEvidence.addAll(previousEvidences); + stillEvidence.removeAll(changedEvidence); + + // "Refresh" the molerat.evidence when a file was not changed + for (VulnerabilityEvidence e : stillEvidence) { + VulnerabilityEvidence newEvidence = new VulnerabilityEvidence( + e.getPath(), + currentEvidenceCommit, + e.getContainer(), + e.getLineNumber(), + e.getLineContents() + ); + newEvidences.add(newEvidence); + } + + // "Triage" the molerat.evidence when a file was changed + for (Changes change : changesToProcess) { + // -------------------------------------- + Map slicingCriteria = new TreeMap<>(); + for (VulnerabilityEvidence e : changedEvidence) { + if (e.getPath().equals(change.getPath())) { + slicingCriteria.put(e.getLineNumber(), e.getLineContents()); + } + } + String rightFile = this.repoWrapper.doCat(change.getPath(), change.getRightRevision()); + Map slice = this.doSlice(slicingCriteria, rightFile); + Set slicedEvd = this.recordVulnerabilityEvidenceForRightFile(slice, change); + + Map linesToKeep = this.updateChangedLines( + change.getPath(), + change.getLeftRevision(), + change.getRightRevision(), + slicedEvd, + change + ); + if (linesToKeep != null) { + String leftFile = this.repoWrapper.doCat(change.getPath(), change.getLeftRevision()); + slice = this.doSlice(linesToKeep, leftFile); + newEvidences.addAll(this.recordVulnerabilityEvidence(slice, change)); + } + } + return newEvidences; + } + + + + protected Map doSlice(Map slicingCriteria, String fileContents) { + Map sliced = this.repoWrapper.getLineMappings(fileContents); + LanguageFactory.init("Java", fileContents); + LightweightSlice slice; + try { + slice = new LightweightSlice(LanguageFactory.getRoot(), slicingCriteria.keySet()); + sliced.keySet().retainAll(slice.getSelectedLines()); + } catch (Exception e) { + System.out.println("ERROR: " + e.getMessage()); + } + return sliced; + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/VulnerabilityEvidenceTracker.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/VulnerabilityEvidenceTracker.java new file mode 100644 index 0000000..dbb2048 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/VulnerabilityEvidenceTracker.java @@ -0,0 +1,234 @@ +package it.unitn.molerat.repos.trackers.vuln; + +import it.unitn.molerat.evidence.Changes; +import it.unitn.molerat.repos.trackers.AbstractEvidenceTracker; +import it.unitn.molerat.repos.utils.SignatureExtractor; +import it.unitn.molerat.evidence.VulnerabilityEvidence; +import it.unitn.molerat.repos.wrappers.RepoWrapper; + +import java.util.*; + +public abstract class VulnerabilityEvidenceTracker extends AbstractEvidenceTracker { + + protected Map> evidences = new LinkedHashMap>(); + + public VulnerabilityEvidenceTracker(RepoWrapper wrapper, String fixedRev) throws Exception { + super(wrapper, fixedRev); + } + + @Override + public void trackEvidence() throws Exception { + // I. Filter all non-Java files that have been changed + this.changes = filterNonJavaChanges(this.changes); + // ------------------------------------------------- + // II. Get the initial molerat.evidence from the fix + Iterator it = changes.iterator(); + while (it.hasNext()) { + Changes currentChanges = it.next(); + Set tempVulnEvidences = getInitialVulnerabilityEvidence(currentChanges); + for (VulnerabilityEvidence evidence : tempVulnEvidences) { + addEvidence(evidence); + } + commits.add(currentChanges.getLeftRevision()); + } + // ------------------------------------------------- + // III. Collect evidences across the rest of commits + String rightCommit = this.vulnRevision; + + Iterator commitIterator = restOfCommits.iterator(); + String commit = ""; + while (commitIterator.hasNext()) { + commit = commitIterator.next(); + // Get the current changes + String leftCommit = commit; + String diffTxt = repoWrapper.doDiff(leftCommit, rightCommit); + Set currentChanges = repoWrapper.inferChangesFromDiff(diffTxt, leftCommit, rightCommit); + + Set newEvidences = new HashSet<>(); + newEvidences = getVulnerabilityEvidence(leftCommit, rightCommit, currentChanges); + + // did the method/file/molerat.evidence disappear? + if (newEvidences.size() == 0) { + break; + } else { + for (VulnerabilityEvidence evidence : newEvidences) { + addEvidence(evidence); + } + rightCommit = leftCommit; + commits.add(commit); + } + } + if (commit.equals("")) { + return; + } + } + + public Set getEvidences(String commit) { + Set evd = this.evidences.get(commit); + return (evd != null) ? evd : new HashSet<>(); + } + + public Map countEvidenceInFiles(String commit) { + Map counts = new TreeMap<>(); + Set evd = getEvidences(commit); + for (VulnerabilityEvidence e : evd) { + String filename = e.getPath(); + if (!counts.containsKey(filename)) { + if (e.getLineNumber() != 0) { + counts.put(filename, 1); + } + else { + counts.put(filename, 0); + } + } + else { + if (e.getLineNumber() == 0) { + counts.replace(filename, 0); + } + else { + int locCount = counts.get(filename); + locCount++; + counts.replace(filename, locCount); + } + } + } + return counts; + } + + public Map> getEvidences() { + return this.evidences; + } + + protected void addEvidence(VulnerabilityEvidence evidence) { + if (this.evidences.containsKey(evidence.getCommit())) { + evidences.get(evidence.getCommit()).add(evidence); + } + else { + Set set = new HashSet<>(); + set.add(evidence); + this.evidences.put(evidence.getCommit(), set); + } + } + + protected abstract Set getInitialVulnerabilityEvidence(Changes changes) throws Exception; + + protected abstract Set getVulnerabilityEvidence(String currentEvidenceCommit, String previousEvidenceCommit, Set changes) throws Exception; + + protected Set recordVulnerabilityEvidence(Map lines, Changes changes) throws Exception { + Set evidences = new HashSet<>(); + String fileContents = this.repoWrapper.doCat(changes.getPath(), changes.getLeftRevision()); + SignatureExtractor se = new SignatureExtractor(fileContents); + Map> containers = se.getSignaturesWithLines(); + for (Map.Entry> containerEntry : containers.entrySet()) { + for (Map.Entry lineEntry : lines.entrySet()) { + if (containerEntry.getValue().contains(lineEntry.getKey())) { + VulnerabilityEvidence evidence = new VulnerabilityEvidence( + changes.getPath(), + changes.getLeftRevision(), + containerEntry.getKey(), + lineEntry.getKey(), + lineEntry.getValue() + ); + evidences.add(evidence); + } + } + } + return evidences; + } + + protected Set recordVulnerabilityEvidenceForRightFile(Map lines, Changes changes) throws Exception { + Set evidences = new HashSet<>(); + String fileContents = this.repoWrapper.doCat(changes.getPath(), changes.getRightRevision()); + SignatureExtractor se = new SignatureExtractor(fileContents); + Map> containers = se.getSignaturesWithLines(); + for (Map.Entry> containerEntry : containers.entrySet()) { + for (Map.Entry lineEntry : lines.entrySet()) { + if (containerEntry.getValue().contains(lineEntry.getKey())) { + VulnerabilityEvidence evidence = new VulnerabilityEvidence( + changes.getPath(), + changes.getRightRevision(), + containerEntry.getKey(), + lineEntry.getKey(), + lineEntry.getValue() + ); + evidences.add(evidence); + } + } + } + return evidences; + } + + + protected Map updateChangedLines(String path, String leftRev, String rightRev, Set retain, Changes change) throws Exception { + Map linesToKeep = new TreeMap<>(); + String leftFile = this.repoWrapper.doCat(path, leftRev); + String rightFile = this.repoWrapper.doCat(path, rightRev); + + SignatureExtractor rightSignatures = new SignatureExtractor(rightFile); + Map> rightLineSignatures = rightSignatures.getSignaturesWithLines(); + Map rightLineMappings = this.repoWrapper.getLineMappings(rightFile); + + SignatureExtractor leftSignatures = new SignatureExtractor(leftFile); + Map> leftLineSignatures = leftSignatures.getSignaturesWithLines(); + Map leftLineMappings = this.repoWrapper.getLineMappings(leftFile); + + for (VulnerabilityEvidence evd : retain) { + String container = evd.getContainer(); + Set lineNumbers = leftLineSignatures.get(container); + + Map leftChunk = new TreeMap<>(); + + // the left container might not exist anymore... + if (lineNumbers == null) { + continue; + } + + // otherwise, process + for (int lineNumber : lineNumbers) { + leftChunk.put(lineNumber, leftLineMappings.get(lineNumber)); + } + + lineNumbers = rightLineSignatures.get(container); + Map rightChunk = new TreeMap<>(); + for (int lineNumber : lineNumbers) { + rightChunk.put(lineNumber, rightLineMappings.get(lineNumber)); + } + + String leftLine = leftChunk.get(evd.getLineNumber()); + String rightLine = rightChunk.get(evd.getLineNumber()); + + if (leftLine != null && rightLine != null && leftLine.equals(rightLine)) { + linesToKeep.put(evd.getLineNumber(), evd.getLineContents()); + continue; + } else { + if (rightLine != null && rightLine.equals(evd.getLineContents())) { + Map eligibleCandidates = new TreeMap<>(); + for (Map.Entry candidateLine : leftChunk.entrySet()) { + if (candidateLine.getValue().equals(evd.getLineContents())) { + eligibleCandidates.put(candidateLine.getKey(), evd.getLineContents()); + continue; + } + } + if (eligibleCandidates.size() > 1) { + Iterator> it = eligibleCandidates.entrySet().iterator(); + int leftLineNumber = it.next().getKey(); + int rightLineNumber = evd.getLineNumber(); + int minimumDistance = rightLineNumber - leftLineNumber; + while (it.hasNext()) { + leftLineNumber = it.next().getKey(); + int tempMinimumDistance = rightLineNumber - leftLineNumber; + minimumDistance = (Math.abs(tempMinimumDistance) < Math.abs(minimumDistance)) ? tempMinimumDistance : minimumDistance; + } + int newLineNumber = rightLineNumber - minimumDistance; + String newLineContents = eligibleCandidates.get(newLineNumber); + linesToKeep.put(newLineNumber, newLineContents); + } + else { + linesToKeep.putAll(eligibleCandidates); + } + } + } + } + return linesToKeep; + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/VulnerabilityEvidenceTrackerFactory.java b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/VulnerabilityEvidenceTrackerFactory.java new file mode 100644 index 0000000..d95b659 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/trackers/vuln/VulnerabilityEvidenceTrackerFactory.java @@ -0,0 +1,73 @@ +package it.unitn.molerat.repos.trackers.vuln; + +import it.unitn.molerat.repos.wrappers.GitRepoWrapper; +import it.unitn.molerat.repos.wrappers.RepoWrapper; +import it.unitn.molerat.repos.wrappers.SvnRepoWrapper; + +public class VulnerabilityEvidenceTrackerFactory { + + public static VulnerabilityEvidenceTracker getTracker(String repoRoot, String fixedRev, String wrapperType, String trackerType) throws Exception { + RepoWrapper wrapper = null; + switch (wrapperType.toLowerCase()) { + case "svn": + wrapper = new SvnRepoWrapper(repoRoot); + break; + + case "git": + wrapper = new GitRepoWrapper(repoRoot); + break; + + default: + throw new Exception("There is currently no support for '" + wrapperType + "'"); + } + VulnerabilityEvidenceTracker vulnerabilityEvidenceTracker = null; + switch (trackerType.toLowerCase()) { + case "deletionvulnerabilityevidencetracker": + vulnerabilityEvidenceTracker = new DeletionVulnerabilityEvidenceTracker(wrapper, fixedRev); + break; + + case "slicevulnerabilityevidencetracker": + vulnerabilityEvidenceTracker = new SliceVulnerabilityEvidenceTracker(wrapper, fixedRev); + break; + + case "slicedecayvulnerabilityevidencetracker": + vulnerabilityEvidenceTracker = new SliceDecayVulnerabilityEvidenceTracker(wrapper, fixedRev); + break; + + case "patchedmethodbodytracker": + vulnerabilityEvidenceTracker = new PatchedMethodBodyTracker(wrapper, fixedRev); + break; + + case "enhanceddeletionvulnerabilityevidencetracker": + vulnerabilityEvidenceTracker = new EnhancedDeletionVulnerabilityEvidenceTracker(wrapper, fixedRev); + break; + + case "fixstatisticsvulnerabilityevidencetracker": + vulnerabilityEvidenceTracker = new FixStatisticsVulnerabilityEvidenceTracker(wrapper, fixedRev); + break; + + default: + throw new Exception("There is no such molerat.evidence tracker as '" + trackerType + "'"); + } + return vulnerabilityEvidenceTracker; + } + + public static String getTrackersList() { + StringBuilder builder = new StringBuilder(); + builder.append("--------------------\n"); + builder.append("The list of available vulnerability molerat.evidence trackers:\n"); + builder.append("--------------------\n"); + builder.append("\n"); + builder.append("\t\"SliceDecayVulnerabilityEvidenceTracker\" - track intra-procedural slice over the fixed lines.\n"); + builder.append("\n"); + builder.append("\t\"DeletionVulnerabilityEvidenceTracker\" - track only the lines deleted during a fix.\n"); + builder.append("\n"); + builder.append("\t\"PatchedMethodBodyTracker\" - track the entire fixed methods.\n"); + builder.append("\n"); + builder.append("\t\"EnhancedDeletionVulnerabilityEvidenceTracker\" - track only the lines deleted during a fix, " + + "or the entire fixed methods if there are no deleted lines.\n"); + builder.append("\n"); + builder.append("--------------------\n"); + return builder.toString(); + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/utils/CommitMetrics.java b/molerat/src/main/java/it/unitn/molerat/repos/utils/CommitMetrics.java new file mode 100644 index 0000000..0a73c76 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/utils/CommitMetrics.java @@ -0,0 +1,98 @@ +package it.unitn.molerat.repos.utils; + +import it.unitn.molerat.evidence.Changes; +import it.unitn.molerat.repos.wrappers.RepoWrapper; +import org.apache.commons.lang3.StringUtils; + +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class CommitMetrics { + + private static final Pattern deletedPublicMethodPattern = Pattern.compile("public .*\\([^\\)]*\\)[^;]*$"); + + public static int getGlobalPublicMethodsRemoved(String leftRev, String rightRev, RepoWrapper wrapper) throws Exception { + int removed = 0; + String diff = wrapper.doDiff(leftRev, rightRev); + Set changes = wrapper.inferChangesFromDiff(diff, leftRev, rightRev); + for (Changes change : changes) { + if (!change.getPath().endsWith(".java")) { + continue; + } + Map deletions = change.getDeletions(); + wrapper.filterCommentsAndBlanks(deletions); + for (String del : deletions.values()) { + del = StringUtils.trim(del); + Matcher matcher = deletedPublicMethodPattern.matcher(del); + if (matcher.matches()) { + removed++; + } + matcher.reset(); + } + } + return removed; + } + + public static int getNumberOfPublicMethodsPerRevision(String rev, RepoWrapper wrapper) throws Exception { + int pubAPICount = 0; + Set files = wrapper.getRevisionFiles(rev, ".java"); + for (String f : files) { + String fc = wrapper.doCat(f, rev); + pubAPICount += countPublicMethodDeclarationsInFile(fc); + } + return pubAPICount; + } + + public static Map getFileContentsPerRevision(String rev, RepoWrapper wrapper) throws Exception { + Map result = new TreeMap<>(); + Set files = wrapper.getRevisionFiles(rev, ".java"); + for (String file : files) { + String contents = wrapper.doCat(file, rev); + result.put(file, contents); + } + return result; + } + + @Deprecated + public static int countPublicMethodDeclarationsInFile(String fileContents) { + int pubAPICount = 0; + String[] lines = StringUtils.split(fileContents, System.getProperty("line.separator")); + for (int i=0; i readFileBrokenByLines(String path) throws IOException { + File javaFile = throwExceptionIfDoesNotExist(path); + Set lines = new LinkedHashSet(); + BufferedReader in = new BufferedReader(new FileReader(javaFile)); + String line = null; + try { + while ( (line = in.readLine()) != null) { + lines.add(line); + } + } + finally { + in.close(); + } + return lines; + } + + public static void readFilesRecursively(File source, Set results) { + if (!source.exists()) { + return; + } + else if (source.isDirectory()) { + String[] files = source.list(); + for (String file : files) { + readFilesRecursively(new File(source,file), results); + } + } + else { + try { + String result = readFile(source.getAbsolutePath()); + results.add(result); + } catch (IOException e) { + System.out.println("ERROR: " + e.getMessage()); + } + } + } + + public static Set readInputDataPoints(String path) throws Exception { + Set dataPointSet = new HashSet<>(); + File file2Parse = new File(path); + BufferedReader reader = null; + try { + String line = ""; + reader = new BufferedReader(new FileReader(file2Parse)); + while ((line = reader.readLine()) != null) { + InputDataPoint inputDataPoint = new InputDataPoint(line); + dataPointSet.add(inputDataPoint); + } + } catch (Exception e) { + System.out.println("ERROR: " + e.getMessage()); + } + finally { + try { + reader.close(); + } catch (Exception e) { + System.out.println("ERROR: " + e.getMessage()); + } + } + return dataPointSet; + } + + + public static File joinpaths(String path1, String path2) { + return new File(path1, path2); + } + + public static void mkdir(File dir) { + if (!dir.exists()) { + dir.mkdirs(); + } + } + + public void copyFolders(File source, File destination) { + if (source.isDirectory() && destination.isDirectory()) { + try { + FileUtils.copyDirectory(source, destination); + } catch (IOException e) { + System.out.println("ERROR: " + e.getMessage()); + } + } + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/utils/SignatureExtractor.java b/molerat/src/main/java/it/unitn/molerat/repos/utils/SignatureExtractor.java new file mode 100644 index 0000000..03534f6 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/utils/SignatureExtractor.java @@ -0,0 +1,233 @@ +package it.unitn.molerat.repos.utils; + +import it.unitn.repoman.core.lang.LanguageFactory; +import it.unitn.repoman.core.lang.parsers.java.JavaBaseListener; +import it.unitn.repoman.core.lang.parsers.java.JavaParser; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.ParseTreeWalker; +import org.antlr.v4.runtime.tree.TerminalNodeImpl; + +import java.util.LinkedList; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; +import java.util.Queue; +import java.util.HashSet; + +public class SignatureExtractor extends JavaBaseListener { + + private String className = ""; + private String packageName = ""; + private String currentSignature = ""; + private final Map> lines = new TreeMap<>(); + private final Queue modifiers = new LinkedList<>(); + + + public SignatureExtractor(String fileContents) { + LanguageFactory.init("java", fileContents); + ParseTreeWalker walker = new ParseTreeWalker(); + walker.walk(this, LanguageFactory.getRoot()); + } + + @Override + public void enterPackageDeclaration(JavaParser.PackageDeclarationContext ctx) { + packageName = ctx.getChild(1).getText(); + currentSignature = packageName; + processLine(ctx); + } + + @Override + public void exitPackageDeclaration(JavaParser.PackageDeclarationContext ctx) { + currentSignature = ""; + } + + @Override + public void enterClassOrInterfaceModifier(JavaParser.ClassOrInterfaceModifierContext ctx) { + modifiers.add(ctx); + } + + @Override + public void enterMethodDeclaration(JavaParser.MethodDeclarationContext ctx) { + StringBuilder methodDeclBuilder = new StringBuilder(); + getMethodSignature(ctx,methodDeclBuilder); + String currentModifiers = retrieveModifiers(); + + StringBuilder signatureBuilder = new StringBuilder(); + signatureBuilder.append(currentModifiers); + signatureBuilder.append(": "); + signatureBuilder.append(joinPackageNameWithClassName()); + signatureBuilder.append("."); + signatureBuilder.append(methodDeclBuilder.toString()); + currentSignature = signatureBuilder.toString(); + } + + private String joinPackageNameWithClassName() { + StringBuilder builder = new StringBuilder(); + if (!packageName.equals("")) { + builder.append(packageName); + builder.append("."); + } + builder.append(className); + return builder.toString(); + } + + @Override + public void exitMethodDeclaration(JavaParser.MethodDeclarationContext ctx) { + currentSignature = ""; + } + + @Override + public void enterConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx) { + StringBuilder constrDeclBuilder = new StringBuilder(); + getConstructorSignature(ctx,constrDeclBuilder); + String currentModifiers = retrieveModifiers(); + + StringBuilder signatureBuilder = new StringBuilder(); + signatureBuilder.append(currentModifiers); + signatureBuilder.append(": "); + signatureBuilder.append(joinPackageNameWithClassName()); + signatureBuilder.append("."); + signatureBuilder.append(constrDeclBuilder.toString()); + currentSignature = signatureBuilder.toString(); + + processLine(ctx); + } + + @Override + public void exitConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx) { + currentSignature = ""; + } + + @Override + public void enterClassDeclaration(JavaParser.ClassDeclarationContext ctx) { + if (!className.equals("")) { + return; + } + className = ctx.getChild(1).getText(); + String currentModifiers = retrieveModifiers(); + + StringBuilder signatureBuilder = new StringBuilder(); + signatureBuilder.append(currentModifiers); + signatureBuilder.append(": "); + signatureBuilder.append(joinPackageNameWithClassName()); + currentSignature = signatureBuilder.toString(); + + processLine(ctx); + } + + + @Override + public void exitClassDeclaration(JavaParser.ClassDeclarationContext ctx) { + currentSignature = ""; + } + + @Override + public void enterStatement(JavaParser.StatementContext ctx) { + processLine(ctx); + } + + @Override + public void enterFieldDeclaration(JavaParser.FieldDeclarationContext ctx) { + String currentModifiers = retrieveModifiers(); + String fieldName = ctx.getChild(1).getChild(0).getChild(0).getText(); + + StringBuilder signatureBuilder = new StringBuilder(); + signatureBuilder.append(currentModifiers); + signatureBuilder.append(": "); + signatureBuilder.append(joinPackageNameWithClassName()); + signatureBuilder.append("."); + signatureBuilder.append(fieldName); + currentSignature = signatureBuilder.toString(); + + processLine(ctx); + } + + @Override + public void exitFieldDeclaration(JavaParser.FieldDeclarationContext ctx) { + currentSignature = ""; + } + + @Override + public void enterLocalVariableDeclaration(JavaParser.LocalVariableDeclarationContext ctx) { + processLine(ctx); + } + + @Override + public void enterCatchClause(JavaParser.CatchClauseContext ctx) { + processLine(ctx); + } + + private void processLine(ParserRuleContext ctx) { + int line = ctx.getStart().getLine(); + if (currentSignature != null) { + Set tempLines = lines.get(currentSignature); + if (tempLines != null) { + lines.remove(currentSignature); + } else { + tempLines = new HashSet<>(); + } + tempLines.add(line); + lines.put(currentSignature, tempLines); + } + } + + /** + * Gets a method signature recursively + * @param method + * @param builder + */ + private void getMethodSignature(ParseTree method, StringBuilder builder) { + int start = (method.getClass().equals(JavaParser.MethodDeclarationContext.class)) ? 1 : 0; + for (int i=start; i> getSignaturesWithLines() { + return this.lines; + } + +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/wrappers/GitRepoWrapper.java b/molerat/src/main/java/it/unitn/molerat/repos/wrappers/GitRepoWrapper.java new file mode 100644 index 0000000..7495494 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/wrappers/GitRepoWrapper.java @@ -0,0 +1,204 @@ +package it.unitn.molerat.repos.wrappers; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.util.*; +import org.eclipse.jgit.api.Git; +import org.eclipse.jgit.diff.DiffEntry; +import org.eclipse.jgit.diff.DiffFormatter; +import org.eclipse.jgit.lib.ObjectId; +import org.eclipse.jgit.lib.ObjectReader; +import org.eclipse.jgit.lib.Repository; +import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.jgit.revwalk.RevTree; +import org.eclipse.jgit.revwalk.RevWalk; +import org.eclipse.jgit.storage.file.FileRepositoryBuilder; +import org.eclipse.jgit.treewalk.AbstractTreeIterator; +import org.eclipse.jgit.treewalk.CanonicalTreeParser; +import org.eclipse.jgit.treewalk.TreeWalk; +import org.eclipse.jgit.treewalk.filter.PathSuffixFilter; +import org.eclipse.jgit.lib.Ref; + +public final class GitRepoWrapper extends RepoWrapper { + + private final String repoRoot; + private final Repository repo; + private final Git git; + + public GitRepoWrapper(String root) throws IOException { + this.diffFilePrefix = "diff --git a"; + this.repoRoot = root; + FileRepositoryBuilder builder = new FileRepositoryBuilder(); + builder.setGitDir(new File(this.repoRoot + "/.git")); + this.repo = builder.build(); + this.git = new Git(this.repo); + } + + public Map getTagsAndCommits() throws Exception { + Map tags = new HashMap<>(); + List call = git.tagList().call(); + for (Ref tagref : call) { + tags.put(tagref.getName(), tagref.getPeeledObjectId().getName()); + } + return tags; + } + + @Override + public String doDiff(String path, String leftRev, String rightRev) throws Exception { + if (path.startsWith("/")) { + path = path.substring(1); + } + OutputStream out = new ByteArrayOutputStream(); + try { DiffFormatter df = new DiffFormatter(out); + df.setRepository(this.git.getRepository()); + df.setDetectRenames(true); + List entries = df.scan(getTreeIterator(leftRev), getTreeIterator(rightRev)); + df.close(); + df.format(entries); + } + catch(Exception e) { + System.out.println("[JGit error] " + e.getMessage()); + throw new Exception(e); + } + return out.toString(); + } + + @Override + public String doDiff(String leftRev, String rightRev) throws Exception { + return this.doDiff("", leftRev, rightRev); + } + + @Override + public String doCat(String path, String rev) throws Exception { + if (path.startsWith("/")) { + path = path.substring(1); + } + String output = ""; + final ObjectId id = this.repo.resolve(rev); + ObjectReader reader = this.repo.newObjectReader(); + RevWalk walk = null; + try { + walk = new RevWalk(reader); + RevCommit commit = walk.parseCommit(id); + RevTree tree = commit.getTree(); + TreeWalk treewalk = TreeWalk.forPath(reader, path, tree); + if (treewalk != null) { + byte[] data = reader.open(treewalk.getObjectId(0)).getBytes(); + output = new String(data, "utf-8"); + } + } finally { + reader.close(); + if (walk != null) { + walk.close(); + } + } + return output; + } + + @Override + public String getBasePath() { + return this.repoRoot; + } + + private AbstractTreeIterator getTreeIterator(String name) throws IOException { + final ObjectId id = this.repo.resolve(name); + if (id == null) { + throw new IllegalArgumentException(name); + } + final CanonicalTreeParser p = new CanonicalTreeParser(); + try (ObjectReader or = this.repo.newObjectReader(); + RevWalk rw = new RevWalk(this.repo)) { + p.reset(or, rw.parseTree(id)); + return p; + } + } + + // TODO: UNIMPLEMENTED + @Override + public void annotate(String path, String rev, Object callback) throws Exception { + } + + + @Override + public Set getRevisionNumbers(String topRev) throws Exception { + Set commits = new LinkedHashSet<>(); + for (RevCommit commit : git.log().add(this.repo.resolve(topRev + "~1")).call()) { + commits.add(commit.getName()); + } + return commits; + } + + // TODO: UNIMPLEMENTED + @Override + public Map determineOriginatingRevision(String filePath, String revision, Map lines) throws Exception { + return new HashMap<>(); + } + + // TODO: UNIMPLEMENTED + @Override + protected String getReleaseTag(String release) throws Exception { + /* + Map tags = this.getTagsAndCommits(); + for (String key : tags.keySet()) { + String candidate = key.replace("refs/tags/", ""); + System.out.println("KEY: " + candidate); + } + */ + return ("refs/tags/" + release); + } + + @Override + public String getReleaseCommit(String release) throws Exception { + String tagName = getReleaseTag(release); + String tagCommit = this.getTagsAndCommits().get(tagName); + Iterator iter = git.log().add(this.repo.resolve(tagCommit)).call().iterator(); + iter.next(); + return iter.next().getName(); + } + + @Override + public Set getRevisionFiles(String rev, String filter) throws Exception { + Set files = new LinkedHashSet<>(); + RevWalk revWalk = null; + TreeWalk treeWalk = null; + try { + ObjectId revId = this.repo.resolve(rev); + revWalk = new RevWalk(this.repo); + RevCommit commit = revWalk.parseCommit(revId); + RevTree tree = commit.getTree(); + treeWalk = new TreeWalk(this.repo); + treeWalk.addTree(tree); + treeWalk.setRecursive(true); + + treeWalk.setFilter(PathSuffixFilter.create(filter)); + while(treeWalk.next()) { + files.add(treeWalk.getPathString()); + } + } catch(Exception e) { + throw new Exception("[JGit error] " + e.getMessage()); + } finally { + if (revWalk != null){ + revWalk.close(); + } + if (treeWalk != null){ + treeWalk.close(); + } + } + return files; + } + + @Override + public Set getAllRepositoryTransactions() throws Exception { + Iterable logs = git.log().call(); + Set commits = new LinkedHashSet<>(); + Iterator it = logs.iterator(); + if (it.hasNext()) { + String latestCommit = it.next().getName(); + commits.add(latestCommit); + commits.addAll(this.getRevisionNumbers(latestCommit)); + } + return commits; + } +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/wrappers/RepoWrapper.java b/molerat/src/main/java/it/unitn/molerat/repos/wrappers/RepoWrapper.java new file mode 100644 index 0000000..59e9048 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/wrappers/RepoWrapper.java @@ -0,0 +1,161 @@ +package it.unitn.molerat.repos.wrappers; + +import java.io.IOException; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import it.unitn.molerat.evidence.Changes; + +public abstract class RepoWrapper { + + protected String diffFilePrefix; + + protected final Pattern hunkRegexPattern = Pattern.compile("@@[ ]*\\-([0-9]+)[\\,0-9 ]+\\+([0-9]+)[\\,0-9 ]+@@"); + + protected final Pattern commentsPattern = Pattern.compile("(\\*|\\/\\*|\\*\\/|\\/\\/)(.*)"); + + public abstract String doDiff(String leftRev, String rightRev) throws Exception; + + public abstract String doDiff(String path, String leftRev, String rightRev) throws Exception; + + public abstract void annotate(String path, String rev, Object callback) throws Exception; + + public abstract String doCat(String path, String rev) throws Exception; + + public abstract String getBasePath(); + + public abstract Set getRevisionFiles(String rev, String filter) throws Exception; + + public abstract Set getRevisionNumbers(String topRev) throws Exception; + + public abstract Map determineOriginatingRevision(final String filePath, final String revision, final Map lines) throws Exception; + + public Set inferChangesFromDiff(String diffText, String leftRev, String rightRev) throws IOException { + Set relevantChanges = new LinkedHashSet<>(); + + Changes newRelevantChanges = null; + int deletionRange = -1; + int additionRange = -1; + boolean additionRangeNotSet = true; + boolean deletionRangeNotSet = true; + + String[] diffLines = diffText.split(System.getProperty("line.separator")); + //for (String line : diffLines) { + for (int i=0; i lines) { + Iterator> it = lines.entrySet().iterator(); + while (it.hasNext()) { + String line = it.next().getValue(); + Matcher commentMatcher = this.commentsPattern.matcher(line.trim()); + if (line.trim().isEmpty() || commentMatcher.matches()) { + it.remove(); + } + } + } + + public Map getLineMappings(final String fileContents) { + Map lineMappings = new TreeMap(); + String[] lines = fileContents.split(System.getProperty("line.separator")); + int lineNumber = 1; + for (String line : lines) { + line = line.trim().replace("\t",""); + lineMappings.put(lineNumber++, line); + } + return lineMappings; + } + + public int getNumberOfLoc(final String fileContents) { + return this.getLineMappings(fileContents).size(); + } + + public int getNumberOfLocFiltered(final String fileContents) { + Map locs = this.getLineMappings(fileContents); + this.filterCommentsAndBlanks(locs); + return locs.size(); + } + + protected abstract String getReleaseTag(String release) throws Exception; + public abstract String getReleaseCommit(String release) throws Exception; + public abstract Set getAllRepositoryTransactions() throws Exception; +} diff --git a/molerat/src/main/java/it/unitn/molerat/repos/wrappers/SvnRepoWrapper.java b/molerat/src/main/java/it/unitn/molerat/repos/wrappers/SvnRepoWrapper.java new file mode 100644 index 0000000..436dcb8 --- /dev/null +++ b/molerat/src/main/java/it/unitn/molerat/repos/wrappers/SvnRepoWrapper.java @@ -0,0 +1,185 @@ +package it.unitn.molerat.repos.wrappers; + +import java.io.ByteArrayOutputStream; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.LinkedList; +import java.util.Map; +import java.util.Set; +import java.util.TreeMap; +import org.tmatesoft.svn.core.SVNException; +import org.tmatesoft.svn.core.SVNLogEntry; +import org.tmatesoft.svn.core.SVNURL; +import org.tmatesoft.svn.core.io.SVNRepository; +import org.tmatesoft.svn.core.io.SVNRepositoryFactory; +import org.tmatesoft.svn.core.wc.SVNRevision; +import org.tmatesoft.svn.core.wc2.ISvnObjectReceiver; +import org.tmatesoft.svn.core.wc2.SvnAnnotate; +import org.tmatesoft.svn.core.wc2.SvnAnnotateItem; +import org.tmatesoft.svn.core.wc2.SvnCat; +import org.tmatesoft.svn.core.wc2.SvnDiff; +import org.tmatesoft.svn.core.wc2.SvnLog; +import org.tmatesoft.svn.core.wc2.SvnOperationFactory; +import org.tmatesoft.svn.core.wc2.SvnRevisionRange; +import org.tmatesoft.svn.core.wc2.SvnTarget; + +public final class SvnRepoWrapper extends RepoWrapper { + + private final SVNURL url; + protected SVNRepository repo = null; + protected final SvnOperationFactory opFactory = new SvnOperationFactory(); + + public SvnRepoWrapper(String url) throws SVNException { + this.diffFilePrefix = "Index: "; + this.url = SVNURL.parseURIEncoded(url); + this.repo = SVNRepositoryFactory.create(this.url); + } + + protected String doDiff(SvnTarget leftRev, SvnTarget rightRev) throws SVNException { + final ByteArrayOutputStream output = new ByteArrayOutputStream(); + SvnDiff diff = opFactory.createDiff(); + diff.setOutput(output); + diff.setSources(leftRev, rightRev); + diff.run(); + return output.toString(); + } + + public Set getRevisionNumbers(String topRev) throws SVNException { + Set revNumbers = new LinkedHashSet<>(); + LinkedList logEntries = new LinkedList<>(); + SvnLog log = opFactory.createLog(); + SvnTarget target = SvnTarget.fromURL(this.url); + log.addRange(SvnRevisionRange.create(SVNRevision.create(0), SVNRevision.create(Long.parseLong(topRev)))); + log.setSingleTarget(target); + log.run(logEntries); + Iterator it = logEntries.descendingIterator(); + if (it.hasNext()) { + it.next(); // discard the topRev + } + while (it.hasNext()) { + SVNLogEntry entry = it.next(); + revNumbers.add(String.valueOf(entry.getRevision())); + } + return revNumbers; + } + + + protected void annotate(final SvnTarget target, ISvnObjectReceiver callback) throws SVNException { + SvnAnnotate annotate = opFactory.createAnnotate(); + annotate.setSingleTarget(target); + final SVNRevision startRev = SVNRevision.create(1); + final SVNRevision endRev = target.getPegRevision(); + annotate.setStartRevision(startRev); + annotate.setEndRevision(endRev); + annotate.setReceiver(callback); + annotate.run(); + } + + @Override + @SuppressWarnings("unchecked") + public void annotate(String path, String rev, Object callback) throws Exception { + long revLong = Long.parseLong(rev); + SvnTarget target = SvnTarget.fromURL(SVNURL.parseURIEncoded(this.getBasePath() + path), SVNRevision.create(revLong)); + this.annotate(target, ((ISvnObjectReceiver)callback)); + } + + protected String doCat(final SvnTarget target) throws SVNException { + final ByteArrayOutputStream output = new ByteArrayOutputStream(); + SvnCat cat = this.opFactory.createCat(); + cat.addTarget(target); + cat.setOutput(output); + cat.run(); + return output.toString(); + } + + @Override + public String doDiff(String leftRev, String rightRev) throws SVNException { + return this.doDiff("", leftRev, rightRev); + } + + @Override + public String doDiff(String path, String leftRev, String rightRev) throws SVNException { + long leftLong = Long.parseLong(leftRev); + long rightLong = Long.parseLong(rightRev); + SvnTarget left = SvnTarget.fromURL(SVNURL.parseURIEncoded(this.url + path), SVNRevision.create(leftLong)); + SvnTarget right = SvnTarget.fromURL(SVNURL.parseURIEncoded(this.url + path), SVNRevision.create(rightLong)); + return this.doDiff(left, right); + } + + + @Override + public String getBasePath() { + return this.url.toString(); + } + + @Override + public String doCat(String path, String rev) throws SVNException { + long revLong = Long.parseLong(rev); + SvnTarget target = SvnTarget.fromURL(SVNURL.parseURIEncoded(this.url + path), SVNRevision.create(revLong)); + return this.doCat(target); + } + + //---------------------------------------------------------------------------------------------------- + public String getTopmostRevision(String url) throws SVNException { + SvnLog log = opFactory.createLog(); + SvnTarget target = SvnTarget.fromURL(SVNURL.parseURIEncoded(url)); + log.addRange(SvnRevisionRange.create(null, null)); + log.setSingleTarget(target); + SVNLogEntry entry = log.run(); + return String.valueOf(entry.getRevision()); + } + //---------------------------------------------------------------------------------------------------- + + /*---------------------------------------------------------------------------------------------------- + * example found at: http://blog.gmane.org/gmane.comp.version-control.subversion.javasvn.user/month=20131101 + ----------------------------------------------------------------------------------------------------*/ + @Override + public Map determineOriginatingRevision(final String filePath, + final String revision, final Map lines) throws Exception { + final Map originating = new TreeMap(); + final long startRev = 1; + final long endRev = Long.parseLong(revision); + this.annotate(filePath, String.valueOf(endRev), new ISvnObjectReceiver() { + @Override + public void receive(SvnTarget target, SvnAnnotateItem itm) throws SVNException { + if (itm.isLine()) { + final long revision = itm.getRevision(); + final int lineNumber = itm.getLineNumber() + 1; + if (startRev < revision && revision <= endRev) { + if (lines.containsKey(lineNumber)) { + originating.put(lineNumber, String.valueOf(revision)); + } + } + } + } + }); + return originating; + } + + // TODO: UNIMPLEMENTED + @Override + protected String getReleaseTag(String release) throws Exception { + return ""; + } + + // TODO: UNIMPLEMENTED + @Override + public String getReleaseCommit(String release) throws Exception { + return ""; + } + + + // TODO: UNIMPLEMENTED + @Override + public Set getRevisionFiles(String rev, String filter) throws Exception { + return new LinkedHashSet<>(); + } + + // TODO: UNIMPLEMENTED + @Override + public Set getAllRepositoryTransactions() throws Exception { + return new LinkedHashSet<>(); + } + + +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..ed41caf --- /dev/null +++ b/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + it.unitn + foss-vuln-tracker + 1.0-SNAPSHOT + pom + + 1.8 + 1.8 + UTF-8 + UTF-8 + + + molerat + repoman + + diff --git a/repoman/pom.xml b/repoman/pom.xml new file mode 100644 index 0000000..415a331 --- /dev/null +++ b/repoman/pom.xml @@ -0,0 +1,69 @@ + + + + + it.unitn + foss-vuln-tracker + 1.0-SNAPSHOT + + 4.0.0 + it.unitn.repoman + repoman + 1.0-SNAPSHOT + jar + + + + + org.antlr + antlr4-runtime + 4.7 + + + commons-cli + commons-cli + 1.4 + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.0.1 + + + copy-dependencies + prepare-package + + copy-dependencies + + + + ${project.build.directory}/libs + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.0.2 + + + + true + libs/ + it.unitn.repoman.cmd.Main + + + + + + + diff --git a/repoman/src/main/java/it/unitn/repoman/cmd/Main.java b/repoman/src/main/java/it/unitn/repoman/cmd/Main.java new file mode 100755 index 0000000..4b09e65 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/cmd/Main.java @@ -0,0 +1,87 @@ +package it.unitn.repoman.cmd; + +import it.unitn.repoman.core.lang.LanguageFactory; +import it.unitn.repoman.core.slicers.LightweightSlice; +import it.unitn.repoman.core.utils.printers.ConsolePrinterListener; +import java.io.BufferedReader; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.Set; + +import org.antlr.v4.runtime.Parser; +import org.antlr.v4.runtime.tree.ParseTreeListener; +import org.apache.commons.cli.*; + +public class Main { + + public static void main(String[] args) { + Options opts = new Options(); + + Option fileOpt = Option.builder("f") + .argName("e.g, ./Code.java") + .longOpt("file") + .required(true) + .hasArg() + .desc(".java file") + .build(); + opts.addOption(fileOpt); + + Option lineNumbersOpt = Option.builder("l") + .argName("e.g, '1 2 3 4 ...'") + .longOpt("line-numbers") + .desc("Seed lines (line numbers separated with spaces)") + .required(true) + .hasArgs() + .build(); + opts.addOption(lineNumbersOpt); + + CommandLineParser cmdParser = new DefaultParser(); + HelpFormatter helpFormatter = new HelpFormatter(); + CommandLine cmd; + try { + cmd = cmdParser.parse(opts, args); + String file = cmd.getOptionValue("f"); + + LanguageFactory.init("Java", readFile(file)); + String[] argLines = cmd.getOptionValues("l"); + Set lines = new LinkedHashSet<>(); + for (int i=0; i " + line); + } +} \ No newline at end of file diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/LanguageFactory.java b/repoman/src/main/java/it/unitn/repoman/core/lang/LanguageFactory.java new file mode 100755 index 0000000..8b3e3f4 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/LanguageFactory.java @@ -0,0 +1,59 @@ +package it.unitn.repoman.core.lang; + +import org.antlr.v4.runtime.*; + +import it.unitn.repoman.core.lang.wrappers.c.CWrapper; +import it.unitn.repoman.core.lang.wrappers.java.JavaWrapper; +import it.unitn.repoman.core.lang.wrappers.generic.Wrapper; +import it.unitn.repoman.core.lang.parsers.c.CLexer; +import it.unitn.repoman.core.lang.parsers.c.CParser; +import it.unitn.repoman.core.lang.parsers.java.JavaLexer; +import it.unitn.repoman.core.lang.parsers.java.JavaParser; + +public class LanguageFactory { + + private static Wrapper wrapper; + private static Parser parser; + private static ParserRuleContext root; + + private LanguageFactory() {} + + public static void init(String language, String contents) { + try { + if (language.toLowerCase().equals("java")) { + wrapper = new JavaWrapper(); + JavaLexer lexer = new JavaLexer(CharStreams.fromString(contents)); + CommonTokenStream tokens = new CommonTokenStream(lexer); + parser = new JavaParser(tokens); + root = ((JavaParser)parser).compilationUnit(); + } + else if (language.toLowerCase().equals("c")) { + wrapper = new CWrapper(); + CLexer lexer = new CLexer(CharStreams.fromString(contents)); + CommonTokenStream tokens = new CommonTokenStream(lexer); + parser = new CParser(tokens); + root = ((CParser)parser).compilationUnit(); + } + /* + else if (language.toLowerCase().equals("javascript")) { + //TODO + } + */ + } + catch (Exception e) { + e.printStackTrace(); + } + } + + public static Wrapper getWrapper() { + return wrapper; + } + + public static Parser getParser() { + return parser; + } + + public static ParserRuleContext getRoot() { + return root; + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/C.tokens b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/C.tokens new file mode 100644 index 0000000..87a50d6 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/C.tokens @@ -0,0 +1,221 @@ +Enum=25 +AndAssign=97 +Or=79 +Break=16 +LeftShift=69 +GreaterEqual=68 +Bool=52 +ThreadLocal=58 +LeftBracket=61 +RightBrace=64 +Equal=100 +Directives=117 +Restrict=35 +Sizeof=39 +StarAssign=90 +Arrow=102 +NotEqual=101 +LessEqual=66 +Dot=103 +RightParen=60 +XorAssign=98 +Float=27 +Switch=42 +Typedef=43 +StringLiteral=107 +If=30 +Minus=73 +MinusAssign=94 +LeftParen=59 +Newline=114 +Union=44 +Case=17 +Extern=26 +Complex=53 +RightShiftAssign=96 +Comma=88 +Star=75 +Char=18 +ComplexDefine=108 +T__3=11 +T__2=12 +T__1=13 +Question=85 +T__0=14 +OrOr=81 +LineAfterPreprocessing=110 +Inline=31 +Default=21 +Alignas=49 +Div=76 +RightBracket=62 +Register=34 +Else=24 +Assign=89 +AndAnd=80 +LineDirective=111 +LineComment=116 +RightShift=70 +LeftShiftAssign=95 +Identifier=105 +T__11=3 +T__12=2 +T__13=1 +Void=46 +Plus=71 +AsmBlock=109 +StaticAssert=57 +Less=65 +Short=37 +T__10=4 +BlockComment=115 +T__9=5 +Goto=29 +T__8=6 +T__7=7 +T__6=8 +T__5=9 +Signed=38 +T__4=10 +Const=19 +Imaginary=55 +For=28 +Semi=87 +OrAssign=99 +Do=22 +Double=23 +Not=83 +And=78 +Long=33 +Static=40 +Caret=82 +Alignof=50 +Generic=54 +Constant=106 +Atomic=51 +Continue=20 +Int=32 +MinusMinus=74 +Whitespace=113 +Struct=41 +Auto=15 +PlusPlus=72 +PlusAssign=93 +Colon=86 +DivAssign=91 +LeftBrace=63 +Return=36 +Mod=77 +Ellipsis=104 +Tilde=84 +PragmaDirective=112 +While=48 +Noreturn=56 +Volatile=47 +ModAssign=92 +Unsigned=45 +Greater=67 +'-'=73 +'typedef'=43 +'else'=24 +'_Static_assert'=57 +'%'=77 +'__builtin_offsetof'=14 +'>'=67 +'--'=74 +'=='=100 +'_Complex'=53 +'...'=104 +'case'=17 +'->'=102 +'.'=103 +'_Thread_local'=58 +'__m128'=13 +'&'=78 +'__inline__'=12 +'double'=23 +'break'=16 +'short'=37 +'<='=66 +'enum'=25 +'?'=85 +'__attribute__'=11 +'if'=30 +'_Generic'=54 +'goto'=29 +'<<'=69 +'inline'=31 +'||'=81 +'return'=36 +'__m128i'=10 +'_Imaginary'=55 +'unsigned'=45 +'continue'=20 +'/'=76 +'_Bool'=52 +'__m128d'=9 +'signed'=38 +'__asm'=8 +'register'=34 +'sizeof'=39 +'static'=40 +'__typeof__'=7 +'++'=72 +'__builtin_va_arg'=6 +'const'=19 +'volatile'=47 +'/='=91 +'__declspec'=5 +'do'=22 +'('=59 +'|='=99 +'for'=28 +'void'=46 +'{'=63 +'float'=27 +'+='=93 +')'=60 +'__asm__'=4 +'auto'=15 +'!'=83 +'|'=79 +'['=61 +':'=86 +'_Atomic'=51 +'*'=75 +'switch'=42 +'_Alignas'=49 +'_Alignof'=50 +'__stdcall'=3 +'}'=64 +';'=87 +'>>='=96 +'&='=97 +'*='=90 +'struct'=41 +'+'=71 +'~'=84 +']'=62 +'<'=65 +'_Noreturn'=56 +'>='=68 +'long'=33 +','=88 +'-='=94 +'union'=44 +'int'=32 +'__volatile__'=2 +'^'=82 +'<<='=95 +'='=89 +'restrict'=35 +'>>'=70 +'&&'=80 +'^='=98 +'while'=48 +'!='=101 +'__extension__'=1 +'char'=18 +'%='=92 +'extern'=26 +'default'=21 diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CBaseListener.java b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CBaseListener.java new file mode 100644 index 0000000..a9e2ec3 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CBaseListener.java @@ -0,0 +1,1048 @@ +// Generated from C.g4 by ANTLR 4.4 +package it.unitn.repoman.core.lang.parsers.c; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link CListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class CBaseListener implements CListener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStructDeclarationList(@NotNull CParser.StructDeclarationListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStructDeclarationList(@NotNull CParser.StructDeclarationListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterUnaryOperator(@NotNull CParser.UnaryOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitUnaryOperator(@NotNull CParser.UnaryOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStructOrUnionSpecifier(@NotNull CParser.StructOrUnionSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStructOrUnionSpecifier(@NotNull CParser.StructOrUnionSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssignmentOperator(@NotNull CParser.AssignmentOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssignmentOperator(@NotNull CParser.AssignmentOperatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCompoundStatement(@NotNull CParser.CompoundStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCompoundStatement(@NotNull CParser.CompoundStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDeclarationSpecifier(@NotNull CParser.DeclarationSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDeclarationSpecifier(@NotNull CParser.DeclarationSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDeclarationList(@NotNull CParser.DeclarationListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDeclarationList(@NotNull CParser.DeclarationListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDirectDeclarator(@NotNull CParser.DirectDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDirectDeclarator(@NotNull CParser.DirectDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParameterTypeList(@NotNull CParser.ParameterTypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParameterTypeList(@NotNull CParser.ParameterTypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDesignatorList(@NotNull CParser.DesignatorListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDesignatorList(@NotNull CParser.DesignatorListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionSpecifier(@NotNull CParser.FunctionSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionSpecifier(@NotNull CParser.FunctionSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStaticAssertDeclaration(@NotNull CParser.StaticAssertDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStaticAssertDeclaration(@NotNull CParser.StaticAssertDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCastExpression(@NotNull CParser.CastExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCastExpression(@NotNull CParser.CastExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInitDeclarator(@NotNull CParser.InitDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInitDeclarator(@NotNull CParser.InitDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDeclarationSpecifiers2(@NotNull CParser.DeclarationSpecifiers2Context ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDeclarationSpecifiers2(@NotNull CParser.DeclarationSpecifiers2Context ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExternalDeclaration(@NotNull CParser.ExternalDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExternalDeclaration(@NotNull CParser.ExternalDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLogicalAndExpression(@NotNull CParser.LogicalAndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLogicalAndExpression(@NotNull CParser.LogicalAndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGccAttributeList(@NotNull CParser.GccAttributeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGccAttributeList(@NotNull CParser.GccAttributeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpressionStatement(@NotNull CParser.ExpressionStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpressionStatement(@NotNull CParser.ExpressionStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterUnaryExpression(@NotNull CParser.UnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitUnaryExpression(@NotNull CParser.UnaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypedefName(@NotNull CParser.TypedefNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypedefName(@NotNull CParser.TypedefNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPointer(@NotNull CParser.PointerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPointer(@NotNull CParser.PointerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIdentifierList(@NotNull CParser.IdentifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIdentifierList(@NotNull CParser.IdentifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterShiftExpression(@NotNull CParser.ShiftExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitShiftExpression(@NotNull CParser.ShiftExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAtomicTypeSpecifier(@NotNull CParser.AtomicTypeSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAtomicTypeSpecifier(@NotNull CParser.AtomicTypeSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterIterationStatement(@NotNull CParser.IterationStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitIterationStatement(@NotNull CParser.IterationStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumerationConstant(@NotNull CParser.EnumerationConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumerationConstant(@NotNull CParser.EnumerationConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInclusiveOrExpression(@NotNull CParser.InclusiveOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInclusiveOrExpression(@NotNull CParser.InclusiveOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAssignmentExpression(@NotNull CParser.AssignmentExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAssignmentExpression(@NotNull CParser.AssignmentExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDirectAbstractDeclarator(@NotNull CParser.DirectAbstractDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDirectAbstractDeclarator(@NotNull CParser.DirectAbstractDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDeclarationSpecifiers(@NotNull CParser.DeclarationSpecifiersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDeclarationSpecifiers(@NotNull CParser.DeclarationSpecifiersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAlignmentSpecifier(@NotNull CParser.AlignmentSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAlignmentSpecifier(@NotNull CParser.AlignmentSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStructOrUnion(@NotNull CParser.StructOrUnionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStructOrUnion(@NotNull CParser.StructOrUnionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTranslationUnit(@NotNull CParser.TranslationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTranslationUnit(@NotNull CParser.TranslationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCompilationUnit(@NotNull CParser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCompilationUnit(@NotNull CParser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlockItemList(@NotNull CParser.BlockItemListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlockItemList(@NotNull CParser.BlockItemListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExclusiveOrExpression(@NotNull CParser.ExclusiveOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExclusiveOrExpression(@NotNull CParser.ExclusiveOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericAssocList(@NotNull CParser.GenericAssocListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericAssocList(@NotNull CParser.GenericAssocListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEqualityExpression(@NotNull CParser.EqualityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEqualityExpression(@NotNull CParser.EqualityExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParameterList(@NotNull CParser.ParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParameterList(@NotNull CParser.ParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParameterDeclaration(@NotNull CParser.ParameterDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParameterDeclaration(@NotNull CParser.ParameterDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDesignation(@NotNull CParser.DesignationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDesignation(@NotNull CParser.DesignationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlockItem(@NotNull CParser.BlockItemContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlockItem(@NotNull CParser.BlockItemContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInitDeclaratorList(@NotNull CParser.InitDeclaratorListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInitDeclaratorList(@NotNull CParser.InitDeclaratorListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStructDeclaration(@NotNull CParser.StructDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStructDeclaration(@NotNull CParser.StructDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStructDeclaratorList(@NotNull CParser.StructDeclaratorListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStructDeclaratorList(@NotNull CParser.StructDeclaratorListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAdditiveExpression(@NotNull CParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAdditiveExpression(@NotNull CParser.AdditiveExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterRelationalExpression(@NotNull CParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitRelationalExpression(@NotNull CParser.RelationalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumeratorList(@NotNull CParser.EnumeratorListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumeratorList(@NotNull CParser.EnumeratorListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeName(@NotNull CParser.TypeNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeName(@NotNull CParser.TypeNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSelectionStatement(@NotNull CParser.SelectionStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSelectionStatement(@NotNull CParser.SelectionStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericSelection(@NotNull CParser.GenericSelectionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericSelection(@NotNull CParser.GenericSelectionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStorageClassSpecifier(@NotNull CParser.StorageClassSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStorageClassSpecifier(@NotNull CParser.StorageClassSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNestedParenthesesBlock(@NotNull CParser.NestedParenthesesBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNestedParenthesesBlock(@NotNull CParser.NestedParenthesesBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDesignator(@NotNull CParser.DesignatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDesignator(@NotNull CParser.DesignatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAndExpression(@NotNull CParser.AndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAndExpression(@NotNull CParser.AndExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLabeledStatement(@NotNull CParser.LabeledStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLabeledStatement(@NotNull CParser.LabeledStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArgumentExpressionList(@NotNull CParser.ArgumentExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArgumentExpressionList(@NotNull CParser.ArgumentExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGccAttributeSpecifier(@NotNull CParser.GccAttributeSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGccAttributeSpecifier(@NotNull CParser.GccAttributeSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatement(@NotNull CParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatement(@NotNull CParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumerator(@NotNull CParser.EnumeratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumerator(@NotNull CParser.EnumeratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAbstractDeclarator(@NotNull CParser.AbstractDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAbstractDeclarator(@NotNull CParser.AbstractDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPostfixExpression(@NotNull CParser.PostfixExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPostfixExpression(@NotNull CParser.PostfixExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGccAttribute(@NotNull CParser.GccAttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGccAttribute(@NotNull CParser.GccAttributeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrimaryExpression(@NotNull CParser.PrimaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrimaryExpression(@NotNull CParser.PrimaryExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeQualifierList(@NotNull CParser.TypeQualifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeQualifierList(@NotNull CParser.TypeQualifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpression(@NotNull CParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpression(@NotNull CParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstantExpression(@NotNull CParser.ConstantExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstantExpression(@NotNull CParser.ConstantExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConditionalExpression(@NotNull CParser.ConditionalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConditionalExpression(@NotNull CParser.ConditionalExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFunctionDefinition(@NotNull CParser.FunctionDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFunctionDefinition(@NotNull CParser.FunctionDefinitionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSpecifierQualifierList(@NotNull CParser.SpecifierQualifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSpecifierQualifierList(@NotNull CParser.SpecifierQualifierListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGccDeclaratorExtension(@NotNull CParser.GccDeclaratorExtensionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGccDeclaratorExtension(@NotNull CParser.GccDeclaratorExtensionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeSpecifier(@NotNull CParser.TypeSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeSpecifier(@NotNull CParser.TypeSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMultiplicativeExpression(@NotNull CParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMultiplicativeExpression(@NotNull CParser.MultiplicativeExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLogicalOrExpression(@NotNull CParser.LogicalOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLogicalOrExpression(@NotNull CParser.LogicalOrExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDeclaration(@NotNull CParser.DeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDeclaration(@NotNull CParser.DeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDeclarator(@NotNull CParser.DeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDeclarator(@NotNull CParser.DeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInitializer(@NotNull CParser.InitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInitializer(@NotNull CParser.InitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericAssociation(@NotNull CParser.GenericAssociationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericAssociation(@NotNull CParser.GenericAssociationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStructDeclarator(@NotNull CParser.StructDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStructDeclarator(@NotNull CParser.StructDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumSpecifier(@NotNull CParser.EnumSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumSpecifier(@NotNull CParser.EnumSpecifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterJumpStatement(@NotNull CParser.JumpStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitJumpStatement(@NotNull CParser.JumpStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeQualifier(@NotNull CParser.TypeQualifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeQualifier(@NotNull CParser.TypeQualifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInitializerList(@NotNull CParser.InitializerListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInitializerList(@NotNull CParser.InitializerListContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(@NotNull ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(@NotNull TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(@NotNull ErrorNode node) { } +} \ No newline at end of file diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CLexer.java b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CLexer.java new file mode 100644 index 0000000..6073797 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CLexer.java @@ -0,0 +1,618 @@ +// Generated from C.g4 by ANTLR 4.4 +package it.unitn.repoman.core.lang.parsers.c; + +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class CLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + T__13=1, T__12=2, T__11=3, T__10=4, T__9=5, T__8=6, T__7=7, T__6=8, T__5=9, + T__4=10, T__3=11, T__2=12, T__1=13, T__0=14, Auto=15, Break=16, Case=17, + Char=18, Const=19, Continue=20, Default=21, Do=22, Double=23, Else=24, + Enum=25, Extern=26, Float=27, For=28, Goto=29, If=30, Inline=31, Int=32, + Long=33, Register=34, Restrict=35, Return=36, Short=37, Signed=38, Sizeof=39, + Static=40, Struct=41, Switch=42, Typedef=43, Union=44, Unsigned=45, Void=46, + Volatile=47, While=48, Alignas=49, Alignof=50, Atomic=51, Bool=52, Complex=53, + Generic=54, Imaginary=55, Noreturn=56, StaticAssert=57, ThreadLocal=58, + LeftParen=59, RightParen=60, LeftBracket=61, RightBracket=62, LeftBrace=63, + RightBrace=64, Less=65, LessEqual=66, Greater=67, GreaterEqual=68, LeftShift=69, + RightShift=70, Plus=71, PlusPlus=72, Minus=73, MinusMinus=74, Star=75, + Div=76, Mod=77, And=78, Or=79, AndAnd=80, OrOr=81, Caret=82, Not=83, Tilde=84, + Question=85, Colon=86, Semi=87, Comma=88, Assign=89, StarAssign=90, DivAssign=91, + ModAssign=92, PlusAssign=93, MinusAssign=94, LeftShiftAssign=95, RightShiftAssign=96, + AndAssign=97, XorAssign=98, OrAssign=99, Equal=100, NotEqual=101, Arrow=102, + Dot=103, Ellipsis=104, Identifier=105, Constant=106, StringLiteral=107, + ComplexDefine=108, AsmBlock=109, LineAfterPreprocessing=110, LineDirective=111, + PragmaDirective=112, Whitespace=113, Newline=114, BlockComment=115, LineComment=116, + Directives=117; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] tokenNames = { + "'\\u0000'", "'\\u0001'", "'\\u0002'", "'\\u0003'", "'\\u0004'", "'\\u0005'", + "'\\u0006'", "'\\u0007'", "'\b'", "'\t'", "'\n'", "'\\u000B'", "'\f'", + "'\r'", "'\\u000E'", "'\\u000F'", "'\\u0010'", "'\\u0011'", "'\\u0012'", + "'\\u0013'", "'\\u0014'", "'\\u0015'", "'\\u0016'", "'\\u0017'", "'\\u0018'", + "'\\u0019'", "'\\u001A'", "'\\u001B'", "'\\u001C'", "'\\u001D'", "'\\u001E'", + "'\\u001F'", "' '", "'!'", "'\"'", "'#'", "'$'", "'%'", "'&'", "'''", + "'('", "')'", "'*'", "'+'", "','", "'-'", "'.'", "'/'", "'0'", "'1'", + "'2'", "'3'", "'4'", "'5'", "'6'", "'7'", "'8'", "'9'", "':'", "';'", + "'<'", "'='", "'>'", "'?'", "'@'", "'A'", "'B'", "'C'", "'D'", "'E'", + "'F'", "'G'", "'H'", "'I'", "'J'", "'K'", "'L'", "'M'", "'N'", "'O'", + "'P'", "'Q'", "'R'", "'S'", "'T'", "'U'", "'V'", "'W'", "'X'", "'Y'", + "'Z'", "'['", "'\\'", "']'", "'^'", "'_'", "'`'", "'a'", "'b'", "'c'", + "'d'", "'e'", "'f'", "'g'", "'h'", "'i'", "'j'", "'k'", "'l'", "'m'", + "'n'", "'o'", "'p'", "'q'", "'r'", "'s'", "'t'", "'u'" + }; + public static final String[] ruleNames = { + "T__13", "T__12", "T__11", "T__10", "T__9", "T__8", "T__7", "T__6", "T__5", + "T__4", "T__3", "T__2", "T__1", "T__0", "Auto", "Break", "Case", "Char", + "Const", "Continue", "Default", "Do", "Double", "Else", "Enum", "Extern", + "Float", "For", "Goto", "If", "Inline", "Int", "Long", "Register", "Restrict", + "Return", "Short", "Signed", "Sizeof", "Static", "Struct", "Switch", "Typedef", + "Union", "Unsigned", "Void", "Volatile", "While", "Alignas", "Alignof", + "Atomic", "Bool", "Complex", "Generic", "Imaginary", "Noreturn", "StaticAssert", + "ThreadLocal", "LeftParen", "RightParen", "LeftBracket", "RightBracket", + "LeftBrace", "RightBrace", "Less", "LessEqual", "Greater", "GreaterEqual", + "LeftShift", "RightShift", "Plus", "PlusPlus", "Minus", "MinusMinus", + "Star", "Div", "Mod", "And", "Or", "AndAnd", "OrOr", "Caret", "Not", "Tilde", + "Question", "Colon", "Semi", "Comma", "Assign", "StarAssign", "DivAssign", + "ModAssign", "PlusAssign", "MinusAssign", "LeftShiftAssign", "RightShiftAssign", + "AndAssign", "XorAssign", "OrAssign", "Equal", "NotEqual", "Arrow", "Dot", + "Ellipsis", "Identifier", "IdentifierNondigit", "Nondigit", "Digit", "UniversalCharacterName", + "HexQuad", "Constant", "IntegerConstant", "BinaryConstant", "DecimalConstant", + "OctalConstant", "HexadecimalConstant", "HexadecimalPrefix", "NonzeroDigit", + "OctalDigit", "HexadecimalDigit", "IntegerSuffix", "UnsignedSuffix", "LongSuffix", + "LongLongSuffix", "FloatingConstant", "DecimalFloatingConstant", "HexadecimalFloatingConstant", + "FractionalConstant", "ExponentPart", "Sign", "DigitSequence", "HexadecimalFractionalConstant", + "BinaryExponentPart", "HexadecimalDigitSequence", "FloatingSuffix", "CharacterConstant", + "CCharSequence", "CChar", "EscapeSequence", "SimpleEscapeSequence", "OctalEscapeSequence", + "HexadecimalEscapeSequence", "StringLiteral", "EncodingPrefix", "SCharSequence", + "SChar", "ComplexDefine", "AsmBlock", "LineAfterPreprocessing", "LineDirective", + "PragmaDirective", "Whitespace", "Newline", "BlockComment", "LineComment", + "Directives" + }; + + + public CLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "C.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2w\u0543\b\1\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ + "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080"+ + "\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085"+ + "\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089"+ + "\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e"+ + "\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092\t\u0092"+ + "\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095\t\u0095\4\u0096\t\u0096\4\u0097"+ + "\t\u0097\4\u0098\t\u0098\4\u0099\t\u0099\4\u009a\t\u009a\4\u009b\t\u009b"+ + "\4\u009c\t\u009c\4\u009d\t\u009d\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3"+ + "\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3"+ + "\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3"+ + "\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7"+ + "\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3"+ + "\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n"+ + "\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3"+ + "\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r"+ + "\3\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17"+ + "\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\20"+ + "\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22"+ + "\3\22\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25"+ + "\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26"+ + "\3\26\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31"+ + "\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33"+ + "\3\34\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36"+ + "\3\36\3\37\3\37\3\37\3 \3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3\"\3\"\3\"\3\""+ + "\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3"+ + "%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3"+ + "(\3(\3(\3)\3)\3)\3)\3)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3+\3+\3+\3+\3+\3+\3"+ + "+\3,\3,\3,\3,\3,\3,\3,\3,\3-\3-\3-\3-\3-\3-\3.\3.\3.\3.\3.\3.\3.\3.\3"+ + ".\3/\3/\3/\3/\3/\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\61\3\61"+ + "\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\63"+ + "\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64\3\64"+ + "\3\64\3\64\3\65\3\65\3\65\3\65\3\65\3\65\3\66\3\66\3\66\3\66\3\66\3\66"+ + "\3\66\3\66\3\66\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\38\38\38"+ + "\38\38\38\38\38\38\38\38\39\39\39\39\39\39\39\39\39\39\3:\3:\3:\3:\3:"+ + "\3:\3:\3:\3:\3:\3:\3:\3:\3:\3:\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;"+ + "\3;\3<\3<\3=\3=\3>\3>\3?\3?\3@\3@\3A\3A\3B\3B\3C\3C\3C\3D\3D\3E\3E\3E"+ + "\3F\3F\3F\3G\3G\3G\3H\3H\3I\3I\3I\3J\3J\3K\3K\3K\3L\3L\3M\3M\3N\3N\3O"+ + "\3O\3P\3P\3Q\3Q\3Q\3R\3R\3R\3S\3S\3T\3T\3U\3U\3V\3V\3W\3W\3X\3X\3Y\3Y"+ + "\3Z\3Z\3[\3[\3[\3\\\3\\\3\\\3]\3]\3]\3^\3^\3^\3_\3_\3_\3`\3`\3`\3`\3a"+ + "\3a\3a\3a\3b\3b\3b\3c\3c\3c\3d\3d\3d\3e\3e\3e\3f\3f\3f\3g\3g\3g\3h\3h"+ + "\3i\3i\3i\3i\3j\3j\3j\7j\u038b\nj\fj\16j\u038e\13j\3k\3k\5k\u0392\nk\3"+ + "l\3l\3m\3m\3n\3n\3n\3n\3n\3n\3n\3n\3n\3n\5n\u03a2\nn\3o\3o\3o\3o\3o\3"+ + "p\3p\3p\5p\u03ac\np\3q\3q\5q\u03b0\nq\3q\3q\5q\u03b4\nq\3q\3q\5q\u03b8"+ + "\nq\3q\5q\u03bb\nq\3r\3r\3r\6r\u03c0\nr\rr\16r\u03c1\3s\3s\7s\u03c6\n"+ + "s\fs\16s\u03c9\13s\3t\3t\7t\u03cd\nt\ft\16t\u03d0\13t\3u\3u\6u\u03d4\n"+ + "u\ru\16u\u03d5\3v\3v\3v\3w\3w\3x\3x\3y\3y\3z\3z\5z\u03e3\nz\3z\3z\3z\3"+ + "z\3z\5z\u03ea\nz\3z\3z\5z\u03ee\nz\5z\u03f0\nz\3{\3{\3|\3|\3}\3}\3}\3"+ + "}\5}\u03fa\n}\3~\3~\5~\u03fe\n~\3\177\3\177\5\177\u0402\n\177\3\177\5"+ + "\177\u0405\n\177\3\177\3\177\3\177\5\177\u040a\n\177\5\177\u040c\n\177"+ + "\3\u0080\3\u0080\3\u0080\3\u0080\5\u0080\u0412\n\u0080\3\u0080\3\u0080"+ + "\3\u0080\3\u0080\5\u0080\u0418\n\u0080\5\u0080\u041a\n\u0080\3\u0081\5"+ + "\u0081\u041d\n\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\5\u0081\u0424"+ + "\n\u0081\3\u0082\3\u0082\5\u0082\u0428\n\u0082\3\u0082\3\u0082\3\u0082"+ + "\5\u0082\u042d\n\u0082\3\u0082\5\u0082\u0430\n\u0082\3\u0083\3\u0083\3"+ + "\u0084\6\u0084\u0435\n\u0084\r\u0084\16\u0084\u0436\3\u0085\5\u0085\u043a"+ + "\n\u0085\3\u0085\3\u0085\3\u0085\3\u0085\3\u0085\5\u0085\u0441\n\u0085"+ + "\3\u0086\3\u0086\5\u0086\u0445\n\u0086\3\u0086\3\u0086\3\u0086\5\u0086"+ + "\u044a\n\u0086\3\u0086\5\u0086\u044d\n\u0086\3\u0087\6\u0087\u0450\n\u0087"+ + "\r\u0087\16\u0087\u0451\3\u0088\3\u0088\3\u0089\3\u0089\3\u0089\3\u0089"+ + "\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089"+ + "\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089\3\u0089"+ + "\5\u0089\u046c\n\u0089\3\u008a\6\u008a\u046f\n\u008a\r\u008a\16\u008a"+ + "\u0470\3\u008b\3\u008b\5\u008b\u0475\n\u008b\3\u008c\3\u008c\3\u008c\3"+ + "\u008c\5\u008c\u047b\n\u008c\3\u008d\3\u008d\3\u008d\3\u008e\3\u008e\3"+ + "\u008e\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e\3\u008e"+ + "\5\u008e\u048b\n\u008e\3\u008f\3\u008f\3\u008f\3\u008f\6\u008f\u0491\n"+ + "\u008f\r\u008f\16\u008f\u0492\3\u0090\5\u0090\u0496\n\u0090\3\u0090\3"+ + "\u0090\5\u0090\u049a\n\u0090\3\u0090\3\u0090\3\u0091\3\u0091\3\u0091\5"+ + "\u0091\u04a1\n\u0091\3\u0092\6\u0092\u04a4\n\u0092\r\u0092\16\u0092\u04a5"+ + "\3\u0093\3\u0093\3\u0093\3\u0093\3\u0093\3\u0093\3\u0093\5\u0093\u04af"+ + "\n\u0093\3\u0094\3\u0094\5\u0094\u04b3\n\u0094\3\u0094\3\u0094\3\u0094"+ + "\3\u0094\3\u0094\3\u0094\3\u0094\3\u0094\7\u0094\u04bd\n\u0094\f\u0094"+ + "\16\u0094\u04c0\13\u0094\3\u0094\3\u0094\3\u0095\3\u0095\3\u0095\3\u0095"+ + "\3\u0095\7\u0095\u04c9\n\u0095\f\u0095\16\u0095\u04cc\13\u0095\3\u0095"+ + "\3\u0095\7\u0095\u04d0\n\u0095\f\u0095\16\u0095\u04d3\13\u0095\3\u0095"+ + "\3\u0095\3\u0095\3\u0095\3\u0096\3\u0096\3\u0096\3\u0096\3\u0096\3\u0096"+ + "\3\u0096\7\u0096\u04e0\n\u0096\f\u0096\16\u0096\u04e3\13\u0096\3\u0096"+ + "\7\u0096\u04e6\n\u0096\f\u0096\16\u0096\u04e9\13\u0096\3\u0096\3\u0096"+ + "\3\u0097\3\u0097\5\u0097\u04ef\n\u0097\3\u0097\3\u0097\5\u0097\u04f3\n"+ + "\u0097\3\u0097\3\u0097\7\u0097\u04f7\n\u0097\f\u0097\16\u0097\u04fa\13"+ + "\u0097\3\u0097\3\u0097\3\u0098\3\u0098\5\u0098\u0500\n\u0098\3\u0098\3"+ + "\u0098\3\u0098\3\u0098\3\u0098\3\u0098\3\u0098\3\u0098\3\u0098\7\u0098"+ + "\u050b\n\u0098\f\u0098\16\u0098\u050e\13\u0098\3\u0098\3\u0098\3\u0099"+ + "\6\u0099\u0513\n\u0099\r\u0099\16\u0099\u0514\3\u0099\3\u0099\3\u009a"+ + "\3\u009a\5\u009a\u051b\n\u009a\3\u009a\5\u009a\u051e\n\u009a\3\u009a\3"+ + "\u009a\3\u009b\3\u009b\3\u009b\3\u009b\7\u009b\u0526\n\u009b\f\u009b\16"+ + "\u009b\u0529\13\u009b\3\u009b\3\u009b\3\u009b\3\u009b\3\u009b\3\u009c"+ + "\3\u009c\3\u009c\3\u009c\7\u009c\u0534\n\u009c\f\u009c\16\u009c\u0537"+ + "\13\u009c\3\u009c\3\u009c\3\u009d\3\u009d\7\u009d\u053d\n\u009d\f\u009d"+ + "\16\u009d\u0540\13\u009d\3\u009d\3\u009d\3\u0527\2\u009e\3\3\5\4\7\5\t"+ + "\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23"+ + "%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G"+ + "%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{"+ + "?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091"+ + "J\u0093K\u0095L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5"+ + "T\u00a7U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9"+ + "^\u00bb_\u00bd`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7e\u00c9f\u00cbg\u00cd"+ + "h\u00cfi\u00d1j\u00d3k\u00d5\2\u00d7\2\u00d9\2\u00db\2\u00dd\2\u00dfl"+ + "\u00e1\2\u00e3\2\u00e5\2\u00e7\2\u00e9\2\u00eb\2\u00ed\2\u00ef\2\u00f1"+ + "\2\u00f3\2\u00f5\2\u00f7\2\u00f9\2\u00fb\2\u00fd\2\u00ff\2\u0101\2\u0103"+ + "\2\u0105\2\u0107\2\u0109\2\u010b\2\u010d\2\u010f\2\u0111\2\u0113\2\u0115"+ + "\2\u0117\2\u0119\2\u011b\2\u011d\2\u011fm\u0121\2\u0123\2\u0125\2\u0127"+ + "n\u0129o\u012bp\u012dq\u012fr\u0131s\u0133t\u0135u\u0137v\u0139w\3\2\27"+ + "\5\2C\\aac|\3\2\62;\4\2DDdd\3\2\62\63\4\2ZZzz\3\2\63;\3\2\629\5\2\62;"+ + "CHch\4\2WWww\4\2NNnn\4\2--//\6\2HHNNhhnn\6\2\f\f\17\17))^^\f\2$$))AA^"+ + "^cdhhppttvvxx\5\2NNWWww\6\2\f\f\17\17$$^^\3\2%%\3\2}}\3\2\177\177\4\2"+ + "\f\f\17\17\4\2\13\13\"\"\u0569\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t"+ + "\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2"+ + "\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2"+ + "\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2"+ + "+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2"+ + "\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2"+ + "C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3"+ + "\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2"+ + "\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2"+ + "i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3"+ + "\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081"+ + "\3\2\2\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2"+ + "\2\2\u008b\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093"+ + "\3\2\2\2\2\u0095\3\2\2\2\2\u0097\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2"+ + "\2\2\u009d\3\2\2\2\2\u009f\3\2\2\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5"+ + "\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2"+ + "\2\2\u00af\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7"+ + "\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2"+ + "\2\2\u00c1\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9"+ + "\3\2\2\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1\3\2\2"+ + "\2\2\u00d3\3\2\2\2\2\u00df\3\2\2\2\2\u011f\3\2\2\2\2\u0127\3\2\2\2\2\u0129"+ + "\3\2\2\2\2\u012b\3\2\2\2\2\u012d\3\2\2\2\2\u012f\3\2\2\2\2\u0131\3\2\2"+ + "\2\2\u0133\3\2\2\2\2\u0135\3\2\2\2\2\u0137\3\2\2\2\2\u0139\3\2\2\2\3\u013b"+ + "\3\2\2\2\5\u0149\3\2\2\2\7\u0156\3\2\2\2\t\u0160\3\2\2\2\13\u0168\3\2"+ + "\2\2\r\u0173\3\2\2\2\17\u0184\3\2\2\2\21\u018f\3\2\2\2\23\u0195\3\2\2"+ + "\2\25\u019d\3\2\2\2\27\u01a5\3\2\2\2\31\u01b3\3\2\2\2\33\u01be\3\2\2\2"+ + "\35\u01c5\3\2\2\2\37\u01d8\3\2\2\2!\u01dd\3\2\2\2#\u01e3\3\2\2\2%\u01e8"+ + "\3\2\2\2\'\u01ed\3\2\2\2)\u01f3\3\2\2\2+\u01fc\3\2\2\2-\u0204\3\2\2\2"+ + "/\u0207\3\2\2\2\61\u020e\3\2\2\2\63\u0213\3\2\2\2\65\u0218\3\2\2\2\67"+ + "\u021f\3\2\2\29\u0225\3\2\2\2;\u0229\3\2\2\2=\u022e\3\2\2\2?\u0231\3\2"+ + "\2\2A\u0238\3\2\2\2C\u023c\3\2\2\2E\u0241\3\2\2\2G\u024a\3\2\2\2I\u0253"+ + "\3\2\2\2K\u025a\3\2\2\2M\u0260\3\2\2\2O\u0267\3\2\2\2Q\u026e\3\2\2\2S"+ + "\u0275\3\2\2\2U\u027c\3\2\2\2W\u0283\3\2\2\2Y\u028b\3\2\2\2[\u0291\3\2"+ + "\2\2]\u029a\3\2\2\2_\u029f\3\2\2\2a\u02a8\3\2\2\2c\u02ae\3\2\2\2e\u02b7"+ + "\3\2\2\2g\u02c0\3\2\2\2i\u02c8\3\2\2\2k\u02ce\3\2\2\2m\u02d7\3\2\2\2o"+ + "\u02e0\3\2\2\2q\u02eb\3\2\2\2s\u02f5\3\2\2\2u\u0304\3\2\2\2w\u0312\3\2"+ + "\2\2y\u0314\3\2\2\2{\u0316\3\2\2\2}\u0318\3\2\2\2\177\u031a\3\2\2\2\u0081"+ + "\u031c\3\2\2\2\u0083\u031e\3\2\2\2\u0085\u0320\3\2\2\2\u0087\u0323\3\2"+ + "\2\2\u0089\u0325\3\2\2\2\u008b\u0328\3\2\2\2\u008d\u032b\3\2\2\2\u008f"+ + "\u032e\3\2\2\2\u0091\u0330\3\2\2\2\u0093\u0333\3\2\2\2\u0095\u0335\3\2"+ + "\2\2\u0097\u0338\3\2\2\2\u0099\u033a\3\2\2\2\u009b\u033c\3\2\2\2\u009d"+ + "\u033e\3\2\2\2\u009f\u0340\3\2\2\2\u00a1\u0342\3\2\2\2\u00a3\u0345\3\2"+ + "\2\2\u00a5\u0348\3\2\2\2\u00a7\u034a\3\2\2\2\u00a9\u034c\3\2\2\2\u00ab"+ + "\u034e\3\2\2\2\u00ad\u0350\3\2\2\2\u00af\u0352\3\2\2\2\u00b1\u0354\3\2"+ + "\2\2\u00b3\u0356\3\2\2\2\u00b5\u0358\3\2\2\2\u00b7\u035b\3\2\2\2\u00b9"+ + "\u035e\3\2\2\2\u00bb\u0361\3\2\2\2\u00bd\u0364\3\2\2\2\u00bf\u0367\3\2"+ + "\2\2\u00c1\u036b\3\2\2\2\u00c3\u036f\3\2\2\2\u00c5\u0372\3\2\2\2\u00c7"+ + "\u0375\3\2\2\2\u00c9\u0378\3\2\2\2\u00cb\u037b\3\2\2\2\u00cd\u037e\3\2"+ + "\2\2\u00cf\u0381\3\2\2\2\u00d1\u0383\3\2\2\2\u00d3\u0387\3\2\2\2\u00d5"+ + "\u0391\3\2\2\2\u00d7\u0393\3\2\2\2\u00d9\u0395\3\2\2\2\u00db\u03a1\3\2"+ + "\2\2\u00dd\u03a3\3\2\2\2\u00df\u03ab\3\2\2\2\u00e1\u03ba\3\2\2\2\u00e3"+ + "\u03bc\3\2\2\2\u00e5\u03c3\3\2\2\2\u00e7\u03ca\3\2\2\2\u00e9\u03d1\3\2"+ + "\2\2\u00eb\u03d7\3\2\2\2\u00ed\u03da\3\2\2\2\u00ef\u03dc\3\2\2\2\u00f1"+ + "\u03de\3\2\2\2\u00f3\u03ef\3\2\2\2\u00f5\u03f1\3\2\2\2\u00f7\u03f3\3\2"+ + "\2\2\u00f9\u03f9\3\2\2\2\u00fb\u03fd\3\2\2\2\u00fd\u040b\3\2\2\2\u00ff"+ + "\u0419\3\2\2\2\u0101\u0423\3\2\2\2\u0103\u042f\3\2\2\2\u0105\u0431\3\2"+ + "\2\2\u0107\u0434\3\2\2\2\u0109\u0440\3\2\2\2\u010b\u044c\3\2\2\2\u010d"+ + "\u044f\3\2\2\2\u010f\u0453\3\2\2\2\u0111\u046b\3\2\2\2\u0113\u046e\3\2"+ + "\2\2\u0115\u0474\3\2\2\2\u0117\u047a\3\2\2\2\u0119\u047c\3\2\2\2\u011b"+ + "\u048a\3\2\2\2\u011d\u048c\3\2\2\2\u011f\u0495\3\2\2\2\u0121\u04a0\3\2"+ + "\2\2\u0123\u04a3\3\2\2\2\u0125\u04ae\3\2\2\2\u0127\u04b0\3\2\2\2\u0129"+ + "\u04c3\3\2\2\2\u012b\u04d8\3\2\2\2\u012d\u04ec\3\2\2\2\u012f\u04fd\3\2"+ + "\2\2\u0131\u0512\3\2\2\2\u0133\u051d\3\2\2\2\u0135\u0521\3\2\2\2\u0137"+ + "\u052f\3\2\2\2\u0139\u053a\3\2\2\2\u013b\u013c\7a\2\2\u013c\u013d\7a\2"+ + "\2\u013d\u013e\7g\2\2\u013e\u013f\7z\2\2\u013f\u0140\7v\2\2\u0140\u0141"+ + "\7g\2\2\u0141\u0142\7p\2\2\u0142\u0143\7u\2\2\u0143\u0144\7k\2\2\u0144"+ + "\u0145\7q\2\2\u0145\u0146\7p\2\2\u0146\u0147\7a\2\2\u0147\u0148\7a\2\2"+ + "\u0148\4\3\2\2\2\u0149\u014a\7a\2\2\u014a\u014b\7a\2\2\u014b\u014c\7x"+ + "\2\2\u014c\u014d\7q\2\2\u014d\u014e\7n\2\2\u014e\u014f\7c\2\2\u014f\u0150"+ + "\7v\2\2\u0150\u0151\7k\2\2\u0151\u0152\7n\2\2\u0152\u0153\7g\2\2\u0153"+ + "\u0154\7a\2\2\u0154\u0155\7a\2\2\u0155\6\3\2\2\2\u0156\u0157\7a\2\2\u0157"+ + "\u0158\7a\2\2\u0158\u0159\7u\2\2\u0159\u015a\7v\2\2\u015a\u015b\7f\2\2"+ + "\u015b\u015c\7e\2\2\u015c\u015d\7c\2\2\u015d\u015e\7n\2\2\u015e\u015f"+ + "\7n\2\2\u015f\b\3\2\2\2\u0160\u0161\7a\2\2\u0161\u0162\7a\2\2\u0162\u0163"+ + "\7c\2\2\u0163\u0164\7u\2\2\u0164\u0165\7o\2\2\u0165\u0166\7a\2\2\u0166"+ + "\u0167\7a\2\2\u0167\n\3\2\2\2\u0168\u0169\7a\2\2\u0169\u016a\7a\2\2\u016a"+ + "\u016b\7f\2\2\u016b\u016c\7g\2\2\u016c\u016d\7e\2\2\u016d\u016e\7n\2\2"+ + "\u016e\u016f\7u\2\2\u016f\u0170\7r\2\2\u0170\u0171\7g\2\2\u0171\u0172"+ + "\7e\2\2\u0172\f\3\2\2\2\u0173\u0174\7a\2\2\u0174\u0175\7a\2\2\u0175\u0176"+ + "\7d\2\2\u0176\u0177\7w\2\2\u0177\u0178\7k\2\2\u0178\u0179\7n\2\2\u0179"+ + "\u017a\7v\2\2\u017a\u017b\7k\2\2\u017b\u017c\7p\2\2\u017c\u017d\7a\2\2"+ + "\u017d\u017e\7x\2\2\u017e\u017f\7c\2\2\u017f\u0180\7a\2\2\u0180\u0181"+ + "\7c\2\2\u0181\u0182\7t\2\2\u0182\u0183\7i\2\2\u0183\16\3\2\2\2\u0184\u0185"+ + "\7a\2\2\u0185\u0186\7a\2\2\u0186\u0187\7v\2\2\u0187\u0188\7{\2\2\u0188"+ + "\u0189\7r\2\2\u0189\u018a\7g\2\2\u018a\u018b\7q\2\2\u018b\u018c\7h\2\2"+ + "\u018c\u018d\7a\2\2\u018d\u018e\7a\2\2\u018e\20\3\2\2\2\u018f\u0190\7"+ + "a\2\2\u0190\u0191\7a\2\2\u0191\u0192\7c\2\2\u0192\u0193\7u\2\2\u0193\u0194"+ + "\7o\2\2\u0194\22\3\2\2\2\u0195\u0196\7a\2\2\u0196\u0197\7a\2\2\u0197\u0198"+ + "\7o\2\2\u0198\u0199\7\63\2\2\u0199\u019a\7\64\2\2\u019a\u019b\7:\2\2\u019b"+ + "\u019c\7f\2\2\u019c\24\3\2\2\2\u019d\u019e\7a\2\2\u019e\u019f\7a\2\2\u019f"+ + "\u01a0\7o\2\2\u01a0\u01a1\7\63\2\2\u01a1\u01a2\7\64\2\2\u01a2\u01a3\7"+ + ":\2\2\u01a3\u01a4\7k\2\2\u01a4\26\3\2\2\2\u01a5\u01a6\7a\2\2\u01a6\u01a7"+ + "\7a\2\2\u01a7\u01a8\7c\2\2\u01a8\u01a9\7v\2\2\u01a9\u01aa\7v\2\2\u01aa"+ + "\u01ab\7t\2\2\u01ab\u01ac\7k\2\2\u01ac\u01ad\7d\2\2\u01ad\u01ae\7w\2\2"+ + "\u01ae\u01af\7v\2\2\u01af\u01b0\7g\2\2\u01b0\u01b1\7a\2\2\u01b1\u01b2"+ + "\7a\2\2\u01b2\30\3\2\2\2\u01b3\u01b4\7a\2\2\u01b4\u01b5\7a\2\2\u01b5\u01b6"+ + "\7k\2\2\u01b6\u01b7\7p\2\2\u01b7\u01b8\7n\2\2\u01b8\u01b9\7k\2\2\u01b9"+ + "\u01ba\7p\2\2\u01ba\u01bb\7g\2\2\u01bb\u01bc\7a\2\2\u01bc\u01bd\7a\2\2"+ + "\u01bd\32\3\2\2\2\u01be\u01bf\7a\2\2\u01bf\u01c0\7a\2\2\u01c0\u01c1\7"+ + "o\2\2\u01c1\u01c2\7\63\2\2\u01c2\u01c3\7\64\2\2\u01c3\u01c4\7:\2\2\u01c4"+ + "\34\3\2\2\2\u01c5\u01c6\7a\2\2\u01c6\u01c7\7a\2\2\u01c7\u01c8\7d\2\2\u01c8"+ + "\u01c9\7w\2\2\u01c9\u01ca\7k\2\2\u01ca\u01cb\7n\2\2\u01cb\u01cc\7v\2\2"+ + "\u01cc\u01cd\7k\2\2\u01cd\u01ce\7p\2\2\u01ce\u01cf\7a\2\2\u01cf\u01d0"+ + "\7q\2\2\u01d0\u01d1\7h\2\2\u01d1\u01d2\7h\2\2\u01d2\u01d3\7u\2\2\u01d3"+ + "\u01d4\7g\2\2\u01d4\u01d5\7v\2\2\u01d5\u01d6\7q\2\2\u01d6\u01d7\7h\2\2"+ + "\u01d7\36\3\2\2\2\u01d8\u01d9\7c\2\2\u01d9\u01da\7w\2\2\u01da\u01db\7"+ + "v\2\2\u01db\u01dc\7q\2\2\u01dc \3\2\2\2\u01dd\u01de\7d\2\2\u01de\u01df"+ + "\7t\2\2\u01df\u01e0\7g\2\2\u01e0\u01e1\7c\2\2\u01e1\u01e2\7m\2\2\u01e2"+ + "\"\3\2\2\2\u01e3\u01e4\7e\2\2\u01e4\u01e5\7c\2\2\u01e5\u01e6\7u\2\2\u01e6"+ + "\u01e7\7g\2\2\u01e7$\3\2\2\2\u01e8\u01e9\7e\2\2\u01e9\u01ea\7j\2\2\u01ea"+ + "\u01eb\7c\2\2\u01eb\u01ec\7t\2\2\u01ec&\3\2\2\2\u01ed\u01ee\7e\2\2\u01ee"+ + "\u01ef\7q\2\2\u01ef\u01f0\7p\2\2\u01f0\u01f1\7u\2\2\u01f1\u01f2\7v\2\2"+ + "\u01f2(\3\2\2\2\u01f3\u01f4\7e\2\2\u01f4\u01f5\7q\2\2\u01f5\u01f6\7p\2"+ + "\2\u01f6\u01f7\7v\2\2\u01f7\u01f8\7k\2\2\u01f8\u01f9\7p\2\2\u01f9\u01fa"+ + "\7w\2\2\u01fa\u01fb\7g\2\2\u01fb*\3\2\2\2\u01fc\u01fd\7f\2\2\u01fd\u01fe"+ + "\7g\2\2\u01fe\u01ff\7h\2\2\u01ff\u0200\7c\2\2\u0200\u0201\7w\2\2\u0201"+ + "\u0202\7n\2\2\u0202\u0203\7v\2\2\u0203,\3\2\2\2\u0204\u0205\7f\2\2\u0205"+ + "\u0206\7q\2\2\u0206.\3\2\2\2\u0207\u0208\7f\2\2\u0208\u0209\7q\2\2\u0209"+ + "\u020a\7w\2\2\u020a\u020b\7d\2\2\u020b\u020c\7n\2\2\u020c\u020d\7g\2\2"+ + "\u020d\60\3\2\2\2\u020e\u020f\7g\2\2\u020f\u0210\7n\2\2\u0210\u0211\7"+ + "u\2\2\u0211\u0212\7g\2\2\u0212\62\3\2\2\2\u0213\u0214\7g\2\2\u0214\u0215"+ + "\7p\2\2\u0215\u0216\7w\2\2\u0216\u0217\7o\2\2\u0217\64\3\2\2\2\u0218\u0219"+ + "\7g\2\2\u0219\u021a\7z\2\2\u021a\u021b\7v\2\2\u021b\u021c\7g\2\2\u021c"+ + "\u021d\7t\2\2\u021d\u021e\7p\2\2\u021e\66\3\2\2\2\u021f\u0220\7h\2\2\u0220"+ + "\u0221\7n\2\2\u0221\u0222\7q\2\2\u0222\u0223\7c\2\2\u0223\u0224\7v\2\2"+ + "\u02248\3\2\2\2\u0225\u0226\7h\2\2\u0226\u0227\7q\2\2\u0227\u0228\7t\2"+ + "\2\u0228:\3\2\2\2\u0229\u022a\7i\2\2\u022a\u022b\7q\2\2\u022b\u022c\7"+ + "v\2\2\u022c\u022d\7q\2\2\u022d<\3\2\2\2\u022e\u022f\7k\2\2\u022f\u0230"+ + "\7h\2\2\u0230>\3\2\2\2\u0231\u0232\7k\2\2\u0232\u0233\7p\2\2\u0233\u0234"+ + "\7n\2\2\u0234\u0235\7k\2\2\u0235\u0236\7p\2\2\u0236\u0237\7g\2\2\u0237"+ + "@\3\2\2\2\u0238\u0239\7k\2\2\u0239\u023a\7p\2\2\u023a\u023b\7v\2\2\u023b"+ + "B\3\2\2\2\u023c\u023d\7n\2\2\u023d\u023e\7q\2\2\u023e\u023f\7p\2\2\u023f"+ + "\u0240\7i\2\2\u0240D\3\2\2\2\u0241\u0242\7t\2\2\u0242\u0243\7g\2\2\u0243"+ + "\u0244\7i\2\2\u0244\u0245\7k\2\2\u0245\u0246\7u\2\2\u0246\u0247\7v\2\2"+ + "\u0247\u0248\7g\2\2\u0248\u0249\7t\2\2\u0249F\3\2\2\2\u024a\u024b\7t\2"+ + "\2\u024b\u024c\7g\2\2\u024c\u024d\7u\2\2\u024d\u024e\7v\2\2\u024e\u024f"+ + "\7t\2\2\u024f\u0250\7k\2\2\u0250\u0251\7e\2\2\u0251\u0252\7v\2\2\u0252"+ + "H\3\2\2\2\u0253\u0254\7t\2\2\u0254\u0255\7g\2\2\u0255\u0256\7v\2\2\u0256"+ + "\u0257\7w\2\2\u0257\u0258\7t\2\2\u0258\u0259\7p\2\2\u0259J\3\2\2\2\u025a"+ + "\u025b\7u\2\2\u025b\u025c\7j\2\2\u025c\u025d\7q\2\2\u025d\u025e\7t\2\2"+ + "\u025e\u025f\7v\2\2\u025fL\3\2\2\2\u0260\u0261\7u\2\2\u0261\u0262\7k\2"+ + "\2\u0262\u0263\7i\2\2\u0263\u0264\7p\2\2\u0264\u0265\7g\2\2\u0265\u0266"+ + "\7f\2\2\u0266N\3\2\2\2\u0267\u0268\7u\2\2\u0268\u0269\7k\2\2\u0269\u026a"+ + "\7|\2\2\u026a\u026b\7g\2\2\u026b\u026c\7q\2\2\u026c\u026d\7h\2\2\u026d"+ + "P\3\2\2\2\u026e\u026f\7u\2\2\u026f\u0270\7v\2\2\u0270\u0271\7c\2\2\u0271"+ + "\u0272\7v\2\2\u0272\u0273\7k\2\2\u0273\u0274\7e\2\2\u0274R\3\2\2\2\u0275"+ + "\u0276\7u\2\2\u0276\u0277\7v\2\2\u0277\u0278\7t\2\2\u0278\u0279\7w\2\2"+ + "\u0279\u027a\7e\2\2\u027a\u027b\7v\2\2\u027bT\3\2\2\2\u027c\u027d\7u\2"+ + "\2\u027d\u027e\7y\2\2\u027e\u027f\7k\2\2\u027f\u0280\7v\2\2\u0280\u0281"+ + "\7e\2\2\u0281\u0282\7j\2\2\u0282V\3\2\2\2\u0283\u0284\7v\2\2\u0284\u0285"+ + "\7{\2\2\u0285\u0286\7r\2\2\u0286\u0287\7g\2\2\u0287\u0288\7f\2\2\u0288"+ + "\u0289\7g\2\2\u0289\u028a\7h\2\2\u028aX\3\2\2\2\u028b\u028c\7w\2\2\u028c"+ + "\u028d\7p\2\2\u028d\u028e\7k\2\2\u028e\u028f\7q\2\2\u028f\u0290\7p\2\2"+ + "\u0290Z\3\2\2\2\u0291\u0292\7w\2\2\u0292\u0293\7p\2\2\u0293\u0294\7u\2"+ + "\2\u0294\u0295\7k\2\2\u0295\u0296\7i\2\2\u0296\u0297\7p\2\2\u0297\u0298"+ + "\7g\2\2\u0298\u0299\7f\2\2\u0299\\\3\2\2\2\u029a\u029b\7x\2\2\u029b\u029c"+ + "\7q\2\2\u029c\u029d\7k\2\2\u029d\u029e\7f\2\2\u029e^\3\2\2\2\u029f\u02a0"+ + "\7x\2\2\u02a0\u02a1\7q\2\2\u02a1\u02a2\7n\2\2\u02a2\u02a3\7c\2\2\u02a3"+ + "\u02a4\7v\2\2\u02a4\u02a5\7k\2\2\u02a5\u02a6\7n\2\2\u02a6\u02a7\7g\2\2"+ + "\u02a7`\3\2\2\2\u02a8\u02a9\7y\2\2\u02a9\u02aa\7j\2\2\u02aa\u02ab\7k\2"+ + "\2\u02ab\u02ac\7n\2\2\u02ac\u02ad\7g\2\2\u02adb\3\2\2\2\u02ae\u02af\7"+ + "a\2\2\u02af\u02b0\7C\2\2\u02b0\u02b1\7n\2\2\u02b1\u02b2\7k\2\2\u02b2\u02b3"+ + "\7i\2\2\u02b3\u02b4\7p\2\2\u02b4\u02b5\7c\2\2\u02b5\u02b6\7u\2\2\u02b6"+ + "d\3\2\2\2\u02b7\u02b8\7a\2\2\u02b8\u02b9\7C\2\2\u02b9\u02ba\7n\2\2\u02ba"+ + "\u02bb\7k\2\2\u02bb\u02bc\7i\2\2\u02bc\u02bd\7p\2\2\u02bd\u02be\7q\2\2"+ + "\u02be\u02bf\7h\2\2\u02bff\3\2\2\2\u02c0\u02c1\7a\2\2\u02c1\u02c2\7C\2"+ + "\2\u02c2\u02c3\7v\2\2\u02c3\u02c4\7q\2\2\u02c4\u02c5\7o\2\2\u02c5\u02c6"+ + "\7k\2\2\u02c6\u02c7\7e\2\2\u02c7h\3\2\2\2\u02c8\u02c9\7a\2\2\u02c9\u02ca"+ + "\7D\2\2\u02ca\u02cb\7q\2\2\u02cb\u02cc\7q\2\2\u02cc\u02cd\7n\2\2\u02cd"+ + "j\3\2\2\2\u02ce\u02cf\7a\2\2\u02cf\u02d0\7E\2\2\u02d0\u02d1\7q\2\2\u02d1"+ + "\u02d2\7o\2\2\u02d2\u02d3\7r\2\2\u02d3\u02d4\7n\2\2\u02d4\u02d5\7g\2\2"+ + "\u02d5\u02d6\7z\2\2\u02d6l\3\2\2\2\u02d7\u02d8\7a\2\2\u02d8\u02d9\7I\2"+ + "\2\u02d9\u02da\7g\2\2\u02da\u02db\7p\2\2\u02db\u02dc\7g\2\2\u02dc\u02dd"+ + "\7t\2\2\u02dd\u02de\7k\2\2\u02de\u02df\7e\2\2\u02dfn\3\2\2\2\u02e0\u02e1"+ + "\7a\2\2\u02e1\u02e2\7K\2\2\u02e2\u02e3\7o\2\2\u02e3\u02e4\7c\2\2\u02e4"+ + "\u02e5\7i\2\2\u02e5\u02e6\7k\2\2\u02e6\u02e7\7p\2\2\u02e7\u02e8\7c\2\2"+ + "\u02e8\u02e9\7t\2\2\u02e9\u02ea\7{\2\2\u02eap\3\2\2\2\u02eb\u02ec\7a\2"+ + "\2\u02ec\u02ed\7P\2\2\u02ed\u02ee\7q\2\2\u02ee\u02ef\7t\2\2\u02ef\u02f0"+ + "\7g\2\2\u02f0\u02f1\7v\2\2\u02f1\u02f2\7w\2\2\u02f2\u02f3\7t\2\2\u02f3"+ + "\u02f4\7p\2\2\u02f4r\3\2\2\2\u02f5\u02f6\7a\2\2\u02f6\u02f7\7U\2\2\u02f7"+ + "\u02f8\7v\2\2\u02f8\u02f9\7c\2\2\u02f9\u02fa\7v\2\2\u02fa\u02fb\7k\2\2"+ + "\u02fb\u02fc\7e\2\2\u02fc\u02fd\7a\2\2\u02fd\u02fe\7c\2\2\u02fe\u02ff"+ + "\7u\2\2\u02ff\u0300\7u\2\2\u0300\u0301\7g\2\2\u0301\u0302\7t\2\2\u0302"+ + "\u0303\7v\2\2\u0303t\3\2\2\2\u0304\u0305\7a\2\2\u0305\u0306\7V\2\2\u0306"+ + "\u0307\7j\2\2\u0307\u0308\7t\2\2\u0308\u0309\7g\2\2\u0309\u030a\7c\2\2"+ + "\u030a\u030b\7f\2\2\u030b\u030c\7a\2\2\u030c\u030d\7n\2\2\u030d\u030e"+ + "\7q\2\2\u030e\u030f\7e\2\2\u030f\u0310\7c\2\2\u0310\u0311\7n\2\2\u0311"+ + "v\3\2\2\2\u0312\u0313\7*\2\2\u0313x\3\2\2\2\u0314\u0315\7+\2\2\u0315z"+ + "\3\2\2\2\u0316\u0317\7]\2\2\u0317|\3\2\2\2\u0318\u0319\7_\2\2\u0319~\3"+ + "\2\2\2\u031a\u031b\7}\2\2\u031b\u0080\3\2\2\2\u031c\u031d\7\177\2\2\u031d"+ + "\u0082\3\2\2\2\u031e\u031f\7>\2\2\u031f\u0084\3\2\2\2\u0320\u0321\7>\2"+ + "\2\u0321\u0322\7?\2\2\u0322\u0086\3\2\2\2\u0323\u0324\7@\2\2\u0324\u0088"+ + "\3\2\2\2\u0325\u0326\7@\2\2\u0326\u0327\7?\2\2\u0327\u008a\3\2\2\2\u0328"+ + "\u0329\7>\2\2\u0329\u032a\7>\2\2\u032a\u008c\3\2\2\2\u032b\u032c\7@\2"+ + "\2\u032c\u032d\7@\2\2\u032d\u008e\3\2\2\2\u032e\u032f\7-\2\2\u032f\u0090"+ + "\3\2\2\2\u0330\u0331\7-\2\2\u0331\u0332\7-\2\2\u0332\u0092\3\2\2\2\u0333"+ + "\u0334\7/\2\2\u0334\u0094\3\2\2\2\u0335\u0336\7/\2\2\u0336\u0337\7/\2"+ + "\2\u0337\u0096\3\2\2\2\u0338\u0339\7,\2\2\u0339\u0098\3\2\2\2\u033a\u033b"+ + "\7\61\2\2\u033b\u009a\3\2\2\2\u033c\u033d\7\'\2\2\u033d\u009c\3\2\2\2"+ + "\u033e\u033f\7(\2\2\u033f\u009e\3\2\2\2\u0340\u0341\7~\2\2\u0341\u00a0"+ + "\3\2\2\2\u0342\u0343\7(\2\2\u0343\u0344\7(\2\2\u0344\u00a2\3\2\2\2\u0345"+ + "\u0346\7~\2\2\u0346\u0347\7~\2\2\u0347\u00a4\3\2\2\2\u0348\u0349\7`\2"+ + "\2\u0349\u00a6\3\2\2\2\u034a\u034b\7#\2\2\u034b\u00a8\3\2\2\2\u034c\u034d"+ + "\7\u0080\2\2\u034d\u00aa\3\2\2\2\u034e\u034f\7A\2\2\u034f\u00ac\3\2\2"+ + "\2\u0350\u0351\7<\2\2\u0351\u00ae\3\2\2\2\u0352\u0353\7=\2\2\u0353\u00b0"+ + "\3\2\2\2\u0354\u0355\7.\2\2\u0355\u00b2\3\2\2\2\u0356\u0357\7?\2\2\u0357"+ + "\u00b4\3\2\2\2\u0358\u0359\7,\2\2\u0359\u035a\7?\2\2\u035a\u00b6\3\2\2"+ + "\2\u035b\u035c\7\61\2\2\u035c\u035d\7?\2\2\u035d\u00b8\3\2\2\2\u035e\u035f"+ + "\7\'\2\2\u035f\u0360\7?\2\2\u0360\u00ba\3\2\2\2\u0361\u0362\7-\2\2\u0362"+ + "\u0363\7?\2\2\u0363\u00bc\3\2\2\2\u0364\u0365\7/\2\2\u0365\u0366\7?\2"+ + "\2\u0366\u00be\3\2\2\2\u0367\u0368\7>\2\2\u0368\u0369\7>\2\2\u0369\u036a"+ + "\7?\2\2\u036a\u00c0\3\2\2\2\u036b\u036c\7@\2\2\u036c\u036d\7@\2\2\u036d"+ + "\u036e\7?\2\2\u036e\u00c2\3\2\2\2\u036f\u0370\7(\2\2\u0370\u0371\7?\2"+ + "\2\u0371\u00c4\3\2\2\2\u0372\u0373\7`\2\2\u0373\u0374\7?\2\2\u0374\u00c6"+ + "\3\2\2\2\u0375\u0376\7~\2\2\u0376\u0377\7?\2\2\u0377\u00c8\3\2\2\2\u0378"+ + "\u0379\7?\2\2\u0379\u037a\7?\2\2\u037a\u00ca\3\2\2\2\u037b\u037c\7#\2"+ + "\2\u037c\u037d\7?\2\2\u037d\u00cc\3\2\2\2\u037e\u037f\7/\2\2\u037f\u0380"+ + "\7@\2\2\u0380\u00ce\3\2\2\2\u0381\u0382\7\60\2\2\u0382\u00d0\3\2\2\2\u0383"+ + "\u0384\7\60\2\2\u0384\u0385\7\60\2\2\u0385\u0386\7\60\2\2\u0386\u00d2"+ + "\3\2\2\2\u0387\u038c\5\u00d5k\2\u0388\u038b\5\u00d5k\2\u0389\u038b\5\u00d9"+ + "m\2\u038a\u0388\3\2\2\2\u038a\u0389\3\2\2\2\u038b\u038e\3\2\2\2\u038c"+ + "\u038a\3\2\2\2\u038c\u038d\3\2\2\2\u038d\u00d4\3\2\2\2\u038e\u038c\3\2"+ + "\2\2\u038f\u0392\5\u00d7l\2\u0390\u0392\5\u00dbn\2\u0391\u038f\3\2\2\2"+ + "\u0391\u0390\3\2\2\2\u0392\u00d6\3\2\2\2\u0393\u0394\t\2\2\2\u0394\u00d8"+ + "\3\2\2\2\u0395\u0396\t\3\2\2\u0396\u00da\3\2\2\2\u0397\u0398\7^\2\2\u0398"+ + "\u0399\7w\2\2\u0399\u039a\3\2\2\2\u039a\u03a2\5\u00ddo\2\u039b\u039c\7"+ + "^\2\2\u039c\u039d\7W\2\2\u039d\u039e\3\2\2\2\u039e\u039f\5\u00ddo\2\u039f"+ + "\u03a0\5\u00ddo\2\u03a0\u03a2\3\2\2\2\u03a1\u0397\3\2\2\2\u03a1\u039b"+ + "\3\2\2\2\u03a2\u00dc\3\2\2\2\u03a3\u03a4\5\u00f1y\2\u03a4\u03a5\5\u00f1"+ + "y\2\u03a5\u03a6\5\u00f1y\2\u03a6\u03a7\5\u00f1y\2\u03a7\u00de\3\2\2\2"+ + "\u03a8\u03ac\5\u00e1q\2\u03a9\u03ac\5\u00fb~\2\u03aa\u03ac\5\u0111\u0089"+ + "\2\u03ab\u03a8\3\2\2\2\u03ab\u03a9\3\2\2\2\u03ab\u03aa\3\2\2\2\u03ac\u00e0"+ + "\3\2\2\2\u03ad\u03af\5\u00e5s\2\u03ae\u03b0\5\u00f3z\2\u03af\u03ae\3\2"+ + "\2\2\u03af\u03b0\3\2\2\2\u03b0\u03bb\3\2\2\2\u03b1\u03b3\5\u00e7t\2\u03b2"+ + "\u03b4\5\u00f3z\2\u03b3\u03b2\3\2\2\2\u03b3\u03b4\3\2\2\2\u03b4\u03bb"+ + "\3\2\2\2\u03b5\u03b7\5\u00e9u\2\u03b6\u03b8\5\u00f3z\2\u03b7\u03b6\3\2"+ + "\2\2\u03b7\u03b8\3\2\2\2\u03b8\u03bb\3\2\2\2\u03b9\u03bb\5\u00e3r\2\u03ba"+ + "\u03ad\3\2\2\2\u03ba\u03b1\3\2\2\2\u03ba\u03b5\3\2\2\2\u03ba\u03b9\3\2"+ + "\2\2\u03bb\u00e2\3\2\2\2\u03bc\u03bd\7\62\2\2\u03bd\u03bf\t\4\2\2\u03be"+ + "\u03c0\t\5\2\2\u03bf\u03be\3\2\2\2\u03c0\u03c1\3\2\2\2\u03c1\u03bf\3\2"+ + "\2\2\u03c1\u03c2\3\2\2\2\u03c2\u00e4\3\2\2\2\u03c3\u03c7\5\u00edw\2\u03c4"+ + "\u03c6\5\u00d9m\2\u03c5\u03c4\3\2\2\2\u03c6\u03c9\3\2\2\2\u03c7\u03c5"+ + "\3\2\2\2\u03c7\u03c8\3\2\2\2\u03c8\u00e6\3\2\2\2\u03c9\u03c7\3\2\2\2\u03ca"+ + "\u03ce\7\62\2\2\u03cb\u03cd\5\u00efx\2\u03cc\u03cb\3\2\2\2\u03cd\u03d0"+ + "\3\2\2\2\u03ce\u03cc\3\2\2\2\u03ce\u03cf\3\2\2\2\u03cf\u00e8\3\2\2\2\u03d0"+ + "\u03ce\3\2\2\2\u03d1\u03d3\5\u00ebv\2\u03d2\u03d4\5\u00f1y\2\u03d3\u03d2"+ + "\3\2\2\2\u03d4\u03d5\3\2\2\2\u03d5\u03d3\3\2\2\2\u03d5\u03d6\3\2\2\2\u03d6"+ + "\u00ea\3\2\2\2\u03d7\u03d8\7\62\2\2\u03d8\u03d9\t\6\2\2\u03d9\u00ec\3"+ + "\2\2\2\u03da\u03db\t\7\2\2\u03db\u00ee\3\2\2\2\u03dc\u03dd\t\b\2\2\u03dd"+ + "\u00f0\3\2\2\2\u03de\u03df\t\t\2\2\u03df\u00f2\3\2\2\2\u03e0\u03e2\5\u00f5"+ + "{\2\u03e1\u03e3\5\u00f7|\2\u03e2\u03e1\3\2\2\2\u03e2\u03e3\3\2\2\2\u03e3"+ + "\u03f0\3\2\2\2\u03e4\u03e5\5\u00f5{\2\u03e5\u03e6\5\u00f9}\2\u03e6\u03f0"+ + "\3\2\2\2\u03e7\u03e9\5\u00f7|\2\u03e8\u03ea\5\u00f5{\2\u03e9\u03e8\3\2"+ + "\2\2\u03e9\u03ea\3\2\2\2\u03ea\u03f0\3\2\2\2\u03eb\u03ed\5\u00f9}\2\u03ec"+ + "\u03ee\5\u00f5{\2\u03ed\u03ec\3\2\2\2\u03ed\u03ee\3\2\2\2\u03ee\u03f0"+ + "\3\2\2\2\u03ef\u03e0\3\2\2\2\u03ef\u03e4\3\2\2\2\u03ef\u03e7\3\2\2\2\u03ef"+ + "\u03eb\3\2\2\2\u03f0\u00f4\3\2\2\2\u03f1\u03f2\t\n\2\2\u03f2\u00f6\3\2"+ + "\2\2\u03f3\u03f4\t\13\2\2\u03f4\u00f8\3\2\2\2\u03f5\u03f6\7n\2\2\u03f6"+ + "\u03fa\7n\2\2\u03f7\u03f8\7N\2\2\u03f8\u03fa\7N\2\2\u03f9\u03f5\3\2\2"+ + "\2\u03f9\u03f7\3\2\2\2\u03fa\u00fa\3\2\2\2\u03fb\u03fe\5\u00fd\177\2\u03fc"+ + "\u03fe\5\u00ff\u0080\2\u03fd\u03fb\3\2\2\2\u03fd\u03fc\3\2\2\2\u03fe\u00fc"+ + "\3\2\2\2\u03ff\u0401\5\u0101\u0081\2\u0400\u0402\5\u0103\u0082\2\u0401"+ + "\u0400\3\2\2\2\u0401\u0402\3\2\2\2\u0402\u0404\3\2\2\2\u0403\u0405\5\u010f"+ + "\u0088\2\u0404\u0403\3\2\2\2\u0404\u0405\3\2\2\2\u0405\u040c\3\2\2\2\u0406"+ + "\u0407\5\u0107\u0084\2\u0407\u0409\5\u0103\u0082\2\u0408\u040a\5\u010f"+ + "\u0088\2\u0409\u0408\3\2\2\2\u0409\u040a\3\2\2\2\u040a\u040c\3\2\2\2\u040b"+ + "\u03ff\3\2\2\2\u040b\u0406\3\2\2\2\u040c\u00fe\3\2\2\2\u040d\u040e\5\u00eb"+ + "v\2\u040e\u040f\5\u0109\u0085\2\u040f\u0411\5\u010b\u0086\2\u0410\u0412"+ + "\5\u010f\u0088\2\u0411\u0410\3\2\2\2\u0411\u0412\3\2\2\2\u0412\u041a\3"+ + "\2\2\2\u0413\u0414\5\u00ebv\2\u0414\u0415\5\u010d\u0087\2\u0415\u0417"+ + "\5\u010b\u0086\2\u0416\u0418\5\u010f\u0088\2\u0417\u0416\3\2\2\2\u0417"+ + "\u0418\3\2\2\2\u0418\u041a\3\2\2\2\u0419\u040d\3\2\2\2\u0419\u0413\3\2"+ + "\2\2\u041a\u0100\3\2\2\2\u041b\u041d\5\u0107\u0084\2\u041c\u041b\3\2\2"+ + "\2\u041c\u041d\3\2\2\2\u041d\u041e\3\2\2\2\u041e\u041f\7\60\2\2\u041f"+ + "\u0424\5\u0107\u0084\2\u0420\u0421\5\u0107\u0084\2\u0421\u0422\7\60\2"+ + "\2\u0422\u0424\3\2\2\2\u0423\u041c\3\2\2\2\u0423\u0420\3\2\2\2\u0424\u0102"+ + "\3\2\2\2\u0425\u0427\7g\2\2\u0426\u0428\5\u0105\u0083\2\u0427\u0426\3"+ + "\2\2\2\u0427\u0428\3\2\2\2\u0428\u0429\3\2\2\2\u0429\u0430\5\u0107\u0084"+ + "\2\u042a\u042c\7G\2\2\u042b\u042d\5\u0105\u0083\2\u042c\u042b\3\2\2\2"+ + "\u042c\u042d\3\2\2\2\u042d\u042e\3\2\2\2\u042e\u0430\5\u0107\u0084\2\u042f"+ + "\u0425\3\2\2\2\u042f\u042a\3\2\2\2\u0430\u0104\3\2\2\2\u0431\u0432\t\f"+ + "\2\2\u0432\u0106\3\2\2\2\u0433\u0435\5\u00d9m\2\u0434\u0433\3\2\2\2\u0435"+ + "\u0436\3\2\2\2\u0436\u0434\3\2\2\2\u0436\u0437\3\2\2\2\u0437\u0108\3\2"+ + "\2\2\u0438\u043a\5\u010d\u0087\2\u0439\u0438\3\2\2\2\u0439\u043a\3\2\2"+ + "\2\u043a\u043b\3\2\2\2\u043b\u043c\7\60\2\2\u043c\u0441\5\u010d\u0087"+ + "\2\u043d\u043e\5\u010d\u0087\2\u043e\u043f\7\60\2\2\u043f\u0441\3\2\2"+ + "\2\u0440\u0439\3\2\2\2\u0440\u043d\3\2\2\2\u0441\u010a\3\2\2\2\u0442\u0444"+ + "\7r\2\2\u0443\u0445\5\u0105\u0083\2\u0444\u0443\3\2\2\2\u0444\u0445\3"+ + "\2\2\2\u0445\u0446\3\2\2\2\u0446\u044d\5\u0107\u0084\2\u0447\u0449\7R"+ + "\2\2\u0448\u044a\5\u0105\u0083\2\u0449\u0448\3\2\2\2\u0449\u044a\3\2\2"+ + "\2\u044a\u044b\3\2\2\2\u044b\u044d\5\u0107\u0084\2\u044c\u0442\3\2\2\2"+ + "\u044c\u0447\3\2\2\2\u044d\u010c\3\2\2\2\u044e\u0450\5\u00f1y\2\u044f"+ + "\u044e\3\2\2\2\u0450\u0451\3\2\2\2\u0451\u044f\3\2\2\2\u0451\u0452\3\2"+ + "\2\2\u0452\u010e\3\2\2\2\u0453\u0454\t\r\2\2\u0454\u0110\3\2\2\2\u0455"+ + "\u0456\7)\2\2\u0456\u0457\5\u0113\u008a\2\u0457\u0458\7)\2\2\u0458\u046c"+ + "\3\2\2\2\u0459\u045a\7N\2\2\u045a\u045b\7)\2\2\u045b\u045c\3\2\2\2\u045c"+ + "\u045d\5\u0113\u008a\2\u045d\u045e\7)\2\2\u045e\u046c\3\2\2\2\u045f\u0460"+ + "\7w\2\2\u0460\u0461\7)\2\2\u0461\u0462\3\2\2\2\u0462\u0463\5\u0113\u008a"+ + "\2\u0463\u0464\7)\2\2\u0464\u046c\3\2\2\2\u0465\u0466\7W\2\2\u0466\u0467"+ + "\7)\2\2\u0467\u0468\3\2\2\2\u0468\u0469\5\u0113\u008a\2\u0469\u046a\7"+ + ")\2\2\u046a\u046c\3\2\2\2\u046b\u0455\3\2\2\2\u046b\u0459\3\2\2\2\u046b"+ + "\u045f\3\2\2\2\u046b\u0465\3\2\2\2\u046c\u0112\3\2\2\2\u046d\u046f\5\u0115"+ + "\u008b\2\u046e\u046d\3\2\2\2\u046f\u0470\3\2\2\2\u0470\u046e\3\2\2\2\u0470"+ + "\u0471\3\2\2\2\u0471\u0114\3\2\2\2\u0472\u0475\n\16\2\2\u0473\u0475\5"+ + "\u0117\u008c\2\u0474\u0472\3\2\2\2\u0474\u0473\3\2\2\2\u0475\u0116\3\2"+ + "\2\2\u0476\u047b\5\u0119\u008d\2\u0477\u047b\5\u011b\u008e\2\u0478\u047b"+ + "\5\u011d\u008f\2\u0479\u047b\5\u00dbn\2\u047a\u0476\3\2\2\2\u047a\u0477"+ + "\3\2\2\2\u047a\u0478\3\2\2\2\u047a\u0479\3\2\2\2\u047b\u0118\3\2\2\2\u047c"+ + "\u047d\7^\2\2\u047d\u047e\t\17\2\2\u047e\u011a\3\2\2\2\u047f\u0480\7^"+ + "\2\2\u0480\u048b\5\u00efx\2\u0481\u0482\7^\2\2\u0482\u0483\5\u00efx\2"+ + "\u0483\u0484\5\u00efx\2\u0484\u048b\3\2\2\2\u0485\u0486\7^\2\2\u0486\u0487"+ + "\5\u00efx\2\u0487\u0488\5\u00efx\2\u0488\u0489\5\u00efx\2\u0489\u048b"+ + "\3\2\2\2\u048a\u047f\3\2\2\2\u048a\u0481\3\2\2\2\u048a\u0485\3\2\2\2\u048b"+ + "\u011c\3\2\2\2\u048c\u048d\7^\2\2\u048d\u048e\7z\2\2\u048e\u0490\3\2\2"+ + "\2\u048f\u0491\5\u00f1y\2\u0490\u048f\3\2\2\2\u0491\u0492\3\2\2\2\u0492"+ + "\u0490\3\2\2\2\u0492\u0493\3\2\2\2\u0493\u011e\3\2\2\2\u0494\u0496\5\u0121"+ + "\u0091\2\u0495\u0494\3\2\2\2\u0495\u0496\3\2\2\2\u0496\u0497\3\2\2\2\u0497"+ + "\u0499\7$\2\2\u0498\u049a\5\u0123\u0092\2\u0499\u0498\3\2\2\2\u0499\u049a"+ + "\3\2\2\2\u049a\u049b\3\2\2\2\u049b\u049c\7$\2\2\u049c\u0120\3\2\2\2\u049d"+ + "\u049e\7w\2\2\u049e\u04a1\7:\2\2\u049f\u04a1\t\20\2\2\u04a0\u049d\3\2"+ + "\2\2\u04a0\u049f\3\2\2\2\u04a1\u0122\3\2\2\2\u04a2\u04a4\5\u0125\u0093"+ + "\2\u04a3\u04a2\3\2\2\2\u04a4\u04a5\3\2\2\2\u04a5\u04a3\3\2\2\2\u04a5\u04a6"+ + "\3\2\2\2\u04a6\u0124\3\2\2\2\u04a7\u04af\n\21\2\2\u04a8\u04af\5\u0117"+ + "\u008c\2\u04a9\u04aa\7^\2\2\u04aa\u04af\7\f\2\2\u04ab\u04ac\7^\2\2\u04ac"+ + "\u04ad\7\17\2\2\u04ad\u04af\7\f\2\2\u04ae\u04a7\3\2\2\2\u04ae\u04a8\3"+ + "\2\2\2\u04ae\u04a9\3\2\2\2\u04ae\u04ab\3\2\2\2\u04af\u0126\3\2\2\2\u04b0"+ + "\u04b2\7%\2\2\u04b1\u04b3\5\u0131\u0099\2\u04b2\u04b1\3\2\2\2\u04b2\u04b3"+ + "\3\2\2\2\u04b3\u04b4\3\2\2\2\u04b4\u04b5\7f\2\2\u04b5\u04b6\7g\2\2\u04b6"+ + "\u04b7\7h\2\2\u04b7\u04b8\7k\2\2\u04b8\u04b9\7p\2\2\u04b9\u04ba\7g\2\2"+ + "\u04ba\u04be\3\2\2\2\u04bb\u04bd\n\22\2\2\u04bc\u04bb\3\2\2\2\u04bd\u04c0"+ + "\3\2\2\2\u04be\u04bc\3\2\2\2\u04be\u04bf\3\2\2\2\u04bf\u04c1\3\2\2\2\u04c0"+ + "\u04be\3\2\2\2\u04c1\u04c2\b\u0094\2\2\u04c2\u0128\3\2\2\2\u04c3\u04c4"+ + "\7c\2\2\u04c4\u04c5\7u\2\2\u04c5\u04c6\7o\2\2\u04c6\u04ca\3\2\2\2\u04c7"+ + "\u04c9\n\23\2\2\u04c8\u04c7\3\2\2\2\u04c9\u04cc\3\2\2\2\u04ca\u04c8\3"+ + "\2\2\2\u04ca\u04cb\3\2\2\2\u04cb\u04cd\3\2\2\2\u04cc\u04ca\3\2\2\2\u04cd"+ + "\u04d1\7}\2\2\u04ce\u04d0\n\24\2\2\u04cf\u04ce\3\2\2\2\u04d0\u04d3\3\2"+ + "\2\2\u04d1\u04cf\3\2\2\2\u04d1\u04d2\3\2\2\2\u04d2\u04d4\3\2\2\2\u04d3"+ + "\u04d1\3\2\2\2\u04d4\u04d5\7\177\2\2\u04d5\u04d6\3\2\2\2\u04d6\u04d7\b"+ + "\u0095\2\2\u04d7\u012a\3\2\2\2\u04d8\u04d9\7%\2\2\u04d9\u04da\7n\2\2\u04da"+ + "\u04db\7k\2\2\u04db\u04dc\7p\2\2\u04dc\u04dd\7g\2\2\u04dd\u04e1\3\2\2"+ + "\2\u04de\u04e0\5\u0131\u0099\2\u04df\u04de\3\2\2\2\u04e0\u04e3\3\2\2\2"+ + "\u04e1\u04df\3\2\2\2\u04e1\u04e2\3\2\2\2\u04e2\u04e7\3\2\2\2\u04e3\u04e1"+ + "\3\2\2\2\u04e4\u04e6\n\25\2\2\u04e5\u04e4\3\2\2\2\u04e6\u04e9\3\2\2\2"+ + "\u04e7\u04e5\3\2\2\2\u04e7\u04e8\3\2\2\2\u04e8\u04ea\3\2\2\2\u04e9\u04e7"+ + "\3\2\2\2\u04ea\u04eb\b\u0096\2\2\u04eb\u012c\3\2\2\2\u04ec\u04ee\7%\2"+ + "\2\u04ed\u04ef\5\u0131\u0099\2\u04ee\u04ed\3\2\2\2\u04ee\u04ef\3\2\2\2"+ + "\u04ef\u04f0\3\2\2\2\u04f0\u04f2\5\u00e5s\2\u04f1\u04f3\5\u0131\u0099"+ + "\2\u04f2\u04f1\3\2\2\2\u04f2\u04f3\3\2\2\2\u04f3\u04f4\3\2\2\2\u04f4\u04f8"+ + "\5\u011f\u0090\2\u04f5\u04f7\n\25\2\2\u04f6\u04f5\3\2\2\2\u04f7\u04fa"+ + "\3\2\2\2\u04f8\u04f6\3\2\2\2\u04f8\u04f9\3\2\2\2\u04f9\u04fb\3\2\2\2\u04fa"+ + "\u04f8\3\2\2\2\u04fb\u04fc\b\u0097\2\2\u04fc\u012e\3\2\2\2\u04fd\u04ff"+ + "\7%\2\2\u04fe\u0500\5\u0131\u0099\2\u04ff\u04fe\3\2\2\2\u04ff\u0500\3"+ + "\2\2\2\u0500\u0501\3\2\2\2\u0501\u0502\7r\2\2\u0502\u0503\7t\2\2\u0503"+ + "\u0504\7c\2\2\u0504\u0505\7i\2\2\u0505\u0506\7o\2\2\u0506\u0507\7c\2\2"+ + "\u0507\u0508\3\2\2\2\u0508\u050c\5\u0131\u0099\2\u0509\u050b\n\25\2\2"+ + "\u050a\u0509\3\2\2\2\u050b\u050e\3\2\2\2\u050c\u050a\3\2\2\2\u050c\u050d"+ + "\3\2\2\2\u050d\u050f\3\2\2\2\u050e\u050c\3\2\2\2\u050f\u0510\b\u0098\2"+ + "\2\u0510\u0130\3\2\2\2\u0511\u0513\t\26\2\2\u0512\u0511\3\2\2\2\u0513"+ + "\u0514\3\2\2\2\u0514\u0512\3\2\2\2\u0514\u0515\3\2\2\2\u0515\u0516\3\2"+ + "\2\2\u0516\u0517\b\u0099\2\2\u0517\u0132\3\2\2\2\u0518\u051a\7\17\2\2"+ + "\u0519\u051b\7\f\2\2\u051a\u0519\3\2\2\2\u051a\u051b\3\2\2\2\u051b\u051e"+ + "\3\2\2\2\u051c\u051e\7\f\2\2\u051d\u0518\3\2\2\2\u051d\u051c\3\2\2\2\u051e"+ + "\u051f\3\2\2\2\u051f\u0520\b\u009a\2\2\u0520\u0134\3\2\2\2\u0521\u0522"+ + "\7\61\2\2\u0522\u0523\7,\2\2\u0523\u0527\3\2\2\2\u0524\u0526\13\2\2\2"+ + "\u0525\u0524\3\2\2\2\u0526\u0529\3\2\2\2\u0527\u0528\3\2\2\2\u0527\u0525"+ + "\3\2\2\2\u0528\u052a\3\2\2\2\u0529\u0527\3\2\2\2\u052a\u052b\7,\2\2\u052b"+ + "\u052c\7\61\2\2\u052c\u052d\3\2\2\2\u052d\u052e\b\u009b\2\2\u052e\u0136"+ + "\3\2\2\2\u052f\u0530\7\61\2\2\u0530\u0531\7\61\2\2\u0531\u0535\3\2\2\2"+ + "\u0532\u0534\n\25\2\2\u0533\u0532\3\2\2\2\u0534\u0537\3\2\2\2\u0535\u0533"+ + "\3\2\2\2\u0535\u0536\3\2\2\2\u0536\u0538\3\2\2\2\u0537\u0535\3\2\2\2\u0538"+ + "\u0539\b\u009c\2\2\u0539\u0138\3\2\2\2\u053a\u053e\7%\2\2\u053b\u053d"+ + "\n\25\2\2\u053c\u053b\3\2\2\2\u053d\u0540\3\2\2\2\u053e\u053c\3\2\2\2"+ + "\u053e\u053f\3\2\2\2\u053f\u0541\3\2\2\2\u0540\u053e\3\2\2\2\u0541\u0542"+ + "\b\u009d\2\2\u0542\u013a\3\2\2\2E\2\u038a\u038c\u0391\u03a1\u03ab\u03af"+ + "\u03b3\u03b7\u03ba\u03c1\u03c7\u03ce\u03d5\u03e2\u03e9\u03ed\u03ef\u03f9"+ + "\u03fd\u0401\u0404\u0409\u040b\u0411\u0417\u0419\u041c\u0423\u0427\u042c"+ + "\u042f\u0436\u0439\u0440\u0444\u0449\u044c\u0451\u046b\u0470\u0474\u047a"+ + "\u048a\u0492\u0495\u0499\u04a0\u04a5\u04ae\u04b2\u04be\u04ca\u04d1\u04e1"+ + "\u04e7\u04ee\u04f2\u04f8\u04ff\u050c\u0514\u051a\u051d\u0527\u0535\u053e"+ + "\3\b\2\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CLexer.tokens b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CLexer.tokens new file mode 100644 index 0000000..87a50d6 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CLexer.tokens @@ -0,0 +1,221 @@ +Enum=25 +AndAssign=97 +Or=79 +Break=16 +LeftShift=69 +GreaterEqual=68 +Bool=52 +ThreadLocal=58 +LeftBracket=61 +RightBrace=64 +Equal=100 +Directives=117 +Restrict=35 +Sizeof=39 +StarAssign=90 +Arrow=102 +NotEqual=101 +LessEqual=66 +Dot=103 +RightParen=60 +XorAssign=98 +Float=27 +Switch=42 +Typedef=43 +StringLiteral=107 +If=30 +Minus=73 +MinusAssign=94 +LeftParen=59 +Newline=114 +Union=44 +Case=17 +Extern=26 +Complex=53 +RightShiftAssign=96 +Comma=88 +Star=75 +Char=18 +ComplexDefine=108 +T__3=11 +T__2=12 +T__1=13 +Question=85 +T__0=14 +OrOr=81 +LineAfterPreprocessing=110 +Inline=31 +Default=21 +Alignas=49 +Div=76 +RightBracket=62 +Register=34 +Else=24 +Assign=89 +AndAnd=80 +LineDirective=111 +LineComment=116 +RightShift=70 +LeftShiftAssign=95 +Identifier=105 +T__11=3 +T__12=2 +T__13=1 +Void=46 +Plus=71 +AsmBlock=109 +StaticAssert=57 +Less=65 +Short=37 +T__10=4 +BlockComment=115 +T__9=5 +Goto=29 +T__8=6 +T__7=7 +T__6=8 +T__5=9 +Signed=38 +T__4=10 +Const=19 +Imaginary=55 +For=28 +Semi=87 +OrAssign=99 +Do=22 +Double=23 +Not=83 +And=78 +Long=33 +Static=40 +Caret=82 +Alignof=50 +Generic=54 +Constant=106 +Atomic=51 +Continue=20 +Int=32 +MinusMinus=74 +Whitespace=113 +Struct=41 +Auto=15 +PlusPlus=72 +PlusAssign=93 +Colon=86 +DivAssign=91 +LeftBrace=63 +Return=36 +Mod=77 +Ellipsis=104 +Tilde=84 +PragmaDirective=112 +While=48 +Noreturn=56 +Volatile=47 +ModAssign=92 +Unsigned=45 +Greater=67 +'-'=73 +'typedef'=43 +'else'=24 +'_Static_assert'=57 +'%'=77 +'__builtin_offsetof'=14 +'>'=67 +'--'=74 +'=='=100 +'_Complex'=53 +'...'=104 +'case'=17 +'->'=102 +'.'=103 +'_Thread_local'=58 +'__m128'=13 +'&'=78 +'__inline__'=12 +'double'=23 +'break'=16 +'short'=37 +'<='=66 +'enum'=25 +'?'=85 +'__attribute__'=11 +'if'=30 +'_Generic'=54 +'goto'=29 +'<<'=69 +'inline'=31 +'||'=81 +'return'=36 +'__m128i'=10 +'_Imaginary'=55 +'unsigned'=45 +'continue'=20 +'/'=76 +'_Bool'=52 +'__m128d'=9 +'signed'=38 +'__asm'=8 +'register'=34 +'sizeof'=39 +'static'=40 +'__typeof__'=7 +'++'=72 +'__builtin_va_arg'=6 +'const'=19 +'volatile'=47 +'/='=91 +'__declspec'=5 +'do'=22 +'('=59 +'|='=99 +'for'=28 +'void'=46 +'{'=63 +'float'=27 +'+='=93 +')'=60 +'__asm__'=4 +'auto'=15 +'!'=83 +'|'=79 +'['=61 +':'=86 +'_Atomic'=51 +'*'=75 +'switch'=42 +'_Alignas'=49 +'_Alignof'=50 +'__stdcall'=3 +'}'=64 +';'=87 +'>>='=96 +'&='=97 +'*='=90 +'struct'=41 +'+'=71 +'~'=84 +']'=62 +'<'=65 +'_Noreturn'=56 +'>='=68 +'long'=33 +','=88 +'-='=94 +'union'=44 +'int'=32 +'__volatile__'=2 +'^'=82 +'<<='=95 +'='=89 +'restrict'=35 +'>>'=70 +'&&'=80 +'^='=98 +'while'=48 +'!='=101 +'__extension__'=1 +'char'=18 +'%='=92 +'extern'=26 +'default'=21 diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CListener.java b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CListener.java new file mode 100644 index 0000000..0c34a7a --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CListener.java @@ -0,0 +1,852 @@ +// Generated from C.g4 by ANTLR 4.4 +package it.unitn.repoman.core.lang.parsers.c; + +import org.antlr.v4.runtime.misc.NotNull; +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link CParser}. + */ +public interface CListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link CParser#structDeclarationList}. + * @param ctx the parse tree + */ + void enterStructDeclarationList(@NotNull CParser.StructDeclarationListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#structDeclarationList}. + * @param ctx the parse tree + */ + void exitStructDeclarationList(@NotNull CParser.StructDeclarationListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#unaryOperator}. + * @param ctx the parse tree + */ + void enterUnaryOperator(@NotNull CParser.UnaryOperatorContext ctx); + /** + * Exit a parse tree produced by {@link CParser#unaryOperator}. + * @param ctx the parse tree + */ + void exitUnaryOperator(@NotNull CParser.UnaryOperatorContext ctx); + /** + * Enter a parse tree produced by {@link CParser#structOrUnionSpecifier}. + * @param ctx the parse tree + */ + void enterStructOrUnionSpecifier(@NotNull CParser.StructOrUnionSpecifierContext ctx); + /** + * Exit a parse tree produced by {@link CParser#structOrUnionSpecifier}. + * @param ctx the parse tree + */ + void exitStructOrUnionSpecifier(@NotNull CParser.StructOrUnionSpecifierContext ctx); + /** + * Enter a parse tree produced by {@link CParser#assignmentOperator}. + * @param ctx the parse tree + */ + void enterAssignmentOperator(@NotNull CParser.AssignmentOperatorContext ctx); + /** + * Exit a parse tree produced by {@link CParser#assignmentOperator}. + * @param ctx the parse tree + */ + void exitAssignmentOperator(@NotNull CParser.AssignmentOperatorContext ctx); + /** + * Enter a parse tree produced by {@link CParser#compoundStatement}. + * @param ctx the parse tree + */ + void enterCompoundStatement(@NotNull CParser.CompoundStatementContext ctx); + /** + * Exit a parse tree produced by {@link CParser#compoundStatement}. + * @param ctx the parse tree + */ + void exitCompoundStatement(@NotNull CParser.CompoundStatementContext ctx); + /** + * Enter a parse tree produced by {@link CParser#declarationSpecifier}. + * @param ctx the parse tree + */ + void enterDeclarationSpecifier(@NotNull CParser.DeclarationSpecifierContext ctx); + /** + * Exit a parse tree produced by {@link CParser#declarationSpecifier}. + * @param ctx the parse tree + */ + void exitDeclarationSpecifier(@NotNull CParser.DeclarationSpecifierContext ctx); + /** + * Enter a parse tree produced by {@link CParser#declarationList}. + * @param ctx the parse tree + */ + void enterDeclarationList(@NotNull CParser.DeclarationListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#declarationList}. + * @param ctx the parse tree + */ + void exitDeclarationList(@NotNull CParser.DeclarationListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#directDeclarator}. + * @param ctx the parse tree + */ + void enterDirectDeclarator(@NotNull CParser.DirectDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link CParser#directDeclarator}. + * @param ctx the parse tree + */ + void exitDirectDeclarator(@NotNull CParser.DirectDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link CParser#parameterTypeList}. + * @param ctx the parse tree + */ + void enterParameterTypeList(@NotNull CParser.ParameterTypeListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#parameterTypeList}. + * @param ctx the parse tree + */ + void exitParameterTypeList(@NotNull CParser.ParameterTypeListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#designatorList}. + * @param ctx the parse tree + */ + void enterDesignatorList(@NotNull CParser.DesignatorListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#designatorList}. + * @param ctx the parse tree + */ + void exitDesignatorList(@NotNull CParser.DesignatorListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#functionSpecifier}. + * @param ctx the parse tree + */ + void enterFunctionSpecifier(@NotNull CParser.FunctionSpecifierContext ctx); + /** + * Exit a parse tree produced by {@link CParser#functionSpecifier}. + * @param ctx the parse tree + */ + void exitFunctionSpecifier(@NotNull CParser.FunctionSpecifierContext ctx); + /** + * Enter a parse tree produced by {@link CParser#staticAssertDeclaration}. + * @param ctx the parse tree + */ + void enterStaticAssertDeclaration(@NotNull CParser.StaticAssertDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link CParser#staticAssertDeclaration}. + * @param ctx the parse tree + */ + void exitStaticAssertDeclaration(@NotNull CParser.StaticAssertDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link CParser#castExpression}. + * @param ctx the parse tree + */ + void enterCastExpression(@NotNull CParser.CastExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#castExpression}. + * @param ctx the parse tree + */ + void exitCastExpression(@NotNull CParser.CastExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#initDeclarator}. + * @param ctx the parse tree + */ + void enterInitDeclarator(@NotNull CParser.InitDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link CParser#initDeclarator}. + * @param ctx the parse tree + */ + void exitInitDeclarator(@NotNull CParser.InitDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link CParser#declarationSpecifiers2}. + * @param ctx the parse tree + */ + void enterDeclarationSpecifiers2(@NotNull CParser.DeclarationSpecifiers2Context ctx); + /** + * Exit a parse tree produced by {@link CParser#declarationSpecifiers2}. + * @param ctx the parse tree + */ + void exitDeclarationSpecifiers2(@NotNull CParser.DeclarationSpecifiers2Context ctx); + /** + * Enter a parse tree produced by {@link CParser#externalDeclaration}. + * @param ctx the parse tree + */ + void enterExternalDeclaration(@NotNull CParser.ExternalDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link CParser#externalDeclaration}. + * @param ctx the parse tree + */ + void exitExternalDeclaration(@NotNull CParser.ExternalDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link CParser#logicalAndExpression}. + * @param ctx the parse tree + */ + void enterLogicalAndExpression(@NotNull CParser.LogicalAndExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#logicalAndExpression}. + * @param ctx the parse tree + */ + void exitLogicalAndExpression(@NotNull CParser.LogicalAndExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#gccAttributeList}. + * @param ctx the parse tree + */ + void enterGccAttributeList(@NotNull CParser.GccAttributeListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#gccAttributeList}. + * @param ctx the parse tree + */ + void exitGccAttributeList(@NotNull CParser.GccAttributeListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#expressionStatement}. + * @param ctx the parse tree + */ + void enterExpressionStatement(@NotNull CParser.ExpressionStatementContext ctx); + /** + * Exit a parse tree produced by {@link CParser#expressionStatement}. + * @param ctx the parse tree + */ + void exitExpressionStatement(@NotNull CParser.ExpressionStatementContext ctx); + /** + * Enter a parse tree produced by {@link CParser#unaryExpression}. + * @param ctx the parse tree + */ + void enterUnaryExpression(@NotNull CParser.UnaryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#unaryExpression}. + * @param ctx the parse tree + */ + void exitUnaryExpression(@NotNull CParser.UnaryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#typedefName}. + * @param ctx the parse tree + */ + void enterTypedefName(@NotNull CParser.TypedefNameContext ctx); + /** + * Exit a parse tree produced by {@link CParser#typedefName}. + * @param ctx the parse tree + */ + void exitTypedefName(@NotNull CParser.TypedefNameContext ctx); + /** + * Enter a parse tree produced by {@link CParser#pointer}. + * @param ctx the parse tree + */ + void enterPointer(@NotNull CParser.PointerContext ctx); + /** + * Exit a parse tree produced by {@link CParser#pointer}. + * @param ctx the parse tree + */ + void exitPointer(@NotNull CParser.PointerContext ctx); + /** + * Enter a parse tree produced by {@link CParser#identifierList}. + * @param ctx the parse tree + */ + void enterIdentifierList(@NotNull CParser.IdentifierListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#identifierList}. + * @param ctx the parse tree + */ + void exitIdentifierList(@NotNull CParser.IdentifierListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#shiftExpression}. + * @param ctx the parse tree + */ + void enterShiftExpression(@NotNull CParser.ShiftExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#shiftExpression}. + * @param ctx the parse tree + */ + void exitShiftExpression(@NotNull CParser.ShiftExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#atomicTypeSpecifier}. + * @param ctx the parse tree + */ + void enterAtomicTypeSpecifier(@NotNull CParser.AtomicTypeSpecifierContext ctx); + /** + * Exit a parse tree produced by {@link CParser#atomicTypeSpecifier}. + * @param ctx the parse tree + */ + void exitAtomicTypeSpecifier(@NotNull CParser.AtomicTypeSpecifierContext ctx); + /** + * Enter a parse tree produced by {@link CParser#iterationStatement}. + * @param ctx the parse tree + */ + void enterIterationStatement(@NotNull CParser.IterationStatementContext ctx); + /** + * Exit a parse tree produced by {@link CParser#iterationStatement}. + * @param ctx the parse tree + */ + void exitIterationStatement(@NotNull CParser.IterationStatementContext ctx); + /** + * Enter a parse tree produced by {@link CParser#enumerationConstant}. + * @param ctx the parse tree + */ + void enterEnumerationConstant(@NotNull CParser.EnumerationConstantContext ctx); + /** + * Exit a parse tree produced by {@link CParser#enumerationConstant}. + * @param ctx the parse tree + */ + void exitEnumerationConstant(@NotNull CParser.EnumerationConstantContext ctx); + /** + * Enter a parse tree produced by {@link CParser#inclusiveOrExpression}. + * @param ctx the parse tree + */ + void enterInclusiveOrExpression(@NotNull CParser.InclusiveOrExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#inclusiveOrExpression}. + * @param ctx the parse tree + */ + void exitInclusiveOrExpression(@NotNull CParser.InclusiveOrExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#assignmentExpression}. + * @param ctx the parse tree + */ + void enterAssignmentExpression(@NotNull CParser.AssignmentExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#assignmentExpression}. + * @param ctx the parse tree + */ + void exitAssignmentExpression(@NotNull CParser.AssignmentExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#directAbstractDeclarator}. + * @param ctx the parse tree + */ + void enterDirectAbstractDeclarator(@NotNull CParser.DirectAbstractDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link CParser#directAbstractDeclarator}. + * @param ctx the parse tree + */ + void exitDirectAbstractDeclarator(@NotNull CParser.DirectAbstractDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link CParser#declarationSpecifiers}. + * @param ctx the parse tree + */ + void enterDeclarationSpecifiers(@NotNull CParser.DeclarationSpecifiersContext ctx); + /** + * Exit a parse tree produced by {@link CParser#declarationSpecifiers}. + * @param ctx the parse tree + */ + void exitDeclarationSpecifiers(@NotNull CParser.DeclarationSpecifiersContext ctx); + /** + * Enter a parse tree produced by {@link CParser#alignmentSpecifier}. + * @param ctx the parse tree + */ + void enterAlignmentSpecifier(@NotNull CParser.AlignmentSpecifierContext ctx); + /** + * Exit a parse tree produced by {@link CParser#alignmentSpecifier}. + * @param ctx the parse tree + */ + void exitAlignmentSpecifier(@NotNull CParser.AlignmentSpecifierContext ctx); + /** + * Enter a parse tree produced by {@link CParser#structOrUnion}. + * @param ctx the parse tree + */ + void enterStructOrUnion(@NotNull CParser.StructOrUnionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#structOrUnion}. + * @param ctx the parse tree + */ + void exitStructOrUnion(@NotNull CParser.StructOrUnionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#translationUnit}. + * @param ctx the parse tree + */ + void enterTranslationUnit(@NotNull CParser.TranslationUnitContext ctx); + /** + * Exit a parse tree produced by {@link CParser#translationUnit}. + * @param ctx the parse tree + */ + void exitTranslationUnit(@NotNull CParser.TranslationUnitContext ctx); + /** + * Enter a parse tree produced by {@link CParser#compilationUnit}. + * @param ctx the parse tree + */ + void enterCompilationUnit(@NotNull CParser.CompilationUnitContext ctx); + /** + * Exit a parse tree produced by {@link CParser#compilationUnit}. + * @param ctx the parse tree + */ + void exitCompilationUnit(@NotNull CParser.CompilationUnitContext ctx); + /** + * Enter a parse tree produced by {@link CParser#blockItemList}. + * @param ctx the parse tree + */ + void enterBlockItemList(@NotNull CParser.BlockItemListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#blockItemList}. + * @param ctx the parse tree + */ + void exitBlockItemList(@NotNull CParser.BlockItemListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#exclusiveOrExpression}. + * @param ctx the parse tree + */ + void enterExclusiveOrExpression(@NotNull CParser.ExclusiveOrExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#exclusiveOrExpression}. + * @param ctx the parse tree + */ + void exitExclusiveOrExpression(@NotNull CParser.ExclusiveOrExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#genericAssocList}. + * @param ctx the parse tree + */ + void enterGenericAssocList(@NotNull CParser.GenericAssocListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#genericAssocList}. + * @param ctx the parse tree + */ + void exitGenericAssocList(@NotNull CParser.GenericAssocListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#equalityExpression}. + * @param ctx the parse tree + */ + void enterEqualityExpression(@NotNull CParser.EqualityExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#equalityExpression}. + * @param ctx the parse tree + */ + void exitEqualityExpression(@NotNull CParser.EqualityExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#parameterList}. + * @param ctx the parse tree + */ + void enterParameterList(@NotNull CParser.ParameterListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#parameterList}. + * @param ctx the parse tree + */ + void exitParameterList(@NotNull CParser.ParameterListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#parameterDeclaration}. + * @param ctx the parse tree + */ + void enterParameterDeclaration(@NotNull CParser.ParameterDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link CParser#parameterDeclaration}. + * @param ctx the parse tree + */ + void exitParameterDeclaration(@NotNull CParser.ParameterDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link CParser#designation}. + * @param ctx the parse tree + */ + void enterDesignation(@NotNull CParser.DesignationContext ctx); + /** + * Exit a parse tree produced by {@link CParser#designation}. + * @param ctx the parse tree + */ + void exitDesignation(@NotNull CParser.DesignationContext ctx); + /** + * Enter a parse tree produced by {@link CParser#blockItem}. + * @param ctx the parse tree + */ + void enterBlockItem(@NotNull CParser.BlockItemContext ctx); + /** + * Exit a parse tree produced by {@link CParser#blockItem}. + * @param ctx the parse tree + */ + void exitBlockItem(@NotNull CParser.BlockItemContext ctx); + /** + * Enter a parse tree produced by {@link CParser#initDeclaratorList}. + * @param ctx the parse tree + */ + void enterInitDeclaratorList(@NotNull CParser.InitDeclaratorListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#initDeclaratorList}. + * @param ctx the parse tree + */ + void exitInitDeclaratorList(@NotNull CParser.InitDeclaratorListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#structDeclaration}. + * @param ctx the parse tree + */ + void enterStructDeclaration(@NotNull CParser.StructDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link CParser#structDeclaration}. + * @param ctx the parse tree + */ + void exitStructDeclaration(@NotNull CParser.StructDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link CParser#structDeclaratorList}. + * @param ctx the parse tree + */ + void enterStructDeclaratorList(@NotNull CParser.StructDeclaratorListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#structDeclaratorList}. + * @param ctx the parse tree + */ + void exitStructDeclaratorList(@NotNull CParser.StructDeclaratorListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#additiveExpression}. + * @param ctx the parse tree + */ + void enterAdditiveExpression(@NotNull CParser.AdditiveExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#additiveExpression}. + * @param ctx the parse tree + */ + void exitAdditiveExpression(@NotNull CParser.AdditiveExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#relationalExpression}. + * @param ctx the parse tree + */ + void enterRelationalExpression(@NotNull CParser.RelationalExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#relationalExpression}. + * @param ctx the parse tree + */ + void exitRelationalExpression(@NotNull CParser.RelationalExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#enumeratorList}. + * @param ctx the parse tree + */ + void enterEnumeratorList(@NotNull CParser.EnumeratorListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#enumeratorList}. + * @param ctx the parse tree + */ + void exitEnumeratorList(@NotNull CParser.EnumeratorListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#typeName}. + * @param ctx the parse tree + */ + void enterTypeName(@NotNull CParser.TypeNameContext ctx); + /** + * Exit a parse tree produced by {@link CParser#typeName}. + * @param ctx the parse tree + */ + void exitTypeName(@NotNull CParser.TypeNameContext ctx); + /** + * Enter a parse tree produced by {@link CParser#selectionStatement}. + * @param ctx the parse tree + */ + void enterSelectionStatement(@NotNull CParser.SelectionStatementContext ctx); + /** + * Exit a parse tree produced by {@link CParser#selectionStatement}. + * @param ctx the parse tree + */ + void exitSelectionStatement(@NotNull CParser.SelectionStatementContext ctx); + /** + * Enter a parse tree produced by {@link CParser#genericSelection}. + * @param ctx the parse tree + */ + void enterGenericSelection(@NotNull CParser.GenericSelectionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#genericSelection}. + * @param ctx the parse tree + */ + void exitGenericSelection(@NotNull CParser.GenericSelectionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#storageClassSpecifier}. + * @param ctx the parse tree + */ + void enterStorageClassSpecifier(@NotNull CParser.StorageClassSpecifierContext ctx); + /** + * Exit a parse tree produced by {@link CParser#storageClassSpecifier}. + * @param ctx the parse tree + */ + void exitStorageClassSpecifier(@NotNull CParser.StorageClassSpecifierContext ctx); + /** + * Enter a parse tree produced by {@link CParser#nestedParenthesesBlock}. + * @param ctx the parse tree + */ + void enterNestedParenthesesBlock(@NotNull CParser.NestedParenthesesBlockContext ctx); + /** + * Exit a parse tree produced by {@link CParser#nestedParenthesesBlock}. + * @param ctx the parse tree + */ + void exitNestedParenthesesBlock(@NotNull CParser.NestedParenthesesBlockContext ctx); + /** + * Enter a parse tree produced by {@link CParser#designator}. + * @param ctx the parse tree + */ + void enterDesignator(@NotNull CParser.DesignatorContext ctx); + /** + * Exit a parse tree produced by {@link CParser#designator}. + * @param ctx the parse tree + */ + void exitDesignator(@NotNull CParser.DesignatorContext ctx); + /** + * Enter a parse tree produced by {@link CParser#andExpression}. + * @param ctx the parse tree + */ + void enterAndExpression(@NotNull CParser.AndExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#andExpression}. + * @param ctx the parse tree + */ + void exitAndExpression(@NotNull CParser.AndExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#labeledStatement}. + * @param ctx the parse tree + */ + void enterLabeledStatement(@NotNull CParser.LabeledStatementContext ctx); + /** + * Exit a parse tree produced by {@link CParser#labeledStatement}. + * @param ctx the parse tree + */ + void exitLabeledStatement(@NotNull CParser.LabeledStatementContext ctx); + /** + * Enter a parse tree produced by {@link CParser#argumentExpressionList}. + * @param ctx the parse tree + */ + void enterArgumentExpressionList(@NotNull CParser.ArgumentExpressionListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#argumentExpressionList}. + * @param ctx the parse tree + */ + void exitArgumentExpressionList(@NotNull CParser.ArgumentExpressionListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#gccAttributeSpecifier}. + * @param ctx the parse tree + */ + void enterGccAttributeSpecifier(@NotNull CParser.GccAttributeSpecifierContext ctx); + /** + * Exit a parse tree produced by {@link CParser#gccAttributeSpecifier}. + * @param ctx the parse tree + */ + void exitGccAttributeSpecifier(@NotNull CParser.GccAttributeSpecifierContext ctx); + /** + * Enter a parse tree produced by {@link CParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(@NotNull CParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link CParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(@NotNull CParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link CParser#enumerator}. + * @param ctx the parse tree + */ + void enterEnumerator(@NotNull CParser.EnumeratorContext ctx); + /** + * Exit a parse tree produced by {@link CParser#enumerator}. + * @param ctx the parse tree + */ + void exitEnumerator(@NotNull CParser.EnumeratorContext ctx); + /** + * Enter a parse tree produced by {@link CParser#abstractDeclarator}. + * @param ctx the parse tree + */ + void enterAbstractDeclarator(@NotNull CParser.AbstractDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link CParser#abstractDeclarator}. + * @param ctx the parse tree + */ + void exitAbstractDeclarator(@NotNull CParser.AbstractDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link CParser#postfixExpression}. + * @param ctx the parse tree + */ + void enterPostfixExpression(@NotNull CParser.PostfixExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#postfixExpression}. + * @param ctx the parse tree + */ + void exitPostfixExpression(@NotNull CParser.PostfixExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#gccAttribute}. + * @param ctx the parse tree + */ + void enterGccAttribute(@NotNull CParser.GccAttributeContext ctx); + /** + * Exit a parse tree produced by {@link CParser#gccAttribute}. + * @param ctx the parse tree + */ + void exitGccAttribute(@NotNull CParser.GccAttributeContext ctx); + /** + * Enter a parse tree produced by {@link CParser#primaryExpression}. + * @param ctx the parse tree + */ + void enterPrimaryExpression(@NotNull CParser.PrimaryExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#primaryExpression}. + * @param ctx the parse tree + */ + void exitPrimaryExpression(@NotNull CParser.PrimaryExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#typeQualifierList}. + * @param ctx the parse tree + */ + void enterTypeQualifierList(@NotNull CParser.TypeQualifierListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#typeQualifierList}. + * @param ctx the parse tree + */ + void exitTypeQualifierList(@NotNull CParser.TypeQualifierListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#expression}. + * @param ctx the parse tree + */ + void enterExpression(@NotNull CParser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#expression}. + * @param ctx the parse tree + */ + void exitExpression(@NotNull CParser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#constantExpression}. + * @param ctx the parse tree + */ + void enterConstantExpression(@NotNull CParser.ConstantExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#constantExpression}. + * @param ctx the parse tree + */ + void exitConstantExpression(@NotNull CParser.ConstantExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#conditionalExpression}. + * @param ctx the parse tree + */ + void enterConditionalExpression(@NotNull CParser.ConditionalExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#conditionalExpression}. + * @param ctx the parse tree + */ + void exitConditionalExpression(@NotNull CParser.ConditionalExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#functionDefinition}. + * @param ctx the parse tree + */ + void enterFunctionDefinition(@NotNull CParser.FunctionDefinitionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#functionDefinition}. + * @param ctx the parse tree + */ + void exitFunctionDefinition(@NotNull CParser.FunctionDefinitionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#specifierQualifierList}. + * @param ctx the parse tree + */ + void enterSpecifierQualifierList(@NotNull CParser.SpecifierQualifierListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#specifierQualifierList}. + * @param ctx the parse tree + */ + void exitSpecifierQualifierList(@NotNull CParser.SpecifierQualifierListContext ctx); + /** + * Enter a parse tree produced by {@link CParser#gccDeclaratorExtension}. + * @param ctx the parse tree + */ + void enterGccDeclaratorExtension(@NotNull CParser.GccDeclaratorExtensionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#gccDeclaratorExtension}. + * @param ctx the parse tree + */ + void exitGccDeclaratorExtension(@NotNull CParser.GccDeclaratorExtensionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#typeSpecifier}. + * @param ctx the parse tree + */ + void enterTypeSpecifier(@NotNull CParser.TypeSpecifierContext ctx); + /** + * Exit a parse tree produced by {@link CParser#typeSpecifier}. + * @param ctx the parse tree + */ + void exitTypeSpecifier(@NotNull CParser.TypeSpecifierContext ctx); + /** + * Enter a parse tree produced by {@link CParser#multiplicativeExpression}. + * @param ctx the parse tree + */ + void enterMultiplicativeExpression(@NotNull CParser.MultiplicativeExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#multiplicativeExpression}. + * @param ctx the parse tree + */ + void exitMultiplicativeExpression(@NotNull CParser.MultiplicativeExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#logicalOrExpression}. + * @param ctx the parse tree + */ + void enterLogicalOrExpression(@NotNull CParser.LogicalOrExpressionContext ctx); + /** + * Exit a parse tree produced by {@link CParser#logicalOrExpression}. + * @param ctx the parse tree + */ + void exitLogicalOrExpression(@NotNull CParser.LogicalOrExpressionContext ctx); + /** + * Enter a parse tree produced by {@link CParser#declaration}. + * @param ctx the parse tree + */ + void enterDeclaration(@NotNull CParser.DeclarationContext ctx); + /** + * Exit a parse tree produced by {@link CParser#declaration}. + * @param ctx the parse tree + */ + void exitDeclaration(@NotNull CParser.DeclarationContext ctx); + /** + * Enter a parse tree produced by {@link CParser#declarator}. + * @param ctx the parse tree + */ + void enterDeclarator(@NotNull CParser.DeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link CParser#declarator}. + * @param ctx the parse tree + */ + void exitDeclarator(@NotNull CParser.DeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link CParser#initializer}. + * @param ctx the parse tree + */ + void enterInitializer(@NotNull CParser.InitializerContext ctx); + /** + * Exit a parse tree produced by {@link CParser#initializer}. + * @param ctx the parse tree + */ + void exitInitializer(@NotNull CParser.InitializerContext ctx); + /** + * Enter a parse tree produced by {@link CParser#genericAssociation}. + * @param ctx the parse tree + */ + void enterGenericAssociation(@NotNull CParser.GenericAssociationContext ctx); + /** + * Exit a parse tree produced by {@link CParser#genericAssociation}. + * @param ctx the parse tree + */ + void exitGenericAssociation(@NotNull CParser.GenericAssociationContext ctx); + /** + * Enter a parse tree produced by {@link CParser#structDeclarator}. + * @param ctx the parse tree + */ + void enterStructDeclarator(@NotNull CParser.StructDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link CParser#structDeclarator}. + * @param ctx the parse tree + */ + void exitStructDeclarator(@NotNull CParser.StructDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link CParser#enumSpecifier}. + * @param ctx the parse tree + */ + void enterEnumSpecifier(@NotNull CParser.EnumSpecifierContext ctx); + /** + * Exit a parse tree produced by {@link CParser#enumSpecifier}. + * @param ctx the parse tree + */ + void exitEnumSpecifier(@NotNull CParser.EnumSpecifierContext ctx); + /** + * Enter a parse tree produced by {@link CParser#jumpStatement}. + * @param ctx the parse tree + */ + void enterJumpStatement(@NotNull CParser.JumpStatementContext ctx); + /** + * Exit a parse tree produced by {@link CParser#jumpStatement}. + * @param ctx the parse tree + */ + void exitJumpStatement(@NotNull CParser.JumpStatementContext ctx); + /** + * Enter a parse tree produced by {@link CParser#typeQualifier}. + * @param ctx the parse tree + */ + void enterTypeQualifier(@NotNull CParser.TypeQualifierContext ctx); + /** + * Exit a parse tree produced by {@link CParser#typeQualifier}. + * @param ctx the parse tree + */ + void exitTypeQualifier(@NotNull CParser.TypeQualifierContext ctx); + /** + * Enter a parse tree produced by {@link CParser#initializerList}. + * @param ctx the parse tree + */ + void enterInitializerList(@NotNull CParser.InitializerListContext ctx); + /** + * Exit a parse tree produced by {@link CParser#initializerList}. + * @param ctx the parse tree + */ + void exitInitializerList(@NotNull CParser.InitializerListContext ctx); +} \ No newline at end of file diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CParser.java b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CParser.java new file mode 100644 index 0000000..44829bb --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/c/CParser.java @@ -0,0 +1,7491 @@ +// Generated from C.g4 by ANTLR 4.4 +package it.unitn.repoman.core.lang.parsers.c; + +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class CParser extends Parser { + static { RuntimeMetaData.checkVersion("4.4", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + T__13=1, T__12=2, T__11=3, T__10=4, T__9=5, T__8=6, T__7=7, T__6=8, T__5=9, + T__4=10, T__3=11, T__2=12, T__1=13, T__0=14, Auto=15, Break=16, Case=17, + Char=18, Const=19, Continue=20, Default=21, Do=22, Double=23, Else=24, + Enum=25, Extern=26, Float=27, For=28, Goto=29, If=30, Inline=31, Int=32, + Long=33, Register=34, Restrict=35, Return=36, Short=37, Signed=38, Sizeof=39, + Static=40, Struct=41, Switch=42, Typedef=43, Union=44, Unsigned=45, Void=46, + Volatile=47, While=48, Alignas=49, Alignof=50, Atomic=51, Bool=52, Complex=53, + Generic=54, Imaginary=55, Noreturn=56, StaticAssert=57, ThreadLocal=58, + LeftParen=59, RightParen=60, LeftBracket=61, RightBracket=62, LeftBrace=63, + RightBrace=64, Less=65, LessEqual=66, Greater=67, GreaterEqual=68, LeftShift=69, + RightShift=70, Plus=71, PlusPlus=72, Minus=73, MinusMinus=74, Star=75, + Div=76, Mod=77, And=78, Or=79, AndAnd=80, OrOr=81, Caret=82, Not=83, Tilde=84, + Question=85, Colon=86, Semi=87, Comma=88, Assign=89, StarAssign=90, DivAssign=91, + ModAssign=92, PlusAssign=93, MinusAssign=94, LeftShiftAssign=95, RightShiftAssign=96, + AndAssign=97, XorAssign=98, OrAssign=99, Equal=100, NotEqual=101, Arrow=102, + Dot=103, Ellipsis=104, Identifier=105, Constant=106, StringLiteral=107, + ComplexDefine=108, AsmBlock=109, LineAfterPreprocessing=110, LineDirective=111, + PragmaDirective=112, Whitespace=113, Newline=114, BlockComment=115, LineComment=116, + Directives=117; + public static final String[] tokenNames = { + "", "'__extension__'", "'__volatile__'", "'__stdcall'", "'__asm__'", + "'__declspec'", "'__builtin_va_arg'", "'__typeof__'", "'__asm'", "'__m128d'", + "'__m128i'", "'__attribute__'", "'__inline__'", "'__m128'", "'__builtin_offsetof'", + "'auto'", "'break'", "'case'", "'char'", "'const'", "'continue'", "'default'", + "'do'", "'double'", "'else'", "'enum'", "'extern'", "'float'", "'for'", + "'goto'", "'if'", "'inline'", "'int'", "'long'", "'register'", "'restrict'", + "'return'", "'short'", "'signed'", "'sizeof'", "'static'", "'struct'", + "'switch'", "'typedef'", "'union'", "'unsigned'", "'void'", "'volatile'", + "'while'", "'_Alignas'", "'_Alignof'", "'_Atomic'", "'_Bool'", "'_Complex'", + "'_Generic'", "'_Imaginary'", "'_Noreturn'", "'_Static_assert'", "'_Thread_local'", + "'('", "')'", "'['", "']'", "'{'", "'}'", "'<'", "'<='", "'>'", "'>='", + "'<<'", "'>>'", "'+'", "'++'", "'-'", "'--'", "'*'", "'/'", "'%'", "'&'", + "'|'", "'&&'", "'||'", "'^'", "'!'", "'~'", "'?'", "':'", "';'", "','", + "'='", "'*='", "'/='", "'%='", "'+='", "'-='", "'<<='", "'>>='", "'&='", + "'^='", "'|='", "'=='", "'!='", "'->'", "'.'", "'...'", "Identifier", + "Constant", "StringLiteral", "ComplexDefine", "AsmBlock", "LineAfterPreprocessing", + "LineDirective", "PragmaDirective", "Whitespace", "Newline", "BlockComment", + "LineComment", "Directives" + }; + public static final int + RULE_primaryExpression = 0, RULE_genericSelection = 1, RULE_genericAssocList = 2, + RULE_genericAssociation = 3, RULE_postfixExpression = 4, RULE_argumentExpressionList = 5, + RULE_unaryExpression = 6, RULE_unaryOperator = 7, RULE_castExpression = 8, + RULE_multiplicativeExpression = 9, RULE_additiveExpression = 10, RULE_shiftExpression = 11, + RULE_relationalExpression = 12, RULE_equalityExpression = 13, RULE_andExpression = 14, + RULE_exclusiveOrExpression = 15, RULE_inclusiveOrExpression = 16, RULE_logicalAndExpression = 17, + RULE_logicalOrExpression = 18, RULE_conditionalExpression = 19, RULE_assignmentExpression = 20, + RULE_assignmentOperator = 21, RULE_expression = 22, RULE_constantExpression = 23, + RULE_declaration = 24, RULE_declarationSpecifiers = 25, RULE_declarationSpecifiers2 = 26, + RULE_declarationSpecifier = 27, RULE_initDeclaratorList = 28, RULE_initDeclarator = 29, + RULE_storageClassSpecifier = 30, RULE_typeSpecifier = 31, RULE_structOrUnionSpecifier = 32, + RULE_structOrUnion = 33, RULE_structDeclarationList = 34, RULE_structDeclaration = 35, + RULE_specifierQualifierList = 36, RULE_structDeclaratorList = 37, RULE_structDeclarator = 38, + RULE_enumSpecifier = 39, RULE_enumeratorList = 40, RULE_enumerator = 41, + RULE_enumerationConstant = 42, RULE_atomicTypeSpecifier = 43, RULE_typeQualifier = 44, + RULE_functionSpecifier = 45, RULE_alignmentSpecifier = 46, RULE_declarator = 47, + RULE_directDeclarator = 48, RULE_gccDeclaratorExtension = 49, RULE_gccAttributeSpecifier = 50, + RULE_gccAttributeList = 51, RULE_gccAttribute = 52, RULE_nestedParenthesesBlock = 53, + RULE_pointer = 54, RULE_typeQualifierList = 55, RULE_parameterTypeList = 56, + RULE_parameterList = 57, RULE_parameterDeclaration = 58, RULE_identifierList = 59, + RULE_typeName = 60, RULE_abstractDeclarator = 61, RULE_directAbstractDeclarator = 62, + RULE_typedefName = 63, RULE_initializer = 64, RULE_initializerList = 65, + RULE_designation = 66, RULE_designatorList = 67, RULE_designator = 68, + RULE_staticAssertDeclaration = 69, RULE_statement = 70, RULE_labeledStatement = 71, + RULE_compoundStatement = 72, RULE_blockItemList = 73, RULE_blockItem = 74, + RULE_expressionStatement = 75, RULE_selectionStatement = 76, RULE_iterationStatement = 77, + RULE_jumpStatement = 78, RULE_compilationUnit = 79, RULE_translationUnit = 80, + RULE_externalDeclaration = 81, RULE_functionDefinition = 82, RULE_declarationList = 83; + public static final String[] ruleNames = { + "primaryExpression", "genericSelection", "genericAssocList", "genericAssociation", + "postfixExpression", "argumentExpressionList", "unaryExpression", "unaryOperator", + "castExpression", "multiplicativeExpression", "additiveExpression", "shiftExpression", + "relationalExpression", "equalityExpression", "andExpression", "exclusiveOrExpression", + "inclusiveOrExpression", "logicalAndExpression", "logicalOrExpression", + "conditionalExpression", "assignmentExpression", "assignmentOperator", + "expression", "constantExpression", "declaration", "declarationSpecifiers", + "declarationSpecifiers2", "declarationSpecifier", "initDeclaratorList", + "initDeclarator", "storageClassSpecifier", "typeSpecifier", "structOrUnionSpecifier", + "structOrUnion", "structDeclarationList", "structDeclaration", "specifierQualifierList", + "structDeclaratorList", "structDeclarator", "enumSpecifier", "enumeratorList", + "enumerator", "enumerationConstant", "atomicTypeSpecifier", "typeQualifier", + "functionSpecifier", "alignmentSpecifier", "declarator", "directDeclarator", + "gccDeclaratorExtension", "gccAttributeSpecifier", "gccAttributeList", + "gccAttribute", "nestedParenthesesBlock", "pointer", "typeQualifierList", + "parameterTypeList", "parameterList", "parameterDeclaration", "identifierList", + "typeName", "abstractDeclarator", "directAbstractDeclarator", "typedefName", + "initializer", "initializerList", "designation", "designatorList", "designator", + "staticAssertDeclaration", "statement", "labeledStatement", "compoundStatement", + "blockItemList", "blockItem", "expressionStatement", "selectionStatement", + "iterationStatement", "jumpStatement", "compilationUnit", "translationUnit", + "externalDeclaration", "functionDefinition", "declarationList" + }; + + @Override + public String getGrammarFileName() { return "C.g4"; } + + @Override + public String[] getTokenNames() { return tokenNames; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public CParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class PrimaryExpressionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public UnaryExpressionContext unaryExpression() { + return getRuleContext(UnaryExpressionContext.class,0); + } + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public List StringLiteral() { return getTokens(CParser.StringLiteral); } + public TerminalNode Constant() { return getToken(CParser.Constant, 0); } + public TerminalNode StringLiteral(int i) { + return getToken(CParser.StringLiteral, i); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public CompoundStatementContext compoundStatement() { + return getRuleContext(CompoundStatementContext.class,0); + } + public GenericSelectionContext genericSelection() { + return getRuleContext(GenericSelectionContext.class,0); + } + public PrimaryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primaryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterPrimaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitPrimaryExpression(this); + } + } + + public final PrimaryExpressionContext primaryExpression() throws RecognitionException { + PrimaryExpressionContext _localctx = new PrimaryExpressionContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_primaryExpression); + int _la; + try { + int _alt; + setState(201); + switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(168); match(Identifier); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(169); match(Constant); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(171); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(170); match(StringLiteral); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(173); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,0,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(175); match(LeftParen); + setState(176); expression(0); + setState(177); match(RightParen); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(179); genericSelection(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(181); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(180); match(T__13); + } + } + + setState(183); match(LeftParen); + setState(184); compoundStatement(); + setState(185); match(RightParen); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(187); match(T__8); + setState(188); match(LeftParen); + setState(189); unaryExpression(); + setState(190); match(Comma); + setState(191); typeName(); + setState(192); match(RightParen); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(194); match(T__0); + setState(195); match(LeftParen); + setState(196); typeName(); + setState(197); match(Comma); + setState(198); unaryExpression(); + setState(199); match(RightParen); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericSelectionContext extends ParserRuleContext { + public GenericAssocListContext genericAssocList() { + return getRuleContext(GenericAssocListContext.class,0); + } + public AssignmentExpressionContext assignmentExpression() { + return getRuleContext(AssignmentExpressionContext.class,0); + } + public GenericSelectionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericSelection; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterGenericSelection(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitGenericSelection(this); + } + } + + public final GenericSelectionContext genericSelection() throws RecognitionException { + GenericSelectionContext _localctx = new GenericSelectionContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_genericSelection); + try { + enterOuterAlt(_localctx, 1); + { + setState(203); match(Generic); + setState(204); match(LeftParen); + setState(205); assignmentExpression(); + setState(206); match(Comma); + setState(207); genericAssocList(0); + setState(208); match(RightParen); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericAssocListContext extends ParserRuleContext { + public GenericAssociationContext genericAssociation() { + return getRuleContext(GenericAssociationContext.class,0); + } + public GenericAssocListContext genericAssocList() { + return getRuleContext(GenericAssocListContext.class,0); + } + public GenericAssocListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericAssocList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterGenericAssocList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitGenericAssocList(this); + } + } + + public final GenericAssocListContext genericAssocList() throws RecognitionException { + return genericAssocList(0); + } + + private GenericAssocListContext genericAssocList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + GenericAssocListContext _localctx = new GenericAssocListContext(_ctx, _parentState); + GenericAssocListContext _prevctx = _localctx; + int _startState = 4; + enterRecursionRule(_localctx, 4, RULE_genericAssocList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(211); genericAssociation(); + } + _ctx.stop = _input.LT(-1); + setState(218); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,3,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new GenericAssocListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_genericAssocList); + setState(213); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(214); match(Comma); + setState(215); genericAssociation(); + } + } + } + setState(220); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,3,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class GenericAssociationContext extends ParserRuleContext { + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public AssignmentExpressionContext assignmentExpression() { + return getRuleContext(AssignmentExpressionContext.class,0); + } + public GenericAssociationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericAssociation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterGenericAssociation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitGenericAssociation(this); + } + } + + public final GenericAssociationContext genericAssociation() throws RecognitionException { + GenericAssociationContext _localctx = new GenericAssociationContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_genericAssociation); + try { + setState(228); + switch (_input.LA(1)) { + case T__13: + case T__7: + case T__5: + case T__4: + case T__1: + case Char: + case Const: + case Double: + case Enum: + case Float: + case Int: + case Long: + case Restrict: + case Short: + case Signed: + case Struct: + case Union: + case Unsigned: + case Void: + case Volatile: + case Atomic: + case Bool: + case Complex: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(221); typeName(); + setState(222); match(Colon); + setState(223); assignmentExpression(); + } + break; + case Default: + enterOuterAlt(_localctx, 2); + { + setState(225); match(Default); + setState(226); match(Colon); + setState(227); assignmentExpression(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PostfixExpressionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public PostfixExpressionContext postfixExpression() { + return getRuleContext(PostfixExpressionContext.class,0); + } + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public PrimaryExpressionContext primaryExpression() { + return getRuleContext(PrimaryExpressionContext.class,0); + } + public InitializerListContext initializerList() { + return getRuleContext(InitializerListContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ArgumentExpressionListContext argumentExpressionList() { + return getRuleContext(ArgumentExpressionListContext.class,0); + } + public PostfixExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_postfixExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterPostfixExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitPostfixExpression(this); + } + } + + public final PostfixExpressionContext postfixExpression() throws RecognitionException { + return postfixExpression(0); + } + + private PostfixExpressionContext postfixExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + PostfixExpressionContext _localctx = new PostfixExpressionContext(_ctx, _parentState); + PostfixExpressionContext _prevctx = _localctx; + int _startState = 8; + enterRecursionRule(_localctx, 8, RULE_postfixExpression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(264); + switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { + case 1: + { + setState(231); primaryExpression(); + } + break; + case 2: + { + setState(232); match(LeftParen); + setState(233); typeName(); + setState(234); match(RightParen); + setState(235); match(LeftBrace); + setState(236); initializerList(0); + setState(237); match(RightBrace); + } + break; + case 3: + { + setState(239); match(LeftParen); + setState(240); typeName(); + setState(241); match(RightParen); + setState(242); match(LeftBrace); + setState(243); initializerList(0); + setState(244); match(Comma); + setState(245); match(RightBrace); + } + break; + case 4: + { + setState(247); match(T__13); + setState(248); match(LeftParen); + setState(249); typeName(); + setState(250); match(RightParen); + setState(251); match(LeftBrace); + setState(252); initializerList(0); + setState(253); match(RightBrace); + } + break; + case 5: + { + setState(255); match(T__13); + setState(256); match(LeftParen); + setState(257); typeName(); + setState(258); match(RightParen); + setState(259); match(LeftBrace); + setState(260); initializerList(0); + setState(261); match(Comma); + setState(262); match(RightBrace); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(289); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,8,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(287); + switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) { + case 1: + { + _localctx = new PostfixExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_postfixExpression); + setState(266); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(267); match(LeftBracket); + setState(268); expression(0); + setState(269); match(RightBracket); + } + break; + case 2: + { + _localctx = new PostfixExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_postfixExpression); + setState(271); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(272); match(LeftParen); + setState(274); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(273); argumentExpressionList(0); + } + } + + setState(276); match(RightParen); + } + break; + case 3: + { + _localctx = new PostfixExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_postfixExpression); + setState(277); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(278); match(Dot); + setState(279); match(Identifier); + } + break; + case 4: + { + _localctx = new PostfixExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_postfixExpression); + setState(280); + if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(281); match(Arrow); + setState(282); match(Identifier); + } + break; + case 5: + { + _localctx = new PostfixExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_postfixExpression); + setState(283); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(284); match(PlusPlus); + } + break; + case 6: + { + _localctx = new PostfixExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_postfixExpression); + setState(285); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(286); match(MinusMinus); + } + break; + } + } + } + setState(291); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,8,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ArgumentExpressionListContext extends ParserRuleContext { + public AssignmentExpressionContext assignmentExpression() { + return getRuleContext(AssignmentExpressionContext.class,0); + } + public ArgumentExpressionListContext argumentExpressionList() { + return getRuleContext(ArgumentExpressionListContext.class,0); + } + public ArgumentExpressionListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_argumentExpressionList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterArgumentExpressionList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitArgumentExpressionList(this); + } + } + + public final ArgumentExpressionListContext argumentExpressionList() throws RecognitionException { + return argumentExpressionList(0); + } + + private ArgumentExpressionListContext argumentExpressionList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ArgumentExpressionListContext _localctx = new ArgumentExpressionListContext(_ctx, _parentState); + ArgumentExpressionListContext _prevctx = _localctx; + int _startState = 10; + enterRecursionRule(_localctx, 10, RULE_argumentExpressionList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(293); assignmentExpression(); + } + _ctx.stop = _input.LT(-1); + setState(300); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ArgumentExpressionListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_argumentExpressionList); + setState(295); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(296); match(Comma); + setState(297); assignmentExpression(); + } + } + } + setState(302); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class UnaryExpressionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public PostfixExpressionContext postfixExpression() { + return getRuleContext(PostfixExpressionContext.class,0); + } + public UnaryExpressionContext unaryExpression() { + return getRuleContext(UnaryExpressionContext.class,0); + } + public CastExpressionContext castExpression() { + return getRuleContext(CastExpressionContext.class,0); + } + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public UnaryOperatorContext unaryOperator() { + return getRuleContext(UnaryOperatorContext.class,0); + } + public UnaryExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_unaryExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterUnaryExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitUnaryExpression(this); + } + } + + public final UnaryExpressionContext unaryExpression() throws RecognitionException { + UnaryExpressionContext _localctx = new UnaryExpressionContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_unaryExpression); + try { + setState(325); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(303); postfixExpression(0); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(304); match(PlusPlus); + setState(305); unaryExpression(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(306); match(MinusMinus); + setState(307); unaryExpression(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(308); unaryOperator(); + setState(309); castExpression(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(311); match(Sizeof); + setState(312); unaryExpression(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(313); match(Sizeof); + setState(314); match(LeftParen); + setState(315); typeName(); + setState(316); match(RightParen); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(318); match(Alignof); + setState(319); match(LeftParen); + setState(320); typeName(); + setState(321); match(RightParen); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(323); match(AndAnd); + setState(324); match(Identifier); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class UnaryOperatorContext extends ParserRuleContext { + public UnaryOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_unaryOperator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterUnaryOperator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitUnaryOperator(this); + } + } + + public final UnaryOperatorContext unaryOperator() throws RecognitionException { + UnaryOperatorContext _localctx = new UnaryOperatorContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_unaryOperator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(327); + _la = _input.LA(1); + if ( !(((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (Minus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CastExpressionContext extends ParserRuleContext { + public UnaryExpressionContext unaryExpression() { + return getRuleContext(UnaryExpressionContext.class,0); + } + public CastExpressionContext castExpression() { + return getRuleContext(CastExpressionContext.class,0); + } + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public CastExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_castExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterCastExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitCastExpression(this); + } + } + + public final CastExpressionContext castExpression() throws RecognitionException { + CastExpressionContext _localctx = new CastExpressionContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_castExpression); + try { + setState(341); + switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(329); unaryExpression(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(330); match(LeftParen); + setState(331); typeName(); + setState(332); match(RightParen); + setState(333); castExpression(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(335); match(T__13); + setState(336); match(LeftParen); + setState(337); typeName(); + setState(338); match(RightParen); + setState(339); castExpression(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MultiplicativeExpressionContext extends ParserRuleContext { + public CastExpressionContext castExpression() { + return getRuleContext(CastExpressionContext.class,0); + } + public MultiplicativeExpressionContext multiplicativeExpression() { + return getRuleContext(MultiplicativeExpressionContext.class,0); + } + public MultiplicativeExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_multiplicativeExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterMultiplicativeExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitMultiplicativeExpression(this); + } + } + + public final MultiplicativeExpressionContext multiplicativeExpression() throws RecognitionException { + return multiplicativeExpression(0); + } + + private MultiplicativeExpressionContext multiplicativeExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + MultiplicativeExpressionContext _localctx = new MultiplicativeExpressionContext(_ctx, _parentState); + MultiplicativeExpressionContext _prevctx = _localctx; + int _startState = 18; + enterRecursionRule(_localctx, 18, RULE_multiplicativeExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(344); castExpression(); + } + _ctx.stop = _input.LT(-1); + setState(357); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,13,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(355); + switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { + case 1: + { + _localctx = new MultiplicativeExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_multiplicativeExpression); + setState(346); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(347); match(Star); + setState(348); castExpression(); + } + break; + case 2: + { + _localctx = new MultiplicativeExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_multiplicativeExpression); + setState(349); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(350); match(Div); + setState(351); castExpression(); + } + break; + case 3: + { + _localctx = new MultiplicativeExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_multiplicativeExpression); + setState(352); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(353); match(Mod); + setState(354); castExpression(); + } + break; + } + } + } + setState(359); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,13,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class AdditiveExpressionContext extends ParserRuleContext { + public MultiplicativeExpressionContext multiplicativeExpression() { + return getRuleContext(MultiplicativeExpressionContext.class,0); + } + public AdditiveExpressionContext additiveExpression() { + return getRuleContext(AdditiveExpressionContext.class,0); + } + public AdditiveExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_additiveExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterAdditiveExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitAdditiveExpression(this); + } + } + + public final AdditiveExpressionContext additiveExpression() throws RecognitionException { + return additiveExpression(0); + } + + private AdditiveExpressionContext additiveExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + AdditiveExpressionContext _localctx = new AdditiveExpressionContext(_ctx, _parentState); + AdditiveExpressionContext _prevctx = _localctx; + int _startState = 20; + enterRecursionRule(_localctx, 20, RULE_additiveExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(361); multiplicativeExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(371); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,15,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(369); + switch ( getInterpreter().adaptivePredict(_input,14,_ctx) ) { + case 1: + { + _localctx = new AdditiveExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_additiveExpression); + setState(363); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(364); match(Plus); + setState(365); multiplicativeExpression(0); + } + break; + case 2: + { + _localctx = new AdditiveExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_additiveExpression); + setState(366); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(367); match(Minus); + setState(368); multiplicativeExpression(0); + } + break; + } + } + } + setState(373); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,15,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ShiftExpressionContext extends ParserRuleContext { + public AdditiveExpressionContext additiveExpression() { + return getRuleContext(AdditiveExpressionContext.class,0); + } + public ShiftExpressionContext shiftExpression() { + return getRuleContext(ShiftExpressionContext.class,0); + } + public ShiftExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_shiftExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterShiftExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitShiftExpression(this); + } + } + + public final ShiftExpressionContext shiftExpression() throws RecognitionException { + return shiftExpression(0); + } + + private ShiftExpressionContext shiftExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ShiftExpressionContext _localctx = new ShiftExpressionContext(_ctx, _parentState); + ShiftExpressionContext _prevctx = _localctx; + int _startState = 22; + enterRecursionRule(_localctx, 22, RULE_shiftExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(375); additiveExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(385); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(383); + switch ( getInterpreter().adaptivePredict(_input,16,_ctx) ) { + case 1: + { + _localctx = new ShiftExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_shiftExpression); + setState(377); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(378); match(LeftShift); + setState(379); additiveExpression(0); + } + break; + case 2: + { + _localctx = new ShiftExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_shiftExpression); + setState(380); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(381); match(RightShift); + setState(382); additiveExpression(0); + } + break; + } + } + } + setState(387); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,17,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class RelationalExpressionContext extends ParserRuleContext { + public RelationalExpressionContext relationalExpression() { + return getRuleContext(RelationalExpressionContext.class,0); + } + public ShiftExpressionContext shiftExpression() { + return getRuleContext(ShiftExpressionContext.class,0); + } + public RelationalExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_relationalExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterRelationalExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitRelationalExpression(this); + } + } + + public final RelationalExpressionContext relationalExpression() throws RecognitionException { + return relationalExpression(0); + } + + private RelationalExpressionContext relationalExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + RelationalExpressionContext _localctx = new RelationalExpressionContext(_ctx, _parentState); + RelationalExpressionContext _prevctx = _localctx; + int _startState = 24; + enterRecursionRule(_localctx, 24, RULE_relationalExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(389); shiftExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(405); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,19,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(403); + switch ( getInterpreter().adaptivePredict(_input,18,_ctx) ) { + case 1: + { + _localctx = new RelationalExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression); + setState(391); + if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(392); match(Less); + setState(393); shiftExpression(0); + } + break; + case 2: + { + _localctx = new RelationalExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression); + setState(394); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(395); match(Greater); + setState(396); shiftExpression(0); + } + break; + case 3: + { + _localctx = new RelationalExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression); + setState(397); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(398); match(LessEqual); + setState(399); shiftExpression(0); + } + break; + case 4: + { + _localctx = new RelationalExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_relationalExpression); + setState(400); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(401); match(GreaterEqual); + setState(402); shiftExpression(0); + } + break; + } + } + } + setState(407); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,19,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class EqualityExpressionContext extends ParserRuleContext { + public RelationalExpressionContext relationalExpression() { + return getRuleContext(RelationalExpressionContext.class,0); + } + public EqualityExpressionContext equalityExpression() { + return getRuleContext(EqualityExpressionContext.class,0); + } + public EqualityExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_equalityExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterEqualityExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitEqualityExpression(this); + } + } + + public final EqualityExpressionContext equalityExpression() throws RecognitionException { + return equalityExpression(0); + } + + private EqualityExpressionContext equalityExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + EqualityExpressionContext _localctx = new EqualityExpressionContext(_ctx, _parentState); + EqualityExpressionContext _prevctx = _localctx; + int _startState = 26; + enterRecursionRule(_localctx, 26, RULE_equalityExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(409); relationalExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(419); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,21,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(417); + switch ( getInterpreter().adaptivePredict(_input,20,_ctx) ) { + case 1: + { + _localctx = new EqualityExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_equalityExpression); + setState(411); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(412); match(Equal); + setState(413); relationalExpression(0); + } + break; + case 2: + { + _localctx = new EqualityExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_equalityExpression); + setState(414); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(415); match(NotEqual); + setState(416); relationalExpression(0); + } + break; + } + } + } + setState(421); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,21,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class AndExpressionContext extends ParserRuleContext { + public AndExpressionContext andExpression() { + return getRuleContext(AndExpressionContext.class,0); + } + public EqualityExpressionContext equalityExpression() { + return getRuleContext(EqualityExpressionContext.class,0); + } + public AndExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_andExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterAndExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitAndExpression(this); + } + } + + public final AndExpressionContext andExpression() throws RecognitionException { + return andExpression(0); + } + + private AndExpressionContext andExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + AndExpressionContext _localctx = new AndExpressionContext(_ctx, _parentState); + AndExpressionContext _prevctx = _localctx; + int _startState = 28; + enterRecursionRule(_localctx, 28, RULE_andExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(423); equalityExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(430); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,22,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new AndExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_andExpression); + setState(425); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(426); match(And); + setState(427); equalityExpression(0); + } + } + } + setState(432); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,22,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ExclusiveOrExpressionContext extends ParserRuleContext { + public AndExpressionContext andExpression() { + return getRuleContext(AndExpressionContext.class,0); + } + public ExclusiveOrExpressionContext exclusiveOrExpression() { + return getRuleContext(ExclusiveOrExpressionContext.class,0); + } + public ExclusiveOrExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_exclusiveOrExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterExclusiveOrExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitExclusiveOrExpression(this); + } + } + + public final ExclusiveOrExpressionContext exclusiveOrExpression() throws RecognitionException { + return exclusiveOrExpression(0); + } + + private ExclusiveOrExpressionContext exclusiveOrExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExclusiveOrExpressionContext _localctx = new ExclusiveOrExpressionContext(_ctx, _parentState); + ExclusiveOrExpressionContext _prevctx = _localctx; + int _startState = 30; + enterRecursionRule(_localctx, 30, RULE_exclusiveOrExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(434); andExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(441); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,23,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ExclusiveOrExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_exclusiveOrExpression); + setState(436); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(437); match(Caret); + setState(438); andExpression(0); + } + } + } + setState(443); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,23,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class InclusiveOrExpressionContext extends ParserRuleContext { + public InclusiveOrExpressionContext inclusiveOrExpression() { + return getRuleContext(InclusiveOrExpressionContext.class,0); + } + public ExclusiveOrExpressionContext exclusiveOrExpression() { + return getRuleContext(ExclusiveOrExpressionContext.class,0); + } + public InclusiveOrExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_inclusiveOrExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterInclusiveOrExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitInclusiveOrExpression(this); + } + } + + public final InclusiveOrExpressionContext inclusiveOrExpression() throws RecognitionException { + return inclusiveOrExpression(0); + } + + private InclusiveOrExpressionContext inclusiveOrExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + InclusiveOrExpressionContext _localctx = new InclusiveOrExpressionContext(_ctx, _parentState); + InclusiveOrExpressionContext _prevctx = _localctx; + int _startState = 32; + enterRecursionRule(_localctx, 32, RULE_inclusiveOrExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(445); exclusiveOrExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(452); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new InclusiveOrExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_inclusiveOrExpression); + setState(447); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(448); match(Or); + setState(449); exclusiveOrExpression(0); + } + } + } + setState(454); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class LogicalAndExpressionContext extends ParserRuleContext { + public InclusiveOrExpressionContext inclusiveOrExpression() { + return getRuleContext(InclusiveOrExpressionContext.class,0); + } + public LogicalAndExpressionContext logicalAndExpression() { + return getRuleContext(LogicalAndExpressionContext.class,0); + } + public LogicalAndExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_logicalAndExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterLogicalAndExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitLogicalAndExpression(this); + } + } + + public final LogicalAndExpressionContext logicalAndExpression() throws RecognitionException { + return logicalAndExpression(0); + } + + private LogicalAndExpressionContext logicalAndExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + LogicalAndExpressionContext _localctx = new LogicalAndExpressionContext(_ctx, _parentState); + LogicalAndExpressionContext _prevctx = _localctx; + int _startState = 34; + enterRecursionRule(_localctx, 34, RULE_logicalAndExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(456); inclusiveOrExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(463); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,25,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new LogicalAndExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_logicalAndExpression); + setState(458); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(459); match(AndAnd); + setState(460); inclusiveOrExpression(0); + } + } + } + setState(465); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,25,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class LogicalOrExpressionContext extends ParserRuleContext { + public LogicalOrExpressionContext logicalOrExpression() { + return getRuleContext(LogicalOrExpressionContext.class,0); + } + public LogicalAndExpressionContext logicalAndExpression() { + return getRuleContext(LogicalAndExpressionContext.class,0); + } + public LogicalOrExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_logicalOrExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterLogicalOrExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitLogicalOrExpression(this); + } + } + + public final LogicalOrExpressionContext logicalOrExpression() throws RecognitionException { + return logicalOrExpression(0); + } + + private LogicalOrExpressionContext logicalOrExpression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + LogicalOrExpressionContext _localctx = new LogicalOrExpressionContext(_ctx, _parentState); + LogicalOrExpressionContext _prevctx = _localctx; + int _startState = 36; + enterRecursionRule(_localctx, 36, RULE_logicalOrExpression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(467); logicalAndExpression(0); + } + _ctx.stop = _input.LT(-1); + setState(474); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,26,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new LogicalOrExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_logicalOrExpression); + setState(469); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(470); match(OrOr); + setState(471); logicalAndExpression(0); + } + } + } + setState(476); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,26,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ConditionalExpressionContext extends ParserRuleContext { + public ConditionalExpressionContext conditionalExpression() { + return getRuleContext(ConditionalExpressionContext.class,0); + } + public LogicalOrExpressionContext logicalOrExpression() { + return getRuleContext(LogicalOrExpressionContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ConditionalExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_conditionalExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterConditionalExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitConditionalExpression(this); + } + } + + public final ConditionalExpressionContext conditionalExpression() throws RecognitionException { + ConditionalExpressionContext _localctx = new ConditionalExpressionContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_conditionalExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(477); logicalOrExpression(0); + setState(483); + switch ( getInterpreter().adaptivePredict(_input,27,_ctx) ) { + case 1: + { + setState(478); match(Question); + setState(479); expression(0); + setState(480); match(Colon); + setState(481); conditionalExpression(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AssignmentExpressionContext extends ParserRuleContext { + public ConditionalExpressionContext conditionalExpression() { + return getRuleContext(ConditionalExpressionContext.class,0); + } + public UnaryExpressionContext unaryExpression() { + return getRuleContext(UnaryExpressionContext.class,0); + } + public AssignmentExpressionContext assignmentExpression() { + return getRuleContext(AssignmentExpressionContext.class,0); + } + public AssignmentOperatorContext assignmentOperator() { + return getRuleContext(AssignmentOperatorContext.class,0); + } + public AssignmentExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignmentExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterAssignmentExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitAssignmentExpression(this); + } + } + + public final AssignmentExpressionContext assignmentExpression() throws RecognitionException { + AssignmentExpressionContext _localctx = new AssignmentExpressionContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_assignmentExpression); + try { + setState(490); + switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(485); conditionalExpression(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(486); unaryExpression(); + setState(487); assignmentOperator(); + setState(488); assignmentExpression(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AssignmentOperatorContext extends ParserRuleContext { + public AssignmentOperatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignmentOperator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterAssignmentOperator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitAssignmentOperator(this); + } + } + + public final AssignmentOperatorContext assignmentOperator() throws RecognitionException { + AssignmentOperatorContext _localctx = new AssignmentOperatorContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_assignmentOperator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(492); + _la = _input.LA(1); + if ( !(((((_la - 89)) & ~0x3f) == 0 && ((1L << (_la - 89)) & ((1L << (Assign - 89)) | (1L << (StarAssign - 89)) | (1L << (DivAssign - 89)) | (1L << (ModAssign - 89)) | (1L << (PlusAssign - 89)) | (1L << (MinusAssign - 89)) | (1L << (LeftShiftAssign - 89)) | (1L << (RightShiftAssign - 89)) | (1L << (AndAssign - 89)) | (1L << (XorAssign - 89)) | (1L << (OrAssign - 89)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionContext extends ParserRuleContext { + public AssignmentExpressionContext assignmentExpression() { + return getRuleContext(AssignmentExpressionContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitExpression(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 44; + enterRecursionRule(_localctx, 44, RULE_expression, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(495); assignmentExpression(); + } + _ctx.stop = _input.LT(-1); + setState(502); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,29,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(497); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(498); match(Comma); + setState(499); assignmentExpression(); + } + } + } + setState(504); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,29,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ConstantExpressionContext extends ParserRuleContext { + public ConditionalExpressionContext conditionalExpression() { + return getRuleContext(ConditionalExpressionContext.class,0); + } + public ConstantExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterConstantExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitConstantExpression(this); + } + } + + public final ConstantExpressionContext constantExpression() throws RecognitionException { + ConstantExpressionContext _localctx = new ConstantExpressionContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_constantExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(505); conditionalExpression(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DeclarationContext extends ParserRuleContext { + public InitDeclaratorListContext initDeclaratorList() { + return getRuleContext(InitDeclaratorListContext.class,0); + } + public StaticAssertDeclarationContext staticAssertDeclaration() { + return getRuleContext(StaticAssertDeclarationContext.class,0); + } + public DeclarationSpecifiersContext declarationSpecifiers() { + return getRuleContext(DeclarationSpecifiersContext.class,0); + } + public DeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_declaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDeclaration(this); + } + } + + public final DeclarationContext declaration() throws RecognitionException { + DeclarationContext _localctx = new DeclarationContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_declaration); + try { + setState(515); + switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(507); declarationSpecifiers(); + setState(508); initDeclaratorList(0); + setState(509); match(Semi); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(511); declarationSpecifiers(); + setState(512); match(Semi); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(514); staticAssertDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DeclarationSpecifiersContext extends ParserRuleContext { + public List declarationSpecifier() { + return getRuleContexts(DeclarationSpecifierContext.class); + } + public DeclarationSpecifierContext declarationSpecifier(int i) { + return getRuleContext(DeclarationSpecifierContext.class,i); + } + public DeclarationSpecifiersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_declarationSpecifiers; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDeclarationSpecifiers(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDeclarationSpecifiers(this); + } + } + + public final DeclarationSpecifiersContext declarationSpecifiers() throws RecognitionException { + DeclarationSpecifiersContext _localctx = new DeclarationSpecifiersContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_declarationSpecifiers); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(518); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(517); declarationSpecifier(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(520); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,31,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DeclarationSpecifiers2Context extends ParserRuleContext { + public List declarationSpecifier() { + return getRuleContexts(DeclarationSpecifierContext.class); + } + public DeclarationSpecifierContext declarationSpecifier(int i) { + return getRuleContext(DeclarationSpecifierContext.class,i); + } + public DeclarationSpecifiers2Context(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_declarationSpecifiers2; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDeclarationSpecifiers2(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDeclarationSpecifiers2(this); + } + } + + public final DeclarationSpecifiers2Context declarationSpecifiers2() throws RecognitionException { + DeclarationSpecifiers2Context _localctx = new DeclarationSpecifiers2Context(_ctx, getState()); + enterRule(_localctx, 52, RULE_declarationSpecifiers2); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(523); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(522); declarationSpecifier(); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(525); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,32,_ctx); + } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DeclarationSpecifierContext extends ParserRuleContext { + public FunctionSpecifierContext functionSpecifier() { + return getRuleContext(FunctionSpecifierContext.class,0); + } + public TypeSpecifierContext typeSpecifier() { + return getRuleContext(TypeSpecifierContext.class,0); + } + public AlignmentSpecifierContext alignmentSpecifier() { + return getRuleContext(AlignmentSpecifierContext.class,0); + } + public StorageClassSpecifierContext storageClassSpecifier() { + return getRuleContext(StorageClassSpecifierContext.class,0); + } + public TypeQualifierContext typeQualifier() { + return getRuleContext(TypeQualifierContext.class,0); + } + public DeclarationSpecifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_declarationSpecifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDeclarationSpecifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDeclarationSpecifier(this); + } + } + + public final DeclarationSpecifierContext declarationSpecifier() throws RecognitionException { + DeclarationSpecifierContext _localctx = new DeclarationSpecifierContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_declarationSpecifier); + try { + setState(532); + switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(527); storageClassSpecifier(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(528); typeSpecifier(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(529); typeQualifier(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(530); functionSpecifier(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(531); alignmentSpecifier(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InitDeclaratorListContext extends ParserRuleContext { + public InitDeclaratorContext initDeclarator() { + return getRuleContext(InitDeclaratorContext.class,0); + } + public InitDeclaratorListContext initDeclaratorList() { + return getRuleContext(InitDeclaratorListContext.class,0); + } + public InitDeclaratorListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_initDeclaratorList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterInitDeclaratorList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitInitDeclaratorList(this); + } + } + + public final InitDeclaratorListContext initDeclaratorList() throws RecognitionException { + return initDeclaratorList(0); + } + + private InitDeclaratorListContext initDeclaratorList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + InitDeclaratorListContext _localctx = new InitDeclaratorListContext(_ctx, _parentState); + InitDeclaratorListContext _prevctx = _localctx; + int _startState = 56; + enterRecursionRule(_localctx, 56, RULE_initDeclaratorList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(535); initDeclarator(); + } + _ctx.stop = _input.LT(-1); + setState(542); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,34,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new InitDeclaratorListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_initDeclaratorList); + setState(537); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(538); match(Comma); + setState(539); initDeclarator(); + } + } + } + setState(544); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,34,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class InitDeclaratorContext extends ParserRuleContext { + public DeclaratorContext declarator() { + return getRuleContext(DeclaratorContext.class,0); + } + public InitializerContext initializer() { + return getRuleContext(InitializerContext.class,0); + } + public InitDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_initDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterInitDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitInitDeclarator(this); + } + } + + public final InitDeclaratorContext initDeclarator() throws RecognitionException { + InitDeclaratorContext _localctx = new InitDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_initDeclarator); + try { + setState(550); + switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(545); declarator(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(546); declarator(); + setState(547); match(Assign); + setState(548); initializer(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StorageClassSpecifierContext extends ParserRuleContext { + public StorageClassSpecifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_storageClassSpecifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterStorageClassSpecifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitStorageClassSpecifier(this); + } + } + + public final StorageClassSpecifierContext storageClassSpecifier() throws RecognitionException { + StorageClassSpecifierContext _localctx = new StorageClassSpecifierContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_storageClassSpecifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(552); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Auto) | (1L << Extern) | (1L << Register) | (1L << Static) | (1L << Typedef) | (1L << ThreadLocal))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeSpecifierContext extends ParserRuleContext { + public AtomicTypeSpecifierContext atomicTypeSpecifier() { + return getRuleContext(AtomicTypeSpecifierContext.class,0); + } + public StructOrUnionSpecifierContext structOrUnionSpecifier() { + return getRuleContext(StructOrUnionSpecifierContext.class,0); + } + public TypedefNameContext typedefName() { + return getRuleContext(TypedefNameContext.class,0); + } + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public EnumSpecifierContext enumSpecifier() { + return getRuleContext(EnumSpecifierContext.class,0); + } + public TypeSpecifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeSpecifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterTypeSpecifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitTypeSpecifier(this); + } + } + + public final TypeSpecifierContext typeSpecifier() throws RecognitionException { + TypeSpecifierContext _localctx = new TypeSpecifierContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_typeSpecifier); + int _la; + try { + setState(568); + switch (_input.LA(1)) { + case T__5: + case T__4: + case T__1: + case Char: + case Double: + case Float: + case Int: + case Long: + case Short: + case Signed: + case Unsigned: + case Void: + case Bool: + case Complex: + enterOuterAlt(_localctx, 1); + { + setState(554); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__4) | (1L << T__1) | (1L << Char) | (1L << Double) | (1L << Float) | (1L << Int) | (1L << Long) | (1L << Short) | (1L << Signed) | (1L << Unsigned) | (1L << Void) | (1L << Bool) | (1L << Complex))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + case T__13: + enterOuterAlt(_localctx, 2); + { + setState(555); match(T__13); + setState(556); match(LeftParen); + setState(557); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__4) | (1L << T__1))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(558); match(RightParen); + } + break; + case Atomic: + enterOuterAlt(_localctx, 3); + { + setState(559); atomicTypeSpecifier(); + } + break; + case Struct: + case Union: + enterOuterAlt(_localctx, 4); + { + setState(560); structOrUnionSpecifier(); + } + break; + case Enum: + enterOuterAlt(_localctx, 5); + { + setState(561); enumSpecifier(); + } + break; + case Identifier: + enterOuterAlt(_localctx, 6); + { + setState(562); typedefName(); + } + break; + case T__7: + enterOuterAlt(_localctx, 7); + { + setState(563); match(T__7); + setState(564); match(LeftParen); + setState(565); constantExpression(); + setState(566); match(RightParen); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StructOrUnionSpecifierContext extends ParserRuleContext { + public StructOrUnionContext structOrUnion() { + return getRuleContext(StructOrUnionContext.class,0); + } + public StructDeclarationListContext structDeclarationList() { + return getRuleContext(StructDeclarationListContext.class,0); + } + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public StructOrUnionSpecifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_structOrUnionSpecifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterStructOrUnionSpecifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitStructOrUnionSpecifier(this); + } + } + + public final StructOrUnionSpecifierContext structOrUnionSpecifier() throws RecognitionException { + StructOrUnionSpecifierContext _localctx = new StructOrUnionSpecifierContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_structOrUnionSpecifier); + int _la; + try { + setState(581); + switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(570); structOrUnion(); + setState(572); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(571); match(Identifier); + } + } + + setState(574); match(LeftBrace); + setState(575); structDeclarationList(0); + setState(576); match(RightBrace); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(578); structOrUnion(); + setState(579); match(Identifier); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StructOrUnionContext extends ParserRuleContext { + public StructOrUnionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_structOrUnion; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterStructOrUnion(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitStructOrUnion(this); + } + } + + public final StructOrUnionContext structOrUnion() throws RecognitionException { + StructOrUnionContext _localctx = new StructOrUnionContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_structOrUnion); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(583); + _la = _input.LA(1); + if ( !(_la==Struct || _la==Union) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StructDeclarationListContext extends ParserRuleContext { + public StructDeclarationListContext structDeclarationList() { + return getRuleContext(StructDeclarationListContext.class,0); + } + public StructDeclarationContext structDeclaration() { + return getRuleContext(StructDeclarationContext.class,0); + } + public StructDeclarationListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_structDeclarationList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterStructDeclarationList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitStructDeclarationList(this); + } + } + + public final StructDeclarationListContext structDeclarationList() throws RecognitionException { + return structDeclarationList(0); + } + + private StructDeclarationListContext structDeclarationList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + StructDeclarationListContext _localctx = new StructDeclarationListContext(_ctx, _parentState); + StructDeclarationListContext _prevctx = _localctx; + int _startState = 68; + enterRecursionRule(_localctx, 68, RULE_structDeclarationList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(586); structDeclaration(); + } + _ctx.stop = _input.LT(-1); + setState(592); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new StructDeclarationListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_structDeclarationList); + setState(588); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(589); structDeclaration(); + } + } + } + setState(594); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,39,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class StructDeclarationContext extends ParserRuleContext { + public StaticAssertDeclarationContext staticAssertDeclaration() { + return getRuleContext(StaticAssertDeclarationContext.class,0); + } + public StructDeclaratorListContext structDeclaratorList() { + return getRuleContext(StructDeclaratorListContext.class,0); + } + public SpecifierQualifierListContext specifierQualifierList() { + return getRuleContext(SpecifierQualifierListContext.class,0); + } + public StructDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_structDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterStructDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitStructDeclaration(this); + } + } + + public final StructDeclarationContext structDeclaration() throws RecognitionException { + StructDeclarationContext _localctx = new StructDeclarationContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_structDeclaration); + int _la; + try { + setState(602); + switch (_input.LA(1)) { + case T__13: + case T__7: + case T__5: + case T__4: + case T__1: + case Char: + case Const: + case Double: + case Enum: + case Float: + case Int: + case Long: + case Restrict: + case Short: + case Signed: + case Struct: + case Union: + case Unsigned: + case Void: + case Volatile: + case Atomic: + case Bool: + case Complex: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(595); specifierQualifierList(); + setState(597); + _la = _input.LA(1); + if (((((_la - 59)) & ~0x3f) == 0 && ((1L << (_la - 59)) & ((1L << (LeftParen - 59)) | (1L << (Star - 59)) | (1L << (Caret - 59)) | (1L << (Colon - 59)) | (1L << (Identifier - 59)))) != 0)) { + { + setState(596); structDeclaratorList(0); + } + } + + setState(599); match(Semi); + } + break; + case StaticAssert: + enterOuterAlt(_localctx, 2); + { + setState(601); staticAssertDeclaration(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SpecifierQualifierListContext extends ParserRuleContext { + public TypeSpecifierContext typeSpecifier() { + return getRuleContext(TypeSpecifierContext.class,0); + } + public SpecifierQualifierListContext specifierQualifierList() { + return getRuleContext(SpecifierQualifierListContext.class,0); + } + public TypeQualifierContext typeQualifier() { + return getRuleContext(TypeQualifierContext.class,0); + } + public SpecifierQualifierListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_specifierQualifierList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterSpecifierQualifierList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitSpecifierQualifierList(this); + } + } + + public final SpecifierQualifierListContext specifierQualifierList() throws RecognitionException { + SpecifierQualifierListContext _localctx = new SpecifierQualifierListContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_specifierQualifierList); + try { + setState(612); + switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(604); typeSpecifier(); + setState(606); + switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) { + case 1: + { + setState(605); specifierQualifierList(); + } + break; + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(608); typeQualifier(); + setState(610); + switch ( getInterpreter().adaptivePredict(_input,43,_ctx) ) { + case 1: + { + setState(609); specifierQualifierList(); + } + break; + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StructDeclaratorListContext extends ParserRuleContext { + public StructDeclaratorContext structDeclarator() { + return getRuleContext(StructDeclaratorContext.class,0); + } + public StructDeclaratorListContext structDeclaratorList() { + return getRuleContext(StructDeclaratorListContext.class,0); + } + public StructDeclaratorListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_structDeclaratorList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterStructDeclaratorList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitStructDeclaratorList(this); + } + } + + public final StructDeclaratorListContext structDeclaratorList() throws RecognitionException { + return structDeclaratorList(0); + } + + private StructDeclaratorListContext structDeclaratorList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + StructDeclaratorListContext _localctx = new StructDeclaratorListContext(_ctx, _parentState); + StructDeclaratorListContext _prevctx = _localctx; + int _startState = 74; + enterRecursionRule(_localctx, 74, RULE_structDeclaratorList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(615); structDeclarator(); + } + _ctx.stop = _input.LT(-1); + setState(622); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,45,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new StructDeclaratorListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_structDeclaratorList); + setState(617); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(618); match(Comma); + setState(619); structDeclarator(); + } + } + } + setState(624); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,45,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class StructDeclaratorContext extends ParserRuleContext { + public DeclaratorContext declarator() { + return getRuleContext(DeclaratorContext.class,0); + } + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public StructDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_structDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterStructDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitStructDeclarator(this); + } + } + + public final StructDeclaratorContext structDeclarator() throws RecognitionException { + StructDeclaratorContext _localctx = new StructDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_structDeclarator); + int _la; + try { + setState(631); + switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(625); declarator(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(627); + _la = _input.LA(1); + if (((((_la - 59)) & ~0x3f) == 0 && ((1L << (_la - 59)) & ((1L << (LeftParen - 59)) | (1L << (Star - 59)) | (1L << (Caret - 59)) | (1L << (Identifier - 59)))) != 0)) { + { + setState(626); declarator(); + } + } + + setState(629); match(Colon); + setState(630); constantExpression(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumSpecifierContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public EnumeratorListContext enumeratorList() { + return getRuleContext(EnumeratorListContext.class,0); + } + public EnumSpecifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumSpecifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterEnumSpecifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitEnumSpecifier(this); + } + } + + public final EnumSpecifierContext enumSpecifier() throws RecognitionException { + EnumSpecifierContext _localctx = new EnumSpecifierContext(_ctx, getState()); + enterRule(_localctx, 78, RULE_enumSpecifier); + int _la; + try { + setState(652); + switch ( getInterpreter().adaptivePredict(_input,50,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(633); match(Enum); + setState(635); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(634); match(Identifier); + } + } + + setState(637); match(LeftBrace); + setState(638); enumeratorList(0); + setState(639); match(RightBrace); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(641); match(Enum); + setState(643); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(642); match(Identifier); + } + } + + setState(645); match(LeftBrace); + setState(646); enumeratorList(0); + setState(647); match(Comma); + setState(648); match(RightBrace); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(650); match(Enum); + setState(651); match(Identifier); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumeratorListContext extends ParserRuleContext { + public EnumeratorContext enumerator() { + return getRuleContext(EnumeratorContext.class,0); + } + public EnumeratorListContext enumeratorList() { + return getRuleContext(EnumeratorListContext.class,0); + } + public EnumeratorListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumeratorList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterEnumeratorList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitEnumeratorList(this); + } + } + + public final EnumeratorListContext enumeratorList() throws RecognitionException { + return enumeratorList(0); + } + + private EnumeratorListContext enumeratorList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + EnumeratorListContext _localctx = new EnumeratorListContext(_ctx, _parentState); + EnumeratorListContext _prevctx = _localctx; + int _startState = 80; + enterRecursionRule(_localctx, 80, RULE_enumeratorList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(655); enumerator(); + } + _ctx.stop = _input.LT(-1); + setState(662); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,51,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new EnumeratorListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_enumeratorList); + setState(657); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(658); match(Comma); + setState(659); enumerator(); + } + } + } + setState(664); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,51,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class EnumeratorContext extends ParserRuleContext { + public EnumerationConstantContext enumerationConstant() { + return getRuleContext(EnumerationConstantContext.class,0); + } + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public EnumeratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumerator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterEnumerator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitEnumerator(this); + } + } + + public final EnumeratorContext enumerator() throws RecognitionException { + EnumeratorContext _localctx = new EnumeratorContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_enumerator); + try { + setState(670); + switch ( getInterpreter().adaptivePredict(_input,52,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(665); enumerationConstant(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(666); enumerationConstant(); + setState(667); match(Assign); + setState(668); constantExpression(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumerationConstantContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public EnumerationConstantContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumerationConstant; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterEnumerationConstant(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitEnumerationConstant(this); + } + } + + public final EnumerationConstantContext enumerationConstant() throws RecognitionException { + EnumerationConstantContext _localctx = new EnumerationConstantContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_enumerationConstant); + try { + enterOuterAlt(_localctx, 1); + { + setState(672); match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AtomicTypeSpecifierContext extends ParserRuleContext { + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public AtomicTypeSpecifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_atomicTypeSpecifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterAtomicTypeSpecifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitAtomicTypeSpecifier(this); + } + } + + public final AtomicTypeSpecifierContext atomicTypeSpecifier() throws RecognitionException { + AtomicTypeSpecifierContext _localctx = new AtomicTypeSpecifierContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_atomicTypeSpecifier); + try { + enterOuterAlt(_localctx, 1); + { + setState(674); match(Atomic); + setState(675); match(LeftParen); + setState(676); typeName(); + setState(677); match(RightParen); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeQualifierContext extends ParserRuleContext { + public TypeQualifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeQualifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterTypeQualifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitTypeQualifier(this); + } + } + + public final TypeQualifierContext typeQualifier() throws RecognitionException { + TypeQualifierContext _localctx = new TypeQualifierContext(_ctx, getState()); + enterRule(_localctx, 88, RULE_typeQualifier); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(679); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Const) | (1L << Restrict) | (1L << Volatile) | (1L << Atomic))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionSpecifierContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public GccAttributeSpecifierContext gccAttributeSpecifier() { + return getRuleContext(GccAttributeSpecifierContext.class,0); + } + public FunctionSpecifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionSpecifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterFunctionSpecifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitFunctionSpecifier(this); + } + } + + public final FunctionSpecifierContext functionSpecifier() throws RecognitionException { + FunctionSpecifierContext _localctx = new FunctionSpecifierContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_functionSpecifier); + int _la; + try { + setState(687); + switch (_input.LA(1)) { + case T__11: + case T__2: + case Inline: + case Noreturn: + enterOuterAlt(_localctx, 1); + { + setState(681); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__11) | (1L << T__2) | (1L << Inline) | (1L << Noreturn))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + case T__3: + enterOuterAlt(_localctx, 2); + { + setState(682); gccAttributeSpecifier(); + } + break; + case T__9: + enterOuterAlt(_localctx, 3); + { + setState(683); match(T__9); + setState(684); match(LeftParen); + setState(685); match(Identifier); + setState(686); match(RightParen); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AlignmentSpecifierContext extends ParserRuleContext { + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public AlignmentSpecifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_alignmentSpecifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterAlignmentSpecifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitAlignmentSpecifier(this); + } + } + + public final AlignmentSpecifierContext alignmentSpecifier() throws RecognitionException { + AlignmentSpecifierContext _localctx = new AlignmentSpecifierContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_alignmentSpecifier); + try { + setState(699); + switch ( getInterpreter().adaptivePredict(_input,54,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(689); match(Alignas); + setState(690); match(LeftParen); + setState(691); typeName(); + setState(692); match(RightParen); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(694); match(Alignas); + setState(695); match(LeftParen); + setState(696); constantExpression(); + setState(697); match(RightParen); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DeclaratorContext extends ParserRuleContext { + public DirectDeclaratorContext directDeclarator() { + return getRuleContext(DirectDeclaratorContext.class,0); + } + public List gccDeclaratorExtension() { + return getRuleContexts(GccDeclaratorExtensionContext.class); + } + public PointerContext pointer() { + return getRuleContext(PointerContext.class,0); + } + public GccDeclaratorExtensionContext gccDeclaratorExtension(int i) { + return getRuleContext(GccDeclaratorExtensionContext.class,i); + } + public DeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_declarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDeclarator(this); + } + } + + public final DeclaratorContext declarator() throws RecognitionException { + DeclaratorContext _localctx = new DeclaratorContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_declarator); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(702); + _la = _input.LA(1); + if (_la==Star || _la==Caret) { + { + setState(701); pointer(); + } + } + + setState(704); directDeclarator(0); + setState(708); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,56,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(705); gccDeclaratorExtension(); + } + } + } + setState(710); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,56,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DirectDeclaratorContext extends ParserRuleContext { + public TypeQualifierListContext typeQualifierList() { + return getRuleContext(TypeQualifierListContext.class,0); + } + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public DirectDeclaratorContext directDeclarator() { + return getRuleContext(DirectDeclaratorContext.class,0); + } + public DeclaratorContext declarator() { + return getRuleContext(DeclaratorContext.class,0); + } + public IdentifierListContext identifierList() { + return getRuleContext(IdentifierListContext.class,0); + } + public AssignmentExpressionContext assignmentExpression() { + return getRuleContext(AssignmentExpressionContext.class,0); + } + public ParameterTypeListContext parameterTypeList() { + return getRuleContext(ParameterTypeListContext.class,0); + } + public DirectDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_directDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDirectDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDirectDeclarator(this); + } + } + + public final DirectDeclaratorContext directDeclarator() throws RecognitionException { + return directDeclarator(0); + } + + private DirectDeclaratorContext directDeclarator(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + DirectDeclaratorContext _localctx = new DirectDeclaratorContext(_ctx, _parentState); + DirectDeclaratorContext _prevctx = _localctx; + int _startState = 96; + enterRecursionRule(_localctx, 96, RULE_directDeclarator, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(717); + switch (_input.LA(1)) { + case Identifier: + { + setState(712); match(Identifier); + } + break; + case LeftParen: + { + setState(713); match(LeftParen); + setState(714); declarator(); + setState(715); match(RightParen); + } + break; + default: + throw new NoViableAltException(this); + } + _ctx.stop = _input.LT(-1); + setState(764); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,64,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(762); + switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) { + case 1: + { + _localctx = new DirectDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directDeclarator); + setState(719); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(720); match(LeftBracket); + setState(722); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Const) | (1L << Restrict) | (1L << Volatile) | (1L << Atomic))) != 0)) { + { + setState(721); typeQualifierList(0); + } + } + + setState(725); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(724); assignmentExpression(); + } + } + + setState(727); match(RightBracket); + } + break; + case 2: + { + _localctx = new DirectDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directDeclarator); + setState(728); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(729); match(LeftBracket); + setState(730); match(Static); + setState(732); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Const) | (1L << Restrict) | (1L << Volatile) | (1L << Atomic))) != 0)) { + { + setState(731); typeQualifierList(0); + } + } + + setState(734); assignmentExpression(); + setState(735); match(RightBracket); + } + break; + case 3: + { + _localctx = new DirectDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directDeclarator); + setState(737); + if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(738); match(LeftBracket); + setState(739); typeQualifierList(0); + setState(740); match(Static); + setState(741); assignmentExpression(); + setState(742); match(RightBracket); + } + break; + case 4: + { + _localctx = new DirectDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directDeclarator); + setState(744); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(745); match(LeftBracket); + setState(747); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Const) | (1L << Restrict) | (1L << Volatile) | (1L << Atomic))) != 0)) { + { + setState(746); typeQualifierList(0); + } + } + + setState(749); match(Star); + setState(750); match(RightBracket); + } + break; + case 5: + { + _localctx = new DirectDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directDeclarator); + setState(751); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(752); match(LeftParen); + setState(753); parameterTypeList(); + setState(754); match(RightParen); + } + break; + case 6: + { + _localctx = new DirectDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directDeclarator); + setState(756); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(757); match(LeftParen); + setState(759); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(758); identifierList(0); + } + } + + setState(761); match(RightParen); + } + break; + } + } + } + setState(766); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,64,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class GccDeclaratorExtensionContext extends ParserRuleContext { + public List StringLiteral() { return getTokens(CParser.StringLiteral); } + public GccAttributeSpecifierContext gccAttributeSpecifier() { + return getRuleContext(GccAttributeSpecifierContext.class,0); + } + public TerminalNode StringLiteral(int i) { + return getToken(CParser.StringLiteral, i); + } + public GccDeclaratorExtensionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_gccDeclaratorExtension; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterGccDeclaratorExtension(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitGccDeclaratorExtension(this); + } + } + + public final GccDeclaratorExtensionContext gccDeclaratorExtension() throws RecognitionException { + GccDeclaratorExtensionContext _localctx = new GccDeclaratorExtensionContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_gccDeclaratorExtension); + int _la; + try { + setState(776); + switch (_input.LA(1)) { + case T__6: + enterOuterAlt(_localctx, 1); + { + setState(767); match(T__6); + setState(768); match(LeftParen); + setState(770); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(769); match(StringLiteral); + } + } + setState(772); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==StringLiteral ); + setState(774); match(RightParen); + } + break; + case T__3: + enterOuterAlt(_localctx, 2); + { + setState(775); gccAttributeSpecifier(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GccAttributeSpecifierContext extends ParserRuleContext { + public GccAttributeListContext gccAttributeList() { + return getRuleContext(GccAttributeListContext.class,0); + } + public GccAttributeSpecifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_gccAttributeSpecifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterGccAttributeSpecifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitGccAttributeSpecifier(this); + } + } + + public final GccAttributeSpecifierContext gccAttributeSpecifier() throws RecognitionException { + GccAttributeSpecifierContext _localctx = new GccAttributeSpecifierContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_gccAttributeSpecifier); + try { + enterOuterAlt(_localctx, 1); + { + setState(778); match(T__3); + setState(779); match(LeftParen); + setState(780); match(LeftParen); + setState(781); gccAttributeList(); + setState(782); match(RightParen); + setState(783); match(RightParen); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GccAttributeListContext extends ParserRuleContext { + public GccAttributeContext gccAttribute(int i) { + return getRuleContext(GccAttributeContext.class,i); + } + public List gccAttribute() { + return getRuleContexts(GccAttributeContext.class); + } + public GccAttributeListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_gccAttributeList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterGccAttributeList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitGccAttributeList(this); + } + } + + public final GccAttributeListContext gccAttributeList() throws RecognitionException { + GccAttributeListContext _localctx = new GccAttributeListContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_gccAttributeList); + int _la; + try { + setState(794); + switch ( getInterpreter().adaptivePredict(_input,68,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(785); gccAttribute(); + setState(790); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(786); match(Comma); + setState(787); gccAttribute(); + } + } + setState(792); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GccAttributeContext extends ParserRuleContext { + public ArgumentExpressionListContext argumentExpressionList() { + return getRuleContext(ArgumentExpressionListContext.class,0); + } + public GccAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_gccAttribute; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterGccAttribute(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitGccAttribute(this); + } + } + + public final GccAttributeContext gccAttribute() throws RecognitionException { + GccAttributeContext _localctx = new GccAttributeContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_gccAttribute); + int _la; + try { + setState(805); + switch (_input.LA(1)) { + case T__13: + case T__12: + case T__11: + case T__10: + case T__9: + case T__8: + case T__7: + case T__6: + case T__5: + case T__4: + case T__3: + case T__2: + case T__1: + case T__0: + case Auto: + case Break: + case Case: + case Char: + case Const: + case Continue: + case Default: + case Do: + case Double: + case Else: + case Enum: + case Extern: + case Float: + case For: + case Goto: + case If: + case Inline: + case Int: + case Long: + case Register: + case Restrict: + case Return: + case Short: + case Signed: + case Sizeof: + case Static: + case Struct: + case Switch: + case Typedef: + case Union: + case Unsigned: + case Void: + case Volatile: + case While: + case Alignas: + case Alignof: + case Atomic: + case Bool: + case Complex: + case Generic: + case Imaginary: + case Noreturn: + case StaticAssert: + case ThreadLocal: + case LeftBracket: + case RightBracket: + case LeftBrace: + case RightBrace: + case Less: + case LessEqual: + case Greater: + case GreaterEqual: + case LeftShift: + case RightShift: + case Plus: + case PlusPlus: + case Minus: + case MinusMinus: + case Star: + case Div: + case Mod: + case And: + case Or: + case AndAnd: + case OrOr: + case Caret: + case Not: + case Tilde: + case Question: + case Colon: + case Semi: + case Assign: + case StarAssign: + case DivAssign: + case ModAssign: + case PlusAssign: + case MinusAssign: + case LeftShiftAssign: + case RightShiftAssign: + case AndAssign: + case XorAssign: + case OrAssign: + case Equal: + case NotEqual: + case Arrow: + case Dot: + case Ellipsis: + case Identifier: + case Constant: + case StringLiteral: + case ComplexDefine: + case AsmBlock: + case LineAfterPreprocessing: + case LineDirective: + case PragmaDirective: + case Whitespace: + case Newline: + case BlockComment: + case LineComment: + case Directives: + enterOuterAlt(_localctx, 1); + { + setState(796); + _la = _input.LA(1); + if ( _la <= 0 || (((((_la - 59)) & ~0x3f) == 0 && ((1L << (_la - 59)) & ((1L << (LeftParen - 59)) | (1L << (RightParen - 59)) | (1L << (Comma - 59)))) != 0)) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(802); + _la = _input.LA(1); + if (_la==LeftParen) { + { + setState(797); match(LeftParen); + setState(799); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(798); argumentExpressionList(0); + } + } + + setState(801); match(RightParen); + } + } + + } + break; + case RightParen: + case Comma: + enterOuterAlt(_localctx, 2); + { + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NestedParenthesesBlockContext extends ParserRuleContext { + public NestedParenthesesBlockContext nestedParenthesesBlock(int i) { + return getRuleContext(NestedParenthesesBlockContext.class,i); + } + public List nestedParenthesesBlock() { + return getRuleContexts(NestedParenthesesBlockContext.class); + } + public NestedParenthesesBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nestedParenthesesBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterNestedParenthesesBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitNestedParenthesesBlock(this); + } + } + + public final NestedParenthesesBlockContext nestedParenthesesBlock() throws RecognitionException { + NestedParenthesesBlockContext _localctx = new NestedParenthesesBlockContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_nestedParenthesesBlock); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(814); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__12) | (1L << T__11) | (1L << T__10) | (1L << T__9) | (1L << T__8) | (1L << T__7) | (1L << T__6) | (1L << T__5) | (1L << T__4) | (1L << T__3) | (1L << T__2) | (1L << T__1) | (1L << T__0) | (1L << Auto) | (1L << Break) | (1L << Case) | (1L << Char) | (1L << Const) | (1L << Continue) | (1L << Default) | (1L << Do) | (1L << Double) | (1L << Else) | (1L << Enum) | (1L << Extern) | (1L << Float) | (1L << For) | (1L << Goto) | (1L << If) | (1L << Inline) | (1L << Int) | (1L << Long) | (1L << Register) | (1L << Restrict) | (1L << Return) | (1L << Short) | (1L << Signed) | (1L << Sizeof) | (1L << Static) | (1L << Struct) | (1L << Switch) | (1L << Typedef) | (1L << Union) | (1L << Unsigned) | (1L << Void) | (1L << Volatile) | (1L << While) | (1L << Alignas) | (1L << Alignof) | (1L << Atomic) | (1L << Bool) | (1L << Complex) | (1L << Generic) | (1L << Imaginary) | (1L << Noreturn) | (1L << StaticAssert) | (1L << ThreadLocal) | (1L << LeftParen) | (1L << LeftBracket) | (1L << RightBracket) | (1L << LeftBrace))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (RightBrace - 64)) | (1L << (Less - 64)) | (1L << (LessEqual - 64)) | (1L << (Greater - 64)) | (1L << (GreaterEqual - 64)) | (1L << (LeftShift - 64)) | (1L << (RightShift - 64)) | (1L << (Plus - 64)) | (1L << (PlusPlus - 64)) | (1L << (Minus - 64)) | (1L << (MinusMinus - 64)) | (1L << (Star - 64)) | (1L << (Div - 64)) | (1L << (Mod - 64)) | (1L << (And - 64)) | (1L << (Or - 64)) | (1L << (AndAnd - 64)) | (1L << (OrOr - 64)) | (1L << (Caret - 64)) | (1L << (Not - 64)) | (1L << (Tilde - 64)) | (1L << (Question - 64)) | (1L << (Colon - 64)) | (1L << (Semi - 64)) | (1L << (Comma - 64)) | (1L << (Assign - 64)) | (1L << (StarAssign - 64)) | (1L << (DivAssign - 64)) | (1L << (ModAssign - 64)) | (1L << (PlusAssign - 64)) | (1L << (MinusAssign - 64)) | (1L << (LeftShiftAssign - 64)) | (1L << (RightShiftAssign - 64)) | (1L << (AndAssign - 64)) | (1L << (XorAssign - 64)) | (1L << (OrAssign - 64)) | (1L << (Equal - 64)) | (1L << (NotEqual - 64)) | (1L << (Arrow - 64)) | (1L << (Dot - 64)) | (1L << (Ellipsis - 64)) | (1L << (Identifier - 64)) | (1L << (Constant - 64)) | (1L << (StringLiteral - 64)) | (1L << (ComplexDefine - 64)) | (1L << (AsmBlock - 64)) | (1L << (LineAfterPreprocessing - 64)) | (1L << (LineDirective - 64)) | (1L << (PragmaDirective - 64)) | (1L << (Whitespace - 64)) | (1L << (Newline - 64)) | (1L << (BlockComment - 64)) | (1L << (LineComment - 64)) | (1L << (Directives - 64)))) != 0)) { + { + setState(812); + switch (_input.LA(1)) { + case T__13: + case T__12: + case T__11: + case T__10: + case T__9: + case T__8: + case T__7: + case T__6: + case T__5: + case T__4: + case T__3: + case T__2: + case T__1: + case T__0: + case Auto: + case Break: + case Case: + case Char: + case Const: + case Continue: + case Default: + case Do: + case Double: + case Else: + case Enum: + case Extern: + case Float: + case For: + case Goto: + case If: + case Inline: + case Int: + case Long: + case Register: + case Restrict: + case Return: + case Short: + case Signed: + case Sizeof: + case Static: + case Struct: + case Switch: + case Typedef: + case Union: + case Unsigned: + case Void: + case Volatile: + case While: + case Alignas: + case Alignof: + case Atomic: + case Bool: + case Complex: + case Generic: + case Imaginary: + case Noreturn: + case StaticAssert: + case ThreadLocal: + case LeftBracket: + case RightBracket: + case LeftBrace: + case RightBrace: + case Less: + case LessEqual: + case Greater: + case GreaterEqual: + case LeftShift: + case RightShift: + case Plus: + case PlusPlus: + case Minus: + case MinusMinus: + case Star: + case Div: + case Mod: + case And: + case Or: + case AndAnd: + case OrOr: + case Caret: + case Not: + case Tilde: + case Question: + case Colon: + case Semi: + case Comma: + case Assign: + case StarAssign: + case DivAssign: + case ModAssign: + case PlusAssign: + case MinusAssign: + case LeftShiftAssign: + case RightShiftAssign: + case AndAssign: + case XorAssign: + case OrAssign: + case Equal: + case NotEqual: + case Arrow: + case Dot: + case Ellipsis: + case Identifier: + case Constant: + case StringLiteral: + case ComplexDefine: + case AsmBlock: + case LineAfterPreprocessing: + case LineDirective: + case PragmaDirective: + case Whitespace: + case Newline: + case BlockComment: + case LineComment: + case Directives: + { + setState(807); + _la = _input.LA(1); + if ( _la <= 0 || (_la==LeftParen || _la==RightParen) ) { + _errHandler.recoverInline(this); + } + consume(); + } + break; + case LeftParen: + { + setState(808); match(LeftParen); + setState(809); nestedParenthesesBlock(); + setState(810); match(RightParen); + } + break; + default: + throw new NoViableAltException(this); + } + } + setState(816); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PointerContext extends ParserRuleContext { + public TypeQualifierListContext typeQualifierList() { + return getRuleContext(TypeQualifierListContext.class,0); + } + public PointerContext pointer() { + return getRuleContext(PointerContext.class,0); + } + public PointerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_pointer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterPointer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitPointer(this); + } + } + + public final PointerContext pointer() throws RecognitionException { + PointerContext _localctx = new PointerContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_pointer); + int _la; + try { + setState(835); + switch ( getInterpreter().adaptivePredict(_input,78,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(817); match(Star); + setState(819); + switch ( getInterpreter().adaptivePredict(_input,74,_ctx) ) { + case 1: + { + setState(818); typeQualifierList(0); + } + break; + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(821); match(Star); + setState(823); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Const) | (1L << Restrict) | (1L << Volatile) | (1L << Atomic))) != 0)) { + { + setState(822); typeQualifierList(0); + } + } + + setState(825); pointer(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(826); match(Caret); + setState(828); + switch ( getInterpreter().adaptivePredict(_input,76,_ctx) ) { + case 1: + { + setState(827); typeQualifierList(0); + } + break; + } + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(830); match(Caret); + setState(832); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Const) | (1L << Restrict) | (1L << Volatile) | (1L << Atomic))) != 0)) { + { + setState(831); typeQualifierList(0); + } + } + + setState(834); pointer(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeQualifierListContext extends ParserRuleContext { + public TypeQualifierListContext typeQualifierList() { + return getRuleContext(TypeQualifierListContext.class,0); + } + public TypeQualifierContext typeQualifier() { + return getRuleContext(TypeQualifierContext.class,0); + } + public TypeQualifierListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeQualifierList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterTypeQualifierList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitTypeQualifierList(this); + } + } + + public final TypeQualifierListContext typeQualifierList() throws RecognitionException { + return typeQualifierList(0); + } + + private TypeQualifierListContext typeQualifierList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + TypeQualifierListContext _localctx = new TypeQualifierListContext(_ctx, _parentState); + TypeQualifierListContext _prevctx = _localctx; + int _startState = 110; + enterRecursionRule(_localctx, 110, RULE_typeQualifierList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(838); typeQualifier(); + } + _ctx.stop = _input.LT(-1); + setState(844); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new TypeQualifierListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_typeQualifierList); + setState(840); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(841); typeQualifier(); + } + } + } + setState(846); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ParameterTypeListContext extends ParserRuleContext { + public ParameterListContext parameterList() { + return getRuleContext(ParameterListContext.class,0); + } + public ParameterTypeListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parameterTypeList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterParameterTypeList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitParameterTypeList(this); + } + } + + public final ParameterTypeListContext parameterTypeList() throws RecognitionException { + ParameterTypeListContext _localctx = new ParameterTypeListContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_parameterTypeList); + try { + setState(852); + switch ( getInterpreter().adaptivePredict(_input,80,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(847); parameterList(0); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(848); parameterList(0); + setState(849); match(Comma); + setState(850); match(Ellipsis); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParameterListContext extends ParserRuleContext { + public ParameterDeclarationContext parameterDeclaration() { + return getRuleContext(ParameterDeclarationContext.class,0); + } + public ParameterListContext parameterList() { + return getRuleContext(ParameterListContext.class,0); + } + public ParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitParameterList(this); + } + } + + public final ParameterListContext parameterList() throws RecognitionException { + return parameterList(0); + } + + private ParameterListContext parameterList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ParameterListContext _localctx = new ParameterListContext(_ctx, _parentState); + ParameterListContext _prevctx = _localctx; + int _startState = 114; + enterRecursionRule(_localctx, 114, RULE_parameterList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(855); parameterDeclaration(); + } + _ctx.stop = _input.LT(-1); + setState(862); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,81,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ParameterListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_parameterList); + setState(857); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(858); match(Comma); + setState(859); parameterDeclaration(); + } + } + } + setState(864); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,81,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ParameterDeclarationContext extends ParserRuleContext { + public AbstractDeclaratorContext abstractDeclarator() { + return getRuleContext(AbstractDeclaratorContext.class,0); + } + public DeclaratorContext declarator() { + return getRuleContext(DeclaratorContext.class,0); + } + public DeclarationSpecifiers2Context declarationSpecifiers2() { + return getRuleContext(DeclarationSpecifiers2Context.class,0); + } + public DeclarationSpecifiersContext declarationSpecifiers() { + return getRuleContext(DeclarationSpecifiersContext.class,0); + } + public ParameterDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parameterDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterParameterDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitParameterDeclaration(this); + } + } + + public final ParameterDeclarationContext parameterDeclaration() throws RecognitionException { + ParameterDeclarationContext _localctx = new ParameterDeclarationContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_parameterDeclaration); + try { + setState(872); + switch ( getInterpreter().adaptivePredict(_input,83,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(865); declarationSpecifiers(); + setState(866); declarator(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(868); declarationSpecifiers2(); + setState(870); + switch ( getInterpreter().adaptivePredict(_input,82,_ctx) ) { + case 1: + { + setState(869); abstractDeclarator(); + } + break; + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IdentifierListContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public IdentifierListContext identifierList() { + return getRuleContext(IdentifierListContext.class,0); + } + public IdentifierListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_identifierList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterIdentifierList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitIdentifierList(this); + } + } + + public final IdentifierListContext identifierList() throws RecognitionException { + return identifierList(0); + } + + private IdentifierListContext identifierList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + IdentifierListContext _localctx = new IdentifierListContext(_ctx, _parentState); + IdentifierListContext _prevctx = _localctx; + int _startState = 118; + enterRecursionRule(_localctx, 118, RULE_identifierList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(875); match(Identifier); + } + _ctx.stop = _input.LT(-1); + setState(882); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,84,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new IdentifierListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_identifierList); + setState(877); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(878); match(Comma); + setState(879); match(Identifier); + } + } + } + setState(884); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,84,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class TypeNameContext extends ParserRuleContext { + public AbstractDeclaratorContext abstractDeclarator() { + return getRuleContext(AbstractDeclaratorContext.class,0); + } + public SpecifierQualifierListContext specifierQualifierList() { + return getRuleContext(SpecifierQualifierListContext.class,0); + } + public TypeNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterTypeName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitTypeName(this); + } + } + + public final TypeNameContext typeName() throws RecognitionException { + TypeNameContext _localctx = new TypeNameContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_typeName); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(885); specifierQualifierList(); + setState(887); + _la = _input.LA(1); + if (((((_la - 59)) & ~0x3f) == 0 && ((1L << (_la - 59)) & ((1L << (LeftParen - 59)) | (1L << (LeftBracket - 59)) | (1L << (Star - 59)) | (1L << (Caret - 59)))) != 0)) { + { + setState(886); abstractDeclarator(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AbstractDeclaratorContext extends ParserRuleContext { + public List gccDeclaratorExtension() { + return getRuleContexts(GccDeclaratorExtensionContext.class); + } + public PointerContext pointer() { + return getRuleContext(PointerContext.class,0); + } + public DirectAbstractDeclaratorContext directAbstractDeclarator() { + return getRuleContext(DirectAbstractDeclaratorContext.class,0); + } + public GccDeclaratorExtensionContext gccDeclaratorExtension(int i) { + return getRuleContext(GccDeclaratorExtensionContext.class,i); + } + public AbstractDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_abstractDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterAbstractDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitAbstractDeclarator(this); + } + } + + public final AbstractDeclaratorContext abstractDeclarator() throws RecognitionException { + AbstractDeclaratorContext _localctx = new AbstractDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 122, RULE_abstractDeclarator); + int _la; + try { + int _alt; + setState(900); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(889); pointer(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(891); + _la = _input.LA(1); + if (_la==Star || _la==Caret) { + { + setState(890); pointer(); + } + } + + setState(893); directAbstractDeclarator(0); + setState(897); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,87,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(894); gccDeclaratorExtension(); + } + } + } + setState(899); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,87,_ctx); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DirectAbstractDeclaratorContext extends ParserRuleContext { + public TypeQualifierListContext typeQualifierList() { + return getRuleContext(TypeQualifierListContext.class,0); + } + public AbstractDeclaratorContext abstractDeclarator() { + return getRuleContext(AbstractDeclaratorContext.class,0); + } + public List gccDeclaratorExtension() { + return getRuleContexts(GccDeclaratorExtensionContext.class); + } + public DirectAbstractDeclaratorContext directAbstractDeclarator() { + return getRuleContext(DirectAbstractDeclaratorContext.class,0); + } + public GccDeclaratorExtensionContext gccDeclaratorExtension(int i) { + return getRuleContext(GccDeclaratorExtensionContext.class,i); + } + public AssignmentExpressionContext assignmentExpression() { + return getRuleContext(AssignmentExpressionContext.class,0); + } + public ParameterTypeListContext parameterTypeList() { + return getRuleContext(ParameterTypeListContext.class,0); + } + public DirectAbstractDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_directAbstractDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDirectAbstractDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDirectAbstractDeclarator(this); + } + } + + public final DirectAbstractDeclaratorContext directAbstractDeclarator() throws RecognitionException { + return directAbstractDeclarator(0); + } + + private DirectAbstractDeclaratorContext directAbstractDeclarator(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + DirectAbstractDeclaratorContext _localctx = new DirectAbstractDeclaratorContext(_ctx, _parentState); + DirectAbstractDeclaratorContext _prevctx = _localctx; + int _startState = 124; + enterRecursionRule(_localctx, 124, RULE_directAbstractDeclarator, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(948); + switch ( getInterpreter().adaptivePredict(_input,95,_ctx) ) { + case 1: + { + setState(903); match(LeftParen); + setState(904); abstractDeclarator(); + setState(905); match(RightParen); + setState(909); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,89,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(906); gccDeclaratorExtension(); + } + } + } + setState(911); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,89,_ctx); + } + } + break; + case 2: + { + setState(912); match(LeftBracket); + setState(914); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Const) | (1L << Restrict) | (1L << Volatile) | (1L << Atomic))) != 0)) { + { + setState(913); typeQualifierList(0); + } + } + + setState(917); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(916); assignmentExpression(); + } + } + + setState(919); match(RightBracket); + } + break; + case 3: + { + setState(920); match(LeftBracket); + setState(921); match(Static); + setState(923); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Const) | (1L << Restrict) | (1L << Volatile) | (1L << Atomic))) != 0)) { + { + setState(922); typeQualifierList(0); + } + } + + setState(925); assignmentExpression(); + setState(926); match(RightBracket); + } + break; + case 4: + { + setState(928); match(LeftBracket); + setState(929); typeQualifierList(0); + setState(930); match(Static); + setState(931); assignmentExpression(); + setState(932); match(RightBracket); + } + break; + case 5: + { + setState(934); match(LeftBracket); + setState(935); match(Star); + setState(936); match(RightBracket); + } + break; + case 6: + { + setState(937); match(LeftParen); + setState(939); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__11) | (1L << T__9) | (1L << T__7) | (1L << T__5) | (1L << T__4) | (1L << T__3) | (1L << T__2) | (1L << T__1) | (1L << Auto) | (1L << Char) | (1L << Const) | (1L << Double) | (1L << Enum) | (1L << Extern) | (1L << Float) | (1L << Inline) | (1L << Int) | (1L << Long) | (1L << Register) | (1L << Restrict) | (1L << Short) | (1L << Signed) | (1L << Static) | (1L << Struct) | (1L << Typedef) | (1L << Union) | (1L << Unsigned) | (1L << Void) | (1L << Volatile) | (1L << Alignas) | (1L << Atomic) | (1L << Bool) | (1L << Complex) | (1L << Noreturn) | (1L << ThreadLocal))) != 0) || _la==Identifier) { + { + setState(938); parameterTypeList(); + } + } + + setState(941); match(RightParen); + setState(945); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,94,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(942); gccDeclaratorExtension(); + } + } + } + setState(947); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,94,_ctx); + } + } + break; + } + _ctx.stop = _input.LT(-1); + setState(993); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(991); + switch ( getInterpreter().adaptivePredict(_input,101,_ctx) ) { + case 1: + { + _localctx = new DirectAbstractDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directAbstractDeclarator); + setState(950); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(951); match(LeftBracket); + setState(953); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Const) | (1L << Restrict) | (1L << Volatile) | (1L << Atomic))) != 0)) { + { + setState(952); typeQualifierList(0); + } + } + + setState(956); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(955); assignmentExpression(); + } + } + + setState(958); match(RightBracket); + } + break; + case 2: + { + _localctx = new DirectAbstractDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directAbstractDeclarator); + setState(959); + if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(960); match(LeftBracket); + setState(961); match(Static); + setState(963); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << Const) | (1L << Restrict) | (1L << Volatile) | (1L << Atomic))) != 0)) { + { + setState(962); typeQualifierList(0); + } + } + + setState(965); assignmentExpression(); + setState(966); match(RightBracket); + } + break; + case 3: + { + _localctx = new DirectAbstractDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directAbstractDeclarator); + setState(968); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(969); match(LeftBracket); + setState(970); typeQualifierList(0); + setState(971); match(Static); + setState(972); assignmentExpression(); + setState(973); match(RightBracket); + } + break; + case 4: + { + _localctx = new DirectAbstractDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directAbstractDeclarator); + setState(975); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(976); match(LeftBracket); + setState(977); match(Star); + setState(978); match(RightBracket); + } + break; + case 5: + { + _localctx = new DirectAbstractDeclaratorContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_directAbstractDeclarator); + setState(979); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(980); match(LeftParen); + setState(982); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__11) | (1L << T__9) | (1L << T__7) | (1L << T__5) | (1L << T__4) | (1L << T__3) | (1L << T__2) | (1L << T__1) | (1L << Auto) | (1L << Char) | (1L << Const) | (1L << Double) | (1L << Enum) | (1L << Extern) | (1L << Float) | (1L << Inline) | (1L << Int) | (1L << Long) | (1L << Register) | (1L << Restrict) | (1L << Short) | (1L << Signed) | (1L << Static) | (1L << Struct) | (1L << Typedef) | (1L << Union) | (1L << Unsigned) | (1L << Void) | (1L << Volatile) | (1L << Alignas) | (1L << Atomic) | (1L << Bool) | (1L << Complex) | (1L << Noreturn) | (1L << ThreadLocal))) != 0) || _la==Identifier) { + { + setState(981); parameterTypeList(); + } + } + + setState(984); match(RightParen); + setState(988); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,100,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(985); gccDeclaratorExtension(); + } + } + } + setState(990); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,100,_ctx); + } + } + break; + } + } + } + setState(995); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class TypedefNameContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public TypedefNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typedefName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterTypedefName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitTypedefName(this); + } + } + + public final TypedefNameContext typedefName() throws RecognitionException { + TypedefNameContext _localctx = new TypedefNameContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_typedefName); + try { + enterOuterAlt(_localctx, 1); + { + setState(996); match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InitializerContext extends ParserRuleContext { + public AssignmentExpressionContext assignmentExpression() { + return getRuleContext(AssignmentExpressionContext.class,0); + } + public InitializerListContext initializerList() { + return getRuleContext(InitializerListContext.class,0); + } + public InitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_initializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitInitializer(this); + } + } + + public final InitializerContext initializer() throws RecognitionException { + InitializerContext _localctx = new InitializerContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_initializer); + try { + setState(1008); + switch ( getInterpreter().adaptivePredict(_input,103,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(998); assignmentExpression(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(999); match(LeftBrace); + setState(1000); initializerList(0); + setState(1001); match(RightBrace); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1003); match(LeftBrace); + setState(1004); initializerList(0); + setState(1005); match(Comma); + setState(1006); match(RightBrace); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InitializerListContext extends ParserRuleContext { + public DesignationContext designation() { + return getRuleContext(DesignationContext.class,0); + } + public InitializerListContext initializerList() { + return getRuleContext(InitializerListContext.class,0); + } + public InitializerContext initializer() { + return getRuleContext(InitializerContext.class,0); + } + public InitializerListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_initializerList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterInitializerList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitInitializerList(this); + } + } + + public final InitializerListContext initializerList() throws RecognitionException { + return initializerList(0); + } + + private InitializerListContext initializerList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + InitializerListContext _localctx = new InitializerListContext(_ctx, _parentState); + InitializerListContext _prevctx = _localctx; + int _startState = 130; + enterRecursionRule(_localctx, 130, RULE_initializerList, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(1012); + _la = _input.LA(1); + if (_la==LeftBracket || _la==Dot) { + { + setState(1011); designation(); + } + } + + setState(1014); initializer(); + } + _ctx.stop = _input.LT(-1); + setState(1024); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,106,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new InitializerListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_initializerList); + setState(1016); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1017); match(Comma); + setState(1019); + _la = _input.LA(1); + if (_la==LeftBracket || _la==Dot) { + { + setState(1018); designation(); + } + } + + setState(1021); initializer(); + } + } + } + setState(1026); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,106,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class DesignationContext extends ParserRuleContext { + public DesignatorListContext designatorList() { + return getRuleContext(DesignatorListContext.class,0); + } + public DesignationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_designation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDesignation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDesignation(this); + } + } + + public final DesignationContext designation() throws RecognitionException { + DesignationContext _localctx = new DesignationContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_designation); + try { + enterOuterAlt(_localctx, 1); + { + setState(1027); designatorList(0); + setState(1028); match(Assign); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DesignatorListContext extends ParserRuleContext { + public DesignatorListContext designatorList() { + return getRuleContext(DesignatorListContext.class,0); + } + public DesignatorContext designator() { + return getRuleContext(DesignatorContext.class,0); + } + public DesignatorListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_designatorList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDesignatorList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDesignatorList(this); + } + } + + public final DesignatorListContext designatorList() throws RecognitionException { + return designatorList(0); + } + + private DesignatorListContext designatorList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + DesignatorListContext _localctx = new DesignatorListContext(_ctx, _parentState); + DesignatorListContext _prevctx = _localctx; + int _startState = 134; + enterRecursionRule(_localctx, 134, RULE_designatorList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(1031); designator(); + } + _ctx.stop = _input.LT(-1); + setState(1037); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,107,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new DesignatorListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_designatorList); + setState(1033); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1034); designator(); + } + } + } + setState(1039); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,107,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class DesignatorContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public DesignatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_designator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDesignator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDesignator(this); + } + } + + public final DesignatorContext designator() throws RecognitionException { + DesignatorContext _localctx = new DesignatorContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_designator); + try { + setState(1046); + switch (_input.LA(1)) { + case LeftBracket: + enterOuterAlt(_localctx, 1); + { + setState(1040); match(LeftBracket); + setState(1041); constantExpression(); + setState(1042); match(RightBracket); + } + break; + case Dot: + enterOuterAlt(_localctx, 2); + { + setState(1044); match(Dot); + setState(1045); match(Identifier); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StaticAssertDeclarationContext extends ParserRuleContext { + public List StringLiteral() { return getTokens(CParser.StringLiteral); } + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public TerminalNode StringLiteral(int i) { + return getToken(CParser.StringLiteral, i); + } + public StaticAssertDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_staticAssertDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterStaticAssertDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitStaticAssertDeclaration(this); + } + } + + public final StaticAssertDeclarationContext staticAssertDeclaration() throws RecognitionException { + StaticAssertDeclarationContext _localctx = new StaticAssertDeclarationContext(_ctx, getState()); + enterRule(_localctx, 138, RULE_staticAssertDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1048); match(StaticAssert); + setState(1049); match(LeftParen); + setState(1050); constantExpression(); + setState(1051); match(Comma); + setState(1053); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(1052); match(StringLiteral); + } + } + setState(1055); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==StringLiteral ); + setState(1057); match(RightParen); + setState(1058); match(Semi); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementContext extends ParserRuleContext { + public LabeledStatementContext labeledStatement() { + return getRuleContext(LabeledStatementContext.class,0); + } + public ExpressionStatementContext expressionStatement() { + return getRuleContext(ExpressionStatementContext.class,0); + } + public JumpStatementContext jumpStatement() { + return getRuleContext(JumpStatementContext.class,0); + } + public LogicalOrExpressionContext logicalOrExpression(int i) { + return getRuleContext(LogicalOrExpressionContext.class,i); + } + public List logicalOrExpression() { + return getRuleContexts(LogicalOrExpressionContext.class); + } + public SelectionStatementContext selectionStatement() { + return getRuleContext(SelectionStatementContext.class,0); + } + public IterationStatementContext iterationStatement() { + return getRuleContext(IterationStatementContext.class,0); + } + public CompoundStatementContext compoundStatement() { + return getRuleContext(CompoundStatementContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitStatement(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 140, RULE_statement); + int _la; + try { + setState(1097); + switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1060); labeledStatement(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1061); compoundStatement(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1062); expressionStatement(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1063); selectionStatement(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(1064); iterationStatement(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(1065); jumpStatement(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(1066); + _la = _input.LA(1); + if ( !(_la==T__10 || _la==T__6) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1067); + _la = _input.LA(1); + if ( !(_la==T__12 || _la==Volatile) ) { + _errHandler.recoverInline(this); + } + consume(); + setState(1068); match(LeftParen); + setState(1077); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(1069); logicalOrExpression(0); + setState(1074); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(1070); match(Comma); + setState(1071); logicalOrExpression(0); + } + } + setState(1076); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + + setState(1092); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Colon) { + { + { + setState(1079); match(Colon); + setState(1088); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(1080); logicalOrExpression(0); + setState(1085); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==Comma) { + { + { + setState(1081); match(Comma); + setState(1082); logicalOrExpression(0); + } + } + setState(1087); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + + } + } + setState(1094); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1095); match(RightParen); + setState(1096); match(Semi); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LabeledStatementContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public LabeledStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_labeledStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterLabeledStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitLabeledStatement(this); + } + } + + public final LabeledStatementContext labeledStatement() throws RecognitionException { + LabeledStatementContext _localctx = new LabeledStatementContext(_ctx, getState()); + enterRule(_localctx, 142, RULE_labeledStatement); + try { + setState(1110); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1099); match(Identifier); + setState(1100); match(Colon); + setState(1101); statement(); + } + break; + case Case: + enterOuterAlt(_localctx, 2); + { + setState(1102); match(Case); + setState(1103); constantExpression(); + setState(1104); match(Colon); + setState(1105); statement(); + } + break; + case Default: + enterOuterAlt(_localctx, 3); + { + setState(1107); match(Default); + setState(1108); match(Colon); + setState(1109); statement(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CompoundStatementContext extends ParserRuleContext { + public BlockItemListContext blockItemList() { + return getRuleContext(BlockItemListContext.class,0); + } + public CompoundStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_compoundStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterCompoundStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitCompoundStatement(this); + } + } + + public final CompoundStatementContext compoundStatement() throws RecognitionException { + CompoundStatementContext _localctx = new CompoundStatementContext(_ctx, getState()); + enterRule(_localctx, 144, RULE_compoundStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1112); match(LeftBrace); + setState(1114); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__11) | (1L << T__10) | (1L << T__9) | (1L << T__8) | (1L << T__7) | (1L << T__6) | (1L << T__5) | (1L << T__4) | (1L << T__3) | (1L << T__2) | (1L << T__1) | (1L << T__0) | (1L << Auto) | (1L << Break) | (1L << Case) | (1L << Char) | (1L << Const) | (1L << Continue) | (1L << Default) | (1L << Do) | (1L << Double) | (1L << Enum) | (1L << Extern) | (1L << Float) | (1L << For) | (1L << Goto) | (1L << If) | (1L << Inline) | (1L << Int) | (1L << Long) | (1L << Register) | (1L << Restrict) | (1L << Return) | (1L << Short) | (1L << Signed) | (1L << Sizeof) | (1L << Static) | (1L << Struct) | (1L << Switch) | (1L << Typedef) | (1L << Union) | (1L << Unsigned) | (1L << Void) | (1L << Volatile) | (1L << While) | (1L << Alignas) | (1L << Alignof) | (1L << Atomic) | (1L << Bool) | (1L << Complex) | (1L << Generic) | (1L << Noreturn) | (1L << StaticAssert) | (1L << ThreadLocal) | (1L << LeftParen) | (1L << LeftBrace))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Semi - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(1113); blockItemList(0); + } + } + + setState(1116); match(RightBrace); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockItemListContext extends ParserRuleContext { + public BlockItemContext blockItem() { + return getRuleContext(BlockItemContext.class,0); + } + public BlockItemListContext blockItemList() { + return getRuleContext(BlockItemListContext.class,0); + } + public BlockItemListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_blockItemList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterBlockItemList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitBlockItemList(this); + } + } + + public final BlockItemListContext blockItemList() throws RecognitionException { + return blockItemList(0); + } + + private BlockItemListContext blockItemList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + BlockItemListContext _localctx = new BlockItemListContext(_ctx, _parentState); + BlockItemListContext _prevctx = _localctx; + int _startState = 146; + enterRecursionRule(_localctx, 146, RULE_blockItemList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(1119); blockItem(); + } + _ctx.stop = _input.LT(-1); + setState(1125); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,118,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new BlockItemListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_blockItemList); + setState(1121); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1122); blockItem(); + } + } + } + setState(1127); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,118,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class BlockItemContext extends ParserRuleContext { + public DeclarationContext declaration() { + return getRuleContext(DeclarationContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public BlockItemContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_blockItem; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterBlockItem(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitBlockItem(this); + } + } + + public final BlockItemContext blockItem() throws RecognitionException { + BlockItemContext _localctx = new BlockItemContext(_ctx, getState()); + enterRule(_localctx, 148, RULE_blockItem); + try { + setState(1130); + switch ( getInterpreter().adaptivePredict(_input,119,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1128); declaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1129); statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionStatementContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ExpressionStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterExpressionStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitExpressionStatement(this); + } + } + + public final ExpressionStatementContext expressionStatement() throws RecognitionException { + ExpressionStatementContext _localctx = new ExpressionStatementContext(_ctx, getState()); + enterRule(_localctx, 150, RULE_expressionStatement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1133); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(1132); expression(0); + } + } + + setState(1135); match(Semi); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SelectionStatementContext extends ParserRuleContext { + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public SelectionStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_selectionStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterSelectionStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitSelectionStatement(this); + } + } + + public final SelectionStatementContext selectionStatement() throws RecognitionException { + SelectionStatementContext _localctx = new SelectionStatementContext(_ctx, getState()); + enterRule(_localctx, 152, RULE_selectionStatement); + try { + setState(1152); + switch (_input.LA(1)) { + case If: + enterOuterAlt(_localctx, 1); + { + setState(1137); match(If); + setState(1138); match(LeftParen); + setState(1139); expression(0); + setState(1140); match(RightParen); + setState(1141); statement(); + setState(1144); + switch ( getInterpreter().adaptivePredict(_input,121,_ctx) ) { + case 1: + { + setState(1142); match(Else); + setState(1143); statement(); + } + break; + } + } + break; + case Switch: + enterOuterAlt(_localctx, 2); + { + setState(1146); match(Switch); + setState(1147); match(LeftParen); + setState(1148); expression(0); + setState(1149); match(RightParen); + setState(1150); statement(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class IterationStatementContext extends ParserRuleContext { + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public DeclarationContext declaration() { + return getRuleContext(DeclarationContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public IterationStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_iterationStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterIterationStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitIterationStatement(this); + } + } + + public final IterationStatementContext iterationStatement() throws RecognitionException { + IterationStatementContext _localctx = new IterationStatementContext(_ctx, getState()); + enterRule(_localctx, 154, RULE_iterationStatement); + int _la; + try { + setState(1196); + switch ( getInterpreter().adaptivePredict(_input,128,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1154); match(While); + setState(1155); match(LeftParen); + setState(1156); expression(0); + setState(1157); match(RightParen); + setState(1158); statement(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1160); match(Do); + setState(1161); statement(); + setState(1162); match(While); + setState(1163); match(LeftParen); + setState(1164); expression(0); + setState(1165); match(RightParen); + setState(1166); match(Semi); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1168); match(For); + setState(1169); match(LeftParen); + setState(1171); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(1170); expression(0); + } + } + + setState(1173); match(Semi); + setState(1175); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(1174); expression(0); + } + } + + setState(1177); match(Semi); + setState(1179); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(1178); expression(0); + } + } + + setState(1181); match(RightParen); + setState(1182); statement(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1183); match(For); + setState(1184); match(LeftParen); + setState(1185); declaration(); + setState(1187); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(1186); expression(0); + } + } + + setState(1189); match(Semi); + setState(1191); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(1190); expression(0); + } + } + + setState(1193); match(RightParen); + setState(1194); statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class JumpStatementContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(CParser.Identifier, 0); } + public UnaryExpressionContext unaryExpression() { + return getRuleContext(UnaryExpressionContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public JumpStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_jumpStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterJumpStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitJumpStatement(this); + } + } + + public final JumpStatementContext jumpStatement() throws RecognitionException { + JumpStatementContext _localctx = new JumpStatementContext(_ctx, getState()); + enterRule(_localctx, 156, RULE_jumpStatement); + int _la; + try { + setState(1214); + switch ( getInterpreter().adaptivePredict(_input,130,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1198); match(Goto); + setState(1199); match(Identifier); + setState(1200); match(Semi); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1201); match(Continue); + setState(1202); match(Semi); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1203); match(Break); + setState(1204); match(Semi); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1205); match(Return); + setState(1207); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__8) | (1L << T__0) | (1L << Sizeof) | (1L << Alignof) | (1L << Generic) | (1L << LeftParen))) != 0) || ((((_la - 71)) & ~0x3f) == 0 && ((1L << (_la - 71)) & ((1L << (Plus - 71)) | (1L << (PlusPlus - 71)) | (1L << (Minus - 71)) | (1L << (MinusMinus - 71)) | (1L << (Star - 71)) | (1L << (And - 71)) | (1L << (AndAnd - 71)) | (1L << (Not - 71)) | (1L << (Tilde - 71)) | (1L << (Identifier - 71)) | (1L << (Constant - 71)) | (1L << (StringLiteral - 71)))) != 0)) { + { + setState(1206); expression(0); + } + } + + setState(1209); match(Semi); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(1210); match(Goto); + setState(1211); unaryExpression(); + setState(1212); match(Semi); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CompilationUnitContext extends ParserRuleContext { + public TranslationUnitContext translationUnit() { + return getRuleContext(TranslationUnitContext.class,0); + } + public TerminalNode EOF() { return getToken(CParser.EOF, 0); } + public CompilationUnitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_compilationUnit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterCompilationUnit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitCompilationUnit(this); + } + } + + public final CompilationUnitContext compilationUnit() throws RecognitionException { + CompilationUnitContext _localctx = new CompilationUnitContext(_ctx, getState()); + enterRule(_localctx, 158, RULE_compilationUnit); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1217); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__11) | (1L << T__9) | (1L << T__7) | (1L << T__5) | (1L << T__4) | (1L << T__3) | (1L << T__2) | (1L << T__1) | (1L << Auto) | (1L << Char) | (1L << Const) | (1L << Double) | (1L << Enum) | (1L << Extern) | (1L << Float) | (1L << Inline) | (1L << Int) | (1L << Long) | (1L << Register) | (1L << Restrict) | (1L << Short) | (1L << Signed) | (1L << Static) | (1L << Struct) | (1L << Typedef) | (1L << Union) | (1L << Unsigned) | (1L << Void) | (1L << Volatile) | (1L << Alignas) | (1L << Atomic) | (1L << Bool) | (1L << Complex) | (1L << Noreturn) | (1L << StaticAssert) | (1L << ThreadLocal) | (1L << LeftParen))) != 0) || ((((_la - 75)) & ~0x3f) == 0 && ((1L << (_la - 75)) & ((1L << (Star - 75)) | (1L << (Caret - 75)) | (1L << (Semi - 75)) | (1L << (Identifier - 75)))) != 0)) { + { + setState(1216); translationUnit(0); + } + } + + setState(1219); match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TranslationUnitContext extends ParserRuleContext { + public TranslationUnitContext translationUnit() { + return getRuleContext(TranslationUnitContext.class,0); + } + public ExternalDeclarationContext externalDeclaration() { + return getRuleContext(ExternalDeclarationContext.class,0); + } + public TranslationUnitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_translationUnit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterTranslationUnit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitTranslationUnit(this); + } + } + + public final TranslationUnitContext translationUnit() throws RecognitionException { + return translationUnit(0); + } + + private TranslationUnitContext translationUnit(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + TranslationUnitContext _localctx = new TranslationUnitContext(_ctx, _parentState); + TranslationUnitContext _prevctx = _localctx; + int _startState = 160; + enterRecursionRule(_localctx, 160, RULE_translationUnit, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(1222); externalDeclaration(); + } + _ctx.stop = _input.LT(-1); + setState(1228); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,132,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new TranslationUnitContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_translationUnit); + setState(1224); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1225); externalDeclaration(); + } + } + } + setState(1230); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,132,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ExternalDeclarationContext extends ParserRuleContext { + public FunctionDefinitionContext functionDefinition() { + return getRuleContext(FunctionDefinitionContext.class,0); + } + public DeclarationContext declaration() { + return getRuleContext(DeclarationContext.class,0); + } + public ExternalDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_externalDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterExternalDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitExternalDeclaration(this); + } + } + + public final ExternalDeclarationContext externalDeclaration() throws RecognitionException { + ExternalDeclarationContext _localctx = new ExternalDeclarationContext(_ctx, getState()); + enterRule(_localctx, 162, RULE_externalDeclaration); + try { + setState(1234); + switch ( getInterpreter().adaptivePredict(_input,133,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1231); functionDefinition(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1232); declaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1233); match(Semi); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionDefinitionContext extends ParserRuleContext { + public DeclaratorContext declarator() { + return getRuleContext(DeclaratorContext.class,0); + } + public DeclarationListContext declarationList() { + return getRuleContext(DeclarationListContext.class,0); + } + public DeclarationSpecifiersContext declarationSpecifiers() { + return getRuleContext(DeclarationSpecifiersContext.class,0); + } + public CompoundStatementContext compoundStatement() { + return getRuleContext(CompoundStatementContext.class,0); + } + public FunctionDefinitionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionDefinition; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterFunctionDefinition(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitFunctionDefinition(this); + } + } + + public final FunctionDefinitionContext functionDefinition() throws RecognitionException { + FunctionDefinitionContext _localctx = new FunctionDefinitionContext(_ctx, getState()); + enterRule(_localctx, 164, RULE_functionDefinition); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1237); + switch ( getInterpreter().adaptivePredict(_input,134,_ctx) ) { + case 1: + { + setState(1236); declarationSpecifiers(); + } + break; + } + setState(1239); declarator(); + setState(1241); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__11) | (1L << T__9) | (1L << T__7) | (1L << T__5) | (1L << T__4) | (1L << T__3) | (1L << T__2) | (1L << T__1) | (1L << Auto) | (1L << Char) | (1L << Const) | (1L << Double) | (1L << Enum) | (1L << Extern) | (1L << Float) | (1L << Inline) | (1L << Int) | (1L << Long) | (1L << Register) | (1L << Restrict) | (1L << Short) | (1L << Signed) | (1L << Static) | (1L << Struct) | (1L << Typedef) | (1L << Union) | (1L << Unsigned) | (1L << Void) | (1L << Volatile) | (1L << Alignas) | (1L << Atomic) | (1L << Bool) | (1L << Complex) | (1L << Noreturn) | (1L << StaticAssert) | (1L << ThreadLocal))) != 0) || _la==Identifier) { + { + setState(1240); declarationList(0); + } + } + + setState(1243); compoundStatement(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DeclarationListContext extends ParserRuleContext { + public DeclarationListContext declarationList() { + return getRuleContext(DeclarationListContext.class,0); + } + public DeclarationContext declaration() { + return getRuleContext(DeclarationContext.class,0); + } + public DeclarationListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_declarationList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).enterDeclarationList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof CListener ) ((CListener)listener).exitDeclarationList(this); + } + } + + public final DeclarationListContext declarationList() throws RecognitionException { + return declarationList(0); + } + + private DeclarationListContext declarationList(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + DeclarationListContext _localctx = new DeclarationListContext(_ctx, _parentState); + DeclarationListContext _prevctx = _localctx; + int _startState = 166; + enterRecursionRule(_localctx, 166, RULE_declarationList, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(1246); declaration(); + } + _ctx.stop = _input.LT(-1); + setState(1252); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,136,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new DeclarationListContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_declarationList); + setState(1248); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1249); declaration(); + } + } + } + setState(1254); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,136,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 2: return genericAssocList_sempred((GenericAssocListContext)_localctx, predIndex); + case 4: return postfixExpression_sempred((PostfixExpressionContext)_localctx, predIndex); + case 5: return argumentExpressionList_sempred((ArgumentExpressionListContext)_localctx, predIndex); + case 9: return multiplicativeExpression_sempred((MultiplicativeExpressionContext)_localctx, predIndex); + case 10: return additiveExpression_sempred((AdditiveExpressionContext)_localctx, predIndex); + case 11: return shiftExpression_sempred((ShiftExpressionContext)_localctx, predIndex); + case 12: return relationalExpression_sempred((RelationalExpressionContext)_localctx, predIndex); + case 13: return equalityExpression_sempred((EqualityExpressionContext)_localctx, predIndex); + case 14: return andExpression_sempred((AndExpressionContext)_localctx, predIndex); + case 15: return exclusiveOrExpression_sempred((ExclusiveOrExpressionContext)_localctx, predIndex); + case 16: return inclusiveOrExpression_sempred((InclusiveOrExpressionContext)_localctx, predIndex); + case 17: return logicalAndExpression_sempred((LogicalAndExpressionContext)_localctx, predIndex); + case 18: return logicalOrExpression_sempred((LogicalOrExpressionContext)_localctx, predIndex); + case 22: return expression_sempred((ExpressionContext)_localctx, predIndex); + case 28: return initDeclaratorList_sempred((InitDeclaratorListContext)_localctx, predIndex); + case 34: return structDeclarationList_sempred((StructDeclarationListContext)_localctx, predIndex); + case 37: return structDeclaratorList_sempred((StructDeclaratorListContext)_localctx, predIndex); + case 40: return enumeratorList_sempred((EnumeratorListContext)_localctx, predIndex); + case 48: return directDeclarator_sempred((DirectDeclaratorContext)_localctx, predIndex); + case 55: return typeQualifierList_sempred((TypeQualifierListContext)_localctx, predIndex); + case 57: return parameterList_sempred((ParameterListContext)_localctx, predIndex); + case 59: return identifierList_sempred((IdentifierListContext)_localctx, predIndex); + case 62: return directAbstractDeclarator_sempred((DirectAbstractDeclaratorContext)_localctx, predIndex); + case 65: return initializerList_sempred((InitializerListContext)_localctx, predIndex); + case 67: return designatorList_sempred((DesignatorListContext)_localctx, predIndex); + case 73: return blockItemList_sempred((BlockItemListContext)_localctx, predIndex); + case 80: return translationUnit_sempred((TranslationUnitContext)_localctx, predIndex); + case 83: return declarationList_sempred((DeclarationListContext)_localctx, predIndex); + } + return true; + } + private boolean structDeclarationList_sempred(StructDeclarationListContext _localctx, int predIndex) { + switch (predIndex) { + case 28: return precpred(_ctx, 1); + } + return true; + } + private boolean structDeclaratorList_sempred(StructDeclaratorListContext _localctx, int predIndex) { + switch (predIndex) { + case 29: return precpred(_ctx, 1); + } + return true; + } + private boolean additiveExpression_sempred(AdditiveExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 11: return precpred(_ctx, 2); + case 12: return precpred(_ctx, 1); + } + return true; + } + private boolean relationalExpression_sempred(RelationalExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 16: return precpred(_ctx, 3); + case 17: return precpred(_ctx, 2); + case 18: return precpred(_ctx, 1); + case 15: return precpred(_ctx, 4); + } + return true; + } + private boolean enumeratorList_sempred(EnumeratorListContext _localctx, int predIndex) { + switch (predIndex) { + case 30: return precpred(_ctx, 1); + } + return true; + } + private boolean declarationList_sempred(DeclarationListContext _localctx, int predIndex) { + switch (predIndex) { + case 49: return precpred(_ctx, 1); + } + return true; + } + private boolean directDeclarator_sempred(DirectDeclaratorContext _localctx, int predIndex) { + switch (predIndex) { + case 32: return precpred(_ctx, 5); + case 33: return precpred(_ctx, 4); + case 34: return precpred(_ctx, 3); + case 35: return precpred(_ctx, 2); + case 36: return precpred(_ctx, 1); + case 31: return precpred(_ctx, 6); + } + return true; + } + private boolean designatorList_sempred(DesignatorListContext _localctx, int predIndex) { + switch (predIndex) { + case 46: return precpred(_ctx, 1); + } + return true; + } + private boolean andExpression_sempred(AndExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 21: return precpred(_ctx, 1); + } + return true; + } + private boolean argumentExpressionList_sempred(ArgumentExpressionListContext _localctx, int predIndex) { + switch (predIndex) { + case 7: return precpred(_ctx, 1); + } + return true; + } + private boolean logicalAndExpression_sempred(LogicalAndExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 24: return precpred(_ctx, 1); + } + return true; + } + private boolean postfixExpression_sempred(PostfixExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 1: return precpred(_ctx, 10); + case 2: return precpred(_ctx, 9); + case 3: return precpred(_ctx, 8); + case 4: return precpred(_ctx, 7); + case 5: return precpred(_ctx, 6); + case 6: return precpred(_ctx, 5); + } + return true; + } + private boolean typeQualifierList_sempred(TypeQualifierListContext _localctx, int predIndex) { + switch (predIndex) { + case 37: return precpred(_ctx, 1); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 26: return precpred(_ctx, 1); + } + return true; + } + private boolean identifierList_sempred(IdentifierListContext _localctx, int predIndex) { + switch (predIndex) { + case 39: return precpred(_ctx, 1); + } + return true; + } + private boolean shiftExpression_sempred(ShiftExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 13: return precpred(_ctx, 2); + case 14: return precpred(_ctx, 1); + } + return true; + } + private boolean inclusiveOrExpression_sempred(InclusiveOrExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 23: return precpred(_ctx, 1); + } + return true; + } + private boolean directAbstractDeclarator_sempred(DirectAbstractDeclaratorContext _localctx, int predIndex) { + switch (predIndex) { + case 40: return precpred(_ctx, 5); + case 41: return precpred(_ctx, 4); + case 42: return precpred(_ctx, 3); + case 43: return precpred(_ctx, 2); + case 44: return precpred(_ctx, 1); + } + return true; + } + private boolean multiplicativeExpression_sempred(MultiplicativeExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 8: return precpred(_ctx, 3); + case 9: return precpred(_ctx, 2); + case 10: return precpred(_ctx, 1); + } + return true; + } + private boolean logicalOrExpression_sempred(LogicalOrExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 25: return precpred(_ctx, 1); + } + return true; + } + private boolean translationUnit_sempred(TranslationUnitContext _localctx, int predIndex) { + switch (predIndex) { + case 48: return precpred(_ctx, 1); + } + return true; + } + private boolean blockItemList_sempred(BlockItemListContext _localctx, int predIndex) { + switch (predIndex) { + case 47: return precpred(_ctx, 1); + } + return true; + } + private boolean exclusiveOrExpression_sempred(ExclusiveOrExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 22: return precpred(_ctx, 1); + } + return true; + } + private boolean genericAssocList_sempred(GenericAssocListContext _localctx, int predIndex) { + switch (predIndex) { + case 0: return precpred(_ctx, 1); + } + return true; + } + private boolean equalityExpression_sempred(EqualityExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 19: return precpred(_ctx, 2); + case 20: return precpred(_ctx, 1); + } + return true; + } + private boolean parameterList_sempred(ParameterListContext _localctx, int predIndex) { + switch (predIndex) { + case 38: return precpred(_ctx, 1); + } + return true; + } + private boolean initDeclaratorList_sempred(InitDeclaratorListContext _localctx, int predIndex) { + switch (predIndex) { + case 27: return precpred(_ctx, 1); + } + return true; + } + private boolean initializerList_sempred(InitializerListContext _localctx, int predIndex) { + switch (predIndex) { + case 45: return precpred(_ctx, 1); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3w\u04ea\4\2\t\2\4"+ + "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ + "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\3\2\3\2\3\2\6\2\u00ae\n\2\r\2\16\2\u00af\3\2\3\2\3\2\3\2\3\2\3"+ + "\2\5\2\u00b8\n\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3"+ + "\2\3\2\3\2\3\2\3\2\5\2\u00cc\n\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3"+ + "\4\3\4\3\4\3\4\7\4\u00db\n\4\f\4\16\4\u00de\13\4\3\5\3\5\3\5\3\5\3\5\3"+ + "\5\3\5\5\5\u00e7\n\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3"+ + "\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6"+ + "\3\6\3\6\3\6\3\6\5\6\u010b\n\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\5\6\u0115"+ + "\n\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\7\6\u0122\n\6\f\6\16"+ + "\6\u0125\13\6\3\7\3\7\3\7\3\7\3\7\3\7\7\7\u012d\n\7\f\7\16\7\u0130\13"+ + "\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b"+ + "\3\b\3\b\3\b\3\b\3\b\5\b\u0148\n\b\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n"+ + "\3\n\3\n\3\n\3\n\3\n\5\n\u0158\n\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13"+ + "\3\13\3\13\3\13\3\13\3\13\7\13\u0166\n\13\f\13\16\13\u0169\13\13\3\f\3"+ + "\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\7\f\u0174\n\f\f\f\16\f\u0177\13\f\3\r\3"+ + "\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\7\r\u0182\n\r\f\r\16\r\u0185\13\r\3\16"+ + "\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16"+ + "\7\16\u0196\n\16\f\16\16\16\u0199\13\16\3\17\3\17\3\17\3\17\3\17\3\17"+ + "\3\17\3\17\3\17\7\17\u01a4\n\17\f\17\16\17\u01a7\13\17\3\20\3\20\3\20"+ + "\3\20\3\20\3\20\7\20\u01af\n\20\f\20\16\20\u01b2\13\20\3\21\3\21\3\21"+ + "\3\21\3\21\3\21\7\21\u01ba\n\21\f\21\16\21\u01bd\13\21\3\22\3\22\3\22"+ + "\3\22\3\22\3\22\7\22\u01c5\n\22\f\22\16\22\u01c8\13\22\3\23\3\23\3\23"+ + "\3\23\3\23\3\23\7\23\u01d0\n\23\f\23\16\23\u01d3\13\23\3\24\3\24\3\24"+ + "\3\24\3\24\3\24\7\24\u01db\n\24\f\24\16\24\u01de\13\24\3\25\3\25\3\25"+ + "\3\25\3\25\3\25\5\25\u01e6\n\25\3\26\3\26\3\26\3\26\3\26\5\26\u01ed\n"+ + "\26\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\7\30\u01f7\n\30\f\30\16\30"+ + "\u01fa\13\30\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\5\32\u0206"+ + "\n\32\3\33\6\33\u0209\n\33\r\33\16\33\u020a\3\34\6\34\u020e\n\34\r\34"+ + "\16\34\u020f\3\35\3\35\3\35\3\35\3\35\5\35\u0217\n\35\3\36\3\36\3\36\3"+ + "\36\3\36\3\36\7\36\u021f\n\36\f\36\16\36\u0222\13\36\3\37\3\37\3\37\3"+ + "\37\3\37\5\37\u0229\n\37\3 \3 \3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!"+ + "\3!\5!\u023b\n!\3\"\3\"\5\"\u023f\n\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\5\""+ + "\u0248\n\"\3#\3#\3$\3$\3$\3$\3$\7$\u0251\n$\f$\16$\u0254\13$\3%\3%\5%"+ + "\u0258\n%\3%\3%\3%\5%\u025d\n%\3&\3&\5&\u0261\n&\3&\3&\5&\u0265\n&\5&"+ + "\u0267\n&\3\'\3\'\3\'\3\'\3\'\3\'\7\'\u026f\n\'\f\'\16\'\u0272\13\'\3"+ + "(\3(\5(\u0276\n(\3(\3(\5(\u027a\n(\3)\3)\5)\u027e\n)\3)\3)\3)\3)\3)\3"+ + ")\5)\u0286\n)\3)\3)\3)\3)\3)\3)\3)\5)\u028f\n)\3*\3*\3*\3*\3*\3*\7*\u0297"+ + "\n*\f*\16*\u029a\13*\3+\3+\3+\3+\3+\5+\u02a1\n+\3,\3,\3-\3-\3-\3-\3-\3"+ + ".\3.\3/\3/\3/\3/\3/\3/\5/\u02b2\n/\3\60\3\60\3\60\3\60\3\60\3\60\3\60"+ + "\3\60\3\60\3\60\5\60\u02be\n\60\3\61\5\61\u02c1\n\61\3\61\3\61\7\61\u02c5"+ + "\n\61\f\61\16\61\u02c8\13\61\3\62\3\62\3\62\3\62\3\62\3\62\5\62\u02d0"+ + "\n\62\3\62\3\62\3\62\5\62\u02d5\n\62\3\62\5\62\u02d8\n\62\3\62\3\62\3"+ + "\62\3\62\3\62\5\62\u02df\n\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62"+ + "\3\62\3\62\3\62\3\62\3\62\5\62\u02ee\n\62\3\62\3\62\3\62\3\62\3\62\3\62"+ + "\3\62\3\62\3\62\3\62\5\62\u02fa\n\62\3\62\7\62\u02fd\n\62\f\62\16\62\u0300"+ + "\13\62\3\63\3\63\3\63\6\63\u0305\n\63\r\63\16\63\u0306\3\63\3\63\5\63"+ + "\u030b\n\63\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\65\3\65\3\65\7\65\u0317"+ + "\n\65\f\65\16\65\u031a\13\65\3\65\5\65\u031d\n\65\3\66\3\66\3\66\5\66"+ + "\u0322\n\66\3\66\5\66\u0325\n\66\3\66\5\66\u0328\n\66\3\67\3\67\3\67\3"+ + "\67\3\67\7\67\u032f\n\67\f\67\16\67\u0332\13\67\38\38\58\u0336\n8\38\3"+ + "8\58\u033a\n8\38\38\38\58\u033f\n8\38\38\58\u0343\n8\38\58\u0346\n8\3"+ + "9\39\39\39\39\79\u034d\n9\f9\169\u0350\139\3:\3:\3:\3:\3:\5:\u0357\n:"+ + "\3;\3;\3;\3;\3;\3;\7;\u035f\n;\f;\16;\u0362\13;\3<\3<\3<\3<\3<\5<\u0369"+ + "\n<\5<\u036b\n<\3=\3=\3=\3=\3=\3=\7=\u0373\n=\f=\16=\u0376\13=\3>\3>\5"+ + ">\u037a\n>\3?\3?\5?\u037e\n?\3?\3?\7?\u0382\n?\f?\16?\u0385\13?\5?\u0387"+ + "\n?\3@\3@\3@\3@\3@\7@\u038e\n@\f@\16@\u0391\13@\3@\3@\5@\u0395\n@\3@\5"+ + "@\u0398\n@\3@\3@\3@\3@\5@\u039e\n@\3@\3@\3@\3@\3@\3@\3@\3@\3@\3@\3@\3"+ + "@\3@\3@\5@\u03ae\n@\3@\3@\7@\u03b2\n@\f@\16@\u03b5\13@\5@\u03b7\n@\3@"+ + "\3@\3@\5@\u03bc\n@\3@\5@\u03bf\n@\3@\3@\3@\3@\3@\5@\u03c6\n@\3@\3@\3@"+ + "\3@\3@\3@\3@\3@\3@\3@\3@\3@\3@\3@\3@\3@\3@\5@\u03d9\n@\3@\3@\7@\u03dd"+ + "\n@\f@\16@\u03e0\13@\7@\u03e2\n@\f@\16@\u03e5\13@\3A\3A\3B\3B\3B\3B\3"+ + "B\3B\3B\3B\3B\3B\5B\u03f3\nB\3C\3C\5C\u03f7\nC\3C\3C\3C\3C\3C\5C\u03fe"+ + "\nC\3C\7C\u0401\nC\fC\16C\u0404\13C\3D\3D\3D\3E\3E\3E\3E\3E\7E\u040e\n"+ + "E\fE\16E\u0411\13E\3F\3F\3F\3F\3F\3F\5F\u0419\nF\3G\3G\3G\3G\3G\6G\u0420"+ + "\nG\rG\16G\u0421\3G\3G\3G\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\7H\u0433"+ + "\nH\fH\16H\u0436\13H\5H\u0438\nH\3H\3H\3H\3H\7H\u043e\nH\fH\16H\u0441"+ + "\13H\5H\u0443\nH\7H\u0445\nH\fH\16H\u0448\13H\3H\3H\5H\u044c\nH\3I\3I"+ + "\3I\3I\3I\3I\3I\3I\3I\3I\3I\5I\u0459\nI\3J\3J\5J\u045d\nJ\3J\3J\3K\3K"+ + "\3K\3K\3K\7K\u0466\nK\fK\16K\u0469\13K\3L\3L\5L\u046d\nL\3M\5M\u0470\n"+ + "M\3M\3M\3N\3N\3N\3N\3N\3N\3N\5N\u047b\nN\3N\3N\3N\3N\3N\3N\5N\u0483\n"+ + "N\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\5O\u0496\nO\3O\3"+ + "O\5O\u049a\nO\3O\3O\5O\u049e\nO\3O\3O\3O\3O\3O\3O\5O\u04a6\nO\3O\3O\5"+ + "O\u04aa\nO\3O\3O\3O\5O\u04af\nO\3P\3P\3P\3P\3P\3P\3P\3P\3P\5P\u04ba\n"+ + "P\3P\3P\3P\3P\3P\5P\u04c1\nP\3Q\5Q\u04c4\nQ\3Q\3Q\3R\3R\3R\3R\3R\7R\u04cd"+ + "\nR\fR\16R\u04d0\13R\3S\3S\3S\5S\u04d5\nS\3T\5T\u04d8\nT\3T\3T\5T\u04dc"+ + "\nT\3T\3T\3U\3U\3U\3U\3U\7U\u04e5\nU\fU\16U\u04e8\13U\3U\2\36\6\n\f\24"+ + "\26\30\32\34\36 \"$&.:FLRbptx~\u0084\u0088\u0094\u00a2\u00a8V\2\4\6\b"+ + "\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVX"+ + "Z\\^`bdfhjlnprtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a\u008c\u008e\u0090"+ + "\u0092\u0094\u0096\u0098\u009a\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8"+ + "\2\16\7\2IIKKMMPPUV\3\2[e\b\2\21\21\34\34$$**--<<\13\2\13\f\17\17\24\24"+ + "\31\31\35\35\"#\'(/\60\66\67\4\2\13\f\17\17\4\2++..\6\2\25\25%%\61\61"+ + "\65\65\6\2\5\5\16\16!!::\4\2=>ZZ\3\2=>\4\2\6\6\n\n\4\2\4\4\61\61\u055a"+ + "\2\u00cb\3\2\2\2\4\u00cd\3\2\2\2\6\u00d4\3\2\2\2\b\u00e6\3\2\2\2\n\u010a"+ + "\3\2\2\2\f\u0126\3\2\2\2\16\u0147\3\2\2\2\20\u0149\3\2\2\2\22\u0157\3"+ + "\2\2\2\24\u0159\3\2\2\2\26\u016a\3\2\2\2\30\u0178\3\2\2\2\32\u0186\3\2"+ + "\2\2\34\u019a\3\2\2\2\36\u01a8\3\2\2\2 \u01b3\3\2\2\2\"\u01be\3\2\2\2"+ + "$\u01c9\3\2\2\2&\u01d4\3\2\2\2(\u01df\3\2\2\2*\u01ec\3\2\2\2,\u01ee\3"+ + "\2\2\2.\u01f0\3\2\2\2\60\u01fb\3\2\2\2\62\u0205\3\2\2\2\64\u0208\3\2\2"+ + "\2\66\u020d\3\2\2\28\u0216\3\2\2\2:\u0218\3\2\2\2<\u0228\3\2\2\2>\u022a"+ + "\3\2\2\2@\u023a\3\2\2\2B\u0247\3\2\2\2D\u0249\3\2\2\2F\u024b\3\2\2\2H"+ + "\u025c\3\2\2\2J\u0266\3\2\2\2L\u0268\3\2\2\2N\u0279\3\2\2\2P\u028e\3\2"+ + "\2\2R\u0290\3\2\2\2T\u02a0\3\2\2\2V\u02a2\3\2\2\2X\u02a4\3\2\2\2Z\u02a9"+ + "\3\2\2\2\\\u02b1\3\2\2\2^\u02bd\3\2\2\2`\u02c0\3\2\2\2b\u02cf\3\2\2\2"+ + "d\u030a\3\2\2\2f\u030c\3\2\2\2h\u031c\3\2\2\2j\u0327\3\2\2\2l\u0330\3"+ + "\2\2\2n\u0345\3\2\2\2p\u0347\3\2\2\2r\u0356\3\2\2\2t\u0358\3\2\2\2v\u036a"+ + "\3\2\2\2x\u036c\3\2\2\2z\u0377\3\2\2\2|\u0386\3\2\2\2~\u03b6\3\2\2\2\u0080"+ + "\u03e6\3\2\2\2\u0082\u03f2\3\2\2\2\u0084\u03f4\3\2\2\2\u0086\u0405\3\2"+ + "\2\2\u0088\u0408\3\2\2\2\u008a\u0418\3\2\2\2\u008c\u041a\3\2\2\2\u008e"+ + "\u044b\3\2\2\2\u0090\u0458\3\2\2\2\u0092\u045a\3\2\2\2\u0094\u0460\3\2"+ + "\2\2\u0096\u046c\3\2\2\2\u0098\u046f\3\2\2\2\u009a\u0482\3\2\2\2\u009c"+ + "\u04ae\3\2\2\2\u009e\u04c0\3\2\2\2\u00a0\u04c3\3\2\2\2\u00a2\u04c7\3\2"+ + "\2\2\u00a4\u04d4\3\2\2\2\u00a6\u04d7\3\2\2\2\u00a8\u04df\3\2\2\2\u00aa"+ + "\u00cc\7k\2\2\u00ab\u00cc\7l\2\2\u00ac\u00ae\7m\2\2\u00ad\u00ac\3\2\2"+ + "\2\u00ae\u00af\3\2\2\2\u00af\u00ad\3\2\2\2\u00af\u00b0\3\2\2\2\u00b0\u00cc"+ + "\3\2\2\2\u00b1\u00b2\7=\2\2\u00b2\u00b3\5.\30\2\u00b3\u00b4\7>\2\2\u00b4"+ + "\u00cc\3\2\2\2\u00b5\u00cc\5\4\3\2\u00b6\u00b8\7\3\2\2\u00b7\u00b6\3\2"+ + "\2\2\u00b7\u00b8\3\2\2\2\u00b8\u00b9\3\2\2\2\u00b9\u00ba\7=\2\2\u00ba"+ + "\u00bb\5\u0092J\2\u00bb\u00bc\7>\2\2\u00bc\u00cc\3\2\2\2\u00bd\u00be\7"+ + "\b\2\2\u00be\u00bf\7=\2\2\u00bf\u00c0\5\16\b\2\u00c0\u00c1\7Z\2\2\u00c1"+ + "\u00c2\5z>\2\u00c2\u00c3\7>\2\2\u00c3\u00cc\3\2\2\2\u00c4\u00c5\7\20\2"+ + "\2\u00c5\u00c6\7=\2\2\u00c6\u00c7\5z>\2\u00c7\u00c8\7Z\2\2\u00c8\u00c9"+ + "\5\16\b\2\u00c9\u00ca\7>\2\2\u00ca\u00cc\3\2\2\2\u00cb\u00aa\3\2\2\2\u00cb"+ + "\u00ab\3\2\2\2\u00cb\u00ad\3\2\2\2\u00cb\u00b1\3\2\2\2\u00cb\u00b5\3\2"+ + "\2\2\u00cb\u00b7\3\2\2\2\u00cb\u00bd\3\2\2\2\u00cb\u00c4\3\2\2\2\u00cc"+ + "\3\3\2\2\2\u00cd\u00ce\78\2\2\u00ce\u00cf\7=\2\2\u00cf\u00d0\5*\26\2\u00d0"+ + "\u00d1\7Z\2\2\u00d1\u00d2\5\6\4\2\u00d2\u00d3\7>\2\2\u00d3\5\3\2\2\2\u00d4"+ + "\u00d5\b\4\1\2\u00d5\u00d6\5\b\5\2\u00d6\u00dc\3\2\2\2\u00d7\u00d8\f\3"+ + "\2\2\u00d8\u00d9\7Z\2\2\u00d9\u00db\5\b\5\2\u00da\u00d7\3\2\2\2\u00db"+ + "\u00de\3\2\2\2\u00dc\u00da\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\7\3\2\2\2"+ + "\u00de\u00dc\3\2\2\2\u00df\u00e0\5z>\2\u00e0\u00e1\7X\2\2\u00e1\u00e2"+ + "\5*\26\2\u00e2\u00e7\3\2\2\2\u00e3\u00e4\7\27\2\2\u00e4\u00e5\7X\2\2\u00e5"+ + "\u00e7\5*\26\2\u00e6\u00df\3\2\2\2\u00e6\u00e3\3\2\2\2\u00e7\t\3\2\2\2"+ + "\u00e8\u00e9\b\6\1\2\u00e9\u010b\5\2\2\2\u00ea\u00eb\7=\2\2\u00eb\u00ec"+ + "\5z>\2\u00ec\u00ed\7>\2\2\u00ed\u00ee\7A\2\2\u00ee\u00ef\5\u0084C\2\u00ef"+ + "\u00f0\7B\2\2\u00f0\u010b\3\2\2\2\u00f1\u00f2\7=\2\2\u00f2\u00f3\5z>\2"+ + "\u00f3\u00f4\7>\2\2\u00f4\u00f5\7A\2\2\u00f5\u00f6\5\u0084C\2\u00f6\u00f7"+ + "\7Z\2\2\u00f7\u00f8\7B\2\2\u00f8\u010b\3\2\2\2\u00f9\u00fa\7\3\2\2\u00fa"+ + "\u00fb\7=\2\2\u00fb\u00fc\5z>\2\u00fc\u00fd\7>\2\2\u00fd\u00fe\7A\2\2"+ + "\u00fe\u00ff\5\u0084C\2\u00ff\u0100\7B\2\2\u0100\u010b\3\2\2\2\u0101\u0102"+ + "\7\3\2\2\u0102\u0103\7=\2\2\u0103\u0104\5z>\2\u0104\u0105\7>\2\2\u0105"+ + "\u0106\7A\2\2\u0106\u0107\5\u0084C\2\u0107\u0108\7Z\2\2\u0108\u0109\7"+ + "B\2\2\u0109\u010b\3\2\2\2\u010a\u00e8\3\2\2\2\u010a\u00ea\3\2\2\2\u010a"+ + "\u00f1\3\2\2\2\u010a\u00f9\3\2\2\2\u010a\u0101\3\2\2\2\u010b\u0123\3\2"+ + "\2\2\u010c\u010d\f\f\2\2\u010d\u010e\7?\2\2\u010e\u010f\5.\30\2\u010f"+ + "\u0110\7@\2\2\u0110\u0122\3\2\2\2\u0111\u0112\f\13\2\2\u0112\u0114\7="+ + "\2\2\u0113\u0115\5\f\7\2\u0114\u0113\3\2\2\2\u0114\u0115\3\2\2\2\u0115"+ + "\u0116\3\2\2\2\u0116\u0122\7>\2\2\u0117\u0118\f\n\2\2\u0118\u0119\7i\2"+ + "\2\u0119\u0122\7k\2\2\u011a\u011b\f\t\2\2\u011b\u011c\7h\2\2\u011c\u0122"+ + "\7k\2\2\u011d\u011e\f\b\2\2\u011e\u0122\7J\2\2\u011f\u0120\f\7\2\2\u0120"+ + "\u0122\7L\2\2\u0121\u010c\3\2\2\2\u0121\u0111\3\2\2\2\u0121\u0117\3\2"+ + "\2\2\u0121\u011a\3\2\2\2\u0121\u011d\3\2\2\2\u0121\u011f\3\2\2\2\u0122"+ + "\u0125\3\2\2\2\u0123\u0121\3\2\2\2\u0123\u0124\3\2\2\2\u0124\13\3\2\2"+ + "\2\u0125\u0123\3\2\2\2\u0126\u0127\b\7\1\2\u0127\u0128\5*\26\2\u0128\u012e"+ + "\3\2\2\2\u0129\u012a\f\3\2\2\u012a\u012b\7Z\2\2\u012b\u012d\5*\26\2\u012c"+ + "\u0129\3\2\2\2\u012d\u0130\3\2\2\2\u012e\u012c\3\2\2\2\u012e\u012f\3\2"+ + "\2\2\u012f\r\3\2\2\2\u0130\u012e\3\2\2\2\u0131\u0148\5\n\6\2\u0132\u0133"+ + "\7J\2\2\u0133\u0148\5\16\b\2\u0134\u0135\7L\2\2\u0135\u0148\5\16\b\2\u0136"+ + "\u0137\5\20\t\2\u0137\u0138\5\22\n\2\u0138\u0148\3\2\2\2\u0139\u013a\7"+ + ")\2\2\u013a\u0148\5\16\b\2\u013b\u013c\7)\2\2\u013c\u013d\7=\2\2\u013d"+ + "\u013e\5z>\2\u013e\u013f\7>\2\2\u013f\u0148\3\2\2\2\u0140\u0141\7\64\2"+ + "\2\u0141\u0142\7=\2\2\u0142\u0143\5z>\2\u0143\u0144\7>\2\2\u0144\u0148"+ + "\3\2\2\2\u0145\u0146\7R\2\2\u0146\u0148\7k\2\2\u0147\u0131\3\2\2\2\u0147"+ + "\u0132\3\2\2\2\u0147\u0134\3\2\2\2\u0147\u0136\3\2\2\2\u0147\u0139\3\2"+ + "\2\2\u0147\u013b\3\2\2\2\u0147\u0140\3\2\2\2\u0147\u0145\3\2\2\2\u0148"+ + "\17\3\2\2\2\u0149\u014a\t\2\2\2\u014a\21\3\2\2\2\u014b\u0158\5\16\b\2"+ + "\u014c\u014d\7=\2\2\u014d\u014e\5z>\2\u014e\u014f\7>\2\2\u014f\u0150\5"+ + "\22\n\2\u0150\u0158\3\2\2\2\u0151\u0152\7\3\2\2\u0152\u0153\7=\2\2\u0153"+ + "\u0154\5z>\2\u0154\u0155\7>\2\2\u0155\u0156\5\22\n\2\u0156\u0158\3\2\2"+ + "\2\u0157\u014b\3\2\2\2\u0157\u014c\3\2\2\2\u0157\u0151\3\2\2\2\u0158\23"+ + "\3\2\2\2\u0159\u015a\b\13\1\2\u015a\u015b\5\22\n\2\u015b\u0167\3\2\2\2"+ + "\u015c\u015d\f\5\2\2\u015d\u015e\7M\2\2\u015e\u0166\5\22\n\2\u015f\u0160"+ + "\f\4\2\2\u0160\u0161\7N\2\2\u0161\u0166\5\22\n\2\u0162\u0163\f\3\2\2\u0163"+ + "\u0164\7O\2\2\u0164\u0166\5\22\n\2\u0165\u015c\3\2\2\2\u0165\u015f\3\2"+ + "\2\2\u0165\u0162\3\2\2\2\u0166\u0169\3\2\2\2\u0167\u0165\3\2\2\2\u0167"+ + "\u0168\3\2\2\2\u0168\25\3\2\2\2\u0169\u0167\3\2\2\2\u016a\u016b\b\f\1"+ + "\2\u016b\u016c\5\24\13\2\u016c\u0175\3\2\2\2\u016d\u016e\f\4\2\2\u016e"+ + "\u016f\7I\2\2\u016f\u0174\5\24\13\2\u0170\u0171\f\3\2\2\u0171\u0172\7"+ + "K\2\2\u0172\u0174\5\24\13\2\u0173\u016d\3\2\2\2\u0173\u0170\3\2\2\2\u0174"+ + "\u0177\3\2\2\2\u0175\u0173\3\2\2\2\u0175\u0176\3\2\2\2\u0176\27\3\2\2"+ + "\2\u0177\u0175\3\2\2\2\u0178\u0179\b\r\1\2\u0179\u017a\5\26\f\2\u017a"+ + "\u0183\3\2\2\2\u017b\u017c\f\4\2\2\u017c\u017d\7G\2\2\u017d\u0182\5\26"+ + "\f\2\u017e\u017f\f\3\2\2\u017f\u0180\7H\2\2\u0180\u0182\5\26\f\2\u0181"+ + "\u017b\3\2\2\2\u0181\u017e\3\2\2\2\u0182\u0185\3\2\2\2\u0183\u0181\3\2"+ + "\2\2\u0183\u0184\3\2\2\2\u0184\31\3\2\2\2\u0185\u0183\3\2\2\2\u0186\u0187"+ + "\b\16\1\2\u0187\u0188\5\30\r\2\u0188\u0197\3\2\2\2\u0189\u018a\f\6\2\2"+ + "\u018a\u018b\7C\2\2\u018b\u0196\5\30\r\2\u018c\u018d\f\5\2\2\u018d\u018e"+ + "\7E\2\2\u018e\u0196\5\30\r\2\u018f\u0190\f\4\2\2\u0190\u0191\7D\2\2\u0191"+ + "\u0196\5\30\r\2\u0192\u0193\f\3\2\2\u0193\u0194\7F\2\2\u0194\u0196\5\30"+ + "\r\2\u0195\u0189\3\2\2\2\u0195\u018c\3\2\2\2\u0195\u018f\3\2\2\2\u0195"+ + "\u0192\3\2\2\2\u0196\u0199\3\2\2\2\u0197\u0195\3\2\2\2\u0197\u0198\3\2"+ + "\2\2\u0198\33\3\2\2\2\u0199\u0197\3\2\2\2\u019a\u019b\b\17\1\2\u019b\u019c"+ + "\5\32\16\2\u019c\u01a5\3\2\2\2\u019d\u019e\f\4\2\2\u019e\u019f\7f\2\2"+ + "\u019f\u01a4\5\32\16\2\u01a0\u01a1\f\3\2\2\u01a1\u01a2\7g\2\2\u01a2\u01a4"+ + "\5\32\16\2\u01a3\u019d\3\2\2\2\u01a3\u01a0\3\2\2\2\u01a4\u01a7\3\2\2\2"+ + "\u01a5\u01a3\3\2\2\2\u01a5\u01a6\3\2\2\2\u01a6\35\3\2\2\2\u01a7\u01a5"+ + "\3\2\2\2\u01a8\u01a9\b\20\1\2\u01a9\u01aa\5\34\17\2\u01aa\u01b0\3\2\2"+ + "\2\u01ab\u01ac\f\3\2\2\u01ac\u01ad\7P\2\2\u01ad\u01af\5\34\17\2\u01ae"+ + "\u01ab\3\2\2\2\u01af\u01b2\3\2\2\2\u01b0\u01ae\3\2\2\2\u01b0\u01b1\3\2"+ + "\2\2\u01b1\37\3\2\2\2\u01b2\u01b0\3\2\2\2\u01b3\u01b4\b\21\1\2\u01b4\u01b5"+ + "\5\36\20\2\u01b5\u01bb\3\2\2\2\u01b6\u01b7\f\3\2\2\u01b7\u01b8\7T\2\2"+ + "\u01b8\u01ba\5\36\20\2\u01b9\u01b6\3\2\2\2\u01ba\u01bd\3\2\2\2\u01bb\u01b9"+ + "\3\2\2\2\u01bb\u01bc\3\2\2\2\u01bc!\3\2\2\2\u01bd\u01bb\3\2\2\2\u01be"+ + "\u01bf\b\22\1\2\u01bf\u01c0\5 \21\2\u01c0\u01c6\3\2\2\2\u01c1\u01c2\f"+ + "\3\2\2\u01c2\u01c3\7Q\2\2\u01c3\u01c5\5 \21\2\u01c4\u01c1\3\2\2\2\u01c5"+ + "\u01c8\3\2\2\2\u01c6\u01c4\3\2\2\2\u01c6\u01c7\3\2\2\2\u01c7#\3\2\2\2"+ + "\u01c8\u01c6\3\2\2\2\u01c9\u01ca\b\23\1\2\u01ca\u01cb\5\"\22\2\u01cb\u01d1"+ + "\3\2\2\2\u01cc\u01cd\f\3\2\2\u01cd\u01ce\7R\2\2\u01ce\u01d0\5\"\22\2\u01cf"+ + "\u01cc\3\2\2\2\u01d0\u01d3\3\2\2\2\u01d1\u01cf\3\2\2\2\u01d1\u01d2\3\2"+ + "\2\2\u01d2%\3\2\2\2\u01d3\u01d1\3\2\2\2\u01d4\u01d5\b\24\1\2\u01d5\u01d6"+ + "\5$\23\2\u01d6\u01dc\3\2\2\2\u01d7\u01d8\f\3\2\2\u01d8\u01d9\7S\2\2\u01d9"+ + "\u01db\5$\23\2\u01da\u01d7\3\2\2\2\u01db\u01de\3\2\2\2\u01dc\u01da\3\2"+ + "\2\2\u01dc\u01dd\3\2\2\2\u01dd\'\3\2\2\2\u01de\u01dc\3\2\2\2\u01df\u01e5"+ + "\5&\24\2\u01e0\u01e1\7W\2\2\u01e1\u01e2\5.\30\2\u01e2\u01e3\7X\2\2\u01e3"+ + "\u01e4\5(\25\2\u01e4\u01e6\3\2\2\2\u01e5\u01e0\3\2\2\2\u01e5\u01e6\3\2"+ + "\2\2\u01e6)\3\2\2\2\u01e7\u01ed\5(\25\2\u01e8\u01e9\5\16\b\2\u01e9\u01ea"+ + "\5,\27\2\u01ea\u01eb\5*\26\2\u01eb\u01ed\3\2\2\2\u01ec\u01e7\3\2\2\2\u01ec"+ + "\u01e8\3\2\2\2\u01ed+\3\2\2\2\u01ee\u01ef\t\3\2\2\u01ef-\3\2\2\2\u01f0"+ + "\u01f1\b\30\1\2\u01f1\u01f2\5*\26\2\u01f2\u01f8\3\2\2\2\u01f3\u01f4\f"+ + "\3\2\2\u01f4\u01f5\7Z\2\2\u01f5\u01f7\5*\26\2\u01f6\u01f3\3\2\2\2\u01f7"+ + "\u01fa\3\2\2\2\u01f8\u01f6\3\2\2\2\u01f8\u01f9\3\2\2\2\u01f9/\3\2\2\2"+ + "\u01fa\u01f8\3\2\2\2\u01fb\u01fc\5(\25\2\u01fc\61\3\2\2\2\u01fd\u01fe"+ + "\5\64\33\2\u01fe\u01ff\5:\36\2\u01ff\u0200\7Y\2\2\u0200\u0206\3\2\2\2"+ + "\u0201\u0202\5\64\33\2\u0202\u0203\7Y\2\2\u0203\u0206\3\2\2\2\u0204\u0206"+ + "\5\u008cG\2\u0205\u01fd\3\2\2\2\u0205\u0201\3\2\2\2\u0205\u0204\3\2\2"+ + "\2\u0206\63\3\2\2\2\u0207\u0209\58\35\2\u0208\u0207\3\2\2\2\u0209\u020a"+ + "\3\2\2\2\u020a\u0208\3\2\2\2\u020a\u020b\3\2\2\2\u020b\65\3\2\2\2\u020c"+ + "\u020e\58\35\2\u020d\u020c\3\2\2\2\u020e\u020f\3\2\2\2\u020f\u020d\3\2"+ + "\2\2\u020f\u0210\3\2\2\2\u0210\67\3\2\2\2\u0211\u0217\5> \2\u0212\u0217"+ + "\5@!\2\u0213\u0217\5Z.\2\u0214\u0217\5\\/\2\u0215\u0217\5^\60\2\u0216"+ + "\u0211\3\2\2\2\u0216\u0212\3\2\2\2\u0216\u0213\3\2\2\2\u0216\u0214\3\2"+ + "\2\2\u0216\u0215\3\2\2\2\u02179\3\2\2\2\u0218\u0219\b\36\1\2\u0219\u021a"+ + "\5<\37\2\u021a\u0220\3\2\2\2\u021b\u021c\f\3\2\2\u021c\u021d\7Z\2\2\u021d"+ + "\u021f\5<\37\2\u021e\u021b\3\2\2\2\u021f\u0222\3\2\2\2\u0220\u021e\3\2"+ + "\2\2\u0220\u0221\3\2\2\2\u0221;\3\2\2\2\u0222\u0220\3\2\2\2\u0223\u0229"+ + "\5`\61\2\u0224\u0225\5`\61\2\u0225\u0226\7[\2\2\u0226\u0227\5\u0082B\2"+ + "\u0227\u0229\3\2\2\2\u0228\u0223\3\2\2\2\u0228\u0224\3\2\2\2\u0229=\3"+ + "\2\2\2\u022a\u022b\t\4\2\2\u022b?\3\2\2\2\u022c\u023b\t\5\2\2\u022d\u022e"+ + "\7\3\2\2\u022e\u022f\7=\2\2\u022f\u0230\t\6\2\2\u0230\u023b\7>\2\2\u0231"+ + "\u023b\5X-\2\u0232\u023b\5B\"\2\u0233\u023b\5P)\2\u0234\u023b\5\u0080"+ + "A\2\u0235\u0236\7\t\2\2\u0236\u0237\7=\2\2\u0237\u0238\5\60\31\2\u0238"+ + "\u0239\7>\2\2\u0239\u023b\3\2\2\2\u023a\u022c\3\2\2\2\u023a\u022d\3\2"+ + "\2\2\u023a\u0231\3\2\2\2\u023a\u0232\3\2\2\2\u023a\u0233\3\2\2\2\u023a"+ + "\u0234\3\2\2\2\u023a\u0235\3\2\2\2\u023bA\3\2\2\2\u023c\u023e\5D#\2\u023d"+ + "\u023f\7k\2\2\u023e\u023d\3\2\2\2\u023e\u023f\3\2\2\2\u023f\u0240\3\2"+ + "\2\2\u0240\u0241\7A\2\2\u0241\u0242\5F$\2\u0242\u0243\7B\2\2\u0243\u0248"+ + "\3\2\2\2\u0244\u0245\5D#\2\u0245\u0246\7k\2\2\u0246\u0248\3\2\2\2\u0247"+ + "\u023c\3\2\2\2\u0247\u0244\3\2\2\2\u0248C\3\2\2\2\u0249\u024a\t\7\2\2"+ + "\u024aE\3\2\2\2\u024b\u024c\b$\1\2\u024c\u024d\5H%\2\u024d\u0252\3\2\2"+ + "\2\u024e\u024f\f\3\2\2\u024f\u0251\5H%\2\u0250\u024e\3\2\2\2\u0251\u0254"+ + "\3\2\2\2\u0252\u0250\3\2\2\2\u0252\u0253\3\2\2\2\u0253G\3\2\2\2\u0254"+ + "\u0252\3\2\2\2\u0255\u0257\5J&\2\u0256\u0258\5L\'\2\u0257\u0256\3\2\2"+ + "\2\u0257\u0258\3\2\2\2\u0258\u0259\3\2\2\2\u0259\u025a\7Y\2\2\u025a\u025d"+ + "\3\2\2\2\u025b\u025d\5\u008cG\2\u025c\u0255\3\2\2\2\u025c\u025b\3\2\2"+ + "\2\u025dI\3\2\2\2\u025e\u0260\5@!\2\u025f\u0261\5J&\2\u0260\u025f\3\2"+ + "\2\2\u0260\u0261\3\2\2\2\u0261\u0267\3\2\2\2\u0262\u0264\5Z.\2\u0263\u0265"+ + "\5J&\2\u0264\u0263\3\2\2\2\u0264\u0265\3\2\2\2\u0265\u0267\3\2\2\2\u0266"+ + "\u025e\3\2\2\2\u0266\u0262\3\2\2\2\u0267K\3\2\2\2\u0268\u0269\b\'\1\2"+ + "\u0269\u026a\5N(\2\u026a\u0270\3\2\2\2\u026b\u026c\f\3\2\2\u026c\u026d"+ + "\7Z\2\2\u026d\u026f\5N(\2\u026e\u026b\3\2\2\2\u026f\u0272\3\2\2\2\u0270"+ + "\u026e\3\2\2\2\u0270\u0271\3\2\2\2\u0271M\3\2\2\2\u0272\u0270\3\2\2\2"+ + "\u0273\u027a\5`\61\2\u0274\u0276\5`\61\2\u0275\u0274\3\2\2\2\u0275\u0276"+ + "\3\2\2\2\u0276\u0277\3\2\2\2\u0277\u0278\7X\2\2\u0278\u027a\5\60\31\2"+ + "\u0279\u0273\3\2\2\2\u0279\u0275\3\2\2\2\u027aO\3\2\2\2\u027b\u027d\7"+ + "\33\2\2\u027c\u027e\7k\2\2\u027d\u027c\3\2\2\2\u027d\u027e\3\2\2\2\u027e"+ + "\u027f\3\2\2\2\u027f\u0280\7A\2\2\u0280\u0281\5R*\2\u0281\u0282\7B\2\2"+ + "\u0282\u028f\3\2\2\2\u0283\u0285\7\33\2\2\u0284\u0286\7k\2\2\u0285\u0284"+ + "\3\2\2\2\u0285\u0286\3\2\2\2\u0286\u0287\3\2\2\2\u0287\u0288\7A\2\2\u0288"+ + "\u0289\5R*\2\u0289\u028a\7Z\2\2\u028a\u028b\7B\2\2\u028b\u028f\3\2\2\2"+ + "\u028c\u028d\7\33\2\2\u028d\u028f\7k\2\2\u028e\u027b\3\2\2\2\u028e\u0283"+ + "\3\2\2\2\u028e\u028c\3\2\2\2\u028fQ\3\2\2\2\u0290\u0291\b*\1\2\u0291\u0292"+ + "\5T+\2\u0292\u0298\3\2\2\2\u0293\u0294\f\3\2\2\u0294\u0295\7Z\2\2\u0295"+ + "\u0297\5T+\2\u0296\u0293\3\2\2\2\u0297\u029a\3\2\2\2\u0298\u0296\3\2\2"+ + "\2\u0298\u0299\3\2\2\2\u0299S\3\2\2\2\u029a\u0298\3\2\2\2\u029b\u02a1"+ + "\5V,\2\u029c\u029d\5V,\2\u029d\u029e\7[\2\2\u029e\u029f\5\60\31\2\u029f"+ + "\u02a1\3\2\2\2\u02a0\u029b\3\2\2\2\u02a0\u029c\3\2\2\2\u02a1U\3\2\2\2"+ + "\u02a2\u02a3\7k\2\2\u02a3W\3\2\2\2\u02a4\u02a5\7\65\2\2\u02a5\u02a6\7"+ + "=\2\2\u02a6\u02a7\5z>\2\u02a7\u02a8\7>\2\2\u02a8Y\3\2\2\2\u02a9\u02aa"+ + "\t\b\2\2\u02aa[\3\2\2\2\u02ab\u02b2\t\t\2\2\u02ac\u02b2\5f\64\2\u02ad"+ + "\u02ae\7\7\2\2\u02ae\u02af\7=\2\2\u02af\u02b0\7k\2\2\u02b0\u02b2\7>\2"+ + "\2\u02b1\u02ab\3\2\2\2\u02b1\u02ac\3\2\2\2\u02b1\u02ad\3\2\2\2\u02b2]"+ + "\3\2\2\2\u02b3\u02b4\7\63\2\2\u02b4\u02b5\7=\2\2\u02b5\u02b6\5z>\2\u02b6"+ + "\u02b7\7>\2\2\u02b7\u02be\3\2\2\2\u02b8\u02b9\7\63\2\2\u02b9\u02ba\7="+ + "\2\2\u02ba\u02bb\5\60\31\2\u02bb\u02bc\7>\2\2\u02bc\u02be\3\2\2\2\u02bd"+ + "\u02b3\3\2\2\2\u02bd\u02b8\3\2\2\2\u02be_\3\2\2\2\u02bf\u02c1\5n8\2\u02c0"+ + "\u02bf\3\2\2\2\u02c0\u02c1\3\2\2\2\u02c1\u02c2\3\2\2\2\u02c2\u02c6\5b"+ + "\62\2\u02c3\u02c5\5d\63\2\u02c4\u02c3\3\2\2\2\u02c5\u02c8\3\2\2\2\u02c6"+ + "\u02c4\3\2\2\2\u02c6\u02c7\3\2\2\2\u02c7a\3\2\2\2\u02c8\u02c6\3\2\2\2"+ + "\u02c9\u02ca\b\62\1\2\u02ca\u02d0\7k\2\2\u02cb\u02cc\7=\2\2\u02cc\u02cd"+ + "\5`\61\2\u02cd\u02ce\7>\2\2\u02ce\u02d0\3\2\2\2\u02cf\u02c9\3\2\2\2\u02cf"+ + "\u02cb\3\2\2\2\u02d0\u02fe\3\2\2\2\u02d1\u02d2\f\b\2\2\u02d2\u02d4\7?"+ + "\2\2\u02d3\u02d5\5p9\2\u02d4\u02d3\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d5\u02d7"+ + "\3\2\2\2\u02d6\u02d8\5*\26\2\u02d7\u02d6\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8"+ + "\u02d9\3\2\2\2\u02d9\u02fd\7@\2\2\u02da\u02db\f\7\2\2\u02db\u02dc\7?\2"+ + "\2\u02dc\u02de\7*\2\2\u02dd\u02df\5p9\2\u02de\u02dd\3\2\2\2\u02de\u02df"+ + "\3\2\2\2\u02df\u02e0\3\2\2\2\u02e0\u02e1\5*\26\2\u02e1\u02e2\7@\2\2\u02e2"+ + "\u02fd\3\2\2\2\u02e3\u02e4\f\6\2\2\u02e4\u02e5\7?\2\2\u02e5\u02e6\5p9"+ + "\2\u02e6\u02e7\7*\2\2\u02e7\u02e8\5*\26\2\u02e8\u02e9\7@\2\2\u02e9\u02fd"+ + "\3\2\2\2\u02ea\u02eb\f\5\2\2\u02eb\u02ed\7?\2\2\u02ec\u02ee\5p9\2\u02ed"+ + "\u02ec\3\2\2\2\u02ed\u02ee\3\2\2\2\u02ee\u02ef\3\2\2\2\u02ef\u02f0\7M"+ + "\2\2\u02f0\u02fd\7@\2\2\u02f1\u02f2\f\4\2\2\u02f2\u02f3\7=\2\2\u02f3\u02f4"+ + "\5r:\2\u02f4\u02f5\7>\2\2\u02f5\u02fd\3\2\2\2\u02f6\u02f7\f\3\2\2\u02f7"+ + "\u02f9\7=\2\2\u02f8\u02fa\5x=\2\u02f9\u02f8\3\2\2\2\u02f9\u02fa\3\2\2"+ + "\2\u02fa\u02fb\3\2\2\2\u02fb\u02fd\7>\2\2\u02fc\u02d1\3\2\2\2\u02fc\u02da"+ + "\3\2\2\2\u02fc\u02e3\3\2\2\2\u02fc\u02ea\3\2\2\2\u02fc\u02f1\3\2\2\2\u02fc"+ + "\u02f6\3\2\2\2\u02fd\u0300\3\2\2\2\u02fe\u02fc\3\2\2\2\u02fe\u02ff\3\2"+ + "\2\2\u02ffc\3\2\2\2\u0300\u02fe\3\2\2\2\u0301\u0302\7\n\2\2\u0302\u0304"+ + "\7=\2\2\u0303\u0305\7m\2\2\u0304\u0303\3\2\2\2\u0305\u0306\3\2\2\2\u0306"+ + "\u0304\3\2\2\2\u0306\u0307\3\2\2\2\u0307\u0308\3\2\2\2\u0308\u030b\7>"+ + "\2\2\u0309\u030b\5f\64\2\u030a\u0301\3\2\2\2\u030a\u0309\3\2\2\2\u030b"+ + "e\3\2\2\2\u030c\u030d\7\r\2\2\u030d\u030e\7=\2\2\u030e\u030f\7=\2\2\u030f"+ + "\u0310\5h\65\2\u0310\u0311\7>\2\2\u0311\u0312\7>\2\2\u0312g\3\2\2\2\u0313"+ + "\u0318\5j\66\2\u0314\u0315\7Z\2\2\u0315\u0317\5j\66\2\u0316\u0314\3\2"+ + "\2\2\u0317\u031a\3\2\2\2\u0318\u0316\3\2\2\2\u0318\u0319\3\2\2\2\u0319"+ + "\u031d\3\2\2\2\u031a\u0318\3\2\2\2\u031b\u031d\3\2\2\2\u031c\u0313\3\2"+ + "\2\2\u031c\u031b\3\2\2\2\u031di\3\2\2\2\u031e\u0324\n\n\2\2\u031f\u0321"+ + "\7=\2\2\u0320\u0322\5\f\7\2\u0321\u0320\3\2\2\2\u0321\u0322\3\2\2\2\u0322"+ + "\u0323\3\2\2\2\u0323\u0325\7>\2\2\u0324\u031f\3\2\2\2\u0324\u0325\3\2"+ + "\2\2\u0325\u0328\3\2\2\2\u0326\u0328\3\2\2\2\u0327\u031e\3\2\2\2\u0327"+ + "\u0326\3\2\2\2\u0328k\3\2\2\2\u0329\u032f\n\13\2\2\u032a\u032b\7=\2\2"+ + "\u032b\u032c\5l\67\2\u032c\u032d\7>\2\2\u032d\u032f\3\2\2\2\u032e\u0329"+ + "\3\2\2\2\u032e\u032a\3\2\2\2\u032f\u0332\3\2\2\2\u0330\u032e\3\2\2\2\u0330"+ + "\u0331\3\2\2\2\u0331m\3\2\2\2\u0332\u0330\3\2\2\2\u0333\u0335\7M\2\2\u0334"+ + "\u0336\5p9\2\u0335\u0334\3\2\2\2\u0335\u0336\3\2\2\2\u0336\u0346\3\2\2"+ + "\2\u0337\u0339\7M\2\2\u0338\u033a\5p9\2\u0339\u0338\3\2\2\2\u0339\u033a"+ + "\3\2\2\2\u033a\u033b\3\2\2\2\u033b\u0346\5n8\2\u033c\u033e\7T\2\2\u033d"+ + "\u033f\5p9\2\u033e\u033d\3\2\2\2\u033e\u033f\3\2\2\2\u033f\u0346\3\2\2"+ + "\2\u0340\u0342\7T\2\2\u0341\u0343\5p9\2\u0342\u0341\3\2\2\2\u0342\u0343"+ + "\3\2\2\2\u0343\u0344\3\2\2\2\u0344\u0346\5n8\2\u0345\u0333\3\2\2\2\u0345"+ + "\u0337\3\2\2\2\u0345\u033c\3\2\2\2\u0345\u0340\3\2\2\2\u0346o\3\2\2\2"+ + "\u0347\u0348\b9\1\2\u0348\u0349\5Z.\2\u0349\u034e\3\2\2\2\u034a\u034b"+ + "\f\3\2\2\u034b\u034d\5Z.\2\u034c\u034a\3\2\2\2\u034d\u0350\3\2\2\2\u034e"+ + "\u034c\3\2\2\2\u034e\u034f\3\2\2\2\u034fq\3\2\2\2\u0350\u034e\3\2\2\2"+ + "\u0351\u0357\5t;\2\u0352\u0353\5t;\2\u0353\u0354\7Z\2\2\u0354\u0355\7"+ + "j\2\2\u0355\u0357\3\2\2\2\u0356\u0351\3\2\2\2\u0356\u0352\3\2\2\2\u0357"+ + "s\3\2\2\2\u0358\u0359\b;\1\2\u0359\u035a\5v<\2\u035a\u0360\3\2\2\2\u035b"+ + "\u035c\f\3\2\2\u035c\u035d\7Z\2\2\u035d\u035f\5v<\2\u035e\u035b\3\2\2"+ + "\2\u035f\u0362\3\2\2\2\u0360\u035e\3\2\2\2\u0360\u0361\3\2\2\2\u0361u"+ + "\3\2\2\2\u0362\u0360\3\2\2\2\u0363\u0364\5\64\33\2\u0364\u0365\5`\61\2"+ + "\u0365\u036b\3\2\2\2\u0366\u0368\5\66\34\2\u0367\u0369\5|?\2\u0368\u0367"+ + "\3\2\2\2\u0368\u0369\3\2\2\2\u0369\u036b\3\2\2\2\u036a\u0363\3\2\2\2\u036a"+ + "\u0366\3\2\2\2\u036bw\3\2\2\2\u036c\u036d\b=\1\2\u036d\u036e\7k\2\2\u036e"+ + "\u0374\3\2\2\2\u036f\u0370\f\3\2\2\u0370\u0371\7Z\2\2\u0371\u0373\7k\2"+ + "\2\u0372\u036f\3\2\2\2\u0373\u0376\3\2\2\2\u0374\u0372\3\2\2\2\u0374\u0375"+ + "\3\2\2\2\u0375y\3\2\2\2\u0376\u0374\3\2\2\2\u0377\u0379\5J&\2\u0378\u037a"+ + "\5|?\2\u0379\u0378\3\2\2\2\u0379\u037a\3\2\2\2\u037a{\3\2\2\2\u037b\u0387"+ + "\5n8\2\u037c\u037e\5n8\2\u037d\u037c\3\2\2\2\u037d\u037e\3\2\2\2\u037e"+ + "\u037f\3\2\2\2\u037f\u0383\5~@\2\u0380\u0382\5d\63\2\u0381\u0380\3\2\2"+ + "\2\u0382\u0385\3\2\2\2\u0383\u0381\3\2\2\2\u0383\u0384\3\2\2\2\u0384\u0387"+ + "\3\2\2\2\u0385\u0383\3\2\2\2\u0386\u037b\3\2\2\2\u0386\u037d\3\2\2\2\u0387"+ + "}\3\2\2\2\u0388\u0389\b@\1\2\u0389\u038a\7=\2\2\u038a\u038b\5|?\2\u038b"+ + "\u038f\7>\2\2\u038c\u038e\5d\63\2\u038d\u038c\3\2\2\2\u038e\u0391\3\2"+ + "\2\2\u038f\u038d\3\2\2\2\u038f\u0390\3\2\2\2\u0390\u03b7\3\2\2\2\u0391"+ + "\u038f\3\2\2\2\u0392\u0394\7?\2\2\u0393\u0395\5p9\2\u0394\u0393\3\2\2"+ + "\2\u0394\u0395\3\2\2\2\u0395\u0397\3\2\2\2\u0396\u0398\5*\26\2\u0397\u0396"+ + "\3\2\2\2\u0397\u0398\3\2\2\2\u0398\u0399\3\2\2\2\u0399\u03b7\7@\2\2\u039a"+ + "\u039b\7?\2\2\u039b\u039d\7*\2\2\u039c\u039e\5p9\2\u039d\u039c\3\2\2\2"+ + "\u039d\u039e\3\2\2\2\u039e\u039f\3\2\2\2\u039f\u03a0\5*\26\2\u03a0\u03a1"+ + "\7@\2\2\u03a1\u03b7\3\2\2\2\u03a2\u03a3\7?\2\2\u03a3\u03a4\5p9\2\u03a4"+ + "\u03a5\7*\2\2\u03a5\u03a6\5*\26\2\u03a6\u03a7\7@\2\2\u03a7\u03b7\3\2\2"+ + "\2\u03a8\u03a9\7?\2\2\u03a9\u03aa\7M\2\2\u03aa\u03b7\7@\2\2\u03ab\u03ad"+ + "\7=\2\2\u03ac\u03ae\5r:\2\u03ad\u03ac\3\2\2\2\u03ad\u03ae\3\2\2\2\u03ae"+ + "\u03af\3\2\2\2\u03af\u03b3\7>\2\2\u03b0\u03b2\5d\63\2\u03b1\u03b0\3\2"+ + "\2\2\u03b2\u03b5\3\2\2\2\u03b3\u03b1\3\2\2\2\u03b3\u03b4\3\2\2\2\u03b4"+ + "\u03b7\3\2\2\2\u03b5\u03b3\3\2\2\2\u03b6\u0388\3\2\2\2\u03b6\u0392\3\2"+ + "\2\2\u03b6\u039a\3\2\2\2\u03b6\u03a2\3\2\2\2\u03b6\u03a8\3\2\2\2\u03b6"+ + "\u03ab\3\2\2\2\u03b7\u03e3\3\2\2\2\u03b8\u03b9\f\7\2\2\u03b9\u03bb\7?"+ + "\2\2\u03ba\u03bc\5p9\2\u03bb\u03ba\3\2\2\2\u03bb\u03bc\3\2\2\2\u03bc\u03be"+ + "\3\2\2\2\u03bd\u03bf\5*\26\2\u03be\u03bd\3\2\2\2\u03be\u03bf\3\2\2\2\u03bf"+ + "\u03c0\3\2\2\2\u03c0\u03e2\7@\2\2\u03c1\u03c2\f\6\2\2\u03c2\u03c3\7?\2"+ + "\2\u03c3\u03c5\7*\2\2\u03c4\u03c6\5p9\2\u03c5\u03c4\3\2\2\2\u03c5\u03c6"+ + "\3\2\2\2\u03c6\u03c7\3\2\2\2\u03c7\u03c8\5*\26\2\u03c8\u03c9\7@\2\2\u03c9"+ + "\u03e2\3\2\2\2\u03ca\u03cb\f\5\2\2\u03cb\u03cc\7?\2\2\u03cc\u03cd\5p9"+ + "\2\u03cd\u03ce\7*\2\2\u03ce\u03cf\5*\26\2\u03cf\u03d0\7@\2\2\u03d0\u03e2"+ + "\3\2\2\2\u03d1\u03d2\f\4\2\2\u03d2\u03d3\7?\2\2\u03d3\u03d4\7M\2\2\u03d4"+ + "\u03e2\7@\2\2\u03d5\u03d6\f\3\2\2\u03d6\u03d8\7=\2\2\u03d7\u03d9\5r:\2"+ + "\u03d8\u03d7\3\2\2\2\u03d8\u03d9\3\2\2\2\u03d9\u03da\3\2\2\2\u03da\u03de"+ + "\7>\2\2\u03db\u03dd\5d\63\2\u03dc\u03db\3\2\2\2\u03dd\u03e0\3\2\2\2\u03de"+ + "\u03dc\3\2\2\2\u03de\u03df\3\2\2\2\u03df\u03e2\3\2\2\2\u03e0\u03de\3\2"+ + "\2\2\u03e1\u03b8\3\2\2\2\u03e1\u03c1\3\2\2\2\u03e1\u03ca\3\2\2\2\u03e1"+ + "\u03d1\3\2\2\2\u03e1\u03d5\3\2\2\2\u03e2\u03e5\3\2\2\2\u03e3\u03e1\3\2"+ + "\2\2\u03e3\u03e4\3\2\2\2\u03e4\177\3\2\2\2\u03e5\u03e3\3\2\2\2\u03e6\u03e7"+ + "\7k\2\2\u03e7\u0081\3\2\2\2\u03e8\u03f3\5*\26\2\u03e9\u03ea\7A\2\2\u03ea"+ + "\u03eb\5\u0084C\2\u03eb\u03ec\7B\2\2\u03ec\u03f3\3\2\2\2\u03ed\u03ee\7"+ + "A\2\2\u03ee\u03ef\5\u0084C\2\u03ef\u03f0\7Z\2\2\u03f0\u03f1\7B\2\2\u03f1"+ + "\u03f3\3\2\2\2\u03f2\u03e8\3\2\2\2\u03f2\u03e9\3\2\2\2\u03f2\u03ed\3\2"+ + "\2\2\u03f3\u0083\3\2\2\2\u03f4\u03f6\bC\1\2\u03f5\u03f7\5\u0086D\2\u03f6"+ + "\u03f5\3\2\2\2\u03f6\u03f7\3\2\2\2\u03f7\u03f8\3\2\2\2\u03f8\u03f9\5\u0082"+ + "B\2\u03f9\u0402\3\2\2\2\u03fa\u03fb\f\3\2\2\u03fb\u03fd\7Z\2\2\u03fc\u03fe"+ + "\5\u0086D\2\u03fd\u03fc\3\2\2\2\u03fd\u03fe\3\2\2\2\u03fe\u03ff\3\2\2"+ + "\2\u03ff\u0401\5\u0082B\2\u0400\u03fa\3\2\2\2\u0401\u0404\3\2\2\2\u0402"+ + "\u0400\3\2\2\2\u0402\u0403\3\2\2\2\u0403\u0085\3\2\2\2\u0404\u0402\3\2"+ + "\2\2\u0405\u0406\5\u0088E\2\u0406\u0407\7[\2\2\u0407\u0087\3\2\2\2\u0408"+ + "\u0409\bE\1\2\u0409\u040a\5\u008aF\2\u040a\u040f\3\2\2\2\u040b\u040c\f"+ + "\3\2\2\u040c\u040e\5\u008aF\2\u040d\u040b\3\2\2\2\u040e\u0411\3\2\2\2"+ + "\u040f\u040d\3\2\2\2\u040f\u0410\3\2\2\2\u0410\u0089\3\2\2\2\u0411\u040f"+ + "\3\2\2\2\u0412\u0413\7?\2\2\u0413\u0414\5\60\31\2\u0414\u0415\7@\2\2\u0415"+ + "\u0419\3\2\2\2\u0416\u0417\7i\2\2\u0417\u0419\7k\2\2\u0418\u0412\3\2\2"+ + "\2\u0418\u0416\3\2\2\2\u0419\u008b\3\2\2\2\u041a\u041b\7;\2\2\u041b\u041c"+ + "\7=\2\2\u041c\u041d\5\60\31\2\u041d\u041f\7Z\2\2\u041e\u0420\7m\2\2\u041f"+ + "\u041e\3\2\2\2\u0420\u0421\3\2\2\2\u0421\u041f\3\2\2\2\u0421\u0422\3\2"+ + "\2\2\u0422\u0423\3\2\2\2\u0423\u0424\7>\2\2\u0424\u0425\7Y\2\2\u0425\u008d"+ + "\3\2\2\2\u0426\u044c\5\u0090I\2\u0427\u044c\5\u0092J\2\u0428\u044c\5\u0098"+ + "M\2\u0429\u044c\5\u009aN\2\u042a\u044c\5\u009cO\2\u042b\u044c\5\u009e"+ + "P\2\u042c\u042d\t\f\2\2\u042d\u042e\t\r\2\2\u042e\u0437\7=\2\2\u042f\u0434"+ + "\5&\24\2\u0430\u0431\7Z\2\2\u0431\u0433\5&\24\2\u0432\u0430\3\2\2\2\u0433"+ + "\u0436\3\2\2\2\u0434\u0432\3\2\2\2\u0434\u0435\3\2\2\2\u0435\u0438\3\2"+ + "\2\2\u0436\u0434\3\2\2\2\u0437\u042f\3\2\2\2\u0437\u0438\3\2\2\2\u0438"+ + "\u0446\3\2\2\2\u0439\u0442\7X\2\2\u043a\u043f\5&\24\2\u043b\u043c\7Z\2"+ + "\2\u043c\u043e\5&\24\2\u043d\u043b\3\2\2\2\u043e\u0441\3\2\2\2\u043f\u043d"+ + "\3\2\2\2\u043f\u0440\3\2\2\2\u0440\u0443\3\2\2\2\u0441\u043f\3\2\2\2\u0442"+ + "\u043a\3\2\2\2\u0442\u0443\3\2\2\2\u0443\u0445\3\2\2\2\u0444\u0439\3\2"+ + "\2\2\u0445\u0448\3\2\2\2\u0446\u0444\3\2\2\2\u0446\u0447\3\2\2\2\u0447"+ + "\u0449\3\2\2\2\u0448\u0446\3\2\2\2\u0449\u044a\7>\2\2\u044a\u044c\7Y\2"+ + "\2\u044b\u0426\3\2\2\2\u044b\u0427\3\2\2\2\u044b\u0428\3\2\2\2\u044b\u0429"+ + "\3\2\2\2\u044b\u042a\3\2\2\2\u044b\u042b\3\2\2\2\u044b\u042c\3\2\2\2\u044c"+ + "\u008f\3\2\2\2\u044d\u044e\7k\2\2\u044e\u044f\7X\2\2\u044f\u0459\5\u008e"+ + "H\2\u0450\u0451\7\23\2\2\u0451\u0452\5\60\31\2\u0452\u0453\7X\2\2\u0453"+ + "\u0454\5\u008eH\2\u0454\u0459\3\2\2\2\u0455\u0456\7\27\2\2\u0456\u0457"+ + "\7X\2\2\u0457\u0459\5\u008eH\2\u0458\u044d\3\2\2\2\u0458\u0450\3\2\2\2"+ + "\u0458\u0455\3\2\2\2\u0459\u0091\3\2\2\2\u045a\u045c\7A\2\2\u045b\u045d"+ + "\5\u0094K\2\u045c\u045b\3\2\2\2\u045c\u045d\3\2\2\2\u045d\u045e\3\2\2"+ + "\2\u045e\u045f\7B\2\2\u045f\u0093\3\2\2\2\u0460\u0461\bK\1\2\u0461\u0462"+ + "\5\u0096L\2\u0462\u0467\3\2\2\2\u0463\u0464\f\3\2\2\u0464\u0466\5\u0096"+ + "L\2\u0465\u0463\3\2\2\2\u0466\u0469\3\2\2\2\u0467\u0465\3\2\2\2\u0467"+ + "\u0468\3\2\2\2\u0468\u0095\3\2\2\2\u0469\u0467\3\2\2\2\u046a\u046d\5\62"+ + "\32\2\u046b\u046d\5\u008eH\2\u046c\u046a\3\2\2\2\u046c\u046b\3\2\2\2\u046d"+ + "\u0097\3\2\2\2\u046e\u0470\5.\30\2\u046f\u046e\3\2\2\2\u046f\u0470\3\2"+ + "\2\2\u0470\u0471\3\2\2\2\u0471\u0472\7Y\2\2\u0472\u0099\3\2\2\2\u0473"+ + "\u0474\7 \2\2\u0474\u0475\7=\2\2\u0475\u0476\5.\30\2\u0476\u0477\7>\2"+ + "\2\u0477\u047a\5\u008eH\2\u0478\u0479\7\32\2\2\u0479\u047b\5\u008eH\2"+ + "\u047a\u0478\3\2\2\2\u047a\u047b\3\2\2\2\u047b\u0483\3\2\2\2\u047c\u047d"+ + "\7,\2\2\u047d\u047e\7=\2\2\u047e\u047f\5.\30\2\u047f\u0480\7>\2\2\u0480"+ + "\u0481\5\u008eH\2\u0481\u0483\3\2\2\2\u0482\u0473\3\2\2\2\u0482\u047c"+ + "\3\2\2\2\u0483\u009b\3\2\2\2\u0484\u0485\7\62\2\2\u0485\u0486\7=\2\2\u0486"+ + "\u0487\5.\30\2\u0487\u0488\7>\2\2\u0488\u0489\5\u008eH\2\u0489\u04af\3"+ + "\2\2\2\u048a\u048b\7\30\2\2\u048b\u048c\5\u008eH\2\u048c\u048d\7\62\2"+ + "\2\u048d\u048e\7=\2\2\u048e\u048f\5.\30\2\u048f\u0490\7>\2\2\u0490\u0491"+ + "\7Y\2\2\u0491\u04af\3\2\2\2\u0492\u0493\7\36\2\2\u0493\u0495\7=\2\2\u0494"+ + "\u0496\5.\30\2\u0495\u0494\3\2\2\2\u0495\u0496\3\2\2\2\u0496\u0497\3\2"+ + "\2\2\u0497\u0499\7Y\2\2\u0498\u049a\5.\30\2\u0499\u0498\3\2\2\2\u0499"+ + "\u049a\3\2\2\2\u049a\u049b\3\2\2\2\u049b\u049d\7Y\2\2\u049c\u049e\5.\30"+ + "\2\u049d\u049c\3\2\2\2\u049d\u049e\3\2\2\2\u049e\u049f\3\2\2\2\u049f\u04a0"+ + "\7>\2\2\u04a0\u04af\5\u008eH\2\u04a1\u04a2\7\36\2\2\u04a2\u04a3\7=\2\2"+ + "\u04a3\u04a5\5\62\32\2\u04a4\u04a6\5.\30\2\u04a5\u04a4\3\2\2\2\u04a5\u04a6"+ + "\3\2\2\2\u04a6\u04a7\3\2\2\2\u04a7\u04a9\7Y\2\2\u04a8\u04aa\5.\30\2\u04a9"+ + "\u04a8\3\2\2\2\u04a9\u04aa\3\2\2\2\u04aa\u04ab\3\2\2\2\u04ab\u04ac\7>"+ + "\2\2\u04ac\u04ad\5\u008eH\2\u04ad\u04af\3\2\2\2\u04ae\u0484\3\2\2\2\u04ae"+ + "\u048a\3\2\2\2\u04ae\u0492\3\2\2\2\u04ae\u04a1\3\2\2\2\u04af\u009d\3\2"+ + "\2\2\u04b0\u04b1\7\37\2\2\u04b1\u04b2\7k\2\2\u04b2\u04c1\7Y\2\2\u04b3"+ + "\u04b4\7\26\2\2\u04b4\u04c1\7Y\2\2\u04b5\u04b6\7\22\2\2\u04b6\u04c1\7"+ + "Y\2\2\u04b7\u04b9\7&\2\2\u04b8\u04ba\5.\30\2\u04b9\u04b8\3\2\2\2\u04b9"+ + "\u04ba\3\2\2\2\u04ba\u04bb\3\2\2\2\u04bb\u04c1\7Y\2\2\u04bc\u04bd\7\37"+ + "\2\2\u04bd\u04be\5\16\b\2\u04be\u04bf\7Y\2\2\u04bf\u04c1\3\2\2\2\u04c0"+ + "\u04b0\3\2\2\2\u04c0\u04b3\3\2\2\2\u04c0\u04b5\3\2\2\2\u04c0\u04b7\3\2"+ + "\2\2\u04c0\u04bc\3\2\2\2\u04c1\u009f\3\2\2\2\u04c2\u04c4\5\u00a2R\2\u04c3"+ + "\u04c2\3\2\2\2\u04c3\u04c4\3\2\2\2\u04c4\u04c5\3\2\2\2\u04c5\u04c6\7\2"+ + "\2\3\u04c6\u00a1\3\2\2\2\u04c7\u04c8\bR\1\2\u04c8\u04c9\5\u00a4S\2\u04c9"+ + "\u04ce\3\2\2\2\u04ca\u04cb\f\3\2\2\u04cb\u04cd\5\u00a4S\2\u04cc\u04ca"+ + "\3\2\2\2\u04cd\u04d0\3\2\2\2\u04ce\u04cc\3\2\2\2\u04ce\u04cf\3\2\2\2\u04cf"+ + "\u00a3\3\2\2\2\u04d0\u04ce\3\2\2\2\u04d1\u04d5\5\u00a6T\2\u04d2\u04d5"+ + "\5\62\32\2\u04d3\u04d5\7Y\2\2\u04d4\u04d1\3\2\2\2\u04d4\u04d2\3\2\2\2"+ + "\u04d4\u04d3\3\2\2\2\u04d5\u00a5\3\2\2\2\u04d6\u04d8\5\64\33\2\u04d7\u04d6"+ + "\3\2\2\2\u04d7\u04d8\3\2\2\2\u04d8\u04d9\3\2\2\2\u04d9\u04db\5`\61\2\u04da"+ + "\u04dc\5\u00a8U\2\u04db\u04da\3\2\2\2\u04db\u04dc\3\2\2\2\u04dc\u04dd"+ + "\3\2\2\2\u04dd\u04de\5\u0092J\2\u04de\u00a7\3\2\2\2\u04df\u04e0\bU\1\2"+ + "\u04e0\u04e1\5\62\32\2\u04e1\u04e6\3\2\2\2\u04e2\u04e3\f\3\2\2\u04e3\u04e5"+ + "\5\62\32\2\u04e4\u04e2\3\2\2\2\u04e5\u04e8\3\2\2\2\u04e6\u04e4\3\2\2\2"+ + "\u04e6\u04e7\3\2\2\2\u04e7\u00a9\3\2\2\2\u04e8\u04e6\3\2\2\2\u008b\u00af"+ + "\u00b7\u00cb\u00dc\u00e6\u010a\u0114\u0121\u0123\u012e\u0147\u0157\u0165"+ + "\u0167\u0173\u0175\u0181\u0183\u0195\u0197\u01a3\u01a5\u01b0\u01bb\u01c6"+ + "\u01d1\u01dc\u01e5\u01ec\u01f8\u0205\u020a\u020f\u0216\u0220\u0228\u023a"+ + "\u023e\u0247\u0252\u0257\u025c\u0260\u0264\u0266\u0270\u0275\u0279\u027d"+ + "\u0285\u028e\u0298\u02a0\u02b1\u02bd\u02c0\u02c6\u02cf\u02d4\u02d7\u02de"+ + "\u02ed\u02f9\u02fc\u02fe\u0306\u030a\u0318\u031c\u0321\u0324\u0327\u032e"+ + "\u0330\u0335\u0339\u033e\u0342\u0345\u034e\u0356\u0360\u0368\u036a\u0374"+ + "\u0379\u037d\u0383\u0386\u038f\u0394\u0397\u039d\u03ad\u03b3\u03b6\u03bb"+ + "\u03be\u03c5\u03d8\u03de\u03e1\u03e3\u03f2\u03f6\u03fd\u0402\u040f\u0418"+ + "\u0421\u0434\u0437\u043f\u0442\u0446\u044b\u0458\u045c\u0467\u046c\u046f"+ + "\u047a\u0482\u0495\u0499\u049d\u04a5\u04a9\u04ae\u04b9\u04c0\u04c3\u04ce"+ + "\u04d4\u04d7\u04db\u04e6"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/Java.tokens b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/Java.tokens new file mode 100644 index 0000000..d8c1766 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/Java.tokens @@ -0,0 +1,201 @@ +ABSTRACT=1 +ASSERT=2 +BOOLEAN=3 +BREAK=4 +BYTE=5 +CASE=6 +CATCH=7 +CHAR=8 +CLASS=9 +CONST=10 +CONTINUE=11 +DEFAULT=12 +DO=13 +DOUBLE=14 +ELSE=15 +ENUM=16 +EXTENDS=17 +FINAL=18 +FINALLY=19 +FLOAT=20 +FOR=21 +IF=22 +GOTO=23 +IMPLEMENTS=24 +IMPORT=25 +INSTANCEOF=26 +INT=27 +INTERFACE=28 +LONG=29 +NATIVE=30 +NEW=31 +PACKAGE=32 +PRIVATE=33 +PROTECTED=34 +PUBLIC=35 +RETURN=36 +SHORT=37 +STATIC=38 +STRICTFP=39 +SUPER=40 +SWITCH=41 +SYNCHRONIZED=42 +THIS=43 +THROW=44 +THROWS=45 +TRANSIENT=46 +TRY=47 +VOID=48 +VOLATILE=49 +WHILE=50 +IntegerLiteral=51 +FloatingPointLiteral=52 +BooleanLiteral=53 +CharacterLiteral=54 +StringLiteral=55 +NullLiteral=56 +LPAREN=57 +RPAREN=58 +LBRACE=59 +RBRACE=60 +LBRACK=61 +RBRACK=62 +SEMI=63 +COMMA=64 +DOT=65 +ASSIGN=66 +GT=67 +LT=68 +BANG=69 +TILDE=70 +QUESTION=71 +COLON=72 +EQUAL=73 +LE=74 +GE=75 +NOTEQUAL=76 +AND=77 +OR=78 +INC=79 +DEC=80 +ADD=81 +SUB=82 +MUL=83 +DIV=84 +BITAND=85 +BITOR=86 +CARET=87 +MOD=88 +ADD_ASSIGN=89 +SUB_ASSIGN=90 +MUL_ASSIGN=91 +DIV_ASSIGN=92 +AND_ASSIGN=93 +OR_ASSIGN=94 +XOR_ASSIGN=95 +MOD_ASSIGN=96 +LSHIFT_ASSIGN=97 +RSHIFT_ASSIGN=98 +URSHIFT_ASSIGN=99 +Identifier=100 +AT=101 +ELLIPSIS=102 +WS=103 +COMMENT=104 +LINE_COMMENT=105 +'abstract'=1 +'assert'=2 +'boolean'=3 +'break'=4 +'byte'=5 +'case'=6 +'catch'=7 +'char'=8 +'class'=9 +'const'=10 +'continue'=11 +'default'=12 +'do'=13 +'double'=14 +'else'=15 +'enum'=16 +'extends'=17 +'final'=18 +'finally'=19 +'float'=20 +'for'=21 +'if'=22 +'goto'=23 +'implements'=24 +'import'=25 +'instanceof'=26 +'int'=27 +'interface'=28 +'long'=29 +'native'=30 +'new'=31 +'package'=32 +'private'=33 +'protected'=34 +'public'=35 +'return'=36 +'short'=37 +'static'=38 +'strictfp'=39 +'super'=40 +'switch'=41 +'synchronized'=42 +'this'=43 +'throw'=44 +'throws'=45 +'transient'=46 +'try'=47 +'void'=48 +'volatile'=49 +'while'=50 +'null'=56 +'('=57 +')'=58 +'{'=59 +'}'=60 +'['=61 +']'=62 +';'=63 +','=64 +'.'=65 +'='=66 +'>'=67 +'<'=68 +'!'=69 +'~'=70 +'?'=71 +':'=72 +'=='=73 +'<='=74 +'>='=75 +'!='=76 +'&&'=77 +'||'=78 +'++'=79 +'--'=80 +'+'=81 +'-'=82 +'*'=83 +'/'=84 +'&'=85 +'|'=86 +'^'=87 +'%'=88 +'+='=89 +'-='=90 +'*='=91 +'/='=92 +'&='=93 +'|='=94 +'^='=95 +'%='=96 +'<<='=97 +'>>='=98 +'>>>='=99 +'@'=101 +'...'=102 diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaBaseListener.java b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaBaseListener.java new file mode 100644 index 0000000..dd56f71 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaBaseListener.java @@ -0,0 +1,1252 @@ +// Generated from Java.g4 by ANTLR 4.7 + +package it.unitn.repoman.core.lang.parsers.java; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ErrorNode; +import org.antlr.v4.runtime.tree.TerminalNode; + +/** + * This class provides an empty implementation of {@link JavaListener}, + * which can be extended to create a listener which only needs to handle a subset + * of the available methods. + */ +public class JavaBaseListener implements JavaListener { + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCompilationUnit(JavaParser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCompilationUnit(JavaParser.CompilationUnitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPackageDeclaration(JavaParser.PackageDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPackageDeclaration(JavaParser.PackageDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterImportDeclaration(JavaParser.ImportDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitImportDeclaration(JavaParser.ImportDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeDeclaration(JavaParser.TypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeDeclaration(JavaParser.TypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterModifier(JavaParser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitModifier(JavaParser.ModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassOrInterfaceModifier(JavaParser.ClassOrInterfaceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassOrInterfaceModifier(JavaParser.ClassOrInterfaceModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableModifier(JavaParser.VariableModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableModifier(JavaParser.VariableModifierContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassDeclaration(JavaParser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassDeclaration(JavaParser.ClassDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameters(JavaParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameters(JavaParser.TypeParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeParameter(JavaParser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeParameter(JavaParser.TypeParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeBound(JavaParser.TypeBoundContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeBound(JavaParser.TypeBoundContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumDeclaration(JavaParser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumDeclaration(JavaParser.EnumDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstants(JavaParser.EnumConstantsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstants(JavaParser.EnumConstantsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstant(JavaParser.EnumConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstant(JavaParser.EnumConstantContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumBodyDeclarations(JavaParser.EnumBodyDeclarationsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumBodyDeclarations(JavaParser.EnumBodyDeclarationsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceDeclaration(JavaParser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceDeclaration(JavaParser.InterfaceDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeList(JavaParser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeList(JavaParser.TypeListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassBody(JavaParser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassBody(JavaParser.ClassBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceBody(JavaParser.InterfaceBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceBody(JavaParser.InterfaceBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassBodyDeclaration(JavaParser.ClassBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassBodyDeclaration(JavaParser.ClassBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMemberDeclaration(JavaParser.MemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMemberDeclaration(JavaParser.MemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMethodDeclaration(JavaParser.MethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMethodDeclaration(JavaParser.MethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericMethodDeclaration(JavaParser.GenericMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericMethodDeclaration(JavaParser.GenericMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericConstructorDeclaration(JavaParser.GenericConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericConstructorDeclaration(JavaParser.GenericConstructorDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFieldDeclaration(JavaParser.FieldDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFieldDeclaration(JavaParser.FieldDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceBodyDeclaration(JavaParser.InterfaceBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceBodyDeclaration(JavaParser.InterfaceBodyDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceMemberDeclaration(JavaParser.InterfaceMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceMemberDeclaration(JavaParser.InterfaceMemberDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstDeclaration(JavaParser.ConstDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstDeclaration(JavaParser.ConstDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstantDeclarator(JavaParser.ConstantDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstantDeclarator(JavaParser.ConstantDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInterfaceMethodDeclaration(JavaParser.InterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInterfaceMethodDeclaration(JavaParser.InterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterGenericInterfaceMethodDeclaration(JavaParser.GenericInterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitGenericInterfaceMethodDeclaration(JavaParser.GenericInterfaceMethodDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclarators(JavaParser.VariableDeclaratorsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclarators(JavaParser.VariableDeclaratorsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclarator(JavaParser.VariableDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclarator(JavaParser.VariableDeclaratorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableDeclaratorId(JavaParser.VariableDeclaratorIdContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableDeclaratorId(JavaParser.VariableDeclaratorIdContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterVariableInitializer(JavaParser.VariableInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitVariableInitializer(JavaParser.VariableInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayInitializer(JavaParser.ArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayInitializer(JavaParser.ArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnumConstantName(JavaParser.EnumConstantNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnumConstantName(JavaParser.EnumConstantNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeType(JavaParser.TypeTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeType(JavaParser.TypeTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassOrInterfaceType(JavaParser.ClassOrInterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassOrInterfaceType(JavaParser.ClassOrInterfaceTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrimitiveType(JavaParser.PrimitiveTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrimitiveType(JavaParser.PrimitiveTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArguments(JavaParser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArguments(JavaParser.TypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArgument(JavaParser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArgument(JavaParser.TypeArgumentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterQualifiedNameList(JavaParser.QualifiedNameListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitQualifiedNameList(JavaParser.QualifiedNameListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameters(JavaParser.FormalParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameters(JavaParser.FormalParametersContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameterList(JavaParser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameterList(JavaParser.FormalParameterListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFormalParameter(JavaParser.FormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFormalParameter(JavaParser.FormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLastFormalParameter(JavaParser.LastFormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLastFormalParameter(JavaParser.LastFormalParameterContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterMethodBody(JavaParser.MethodBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitMethodBody(JavaParser.MethodBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstructorBody(JavaParser.ConstructorBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstructorBody(JavaParser.ConstructorBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterQualifiedName(JavaParser.QualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitQualifiedName(JavaParser.QualifiedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLiteral(JavaParser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLiteral(JavaParser.LiteralContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotation(JavaParser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotation(JavaParser.AnnotationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationName(JavaParser.AnnotationNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationName(JavaParser.AnnotationNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValuePairs(JavaParser.ElementValuePairsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValuePairs(JavaParser.ElementValuePairsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValuePair(JavaParser.ElementValuePairContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValuePair(JavaParser.ElementValuePairContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValue(JavaParser.ElementValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValue(JavaParser.ElementValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterElementValueArrayInitializer(JavaParser.ElementValueArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitElementValueArrayInitializer(JavaParser.ElementValueArrayInitializerContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeDeclaration(JavaParser.AnnotationTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeDeclaration(JavaParser.AnnotationTypeDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeBody(JavaParser.AnnotationTypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeBody(JavaParser.AnnotationTypeBodyContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeElementDeclaration(JavaParser.AnnotationTypeElementDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeElementDeclaration(JavaParser.AnnotationTypeElementDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationTypeElementRest(JavaParser.AnnotationTypeElementRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationTypeElementRest(JavaParser.AnnotationTypeElementRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationMethodOrConstantRest(JavaParser.AnnotationMethodOrConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationMethodOrConstantRest(JavaParser.AnnotationMethodOrConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationMethodRest(JavaParser.AnnotationMethodRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationMethodRest(JavaParser.AnnotationMethodRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAnnotationConstantRest(JavaParser.AnnotationConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAnnotationConstantRest(JavaParser.AnnotationConstantRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterDefaultValue(JavaParser.DefaultValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitDefaultValue(JavaParser.DefaultValueContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlock(JavaParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlock(JavaParser.BlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlockStatement(JavaParser.BlockStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlockStatement(JavaParser.BlockStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLocalVariableDeclarationStatement(JavaParser.LocalVariableDeclarationStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLocalVariableDeclarationStatement(JavaParser.LocalVariableDeclarationStatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterLocalVariableDeclaration(JavaParser.LocalVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitLocalVariableDeclaration(JavaParser.LocalVariableDeclarationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatement(JavaParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatement(JavaParser.StatementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCatchClause(JavaParser.CatchClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCatchClause(JavaParser.CatchClauseContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCatchType(JavaParser.CatchTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCatchType(JavaParser.CatchTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterFinallyBlock(JavaParser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitFinallyBlock(JavaParser.FinallyBlockContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResourceSpecification(JavaParser.ResourceSpecificationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResourceSpecification(JavaParser.ResourceSpecificationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResources(JavaParser.ResourcesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResources(JavaParser.ResourcesContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterResource(JavaParser.ResourceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitResource(JavaParser.ResourceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSwitchBlockStatementGroup(JavaParser.SwitchBlockStatementGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSwitchBlockStatementGroup(JavaParser.SwitchBlockStatementGroupContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSwitchLabel(JavaParser.SwitchLabelContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSwitchLabel(JavaParser.SwitchLabelContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForControl(JavaParser.ForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForControl(JavaParser.ForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForInit(JavaParser.ForInitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForInit(JavaParser.ForInitContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEnhancedForControl(JavaParser.EnhancedForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEnhancedForControl(JavaParser.EnhancedForControlContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterForUpdate(JavaParser.ForUpdateContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitForUpdate(JavaParser.ForUpdateContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterParExpression(JavaParser.ParExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitParExpression(JavaParser.ParExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpressionList(JavaParser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpressionList(JavaParser.ExpressionListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterStatementExpression(JavaParser.StatementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitStatementExpression(JavaParser.StatementExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterConstantExpression(JavaParser.ConstantExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitConstantExpression(JavaParser.ConstantExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExpression(JavaParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExpression(JavaParser.ExpressionContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterPrimary(JavaParser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitPrimary(JavaParser.PrimaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCreator(JavaParser.CreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCreator(JavaParser.CreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterCreatedName(JavaParser.CreatedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitCreatedName(JavaParser.CreatedNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInnerCreator(JavaParser.InnerCreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInnerCreator(JavaParser.InnerCreatorContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArrayCreatorRest(JavaParser.ArrayCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArrayCreatorRest(JavaParser.ArrayCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterClassCreatorRest(JavaParser.ClassCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitClassCreatorRest(JavaParser.ClassCreatorRestContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExplicitGenericInvocation(JavaParser.ExplicitGenericInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExplicitGenericInvocation(JavaParser.ExplicitGenericInvocationContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNonWildcardTypeArguments(JavaParser.NonWildcardTypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNonWildcardTypeArguments(JavaParser.NonWildcardTypeArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterTypeArgumentsOrDiamond(JavaParser.TypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitTypeArgumentsOrDiamond(JavaParser.TypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterNonWildcardTypeArgumentsOrDiamond(JavaParser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitNonWildcardTypeArgumentsOrDiamond(JavaParser.NonWildcardTypeArgumentsOrDiamondContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterSuperSuffix(JavaParser.SuperSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitSuperSuffix(JavaParser.SuperSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExplicitGenericInvocationSuffix(JavaParser.ExplicitGenericInvocationSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExplicitGenericInvocationSuffix(JavaParser.ExplicitGenericInvocationSuffixContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterArguments(JavaParser.ArgumentsContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitArguments(JavaParser.ArgumentsContext ctx) { } + + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitEveryRule(ParserRuleContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitTerminal(TerminalNode node) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void visitErrorNode(ErrorNode node) { } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaLexer.java b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaLexer.java new file mode 100644 index 0000000..da6120c --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaLexer.java @@ -0,0 +1,545 @@ +// Generated from Java.g4 by ANTLR 4.7 +package it.unitn.repoman.core.lang.parsers.java; + +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class JavaLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.7", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, + CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, + ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, + IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, + NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, + SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, + THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, + WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, + CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, + LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, + ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, + LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, + MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ADD_ASSIGN=89, + SUB_ASSIGN=90, MUL_ASSIGN=91, DIV_ASSIGN=92, AND_ASSIGN=93, OR_ASSIGN=94, + XOR_ASSIGN=95, MOD_ASSIGN=96, LSHIFT_ASSIGN=97, RSHIFT_ASSIGN=98, URSHIFT_ASSIGN=99, + Identifier=100, AT=101, ELLIPSIS=102, WS=103, COMMENT=104, LINE_COMMENT=105; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] ruleNames = { + "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", "CHAR", + "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM", + "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", + "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", + "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", + "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", + "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "DecimalIntegerLiteral", + "HexIntegerLiteral", "OctalIntegerLiteral", "BinaryIntegerLiteral", "IntegerTypeSuffix", + "DecimalNumeral", "Digits", "Digit", "NonZeroDigit", "DigitOrUnderscore", + "Underscores", "HexNumeral", "HexDigits", "HexDigit", "HexDigitOrUnderscore", + "OctalNumeral", "OctalDigits", "OctalDigit", "OctalDigitOrUnderscore", + "BinaryNumeral", "BinaryDigits", "BinaryDigit", "BinaryDigitOrUnderscore", + "FloatingPointLiteral", "DecimalFloatingPointLiteral", "ExponentPart", + "ExponentIndicator", "SignedInteger", "Sign", "FloatTypeSuffix", "HexadecimalFloatingPointLiteral", + "HexSignificand", "BinaryExponent", "BinaryExponentIndicator", "BooleanLiteral", + "CharacterLiteral", "SingleCharacter", "StringLiteral", "StringCharacters", + "StringCharacter", "EscapeSequence", "OctalEscape", "UnicodeEscape", "ZeroToThree", + "NullLiteral", "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", + "SEMI", "COMMA", "DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", + "COLON", "EQUAL", "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", + "SUB", "MUL", "DIV", "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", + "SUB_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", + "MOD_ASSIGN", "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "Identifier", + "JavaLetter", "JavaLetterOrDigit", "AT", "ELLIPSIS", "WS", "COMMENT", + "LINE_COMMENT" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", "'case'", + "'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'", + "'do'", "'double'", "'else'", "'enum'", "'extends'", "'final'", "'finally'", + "'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'", "'instanceof'", + "'int'", "'interface'", "'long'", "'native'", "'new'", "'package'", "'private'", + "'protected'", "'public'", "'return'", "'short'", "'static'", "'strictfp'", + "'super'", "'switch'", "'synchronized'", "'this'", "'throw'", "'throws'", + "'transient'", "'try'", "'void'", "'volatile'", "'while'", null, null, + null, null, null, "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", + "';'", "','", "'.'", "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", + "'=='", "'<='", "'>='", "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'", + "'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'", "'+='", "'-='", "'*='", + "'/='", "'&='", "'|='", "'^='", "'%='", "'<<='", "'>>='", "'>>>='", null, + "'@'", "'...'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", + "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", + "ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", + "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", + "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", + "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", + "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "FloatingPointLiteral", + "BooleanLiteral", "CharacterLiteral", "StringLiteral", "NullLiteral", + "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA", + "DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", "COLON", "EQUAL", + "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL", + "DIV", "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", "SUB_ASSIGN", + "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", + "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "Identifier", "AT", + "ELLIPSIS", "WS", "COMMENT", "LINE_COMMENT" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public JavaLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "Java.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2k\u042a\b\1\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4"+ + "w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080"+ + "\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084\4\u0085"+ + "\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089"+ + "\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e"+ + "\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092\t\u0092"+ + "\4\u0093\t\u0093\4\u0094\t\u0094\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3"+ + "\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\5"+ + "\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3"+ + "\b\3\b\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13"+ + "\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r"+ + "\3\r\3\r\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\20\3\20\3"+ + "\20\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3"+ + "\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3"+ + "\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\27\3\27\3"+ + "\27\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3"+ + "\31\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3"+ + "\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3"+ + "\35\3\35\3\35\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3"+ + "\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3!\3!\3!\3!\3!\3!\3!\3!\3\"\3\"\3"+ + "\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\3#\3$\3$\3$\3$\3$\3"+ + "$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3"+ + "\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3"+ + "+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\3-\3-\3-\3-\3-\3"+ + "-\3.\3.\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3\60\3\60\3\60\3"+ + "\60\3\61\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3\62\3"+ + "\62\3\63\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\5\64\u0281\n\64"+ + "\3\65\3\65\5\65\u0285\n\65\3\66\3\66\5\66\u0289\n\66\3\67\3\67\5\67\u028d"+ + "\n\67\38\38\58\u0291\n8\39\39\3:\3:\3:\5:\u0298\n:\3:\3:\3:\5:\u029d\n"+ + ":\5:\u029f\n:\3;\3;\7;\u02a3\n;\f;\16;\u02a6\13;\3;\5;\u02a9\n;\3<\3<"+ + "\5<\u02ad\n<\3=\3=\3>\3>\5>\u02b3\n>\3?\6?\u02b6\n?\r?\16?\u02b7\3@\3"+ + "@\3@\3@\3A\3A\7A\u02c0\nA\fA\16A\u02c3\13A\3A\5A\u02c6\nA\3B\3B\3C\3C"+ + "\5C\u02cc\nC\3D\3D\5D\u02d0\nD\3D\3D\3E\3E\7E\u02d6\nE\fE\16E\u02d9\13"+ + "E\3E\5E\u02dc\nE\3F\3F\3G\3G\5G\u02e2\nG\3H\3H\3H\3H\3I\3I\7I\u02ea\n"+ + "I\fI\16I\u02ed\13I\3I\5I\u02f0\nI\3J\3J\3K\3K\5K\u02f6\nK\3L\3L\5L\u02fa"+ + "\nL\3M\3M\3M\5M\u02ff\nM\3M\5M\u0302\nM\3M\5M\u0305\nM\3M\3M\3M\5M\u030a"+ + "\nM\3M\5M\u030d\nM\3M\3M\3M\5M\u0312\nM\3M\3M\3M\5M\u0317\nM\3N\3N\3N"+ + "\3O\3O\3P\5P\u031f\nP\3P\3P\3Q\3Q\3R\3R\3S\3S\3S\5S\u032a\nS\3T\3T\5T"+ + "\u032e\nT\3T\3T\3T\5T\u0333\nT\3T\3T\5T\u0337\nT\3U\3U\3U\3V\3V\3W\3W"+ + "\3W\3W\3W\3W\3W\3W\3W\5W\u0347\nW\3X\3X\3X\3X\3X\3X\3X\3X\5X\u0351\nX"+ + "\3Y\3Y\3Z\3Z\5Z\u0357\nZ\3Z\3Z\3[\6[\u035c\n[\r[\16[\u035d\3\\\3\\\5\\"+ + "\u0362\n\\\3]\3]\3]\3]\5]\u0368\n]\3^\3^\3^\3^\3^\3^\3^\3^\3^\3^\3^\5"+ + "^\u0375\n^\3_\3_\3_\3_\3_\3_\3_\3`\3`\3a\3a\3a\3a\3a\3b\3b\3c\3c\3d\3"+ + "d\3e\3e\3f\3f\3g\3g\3h\3h\3i\3i\3j\3j\3k\3k\3l\3l\3m\3m\3n\3n\3o\3o\3"+ + "p\3p\3q\3q\3r\3r\3r\3s\3s\3s\3t\3t\3t\3u\3u\3u\3v\3v\3v\3w\3w\3w\3x\3"+ + "x\3x\3y\3y\3y\3z\3z\3{\3{\3|\3|\3}\3}\3~\3~\3\177\3\177\3\u0080\3\u0080"+ + "\3\u0081\3\u0081\3\u0082\3\u0082\3\u0082\3\u0083\3\u0083\3\u0083\3\u0084"+ + "\3\u0084\3\u0084\3\u0085\3\u0085\3\u0085\3\u0086\3\u0086\3\u0086\3\u0087"+ + "\3\u0087\3\u0087\3\u0088\3\u0088\3\u0088\3\u0089\3\u0089\3\u0089\3\u008a"+ + "\3\u008a\3\u008a\3\u008a\3\u008b\3\u008b\3\u008b\3\u008b\3\u008c\3\u008c"+ + "\3\u008c\3\u008c\3\u008c\3\u008d\3\u008d\7\u008d\u03f4\n\u008d\f\u008d"+ + "\16\u008d\u03f7\13\u008d\3\u008e\3\u008e\3\u008e\3\u008e\5\u008e\u03fd"+ + "\n\u008e\3\u008f\3\u008f\3\u008f\3\u008f\5\u008f\u0403\n\u008f\3\u0090"+ + "\3\u0090\3\u0091\3\u0091\3\u0091\3\u0091\3\u0092\6\u0092\u040c\n\u0092"+ + "\r\u0092\16\u0092\u040d\3\u0092\3\u0092\3\u0093\3\u0093\3\u0093\3\u0093"+ + "\7\u0093\u0416\n\u0093\f\u0093\16\u0093\u0419\13\u0093\3\u0093\3\u0093"+ + "\3\u0093\3\u0093\3\u0093\3\u0094\3\u0094\3\u0094\3\u0094\7\u0094\u0424"+ + "\n\u0094\f\u0094\16\u0094\u0427\13\u0094\3\u0094\3\u0094\3\u0417\2\u0095"+ + "\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20"+ + "\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37"+ + "= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\2k\2m\2o\2"+ + "q\2s\2u\2w\2y\2{\2}\2\177\2\u0081\2\u0083\2\u0085\2\u0087\2\u0089\2\u008b"+ + "\2\u008d\2\u008f\2\u0091\2\u0093\2\u0095\2\u0097\66\u0099\2\u009b\2\u009d"+ + "\2\u009f\2\u00a1\2\u00a3\2\u00a5\2\u00a7\2\u00a9\2\u00ab\2\u00ad\67\u00af"+ + "8\u00b1\2\u00b39\u00b5\2\u00b7\2\u00b9\2\u00bb\2\u00bd\2\u00bf\2\u00c1"+ + ":\u00c3;\u00c5<\u00c7=\u00c9>\u00cb?\u00cd@\u00cfA\u00d1B\u00d3C\u00d5"+ + "D\u00d7E\u00d9F\u00dbG\u00ddH\u00dfI\u00e1J\u00e3K\u00e5L\u00e7M\u00e9"+ + "N\u00ebO\u00edP\u00efQ\u00f1R\u00f3S\u00f5T\u00f7U\u00f9V\u00fbW\u00fd"+ + "X\u00ffY\u0101Z\u0103[\u0105\\\u0107]\u0109^\u010b_\u010d`\u010fa\u0111"+ + "b\u0113c\u0115d\u0117e\u0119f\u011b\2\u011d\2\u011fg\u0121h\u0123i\u0125"+ + "j\u0127k\3\2\30\4\2NNnn\3\2\63;\4\2ZZzz\5\2\62;CHch\3\2\629\4\2DDdd\3"+ + "\2\62\63\4\2GGgg\4\2--//\6\2FFHHffhh\4\2RRrr\6\2\f\f\17\17))^^\4\2$$^"+ + "^\n\2$$))^^ddhhppttvv\3\2\62\65\6\2&&C\\aac|\4\2\2\u0081\ud802\udc01\3"+ + "\2\ud802\udc01\3\2\udc02\ue001\7\2&&\62;C\\aac|\5\2\13\f\16\17\"\"\4\2"+ + "\f\f\17\17\2\u0438\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13"+ + "\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2"+ + "\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2"+ + "!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3"+ + "\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2"+ + "\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E"+ + "\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2"+ + "\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2"+ + "\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2\u0097\3\2\2"+ + "\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b3\3\2\2\2\2\u00c1\3\2\2\2\2\u00c3"+ + "\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2\2\2\u00cb\3\2\2"+ + "\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2\2\2\u00d5"+ + "\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9\3\2\2\2\2\u00db\3\2\2\2\2\u00dd\3\2\2"+ + "\2\2\u00df\3\2\2\2\2\u00e1\3\2\2\2\2\u00e3\3\2\2\2\2\u00e5\3\2\2\2\2\u00e7"+ + "\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb\3\2\2\2\2\u00ed\3\2\2\2\2\u00ef\3\2\2"+ + "\2\2\u00f1\3\2\2\2\2\u00f3\3\2\2\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9"+ + "\3\2\2\2\2\u00fb\3\2\2\2\2\u00fd\3\2\2\2\2\u00ff\3\2\2\2\2\u0101\3\2\2"+ + "\2\2\u0103\3\2\2\2\2\u0105\3\2\2\2\2\u0107\3\2\2\2\2\u0109\3\2\2\2\2\u010b"+ + "\3\2\2\2\2\u010d\3\2\2\2\2\u010f\3\2\2\2\2\u0111\3\2\2\2\2\u0113\3\2\2"+ + "\2\2\u0115\3\2\2\2\2\u0117\3\2\2\2\2\u0119\3\2\2\2\2\u011f\3\2\2\2\2\u0121"+ + "\3\2\2\2\2\u0123\3\2\2\2\2\u0125\3\2\2\2\2\u0127\3\2\2\2\3\u0129\3\2\2"+ + "\2\5\u0132\3\2\2\2\7\u0139\3\2\2\2\t\u0141\3\2\2\2\13\u0147\3\2\2\2\r"+ + "\u014c\3\2\2\2\17\u0151\3\2\2\2\21\u0157\3\2\2\2\23\u015c\3\2\2\2\25\u0162"+ + "\3\2\2\2\27\u0168\3\2\2\2\31\u0171\3\2\2\2\33\u0179\3\2\2\2\35\u017c\3"+ + "\2\2\2\37\u0183\3\2\2\2!\u0188\3\2\2\2#\u018d\3\2\2\2%\u0195\3\2\2\2\'"+ + "\u019b\3\2\2\2)\u01a3\3\2\2\2+\u01a9\3\2\2\2-\u01ad\3\2\2\2/\u01b0\3\2"+ + "\2\2\61\u01b5\3\2\2\2\63\u01c0\3\2\2\2\65\u01c7\3\2\2\2\67\u01d2\3\2\2"+ + "\29\u01d6\3\2\2\2;\u01e0\3\2\2\2=\u01e5\3\2\2\2?\u01ec\3\2\2\2A\u01f0"+ + "\3\2\2\2C\u01f8\3\2\2\2E\u0200\3\2\2\2G\u020a\3\2\2\2I\u0211\3\2\2\2K"+ + "\u0218\3\2\2\2M\u021e\3\2\2\2O\u0225\3\2\2\2Q\u022e\3\2\2\2S\u0234\3\2"+ + "\2\2U\u023b\3\2\2\2W\u0248\3\2\2\2Y\u024d\3\2\2\2[\u0253\3\2\2\2]\u025a"+ + "\3\2\2\2_\u0264\3\2\2\2a\u0268\3\2\2\2c\u026d\3\2\2\2e\u0276\3\2\2\2g"+ + "\u0280\3\2\2\2i\u0282\3\2\2\2k\u0286\3\2\2\2m\u028a\3\2\2\2o\u028e\3\2"+ + "\2\2q\u0292\3\2\2\2s\u029e\3\2\2\2u\u02a0\3\2\2\2w\u02ac\3\2\2\2y\u02ae"+ + "\3\2\2\2{\u02b2\3\2\2\2}\u02b5\3\2\2\2\177\u02b9\3\2\2\2\u0081\u02bd\3"+ + "\2\2\2\u0083\u02c7\3\2\2\2\u0085\u02cb\3\2\2\2\u0087\u02cd\3\2\2\2\u0089"+ + "\u02d3\3\2\2\2\u008b\u02dd\3\2\2\2\u008d\u02e1\3\2\2\2\u008f\u02e3\3\2"+ + "\2\2\u0091\u02e7\3\2\2\2\u0093\u02f1\3\2\2\2\u0095\u02f5\3\2\2\2\u0097"+ + "\u02f9\3\2\2\2\u0099\u0316\3\2\2\2\u009b\u0318\3\2\2\2\u009d\u031b\3\2"+ + "\2\2\u009f\u031e\3\2\2\2\u00a1\u0322\3\2\2\2\u00a3\u0324\3\2\2\2\u00a5"+ + "\u0326\3\2\2\2\u00a7\u0336\3\2\2\2\u00a9\u0338\3\2\2\2\u00ab\u033b\3\2"+ + "\2\2\u00ad\u0346\3\2\2\2\u00af\u0350\3\2\2\2\u00b1\u0352\3\2\2\2\u00b3"+ + "\u0354\3\2\2\2\u00b5\u035b\3\2\2\2\u00b7\u0361\3\2\2\2\u00b9\u0367\3\2"+ + "\2\2\u00bb\u0374\3\2\2\2\u00bd\u0376\3\2\2\2\u00bf\u037d\3\2\2\2\u00c1"+ + "\u037f\3\2\2\2\u00c3\u0384\3\2\2\2\u00c5\u0386\3\2\2\2\u00c7\u0388\3\2"+ + "\2\2\u00c9\u038a\3\2\2\2\u00cb\u038c\3\2\2\2\u00cd\u038e\3\2\2\2\u00cf"+ + "\u0390\3\2\2\2\u00d1\u0392\3\2\2\2\u00d3\u0394\3\2\2\2\u00d5\u0396\3\2"+ + "\2\2\u00d7\u0398\3\2\2\2\u00d9\u039a\3\2\2\2\u00db\u039c\3\2\2\2\u00dd"+ + "\u039e\3\2\2\2\u00df\u03a0\3\2\2\2\u00e1\u03a2\3\2\2\2\u00e3\u03a4\3\2"+ + "\2\2\u00e5\u03a7\3\2\2\2\u00e7\u03aa\3\2\2\2\u00e9\u03ad\3\2\2\2\u00eb"+ + "\u03b0\3\2\2\2\u00ed\u03b3\3\2\2\2\u00ef\u03b6\3\2\2\2\u00f1\u03b9\3\2"+ + "\2\2\u00f3\u03bc\3\2\2\2\u00f5\u03be\3\2\2\2\u00f7\u03c0\3\2\2\2\u00f9"+ + "\u03c2\3\2\2\2\u00fb\u03c4\3\2\2\2\u00fd\u03c6\3\2\2\2\u00ff\u03c8\3\2"+ + "\2\2\u0101\u03ca\3\2\2\2\u0103\u03cc\3\2\2\2\u0105\u03cf\3\2\2\2\u0107"+ + "\u03d2\3\2\2\2\u0109\u03d5\3\2\2\2\u010b\u03d8\3\2\2\2\u010d\u03db\3\2"+ + "\2\2\u010f\u03de\3\2\2\2\u0111\u03e1\3\2\2\2\u0113\u03e4\3\2\2\2\u0115"+ + "\u03e8\3\2\2\2\u0117\u03ec\3\2\2\2\u0119\u03f1\3\2\2\2\u011b\u03fc\3\2"+ + "\2\2\u011d\u0402\3\2\2\2\u011f\u0404\3\2\2\2\u0121\u0406\3\2\2\2\u0123"+ + "\u040b\3\2\2\2\u0125\u0411\3\2\2\2\u0127\u041f\3\2\2\2\u0129\u012a\7c"+ + "\2\2\u012a\u012b\7d\2\2\u012b\u012c\7u\2\2\u012c\u012d\7v\2\2\u012d\u012e"+ + "\7t\2\2\u012e\u012f\7c\2\2\u012f\u0130\7e\2\2\u0130\u0131\7v\2\2\u0131"+ + "\4\3\2\2\2\u0132\u0133\7c\2\2\u0133\u0134\7u\2\2\u0134\u0135\7u\2\2\u0135"+ + "\u0136\7g\2\2\u0136\u0137\7t\2\2\u0137\u0138\7v\2\2\u0138\6\3\2\2\2\u0139"+ + "\u013a\7d\2\2\u013a\u013b\7q\2\2\u013b\u013c\7q\2\2\u013c\u013d\7n\2\2"+ + "\u013d\u013e\7g\2\2\u013e\u013f\7c\2\2\u013f\u0140\7p\2\2\u0140\b\3\2"+ + "\2\2\u0141\u0142\7d\2\2\u0142\u0143\7t\2\2\u0143\u0144\7g\2\2\u0144\u0145"+ + "\7c\2\2\u0145\u0146\7m\2\2\u0146\n\3\2\2\2\u0147\u0148\7d\2\2\u0148\u0149"+ + "\7{\2\2\u0149\u014a\7v\2\2\u014a\u014b\7g\2\2\u014b\f\3\2\2\2\u014c\u014d"+ + "\7e\2\2\u014d\u014e\7c\2\2\u014e\u014f\7u\2\2\u014f\u0150\7g\2\2\u0150"+ + "\16\3\2\2\2\u0151\u0152\7e\2\2\u0152\u0153\7c\2\2\u0153\u0154\7v\2\2\u0154"+ + "\u0155\7e\2\2\u0155\u0156\7j\2\2\u0156\20\3\2\2\2\u0157\u0158\7e\2\2\u0158"+ + "\u0159\7j\2\2\u0159\u015a\7c\2\2\u015a\u015b\7t\2\2\u015b\22\3\2\2\2\u015c"+ + "\u015d\7e\2\2\u015d\u015e\7n\2\2\u015e\u015f\7c\2\2\u015f\u0160\7u\2\2"+ + "\u0160\u0161\7u\2\2\u0161\24\3\2\2\2\u0162\u0163\7e\2\2\u0163\u0164\7"+ + "q\2\2\u0164\u0165\7p\2\2\u0165\u0166\7u\2\2\u0166\u0167\7v\2\2\u0167\26"+ + "\3\2\2\2\u0168\u0169\7e\2\2\u0169\u016a\7q\2\2\u016a\u016b\7p\2\2\u016b"+ + "\u016c\7v\2\2\u016c\u016d\7k\2\2\u016d\u016e\7p\2\2\u016e\u016f\7w\2\2"+ + "\u016f\u0170\7g\2\2\u0170\30\3\2\2\2\u0171\u0172\7f\2\2\u0172\u0173\7"+ + "g\2\2\u0173\u0174\7h\2\2\u0174\u0175\7c\2\2\u0175\u0176\7w\2\2\u0176\u0177"+ + "\7n\2\2\u0177\u0178\7v\2\2\u0178\32\3\2\2\2\u0179\u017a\7f\2\2\u017a\u017b"+ + "\7q\2\2\u017b\34\3\2\2\2\u017c\u017d\7f\2\2\u017d\u017e\7q\2\2\u017e\u017f"+ + "\7w\2\2\u017f\u0180\7d\2\2\u0180\u0181\7n\2\2\u0181\u0182\7g\2\2\u0182"+ + "\36\3\2\2\2\u0183\u0184\7g\2\2\u0184\u0185\7n\2\2\u0185\u0186\7u\2\2\u0186"+ + "\u0187\7g\2\2\u0187 \3\2\2\2\u0188\u0189\7g\2\2\u0189\u018a\7p\2\2\u018a"+ + "\u018b\7w\2\2\u018b\u018c\7o\2\2\u018c\"\3\2\2\2\u018d\u018e\7g\2\2\u018e"+ + "\u018f\7z\2\2\u018f\u0190\7v\2\2\u0190\u0191\7g\2\2\u0191\u0192\7p\2\2"+ + "\u0192\u0193\7f\2\2\u0193\u0194\7u\2\2\u0194$\3\2\2\2\u0195\u0196\7h\2"+ + "\2\u0196\u0197\7k\2\2\u0197\u0198\7p\2\2\u0198\u0199\7c\2\2\u0199\u019a"+ + "\7n\2\2\u019a&\3\2\2\2\u019b\u019c\7h\2\2\u019c\u019d\7k\2\2\u019d\u019e"+ + "\7p\2\2\u019e\u019f\7c\2\2\u019f\u01a0\7n\2\2\u01a0\u01a1\7n\2\2\u01a1"+ + "\u01a2\7{\2\2\u01a2(\3\2\2\2\u01a3\u01a4\7h\2\2\u01a4\u01a5\7n\2\2\u01a5"+ + "\u01a6\7q\2\2\u01a6\u01a7\7c\2\2\u01a7\u01a8\7v\2\2\u01a8*\3\2\2\2\u01a9"+ + "\u01aa\7h\2\2\u01aa\u01ab\7q\2\2\u01ab\u01ac\7t\2\2\u01ac,\3\2\2\2\u01ad"+ + "\u01ae\7k\2\2\u01ae\u01af\7h\2\2\u01af.\3\2\2\2\u01b0\u01b1\7i\2\2\u01b1"+ + "\u01b2\7q\2\2\u01b2\u01b3\7v\2\2\u01b3\u01b4\7q\2\2\u01b4\60\3\2\2\2\u01b5"+ + "\u01b6\7k\2\2\u01b6\u01b7\7o\2\2\u01b7\u01b8\7r\2\2\u01b8\u01b9\7n\2\2"+ + "\u01b9\u01ba\7g\2\2\u01ba\u01bb\7o\2\2\u01bb\u01bc\7g\2\2\u01bc\u01bd"+ + "\7p\2\2\u01bd\u01be\7v\2\2\u01be\u01bf\7u\2\2\u01bf\62\3\2\2\2\u01c0\u01c1"+ + "\7k\2\2\u01c1\u01c2\7o\2\2\u01c2\u01c3\7r\2\2\u01c3\u01c4\7q\2\2\u01c4"+ + "\u01c5\7t\2\2\u01c5\u01c6\7v\2\2\u01c6\64\3\2\2\2\u01c7\u01c8\7k\2\2\u01c8"+ + "\u01c9\7p\2\2\u01c9\u01ca\7u\2\2\u01ca\u01cb\7v\2\2\u01cb\u01cc\7c\2\2"+ + "\u01cc\u01cd\7p\2\2\u01cd\u01ce\7e\2\2\u01ce\u01cf\7g\2\2\u01cf\u01d0"+ + "\7q\2\2\u01d0\u01d1\7h\2\2\u01d1\66\3\2\2\2\u01d2\u01d3\7k\2\2\u01d3\u01d4"+ + "\7p\2\2\u01d4\u01d5\7v\2\2\u01d58\3\2\2\2\u01d6\u01d7\7k\2\2\u01d7\u01d8"+ + "\7p\2\2\u01d8\u01d9\7v\2\2\u01d9\u01da\7g\2\2\u01da\u01db\7t\2\2\u01db"+ + "\u01dc\7h\2\2\u01dc\u01dd\7c\2\2\u01dd\u01de\7e\2\2\u01de\u01df\7g\2\2"+ + "\u01df:\3\2\2\2\u01e0\u01e1\7n\2\2\u01e1\u01e2\7q\2\2\u01e2\u01e3\7p\2"+ + "\2\u01e3\u01e4\7i\2\2\u01e4<\3\2\2\2\u01e5\u01e6\7p\2\2\u01e6\u01e7\7"+ + "c\2\2\u01e7\u01e8\7v\2\2\u01e8\u01e9\7k\2\2\u01e9\u01ea\7x\2\2\u01ea\u01eb"+ + "\7g\2\2\u01eb>\3\2\2\2\u01ec\u01ed\7p\2\2\u01ed\u01ee\7g\2\2\u01ee\u01ef"+ + "\7y\2\2\u01ef@\3\2\2\2\u01f0\u01f1\7r\2\2\u01f1\u01f2\7c\2\2\u01f2\u01f3"+ + "\7e\2\2\u01f3\u01f4\7m\2\2\u01f4\u01f5\7c\2\2\u01f5\u01f6\7i\2\2\u01f6"+ + "\u01f7\7g\2\2\u01f7B\3\2\2\2\u01f8\u01f9\7r\2\2\u01f9\u01fa\7t\2\2\u01fa"+ + "\u01fb\7k\2\2\u01fb\u01fc\7x\2\2\u01fc\u01fd\7c\2\2\u01fd\u01fe\7v\2\2"+ + "\u01fe\u01ff\7g\2\2\u01ffD\3\2\2\2\u0200\u0201\7r\2\2\u0201\u0202\7t\2"+ + "\2\u0202\u0203\7q\2\2\u0203\u0204\7v\2\2\u0204\u0205\7g\2\2\u0205\u0206"+ + "\7e\2\2\u0206\u0207\7v\2\2\u0207\u0208\7g\2\2\u0208\u0209\7f\2\2\u0209"+ + "F\3\2\2\2\u020a\u020b\7r\2\2\u020b\u020c\7w\2\2\u020c\u020d\7d\2\2\u020d"+ + "\u020e\7n\2\2\u020e\u020f\7k\2\2\u020f\u0210\7e\2\2\u0210H\3\2\2\2\u0211"+ + "\u0212\7t\2\2\u0212\u0213\7g\2\2\u0213\u0214\7v\2\2\u0214\u0215\7w\2\2"+ + "\u0215\u0216\7t\2\2\u0216\u0217\7p\2\2\u0217J\3\2\2\2\u0218\u0219\7u\2"+ + "\2\u0219\u021a\7j\2\2\u021a\u021b\7q\2\2\u021b\u021c\7t\2\2\u021c\u021d"+ + "\7v\2\2\u021dL\3\2\2\2\u021e\u021f\7u\2\2\u021f\u0220\7v\2\2\u0220\u0221"+ + "\7c\2\2\u0221\u0222\7v\2\2\u0222\u0223\7k\2\2\u0223\u0224\7e\2\2\u0224"+ + "N\3\2\2\2\u0225\u0226\7u\2\2\u0226\u0227\7v\2\2\u0227\u0228\7t\2\2\u0228"+ + "\u0229\7k\2\2\u0229\u022a\7e\2\2\u022a\u022b\7v\2\2\u022b\u022c\7h\2\2"+ + "\u022c\u022d\7r\2\2\u022dP\3\2\2\2\u022e\u022f\7u\2\2\u022f\u0230\7w\2"+ + "\2\u0230\u0231\7r\2\2\u0231\u0232\7g\2\2\u0232\u0233\7t\2\2\u0233R\3\2"+ + "\2\2\u0234\u0235\7u\2\2\u0235\u0236\7y\2\2\u0236\u0237\7k\2\2\u0237\u0238"+ + "\7v\2\2\u0238\u0239\7e\2\2\u0239\u023a\7j\2\2\u023aT\3\2\2\2\u023b\u023c"+ + "\7u\2\2\u023c\u023d\7{\2\2\u023d\u023e\7p\2\2\u023e\u023f\7e\2\2\u023f"+ + "\u0240\7j\2\2\u0240\u0241\7t\2\2\u0241\u0242\7q\2\2\u0242\u0243\7p\2\2"+ + "\u0243\u0244\7k\2\2\u0244\u0245\7|\2\2\u0245\u0246\7g\2\2\u0246\u0247"+ + "\7f\2\2\u0247V\3\2\2\2\u0248\u0249\7v\2\2\u0249\u024a\7j\2\2\u024a\u024b"+ + "\7k\2\2\u024b\u024c\7u\2\2\u024cX\3\2\2\2\u024d\u024e\7v\2\2\u024e\u024f"+ + "\7j\2\2\u024f\u0250\7t\2\2\u0250\u0251\7q\2\2\u0251\u0252\7y\2\2\u0252"+ + "Z\3\2\2\2\u0253\u0254\7v\2\2\u0254\u0255\7j\2\2\u0255\u0256\7t\2\2\u0256"+ + "\u0257\7q\2\2\u0257\u0258\7y\2\2\u0258\u0259\7u\2\2\u0259\\\3\2\2\2\u025a"+ + "\u025b\7v\2\2\u025b\u025c\7t\2\2\u025c\u025d\7c\2\2\u025d\u025e\7p\2\2"+ + "\u025e\u025f\7u\2\2\u025f\u0260\7k\2\2\u0260\u0261\7g\2\2\u0261\u0262"+ + "\7p\2\2\u0262\u0263\7v\2\2\u0263^\3\2\2\2\u0264\u0265\7v\2\2\u0265\u0266"+ + "\7t\2\2\u0266\u0267\7{\2\2\u0267`\3\2\2\2\u0268\u0269\7x\2\2\u0269\u026a"+ + "\7q\2\2\u026a\u026b\7k\2\2\u026b\u026c\7f\2\2\u026cb\3\2\2\2\u026d\u026e"+ + "\7x\2\2\u026e\u026f\7q\2\2\u026f\u0270\7n\2\2\u0270\u0271\7c\2\2\u0271"+ + "\u0272\7v\2\2\u0272\u0273\7k\2\2\u0273\u0274\7n\2\2\u0274\u0275\7g\2\2"+ + "\u0275d\3\2\2\2\u0276\u0277\7y\2\2\u0277\u0278\7j\2\2\u0278\u0279\7k\2"+ + "\2\u0279\u027a\7n\2\2\u027a\u027b\7g\2\2\u027bf\3\2\2\2\u027c\u0281\5"+ + "i\65\2\u027d\u0281\5k\66\2\u027e\u0281\5m\67\2\u027f\u0281\5o8\2\u0280"+ + "\u027c\3\2\2\2\u0280\u027d\3\2\2\2\u0280\u027e\3\2\2\2\u0280\u027f\3\2"+ + "\2\2\u0281h\3\2\2\2\u0282\u0284\5s:\2\u0283\u0285\5q9\2\u0284\u0283\3"+ + "\2\2\2\u0284\u0285\3\2\2\2\u0285j\3\2\2\2\u0286\u0288\5\177@\2\u0287\u0289"+ + "\5q9\2\u0288\u0287\3\2\2\2\u0288\u0289\3\2\2\2\u0289l\3\2\2\2\u028a\u028c"+ + "\5\u0087D\2\u028b\u028d\5q9\2\u028c\u028b\3\2\2\2\u028c\u028d\3\2\2\2"+ + "\u028dn\3\2\2\2\u028e\u0290\5\u008fH\2\u028f\u0291\5q9\2\u0290\u028f\3"+ + "\2\2\2\u0290\u0291\3\2\2\2\u0291p\3\2\2\2\u0292\u0293\t\2\2\2\u0293r\3"+ + "\2\2\2\u0294\u029f\7\62\2\2\u0295\u029c\5y=\2\u0296\u0298\5u;\2\u0297"+ + "\u0296\3\2\2\2\u0297\u0298\3\2\2\2\u0298\u029d\3\2\2\2\u0299\u029a\5}"+ + "?\2\u029a\u029b\5u;\2\u029b\u029d\3\2\2\2\u029c\u0297\3\2\2\2\u029c\u0299"+ + "\3\2\2\2\u029d\u029f\3\2\2\2\u029e\u0294\3\2\2\2\u029e\u0295\3\2\2\2\u029f"+ + "t\3\2\2\2\u02a0\u02a8\5w<\2\u02a1\u02a3\5{>\2\u02a2\u02a1\3\2\2\2\u02a3"+ + "\u02a6\3\2\2\2\u02a4\u02a2\3\2\2\2\u02a4\u02a5\3\2\2\2\u02a5\u02a7\3\2"+ + "\2\2\u02a6\u02a4\3\2\2\2\u02a7\u02a9\5w<\2\u02a8\u02a4\3\2\2\2\u02a8\u02a9"+ + "\3\2\2\2\u02a9v\3\2\2\2\u02aa\u02ad\7\62\2\2\u02ab\u02ad\5y=\2\u02ac\u02aa"+ + "\3\2\2\2\u02ac\u02ab\3\2\2\2\u02adx\3\2\2\2\u02ae\u02af\t\3\2\2\u02af"+ + "z\3\2\2\2\u02b0\u02b3\5w<\2\u02b1\u02b3\7a\2\2\u02b2\u02b0\3\2\2\2\u02b2"+ + "\u02b1\3\2\2\2\u02b3|\3\2\2\2\u02b4\u02b6\7a\2\2\u02b5\u02b4\3\2\2\2\u02b6"+ + "\u02b7\3\2\2\2\u02b7\u02b5\3\2\2\2\u02b7\u02b8\3\2\2\2\u02b8~\3\2\2\2"+ + "\u02b9\u02ba\7\62\2\2\u02ba\u02bb\t\4\2\2\u02bb\u02bc\5\u0081A\2\u02bc"+ + "\u0080\3\2\2\2\u02bd\u02c5\5\u0083B\2\u02be\u02c0\5\u0085C\2\u02bf\u02be"+ + "\3\2\2\2\u02c0\u02c3\3\2\2\2\u02c1\u02bf\3\2\2\2\u02c1\u02c2\3\2\2\2\u02c2"+ + "\u02c4\3\2\2\2\u02c3\u02c1\3\2\2\2\u02c4\u02c6\5\u0083B\2\u02c5\u02c1"+ + "\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6\u0082\3\2\2\2\u02c7\u02c8\t\5\2\2\u02c8"+ + "\u0084\3\2\2\2\u02c9\u02cc\5\u0083B\2\u02ca\u02cc\7a\2\2\u02cb\u02c9\3"+ + "\2\2\2\u02cb\u02ca\3\2\2\2\u02cc\u0086\3\2\2\2\u02cd\u02cf\7\62\2\2\u02ce"+ + "\u02d0\5}?\2\u02cf\u02ce\3\2\2\2\u02cf\u02d0\3\2\2\2\u02d0\u02d1\3\2\2"+ + "\2\u02d1\u02d2\5\u0089E\2\u02d2\u0088\3\2\2\2\u02d3\u02db\5\u008bF\2\u02d4"+ + "\u02d6\5\u008dG\2\u02d5\u02d4\3\2\2\2\u02d6\u02d9\3\2\2\2\u02d7\u02d5"+ + "\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02da\3\2\2\2\u02d9\u02d7\3\2\2\2\u02da"+ + "\u02dc\5\u008bF\2\u02db\u02d7\3\2\2\2\u02db\u02dc\3\2\2\2\u02dc\u008a"+ + "\3\2\2\2\u02dd\u02de\t\6\2\2\u02de\u008c\3\2\2\2\u02df\u02e2\5\u008bF"+ + "\2\u02e0\u02e2\7a\2\2\u02e1\u02df\3\2\2\2\u02e1\u02e0\3\2\2\2\u02e2\u008e"+ + "\3\2\2\2\u02e3\u02e4\7\62\2\2\u02e4\u02e5\t\7\2\2\u02e5\u02e6\5\u0091"+ + "I\2\u02e6\u0090\3\2\2\2\u02e7\u02ef\5\u0093J\2\u02e8\u02ea\5\u0095K\2"+ + "\u02e9\u02e8\3\2\2\2\u02ea\u02ed\3\2\2\2\u02eb\u02e9\3\2\2\2\u02eb\u02ec"+ + "\3\2\2\2\u02ec\u02ee\3\2\2\2\u02ed\u02eb\3\2\2\2\u02ee\u02f0\5\u0093J"+ + "\2\u02ef\u02eb\3\2\2\2\u02ef\u02f0\3\2\2\2\u02f0\u0092\3\2\2\2\u02f1\u02f2"+ + "\t\b\2\2\u02f2\u0094\3\2\2\2\u02f3\u02f6\5\u0093J\2\u02f4\u02f6\7a\2\2"+ + "\u02f5\u02f3\3\2\2\2\u02f5\u02f4\3\2\2\2\u02f6\u0096\3\2\2\2\u02f7\u02fa"+ + "\5\u0099M\2\u02f8\u02fa\5\u00a5S\2\u02f9\u02f7\3\2\2\2\u02f9\u02f8\3\2"+ + "\2\2\u02fa\u0098\3\2\2\2\u02fb\u02fc\5u;\2\u02fc\u02fe\7\60\2\2\u02fd"+ + "\u02ff\5u;\2\u02fe\u02fd\3\2\2\2\u02fe\u02ff\3\2\2\2\u02ff\u0301\3\2\2"+ + "\2\u0300\u0302\5\u009bN\2\u0301\u0300\3\2\2\2\u0301\u0302\3\2\2\2\u0302"+ + "\u0304\3\2\2\2\u0303\u0305\5\u00a3R\2\u0304\u0303\3\2\2\2\u0304\u0305"+ + "\3\2\2\2\u0305\u0317\3\2\2\2\u0306\u0307\7\60\2\2\u0307\u0309\5u;\2\u0308"+ + "\u030a\5\u009bN\2\u0309\u0308\3\2\2\2\u0309\u030a\3\2\2\2\u030a\u030c"+ + "\3\2\2\2\u030b\u030d\5\u00a3R\2\u030c\u030b\3\2\2\2\u030c\u030d\3\2\2"+ + "\2\u030d\u0317\3\2\2\2\u030e\u030f\5u;\2\u030f\u0311\5\u009bN\2\u0310"+ + "\u0312\5\u00a3R\2\u0311\u0310\3\2\2\2\u0311\u0312\3\2\2\2\u0312\u0317"+ + "\3\2\2\2\u0313\u0314\5u;\2\u0314\u0315\5\u00a3R\2\u0315\u0317\3\2\2\2"+ + "\u0316\u02fb\3\2\2\2\u0316\u0306\3\2\2\2\u0316\u030e\3\2\2\2\u0316\u0313"+ + "\3\2\2\2\u0317\u009a\3\2\2\2\u0318\u0319\5\u009dO\2\u0319\u031a\5\u009f"+ + "P\2\u031a\u009c\3\2\2\2\u031b\u031c\t\t\2\2\u031c\u009e\3\2\2\2\u031d"+ + "\u031f\5\u00a1Q\2\u031e\u031d\3\2\2\2\u031e\u031f\3\2\2\2\u031f\u0320"+ + "\3\2\2\2\u0320\u0321\5u;\2\u0321\u00a0\3\2\2\2\u0322\u0323\t\n\2\2\u0323"+ + "\u00a2\3\2\2\2\u0324\u0325\t\13\2\2\u0325\u00a4\3\2\2\2\u0326\u0327\5"+ + "\u00a7T\2\u0327\u0329\5\u00a9U\2\u0328\u032a\5\u00a3R\2\u0329\u0328\3"+ + "\2\2\2\u0329\u032a\3\2\2\2\u032a\u00a6\3\2\2\2\u032b\u032d\5\177@\2\u032c"+ + "\u032e\7\60\2\2\u032d\u032c\3\2\2\2\u032d\u032e\3\2\2\2\u032e\u0337\3"+ + "\2\2\2\u032f\u0330\7\62\2\2\u0330\u0332\t\4\2\2\u0331\u0333\5\u0081A\2"+ + "\u0332\u0331\3\2\2\2\u0332\u0333\3\2\2\2\u0333\u0334\3\2\2\2\u0334\u0335"+ + "\7\60\2\2\u0335\u0337\5\u0081A\2\u0336\u032b\3\2\2\2\u0336\u032f\3\2\2"+ + "\2\u0337\u00a8\3\2\2\2\u0338\u0339\5\u00abV\2\u0339\u033a\5\u009fP\2\u033a"+ + "\u00aa\3\2\2\2\u033b\u033c\t\f\2\2\u033c\u00ac\3\2\2\2\u033d\u033e\7v"+ + "\2\2\u033e\u033f\7t\2\2\u033f\u0340\7w\2\2\u0340\u0347\7g\2\2\u0341\u0342"+ + "\7h\2\2\u0342\u0343\7c\2\2\u0343\u0344\7n\2\2\u0344\u0345\7u\2\2\u0345"+ + "\u0347\7g\2\2\u0346\u033d\3\2\2\2\u0346\u0341\3\2\2\2\u0347\u00ae\3\2"+ + "\2\2\u0348\u0349\7)\2\2\u0349\u034a\5\u00b1Y\2\u034a\u034b\7)\2\2\u034b"+ + "\u0351\3\2\2\2\u034c\u034d\7)\2\2\u034d\u034e\5\u00b9]\2\u034e\u034f\7"+ + ")\2\2\u034f\u0351\3\2\2\2\u0350\u0348\3\2\2\2\u0350\u034c\3\2\2\2\u0351"+ + "\u00b0\3\2\2\2\u0352\u0353\n\r\2\2\u0353\u00b2\3\2\2\2\u0354\u0356\7$"+ + "\2\2\u0355\u0357\5\u00b5[\2\u0356\u0355\3\2\2\2\u0356\u0357\3\2\2\2\u0357"+ + "\u0358\3\2\2\2\u0358\u0359\7$\2\2\u0359\u00b4\3\2\2\2\u035a\u035c\5\u00b7"+ + "\\\2\u035b\u035a\3\2\2\2\u035c\u035d\3\2\2\2\u035d\u035b\3\2\2\2\u035d"+ + "\u035e\3\2\2\2\u035e\u00b6\3\2\2\2\u035f\u0362\n\16\2\2\u0360\u0362\5"+ + "\u00b9]\2\u0361\u035f\3\2\2\2\u0361\u0360\3\2\2\2\u0362\u00b8\3\2\2\2"+ + "\u0363\u0364\7^\2\2\u0364\u0368\t\17\2\2\u0365\u0368\5\u00bb^\2\u0366"+ + "\u0368\5\u00bd_\2\u0367\u0363\3\2\2\2\u0367\u0365\3\2\2\2\u0367\u0366"+ + "\3\2\2\2\u0368\u00ba\3\2\2\2\u0369\u036a\7^\2\2\u036a\u0375\5\u008bF\2"+ + "\u036b\u036c\7^\2\2\u036c\u036d\5\u008bF\2\u036d\u036e\5\u008bF\2\u036e"+ + "\u0375\3\2\2\2\u036f\u0370\7^\2\2\u0370\u0371\5\u00bf`\2\u0371\u0372\5"+ + "\u008bF\2\u0372\u0373\5\u008bF\2\u0373\u0375\3\2\2\2\u0374\u0369\3\2\2"+ + "\2\u0374\u036b\3\2\2\2\u0374\u036f\3\2\2\2\u0375\u00bc\3\2\2\2\u0376\u0377"+ + "\7^\2\2\u0377\u0378\7w\2\2\u0378\u0379\5\u0083B\2\u0379\u037a\5\u0083"+ + "B\2\u037a\u037b\5\u0083B\2\u037b\u037c\5\u0083B\2\u037c\u00be\3\2\2\2"+ + "\u037d\u037e\t\20\2\2\u037e\u00c0\3\2\2\2\u037f\u0380\7p\2\2\u0380\u0381"+ + "\7w\2\2\u0381\u0382\7n\2\2\u0382\u0383\7n\2\2\u0383\u00c2\3\2\2\2\u0384"+ + "\u0385\7*\2\2\u0385\u00c4\3\2\2\2\u0386\u0387\7+\2\2\u0387\u00c6\3\2\2"+ + "\2\u0388\u0389\7}\2\2\u0389\u00c8\3\2\2\2\u038a\u038b\7\177\2\2\u038b"+ + "\u00ca\3\2\2\2\u038c\u038d\7]\2\2\u038d\u00cc\3\2\2\2\u038e\u038f\7_\2"+ + "\2\u038f\u00ce\3\2\2\2\u0390\u0391\7=\2\2\u0391\u00d0\3\2\2\2\u0392\u0393"+ + "\7.\2\2\u0393\u00d2\3\2\2\2\u0394\u0395\7\60\2\2\u0395\u00d4\3\2\2\2\u0396"+ + "\u0397\7?\2\2\u0397\u00d6\3\2\2\2\u0398\u0399\7@\2\2\u0399\u00d8\3\2\2"+ + "\2\u039a\u039b\7>\2\2\u039b\u00da\3\2\2\2\u039c\u039d\7#\2\2\u039d\u00dc"+ + "\3\2\2\2\u039e\u039f\7\u0080\2\2\u039f\u00de\3\2\2\2\u03a0\u03a1\7A\2"+ + "\2\u03a1\u00e0\3\2\2\2\u03a2\u03a3\7<\2\2\u03a3\u00e2\3\2\2\2\u03a4\u03a5"+ + "\7?\2\2\u03a5\u03a6\7?\2\2\u03a6\u00e4\3\2\2\2\u03a7\u03a8\7>\2\2\u03a8"+ + "\u03a9\7?\2\2\u03a9\u00e6\3\2\2\2\u03aa\u03ab\7@\2\2\u03ab\u03ac\7?\2"+ + "\2\u03ac\u00e8\3\2\2\2\u03ad\u03ae\7#\2\2\u03ae\u03af\7?\2\2\u03af\u00ea"+ + "\3\2\2\2\u03b0\u03b1\7(\2\2\u03b1\u03b2\7(\2\2\u03b2\u00ec\3\2\2\2\u03b3"+ + "\u03b4\7~\2\2\u03b4\u03b5\7~\2\2\u03b5\u00ee\3\2\2\2\u03b6\u03b7\7-\2"+ + "\2\u03b7\u03b8\7-\2\2\u03b8\u00f0\3\2\2\2\u03b9\u03ba\7/\2\2\u03ba\u03bb"+ + "\7/\2\2\u03bb\u00f2\3\2\2\2\u03bc\u03bd\7-\2\2\u03bd\u00f4\3\2\2\2\u03be"+ + "\u03bf\7/\2\2\u03bf\u00f6\3\2\2\2\u03c0\u03c1\7,\2\2\u03c1\u00f8\3\2\2"+ + "\2\u03c2\u03c3\7\61\2\2\u03c3\u00fa\3\2\2\2\u03c4\u03c5\7(\2\2\u03c5\u00fc"+ + "\3\2\2\2\u03c6\u03c7\7~\2\2\u03c7\u00fe\3\2\2\2\u03c8\u03c9\7`\2\2\u03c9"+ + "\u0100\3\2\2\2\u03ca\u03cb\7\'\2\2\u03cb\u0102\3\2\2\2\u03cc\u03cd\7-"+ + "\2\2\u03cd\u03ce\7?\2\2\u03ce\u0104\3\2\2\2\u03cf\u03d0\7/\2\2\u03d0\u03d1"+ + "\7?\2\2\u03d1\u0106\3\2\2\2\u03d2\u03d3\7,\2\2\u03d3\u03d4\7?\2\2\u03d4"+ + "\u0108\3\2\2\2\u03d5\u03d6\7\61\2\2\u03d6\u03d7\7?\2\2\u03d7\u010a\3\2"+ + "\2\2\u03d8\u03d9\7(\2\2\u03d9\u03da\7?\2\2\u03da\u010c\3\2\2\2\u03db\u03dc"+ + "\7~\2\2\u03dc\u03dd\7?\2\2\u03dd\u010e\3\2\2\2\u03de\u03df\7`\2\2\u03df"+ + "\u03e0\7?\2\2\u03e0\u0110\3\2\2\2\u03e1\u03e2\7\'\2\2\u03e2\u03e3\7?\2"+ + "\2\u03e3\u0112\3\2\2\2\u03e4\u03e5\7>\2\2\u03e5\u03e6\7>\2\2\u03e6\u03e7"+ + "\7?\2\2\u03e7\u0114\3\2\2\2\u03e8\u03e9\7@\2\2\u03e9\u03ea\7@\2\2\u03ea"+ + "\u03eb\7?\2\2\u03eb\u0116\3\2\2\2\u03ec\u03ed\7@\2\2\u03ed\u03ee\7@\2"+ + "\2\u03ee\u03ef\7@\2\2\u03ef\u03f0\7?\2\2\u03f0\u0118\3\2\2\2\u03f1\u03f5"+ + "\5\u011b\u008e\2\u03f2\u03f4\5\u011d\u008f\2\u03f3\u03f2\3\2\2\2\u03f4"+ + "\u03f7\3\2\2\2\u03f5\u03f3\3\2\2\2\u03f5\u03f6\3\2\2\2\u03f6\u011a\3\2"+ + "\2\2\u03f7\u03f5\3\2\2\2\u03f8\u03fd\t\21\2\2\u03f9\u03fd\n\22\2\2\u03fa"+ + "\u03fb\t\23\2\2\u03fb\u03fd\t\24\2\2\u03fc\u03f8\3\2\2\2\u03fc\u03f9\3"+ + "\2\2\2\u03fc\u03fa\3\2\2\2\u03fd\u011c\3\2\2\2\u03fe\u0403\t\25\2\2\u03ff"+ + "\u0403\n\22\2\2\u0400\u0401\t\23\2\2\u0401\u0403\t\24\2\2\u0402\u03fe"+ + "\3\2\2\2\u0402\u03ff\3\2\2\2\u0402\u0400\3\2\2\2\u0403\u011e\3\2\2\2\u0404"+ + "\u0405\7B\2\2\u0405\u0120\3\2\2\2\u0406\u0407\7\60\2\2\u0407\u0408\7\60"+ + "\2\2\u0408\u0409\7\60\2\2\u0409\u0122\3\2\2\2\u040a\u040c\t\26\2\2\u040b"+ + "\u040a\3\2\2\2\u040c\u040d\3\2\2\2\u040d\u040b\3\2\2\2\u040d\u040e\3\2"+ + "\2\2\u040e\u040f\3\2\2\2\u040f\u0410\b\u0092\2\2\u0410\u0124\3\2\2\2\u0411"+ + "\u0412\7\61\2\2\u0412\u0413\7,\2\2\u0413\u0417\3\2\2\2\u0414\u0416\13"+ + "\2\2\2\u0415\u0414\3\2\2\2\u0416\u0419\3\2\2\2\u0417\u0418\3\2\2\2\u0417"+ + "\u0415\3\2\2\2\u0418\u041a\3\2\2\2\u0419\u0417\3\2\2\2\u041a\u041b\7,"+ + "\2\2\u041b\u041c\7\61\2\2\u041c\u041d\3\2\2\2\u041d\u041e\b\u0093\3\2"+ + "\u041e\u0126\3\2\2\2\u041f\u0420\7\61\2\2\u0420\u0421\7\61\2\2\u0421\u0425"+ + "\3\2\2\2\u0422\u0424\n\27\2\2\u0423\u0422\3\2\2\2\u0424\u0427\3\2\2\2"+ + "\u0425\u0423\3\2\2\2\u0425\u0426\3\2\2\2\u0426\u0428\3\2\2\2\u0427\u0425"+ + "\3\2\2\2\u0428\u0429\b\u0094\3\2\u0429\u0128\3\2\2\2\64\2\u0280\u0284"+ + "\u0288\u028c\u0290\u0297\u029c\u029e\u02a4\u02a8\u02ac\u02b2\u02b7\u02c1"+ + "\u02c5\u02cb\u02cf\u02d7\u02db\u02e1\u02eb\u02ef\u02f5\u02f9\u02fe\u0301"+ + "\u0304\u0309\u030c\u0311\u0316\u031e\u0329\u032d\u0332\u0336\u0346\u0350"+ + "\u0356\u035d\u0361\u0367\u0374\u03f5\u03fc\u0402\u040d\u0417\u0425\4\b"+ + "\2\2\2\3\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaLexer.tokens b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaLexer.tokens new file mode 100644 index 0000000..d8c1766 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaLexer.tokens @@ -0,0 +1,201 @@ +ABSTRACT=1 +ASSERT=2 +BOOLEAN=3 +BREAK=4 +BYTE=5 +CASE=6 +CATCH=7 +CHAR=8 +CLASS=9 +CONST=10 +CONTINUE=11 +DEFAULT=12 +DO=13 +DOUBLE=14 +ELSE=15 +ENUM=16 +EXTENDS=17 +FINAL=18 +FINALLY=19 +FLOAT=20 +FOR=21 +IF=22 +GOTO=23 +IMPLEMENTS=24 +IMPORT=25 +INSTANCEOF=26 +INT=27 +INTERFACE=28 +LONG=29 +NATIVE=30 +NEW=31 +PACKAGE=32 +PRIVATE=33 +PROTECTED=34 +PUBLIC=35 +RETURN=36 +SHORT=37 +STATIC=38 +STRICTFP=39 +SUPER=40 +SWITCH=41 +SYNCHRONIZED=42 +THIS=43 +THROW=44 +THROWS=45 +TRANSIENT=46 +TRY=47 +VOID=48 +VOLATILE=49 +WHILE=50 +IntegerLiteral=51 +FloatingPointLiteral=52 +BooleanLiteral=53 +CharacterLiteral=54 +StringLiteral=55 +NullLiteral=56 +LPAREN=57 +RPAREN=58 +LBRACE=59 +RBRACE=60 +LBRACK=61 +RBRACK=62 +SEMI=63 +COMMA=64 +DOT=65 +ASSIGN=66 +GT=67 +LT=68 +BANG=69 +TILDE=70 +QUESTION=71 +COLON=72 +EQUAL=73 +LE=74 +GE=75 +NOTEQUAL=76 +AND=77 +OR=78 +INC=79 +DEC=80 +ADD=81 +SUB=82 +MUL=83 +DIV=84 +BITAND=85 +BITOR=86 +CARET=87 +MOD=88 +ADD_ASSIGN=89 +SUB_ASSIGN=90 +MUL_ASSIGN=91 +DIV_ASSIGN=92 +AND_ASSIGN=93 +OR_ASSIGN=94 +XOR_ASSIGN=95 +MOD_ASSIGN=96 +LSHIFT_ASSIGN=97 +RSHIFT_ASSIGN=98 +URSHIFT_ASSIGN=99 +Identifier=100 +AT=101 +ELLIPSIS=102 +WS=103 +COMMENT=104 +LINE_COMMENT=105 +'abstract'=1 +'assert'=2 +'boolean'=3 +'break'=4 +'byte'=5 +'case'=6 +'catch'=7 +'char'=8 +'class'=9 +'const'=10 +'continue'=11 +'default'=12 +'do'=13 +'double'=14 +'else'=15 +'enum'=16 +'extends'=17 +'final'=18 +'finally'=19 +'float'=20 +'for'=21 +'if'=22 +'goto'=23 +'implements'=24 +'import'=25 +'instanceof'=26 +'int'=27 +'interface'=28 +'long'=29 +'native'=30 +'new'=31 +'package'=32 +'private'=33 +'protected'=34 +'public'=35 +'return'=36 +'short'=37 +'static'=38 +'strictfp'=39 +'super'=40 +'switch'=41 +'synchronized'=42 +'this'=43 +'throw'=44 +'throws'=45 +'transient'=46 +'try'=47 +'void'=48 +'volatile'=49 +'while'=50 +'null'=56 +'('=57 +')'=58 +'{'=59 +'}'=60 +'['=61 +']'=62 +';'=63 +','=64 +'.'=65 +'='=66 +'>'=67 +'<'=68 +'!'=69 +'~'=70 +'?'=71 +':'=72 +'=='=73 +'<='=74 +'>='=75 +'!='=76 +'&&'=77 +'||'=78 +'++'=79 +'--'=80 +'+'=81 +'-'=82 +'*'=83 +'/'=84 +'&'=85 +'|'=86 +'^'=87 +'%'=88 +'+='=89 +'-='=90 +'*='=91 +'/='=92 +'&='=93 +'|='=94 +'^='=95 +'%='=96 +'<<='=97 +'>>='=98 +'>>>='=99 +'@'=101 +'...'=102 diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaListener.java b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaListener.java new file mode 100644 index 0000000..40fcb7a --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaListener.java @@ -0,0 +1,1021 @@ +// Generated from Java.g4 by ANTLR 4.7 +package it.unitn.repoman.core.lang.parsers.java; + +import org.antlr.v4.runtime.tree.ParseTreeListener; + +/** + * This interface defines a complete listener for a parse tree produced by + * {@link JavaParser}. + */ +public interface JavaListener extends ParseTreeListener { + /** + * Enter a parse tree produced by {@link JavaParser#compilationUnit}. + * @param ctx the parse tree + */ + void enterCompilationUnit(JavaParser.CompilationUnitContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#compilationUnit}. + * @param ctx the parse tree + */ + void exitCompilationUnit(JavaParser.CompilationUnitContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#packageDeclaration}. + * @param ctx the parse tree + */ + void enterPackageDeclaration(JavaParser.PackageDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#packageDeclaration}. + * @param ctx the parse tree + */ + void exitPackageDeclaration(JavaParser.PackageDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#importDeclaration}. + * @param ctx the parse tree + */ + void enterImportDeclaration(JavaParser.ImportDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#importDeclaration}. + * @param ctx the parse tree + */ + void exitImportDeclaration(JavaParser.ImportDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeDeclaration}. + * @param ctx the parse tree + */ + void enterTypeDeclaration(JavaParser.TypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeDeclaration}. + * @param ctx the parse tree + */ + void exitTypeDeclaration(JavaParser.TypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#modifier}. + * @param ctx the parse tree + */ + void enterModifier(JavaParser.ModifierContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#modifier}. + * @param ctx the parse tree + */ + void exitModifier(JavaParser.ModifierContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classOrInterfaceModifier}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceModifier(JavaParser.ClassOrInterfaceModifierContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classOrInterfaceModifier}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceModifier(JavaParser.ClassOrInterfaceModifierContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#variableModifier}. + * @param ctx the parse tree + */ + void enterVariableModifier(JavaParser.VariableModifierContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#variableModifier}. + * @param ctx the parse tree + */ + void exitVariableModifier(JavaParser.VariableModifierContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classDeclaration}. + * @param ctx the parse tree + */ + void enterClassDeclaration(JavaParser.ClassDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classDeclaration}. + * @param ctx the parse tree + */ + void exitClassDeclaration(JavaParser.ClassDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeParameters}. + * @param ctx the parse tree + */ + void enterTypeParameters(JavaParser.TypeParametersContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeParameters}. + * @param ctx the parse tree + */ + void exitTypeParameters(JavaParser.TypeParametersContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeParameter}. + * @param ctx the parse tree + */ + void enterTypeParameter(JavaParser.TypeParameterContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeParameter}. + * @param ctx the parse tree + */ + void exitTypeParameter(JavaParser.TypeParameterContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeBound}. + * @param ctx the parse tree + */ + void enterTypeBound(JavaParser.TypeBoundContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeBound}. + * @param ctx the parse tree + */ + void exitTypeBound(JavaParser.TypeBoundContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enumDeclaration}. + * @param ctx the parse tree + */ + void enterEnumDeclaration(JavaParser.EnumDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enumDeclaration}. + * @param ctx the parse tree + */ + void exitEnumDeclaration(JavaParser.EnumDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enumConstants}. + * @param ctx the parse tree + */ + void enterEnumConstants(JavaParser.EnumConstantsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enumConstants}. + * @param ctx the parse tree + */ + void exitEnumConstants(JavaParser.EnumConstantsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enumConstant}. + * @param ctx the parse tree + */ + void enterEnumConstant(JavaParser.EnumConstantContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enumConstant}. + * @param ctx the parse tree + */ + void exitEnumConstant(JavaParser.EnumConstantContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enumBodyDeclarations}. + * @param ctx the parse tree + */ + void enterEnumBodyDeclarations(JavaParser.EnumBodyDeclarationsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enumBodyDeclarations}. + * @param ctx the parse tree + */ + void exitEnumBodyDeclarations(JavaParser.EnumBodyDeclarationsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceDeclaration(JavaParser.InterfaceDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceDeclaration(JavaParser.InterfaceDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeList}. + * @param ctx the parse tree + */ + void enterTypeList(JavaParser.TypeListContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeList}. + * @param ctx the parse tree + */ + void exitTypeList(JavaParser.TypeListContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classBody}. + * @param ctx the parse tree + */ + void enterClassBody(JavaParser.ClassBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classBody}. + * @param ctx the parse tree + */ + void exitClassBody(JavaParser.ClassBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceBody}. + * @param ctx the parse tree + */ + void enterInterfaceBody(JavaParser.InterfaceBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceBody}. + * @param ctx the parse tree + */ + void exitInterfaceBody(JavaParser.InterfaceBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classBodyDeclaration}. + * @param ctx the parse tree + */ + void enterClassBodyDeclaration(JavaParser.ClassBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classBodyDeclaration}. + * @param ctx the parse tree + */ + void exitClassBodyDeclaration(JavaParser.ClassBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#memberDeclaration}. + * @param ctx the parse tree + */ + void enterMemberDeclaration(JavaParser.MemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#memberDeclaration}. + * @param ctx the parse tree + */ + void exitMemberDeclaration(JavaParser.MemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#methodDeclaration}. + * @param ctx the parse tree + */ + void enterMethodDeclaration(JavaParser.MethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#methodDeclaration}. + * @param ctx the parse tree + */ + void exitMethodDeclaration(JavaParser.MethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#genericMethodDeclaration}. + * @param ctx the parse tree + */ + void enterGenericMethodDeclaration(JavaParser.GenericMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#genericMethodDeclaration}. + * @param ctx the parse tree + */ + void exitGenericMethodDeclaration(JavaParser.GenericMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#constructorDeclaration}. + * @param ctx the parse tree + */ + void enterConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#constructorDeclaration}. + * @param ctx the parse tree + */ + void exitConstructorDeclaration(JavaParser.ConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#genericConstructorDeclaration}. + * @param ctx the parse tree + */ + void enterGenericConstructorDeclaration(JavaParser.GenericConstructorDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#genericConstructorDeclaration}. + * @param ctx the parse tree + */ + void exitGenericConstructorDeclaration(JavaParser.GenericConstructorDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#fieldDeclaration}. + * @param ctx the parse tree + */ + void enterFieldDeclaration(JavaParser.FieldDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#fieldDeclaration}. + * @param ctx the parse tree + */ + void exitFieldDeclaration(JavaParser.FieldDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceBodyDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceBodyDeclaration(JavaParser.InterfaceBodyDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceBodyDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceBodyDeclaration(JavaParser.InterfaceBodyDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceMemberDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceMemberDeclaration(JavaParser.InterfaceMemberDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceMemberDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceMemberDeclaration(JavaParser.InterfaceMemberDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#constDeclaration}. + * @param ctx the parse tree + */ + void enterConstDeclaration(JavaParser.ConstDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#constDeclaration}. + * @param ctx the parse tree + */ + void exitConstDeclaration(JavaParser.ConstDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#constantDeclarator}. + * @param ctx the parse tree + */ + void enterConstantDeclarator(JavaParser.ConstantDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#constantDeclarator}. + * @param ctx the parse tree + */ + void exitConstantDeclarator(JavaParser.ConstantDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#interfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void enterInterfaceMethodDeclaration(JavaParser.InterfaceMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#interfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void exitInterfaceMethodDeclaration(JavaParser.InterfaceMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void enterGenericInterfaceMethodDeclaration(JavaParser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#genericInterfaceMethodDeclaration}. + * @param ctx the parse tree + */ + void exitGenericInterfaceMethodDeclaration(JavaParser.GenericInterfaceMethodDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#variableDeclarators}. + * @param ctx the parse tree + */ + void enterVariableDeclarators(JavaParser.VariableDeclaratorsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#variableDeclarators}. + * @param ctx the parse tree + */ + void exitVariableDeclarators(JavaParser.VariableDeclaratorsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#variableDeclarator}. + * @param ctx the parse tree + */ + void enterVariableDeclarator(JavaParser.VariableDeclaratorContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#variableDeclarator}. + * @param ctx the parse tree + */ + void exitVariableDeclarator(JavaParser.VariableDeclaratorContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#variableDeclaratorId}. + * @param ctx the parse tree + */ + void enterVariableDeclaratorId(JavaParser.VariableDeclaratorIdContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#variableDeclaratorId}. + * @param ctx the parse tree + */ + void exitVariableDeclaratorId(JavaParser.VariableDeclaratorIdContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#variableInitializer}. + * @param ctx the parse tree + */ + void enterVariableInitializer(JavaParser.VariableInitializerContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#variableInitializer}. + * @param ctx the parse tree + */ + void exitVariableInitializer(JavaParser.VariableInitializerContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#arrayInitializer}. + * @param ctx the parse tree + */ + void enterArrayInitializer(JavaParser.ArrayInitializerContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#arrayInitializer}. + * @param ctx the parse tree + */ + void exitArrayInitializer(JavaParser.ArrayInitializerContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enumConstantName}. + * @param ctx the parse tree + */ + void enterEnumConstantName(JavaParser.EnumConstantNameContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enumConstantName}. + * @param ctx the parse tree + */ + void exitEnumConstantName(JavaParser.EnumConstantNameContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeType}. + * @param ctx the parse tree + */ + void enterTypeType(JavaParser.TypeTypeContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeType}. + * @param ctx the parse tree + */ + void exitTypeType(JavaParser.TypeTypeContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classOrInterfaceType}. + * @param ctx the parse tree + */ + void enterClassOrInterfaceType(JavaParser.ClassOrInterfaceTypeContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classOrInterfaceType}. + * @param ctx the parse tree + */ + void exitClassOrInterfaceType(JavaParser.ClassOrInterfaceTypeContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#primitiveType}. + * @param ctx the parse tree + */ + void enterPrimitiveType(JavaParser.PrimitiveTypeContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#primitiveType}. + * @param ctx the parse tree + */ + void exitPrimitiveType(JavaParser.PrimitiveTypeContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeArguments}. + * @param ctx the parse tree + */ + void enterTypeArguments(JavaParser.TypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeArguments}. + * @param ctx the parse tree + */ + void exitTypeArguments(JavaParser.TypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeArgument}. + * @param ctx the parse tree + */ + void enterTypeArgument(JavaParser.TypeArgumentContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeArgument}. + * @param ctx the parse tree + */ + void exitTypeArgument(JavaParser.TypeArgumentContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#qualifiedNameList}. + * @param ctx the parse tree + */ + void enterQualifiedNameList(JavaParser.QualifiedNameListContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#qualifiedNameList}. + * @param ctx the parse tree + */ + void exitQualifiedNameList(JavaParser.QualifiedNameListContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#formalParameters}. + * @param ctx the parse tree + */ + void enterFormalParameters(JavaParser.FormalParametersContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#formalParameters}. + * @param ctx the parse tree + */ + void exitFormalParameters(JavaParser.FormalParametersContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#formalParameterList}. + * @param ctx the parse tree + */ + void enterFormalParameterList(JavaParser.FormalParameterListContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#formalParameterList}. + * @param ctx the parse tree + */ + void exitFormalParameterList(JavaParser.FormalParameterListContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#formalParameter}. + * @param ctx the parse tree + */ + void enterFormalParameter(JavaParser.FormalParameterContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#formalParameter}. + * @param ctx the parse tree + */ + void exitFormalParameter(JavaParser.FormalParameterContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#lastFormalParameter}. + * @param ctx the parse tree + */ + void enterLastFormalParameter(JavaParser.LastFormalParameterContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#lastFormalParameter}. + * @param ctx the parse tree + */ + void exitLastFormalParameter(JavaParser.LastFormalParameterContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#methodBody}. + * @param ctx the parse tree + */ + void enterMethodBody(JavaParser.MethodBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#methodBody}. + * @param ctx the parse tree + */ + void exitMethodBody(JavaParser.MethodBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#constructorBody}. + * @param ctx the parse tree + */ + void enterConstructorBody(JavaParser.ConstructorBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#constructorBody}. + * @param ctx the parse tree + */ + void exitConstructorBody(JavaParser.ConstructorBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#qualifiedName}. + * @param ctx the parse tree + */ + void enterQualifiedName(JavaParser.QualifiedNameContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#qualifiedName}. + * @param ctx the parse tree + */ + void exitQualifiedName(JavaParser.QualifiedNameContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#literal}. + * @param ctx the parse tree + */ + void enterLiteral(JavaParser.LiteralContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#literal}. + * @param ctx the parse tree + */ + void exitLiteral(JavaParser.LiteralContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotation}. + * @param ctx the parse tree + */ + void enterAnnotation(JavaParser.AnnotationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotation}. + * @param ctx the parse tree + */ + void exitAnnotation(JavaParser.AnnotationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationName}. + * @param ctx the parse tree + */ + void enterAnnotationName(JavaParser.AnnotationNameContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationName}. + * @param ctx the parse tree + */ + void exitAnnotationName(JavaParser.AnnotationNameContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#elementValuePairs}. + * @param ctx the parse tree + */ + void enterElementValuePairs(JavaParser.ElementValuePairsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#elementValuePairs}. + * @param ctx the parse tree + */ + void exitElementValuePairs(JavaParser.ElementValuePairsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#elementValuePair}. + * @param ctx the parse tree + */ + void enterElementValuePair(JavaParser.ElementValuePairContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#elementValuePair}. + * @param ctx the parse tree + */ + void exitElementValuePair(JavaParser.ElementValuePairContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#elementValue}. + * @param ctx the parse tree + */ + void enterElementValue(JavaParser.ElementValueContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#elementValue}. + * @param ctx the parse tree + */ + void exitElementValue(JavaParser.ElementValueContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#elementValueArrayInitializer}. + * @param ctx the parse tree + */ + void enterElementValueArrayInitializer(JavaParser.ElementValueArrayInitializerContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#elementValueArrayInitializer}. + * @param ctx the parse tree + */ + void exitElementValueArrayInitializer(JavaParser.ElementValueArrayInitializerContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationTypeDeclaration}. + * @param ctx the parse tree + */ + void enterAnnotationTypeDeclaration(JavaParser.AnnotationTypeDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationTypeDeclaration}. + * @param ctx the parse tree + */ + void exitAnnotationTypeDeclaration(JavaParser.AnnotationTypeDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationTypeBody}. + * @param ctx the parse tree + */ + void enterAnnotationTypeBody(JavaParser.AnnotationTypeBodyContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationTypeBody}. + * @param ctx the parse tree + */ + void exitAnnotationTypeBody(JavaParser.AnnotationTypeBodyContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + */ + void enterAnnotationTypeElementDeclaration(JavaParser.AnnotationTypeElementDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationTypeElementDeclaration}. + * @param ctx the parse tree + */ + void exitAnnotationTypeElementDeclaration(JavaParser.AnnotationTypeElementDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationTypeElementRest}. + * @param ctx the parse tree + */ + void enterAnnotationTypeElementRest(JavaParser.AnnotationTypeElementRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationTypeElementRest}. + * @param ctx the parse tree + */ + void exitAnnotationTypeElementRest(JavaParser.AnnotationTypeElementRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + */ + void enterAnnotationMethodOrConstantRest(JavaParser.AnnotationMethodOrConstantRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationMethodOrConstantRest}. + * @param ctx the parse tree + */ + void exitAnnotationMethodOrConstantRest(JavaParser.AnnotationMethodOrConstantRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationMethodRest}. + * @param ctx the parse tree + */ + void enterAnnotationMethodRest(JavaParser.AnnotationMethodRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationMethodRest}. + * @param ctx the parse tree + */ + void exitAnnotationMethodRest(JavaParser.AnnotationMethodRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#annotationConstantRest}. + * @param ctx the parse tree + */ + void enterAnnotationConstantRest(JavaParser.AnnotationConstantRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#annotationConstantRest}. + * @param ctx the parse tree + */ + void exitAnnotationConstantRest(JavaParser.AnnotationConstantRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#defaultValue}. + * @param ctx the parse tree + */ + void enterDefaultValue(JavaParser.DefaultValueContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#defaultValue}. + * @param ctx the parse tree + */ + void exitDefaultValue(JavaParser.DefaultValueContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#block}. + * @param ctx the parse tree + */ + void enterBlock(JavaParser.BlockContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#block}. + * @param ctx the parse tree + */ + void exitBlock(JavaParser.BlockContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#blockStatement}. + * @param ctx the parse tree + */ + void enterBlockStatement(JavaParser.BlockStatementContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#blockStatement}. + * @param ctx the parse tree + */ + void exitBlockStatement(JavaParser.BlockStatementContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#localVariableDeclarationStatement}. + * @param ctx the parse tree + */ + void enterLocalVariableDeclarationStatement(JavaParser.LocalVariableDeclarationStatementContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#localVariableDeclarationStatement}. + * @param ctx the parse tree + */ + void exitLocalVariableDeclarationStatement(JavaParser.LocalVariableDeclarationStatementContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#localVariableDeclaration}. + * @param ctx the parse tree + */ + void enterLocalVariableDeclaration(JavaParser.LocalVariableDeclarationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#localVariableDeclaration}. + * @param ctx the parse tree + */ + void exitLocalVariableDeclaration(JavaParser.LocalVariableDeclarationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#statement}. + * @param ctx the parse tree + */ + void enterStatement(JavaParser.StatementContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#statement}. + * @param ctx the parse tree + */ + void exitStatement(JavaParser.StatementContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#catchClause}. + * @param ctx the parse tree + */ + void enterCatchClause(JavaParser.CatchClauseContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#catchClause}. + * @param ctx the parse tree + */ + void exitCatchClause(JavaParser.CatchClauseContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#catchType}. + * @param ctx the parse tree + */ + void enterCatchType(JavaParser.CatchTypeContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#catchType}. + * @param ctx the parse tree + */ + void exitCatchType(JavaParser.CatchTypeContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#finallyBlock}. + * @param ctx the parse tree + */ + void enterFinallyBlock(JavaParser.FinallyBlockContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#finallyBlock}. + * @param ctx the parse tree + */ + void exitFinallyBlock(JavaParser.FinallyBlockContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#resourceSpecification}. + * @param ctx the parse tree + */ + void enterResourceSpecification(JavaParser.ResourceSpecificationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#resourceSpecification}. + * @param ctx the parse tree + */ + void exitResourceSpecification(JavaParser.ResourceSpecificationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#resources}. + * @param ctx the parse tree + */ + void enterResources(JavaParser.ResourcesContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#resources}. + * @param ctx the parse tree + */ + void exitResources(JavaParser.ResourcesContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#resource}. + * @param ctx the parse tree + */ + void enterResource(JavaParser.ResourceContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#resource}. + * @param ctx the parse tree + */ + void exitResource(JavaParser.ResourceContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#switchBlockStatementGroup}. + * @param ctx the parse tree + */ + void enterSwitchBlockStatementGroup(JavaParser.SwitchBlockStatementGroupContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#switchBlockStatementGroup}. + * @param ctx the parse tree + */ + void exitSwitchBlockStatementGroup(JavaParser.SwitchBlockStatementGroupContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#switchLabel}. + * @param ctx the parse tree + */ + void enterSwitchLabel(JavaParser.SwitchLabelContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#switchLabel}. + * @param ctx the parse tree + */ + void exitSwitchLabel(JavaParser.SwitchLabelContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#forControl}. + * @param ctx the parse tree + */ + void enterForControl(JavaParser.ForControlContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#forControl}. + * @param ctx the parse tree + */ + void exitForControl(JavaParser.ForControlContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#forInit}. + * @param ctx the parse tree + */ + void enterForInit(JavaParser.ForInitContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#forInit}. + * @param ctx the parse tree + */ + void exitForInit(JavaParser.ForInitContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#enhancedForControl}. + * @param ctx the parse tree + */ + void enterEnhancedForControl(JavaParser.EnhancedForControlContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#enhancedForControl}. + * @param ctx the parse tree + */ + void exitEnhancedForControl(JavaParser.EnhancedForControlContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#forUpdate}. + * @param ctx the parse tree + */ + void enterForUpdate(JavaParser.ForUpdateContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#forUpdate}. + * @param ctx the parse tree + */ + void exitForUpdate(JavaParser.ForUpdateContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#parExpression}. + * @param ctx the parse tree + */ + void enterParExpression(JavaParser.ParExpressionContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#parExpression}. + * @param ctx the parse tree + */ + void exitParExpression(JavaParser.ParExpressionContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#expressionList}. + * @param ctx the parse tree + */ + void enterExpressionList(JavaParser.ExpressionListContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#expressionList}. + * @param ctx the parse tree + */ + void exitExpressionList(JavaParser.ExpressionListContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#statementExpression}. + * @param ctx the parse tree + */ + void enterStatementExpression(JavaParser.StatementExpressionContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#statementExpression}. + * @param ctx the parse tree + */ + void exitStatementExpression(JavaParser.StatementExpressionContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#constantExpression}. + * @param ctx the parse tree + */ + void enterConstantExpression(JavaParser.ConstantExpressionContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#constantExpression}. + * @param ctx the parse tree + */ + void exitConstantExpression(JavaParser.ConstantExpressionContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#expression}. + * @param ctx the parse tree + */ + void enterExpression(JavaParser.ExpressionContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#expression}. + * @param ctx the parse tree + */ + void exitExpression(JavaParser.ExpressionContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#primary}. + * @param ctx the parse tree + */ + void enterPrimary(JavaParser.PrimaryContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#primary}. + * @param ctx the parse tree + */ + void exitPrimary(JavaParser.PrimaryContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#creator}. + * @param ctx the parse tree + */ + void enterCreator(JavaParser.CreatorContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#creator}. + * @param ctx the parse tree + */ + void exitCreator(JavaParser.CreatorContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#createdName}. + * @param ctx the parse tree + */ + void enterCreatedName(JavaParser.CreatedNameContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#createdName}. + * @param ctx the parse tree + */ + void exitCreatedName(JavaParser.CreatedNameContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#innerCreator}. + * @param ctx the parse tree + */ + void enterInnerCreator(JavaParser.InnerCreatorContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#innerCreator}. + * @param ctx the parse tree + */ + void exitInnerCreator(JavaParser.InnerCreatorContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#arrayCreatorRest}. + * @param ctx the parse tree + */ + void enterArrayCreatorRest(JavaParser.ArrayCreatorRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#arrayCreatorRest}. + * @param ctx the parse tree + */ + void exitArrayCreatorRest(JavaParser.ArrayCreatorRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#classCreatorRest}. + * @param ctx the parse tree + */ + void enterClassCreatorRest(JavaParser.ClassCreatorRestContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#classCreatorRest}. + * @param ctx the parse tree + */ + void exitClassCreatorRest(JavaParser.ClassCreatorRestContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#explicitGenericInvocation}. + * @param ctx the parse tree + */ + void enterExplicitGenericInvocation(JavaParser.ExplicitGenericInvocationContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#explicitGenericInvocation}. + * @param ctx the parse tree + */ + void exitExplicitGenericInvocation(JavaParser.ExplicitGenericInvocationContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#nonWildcardTypeArguments}. + * @param ctx the parse tree + */ + void enterNonWildcardTypeArguments(JavaParser.NonWildcardTypeArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#nonWildcardTypeArguments}. + * @param ctx the parse tree + */ + void exitNonWildcardTypeArguments(JavaParser.NonWildcardTypeArgumentsContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void enterTypeArgumentsOrDiamond(JavaParser.TypeArgumentsOrDiamondContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#typeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void exitTypeArgumentsOrDiamond(JavaParser.TypeArgumentsOrDiamondContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void enterNonWildcardTypeArgumentsOrDiamond(JavaParser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#nonWildcardTypeArgumentsOrDiamond}. + * @param ctx the parse tree + */ + void exitNonWildcardTypeArgumentsOrDiamond(JavaParser.NonWildcardTypeArgumentsOrDiamondContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#superSuffix}. + * @param ctx the parse tree + */ + void enterSuperSuffix(JavaParser.SuperSuffixContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#superSuffix}. + * @param ctx the parse tree + */ + void exitSuperSuffix(JavaParser.SuperSuffixContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + */ + void enterExplicitGenericInvocationSuffix(JavaParser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#explicitGenericInvocationSuffix}. + * @param ctx the parse tree + */ + void exitExplicitGenericInvocationSuffix(JavaParser.ExplicitGenericInvocationSuffixContext ctx); + /** + * Enter a parse tree produced by {@link JavaParser#arguments}. + * @param ctx the parse tree + */ + void enterArguments(JavaParser.ArgumentsContext ctx); + /** + * Exit a parse tree produced by {@link JavaParser#arguments}. + * @param ctx the parse tree + */ + void exitArguments(JavaParser.ArgumentsContext ctx); +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaParser.java b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaParser.java new file mode 100644 index 0000000..1955b93 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/parsers/java/JavaParser.java @@ -0,0 +1,8421 @@ +// Generated from Java.g4 by ANTLR 4.7 +package it.unitn.repoman.core.lang.parsers.java; + +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.tree.*; +import java.util.List; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class JavaParser extends Parser { + static { RuntimeMetaData.checkVersion("4.7", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + ABSTRACT=1, ASSERT=2, BOOLEAN=3, BREAK=4, BYTE=5, CASE=6, CATCH=7, CHAR=8, + CLASS=9, CONST=10, CONTINUE=11, DEFAULT=12, DO=13, DOUBLE=14, ELSE=15, + ENUM=16, EXTENDS=17, FINAL=18, FINALLY=19, FLOAT=20, FOR=21, IF=22, GOTO=23, + IMPLEMENTS=24, IMPORT=25, INSTANCEOF=26, INT=27, INTERFACE=28, LONG=29, + NATIVE=30, NEW=31, PACKAGE=32, PRIVATE=33, PROTECTED=34, PUBLIC=35, RETURN=36, + SHORT=37, STATIC=38, STRICTFP=39, SUPER=40, SWITCH=41, SYNCHRONIZED=42, + THIS=43, THROW=44, THROWS=45, TRANSIENT=46, TRY=47, VOID=48, VOLATILE=49, + WHILE=50, IntegerLiteral=51, FloatingPointLiteral=52, BooleanLiteral=53, + CharacterLiteral=54, StringLiteral=55, NullLiteral=56, LPAREN=57, RPAREN=58, + LBRACE=59, RBRACE=60, LBRACK=61, RBRACK=62, SEMI=63, COMMA=64, DOT=65, + ASSIGN=66, GT=67, LT=68, BANG=69, TILDE=70, QUESTION=71, COLON=72, EQUAL=73, + LE=74, GE=75, NOTEQUAL=76, AND=77, OR=78, INC=79, DEC=80, ADD=81, SUB=82, + MUL=83, DIV=84, BITAND=85, BITOR=86, CARET=87, MOD=88, ADD_ASSIGN=89, + SUB_ASSIGN=90, MUL_ASSIGN=91, DIV_ASSIGN=92, AND_ASSIGN=93, OR_ASSIGN=94, + XOR_ASSIGN=95, MOD_ASSIGN=96, LSHIFT_ASSIGN=97, RSHIFT_ASSIGN=98, URSHIFT_ASSIGN=99, + Identifier=100, AT=101, ELLIPSIS=102, WS=103, COMMENT=104, LINE_COMMENT=105; + public static final int + RULE_compilationUnit = 0, RULE_packageDeclaration = 1, RULE_importDeclaration = 2, + RULE_typeDeclaration = 3, RULE_modifier = 4, RULE_classOrInterfaceModifier = 5, + RULE_variableModifier = 6, RULE_classDeclaration = 7, RULE_typeParameters = 8, + RULE_typeParameter = 9, RULE_typeBound = 10, RULE_enumDeclaration = 11, + RULE_enumConstants = 12, RULE_enumConstant = 13, RULE_enumBodyDeclarations = 14, + RULE_interfaceDeclaration = 15, RULE_typeList = 16, RULE_classBody = 17, + RULE_interfaceBody = 18, RULE_classBodyDeclaration = 19, RULE_memberDeclaration = 20, + RULE_methodDeclaration = 21, RULE_genericMethodDeclaration = 22, RULE_constructorDeclaration = 23, + RULE_genericConstructorDeclaration = 24, RULE_fieldDeclaration = 25, RULE_interfaceBodyDeclaration = 26, + RULE_interfaceMemberDeclaration = 27, RULE_constDeclaration = 28, RULE_constantDeclarator = 29, + RULE_interfaceMethodDeclaration = 30, RULE_genericInterfaceMethodDeclaration = 31, + RULE_variableDeclarators = 32, RULE_variableDeclarator = 33, RULE_variableDeclaratorId = 34, + RULE_variableInitializer = 35, RULE_arrayInitializer = 36, RULE_enumConstantName = 37, + RULE_typeType = 38, RULE_classOrInterfaceType = 39, RULE_primitiveType = 40, + RULE_typeArguments = 41, RULE_typeArgument = 42, RULE_qualifiedNameList = 43, + RULE_formalParameters = 44, RULE_formalParameterList = 45, RULE_formalParameter = 46, + RULE_lastFormalParameter = 47, RULE_methodBody = 48, RULE_constructorBody = 49, + RULE_qualifiedName = 50, RULE_literal = 51, RULE_annotation = 52, RULE_annotationName = 53, + RULE_elementValuePairs = 54, RULE_elementValuePair = 55, RULE_elementValue = 56, + RULE_elementValueArrayInitializer = 57, RULE_annotationTypeDeclaration = 58, + RULE_annotationTypeBody = 59, RULE_annotationTypeElementDeclaration = 60, + RULE_annotationTypeElementRest = 61, RULE_annotationMethodOrConstantRest = 62, + RULE_annotationMethodRest = 63, RULE_annotationConstantRest = 64, RULE_defaultValue = 65, + RULE_block = 66, RULE_blockStatement = 67, RULE_localVariableDeclarationStatement = 68, + RULE_localVariableDeclaration = 69, RULE_statement = 70, RULE_catchClause = 71, + RULE_catchType = 72, RULE_finallyBlock = 73, RULE_resourceSpecification = 74, + RULE_resources = 75, RULE_resource = 76, RULE_switchBlockStatementGroup = 77, + RULE_switchLabel = 78, RULE_forControl = 79, RULE_forInit = 80, RULE_enhancedForControl = 81, + RULE_forUpdate = 82, RULE_parExpression = 83, RULE_expressionList = 84, + RULE_statementExpression = 85, RULE_constantExpression = 86, RULE_expression = 87, + RULE_primary = 88, RULE_creator = 89, RULE_createdName = 90, RULE_innerCreator = 91, + RULE_arrayCreatorRest = 92, RULE_classCreatorRest = 93, RULE_explicitGenericInvocation = 94, + RULE_nonWildcardTypeArguments = 95, RULE_typeArgumentsOrDiamond = 96, + RULE_nonWildcardTypeArgumentsOrDiamond = 97, RULE_superSuffix = 98, RULE_explicitGenericInvocationSuffix = 99, + RULE_arguments = 100; + public static final String[] ruleNames = { + "compilationUnit", "packageDeclaration", "importDeclaration", "typeDeclaration", + "modifier", "classOrInterfaceModifier", "variableModifier", "classDeclaration", + "typeParameters", "typeParameter", "typeBound", "enumDeclaration", "enumConstants", + "enumConstant", "enumBodyDeclarations", "interfaceDeclaration", "typeList", + "classBody", "interfaceBody", "classBodyDeclaration", "memberDeclaration", + "methodDeclaration", "genericMethodDeclaration", "constructorDeclaration", + "genericConstructorDeclaration", "fieldDeclaration", "interfaceBodyDeclaration", + "interfaceMemberDeclaration", "constDeclaration", "constantDeclarator", + "interfaceMethodDeclaration", "genericInterfaceMethodDeclaration", "variableDeclarators", + "variableDeclarator", "variableDeclaratorId", "variableInitializer", "arrayInitializer", + "enumConstantName", "typeType", "classOrInterfaceType", "primitiveType", + "typeArguments", "typeArgument", "qualifiedNameList", "formalParameters", + "formalParameterList", "formalParameter", "lastFormalParameter", "methodBody", + "constructorBody", "qualifiedName", "literal", "annotation", "annotationName", + "elementValuePairs", "elementValuePair", "elementValue", "elementValueArrayInitializer", + "annotationTypeDeclaration", "annotationTypeBody", "annotationTypeElementDeclaration", + "annotationTypeElementRest", "annotationMethodOrConstantRest", "annotationMethodRest", + "annotationConstantRest", "defaultValue", "block", "blockStatement", "localVariableDeclarationStatement", + "localVariableDeclaration", "statement", "catchClause", "catchType", "finallyBlock", + "resourceSpecification", "resources", "resource", "switchBlockStatementGroup", + "switchLabel", "forControl", "forInit", "enhancedForControl", "forUpdate", + "parExpression", "expressionList", "statementExpression", "constantExpression", + "expression", "primary", "creator", "createdName", "innerCreator", "arrayCreatorRest", + "classCreatorRest", "explicitGenericInvocation", "nonWildcardTypeArguments", + "typeArgumentsOrDiamond", "nonWildcardTypeArgumentsOrDiamond", "superSuffix", + "explicitGenericInvocationSuffix", "arguments" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'abstract'", "'assert'", "'boolean'", "'break'", "'byte'", "'case'", + "'catch'", "'char'", "'class'", "'const'", "'continue'", "'default'", + "'do'", "'double'", "'else'", "'enum'", "'extends'", "'final'", "'finally'", + "'float'", "'for'", "'if'", "'goto'", "'implements'", "'import'", "'instanceof'", + "'int'", "'interface'", "'long'", "'native'", "'new'", "'package'", "'private'", + "'protected'", "'public'", "'return'", "'short'", "'static'", "'strictfp'", + "'super'", "'switch'", "'synchronized'", "'this'", "'throw'", "'throws'", + "'transient'", "'try'", "'void'", "'volatile'", "'while'", null, null, + null, null, null, "'null'", "'('", "')'", "'{'", "'}'", "'['", "']'", + "';'", "','", "'.'", "'='", "'>'", "'<'", "'!'", "'~'", "'?'", "':'", + "'=='", "'<='", "'>='", "'!='", "'&&'", "'||'", "'++'", "'--'", "'+'", + "'-'", "'*'", "'/'", "'&'", "'|'", "'^'", "'%'", "'+='", "'-='", "'*='", + "'/='", "'&='", "'|='", "'^='", "'%='", "'<<='", "'>>='", "'>>>='", null, + "'@'", "'...'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "ABSTRACT", "ASSERT", "BOOLEAN", "BREAK", "BYTE", "CASE", "CATCH", + "CHAR", "CLASS", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", + "ENUM", "EXTENDS", "FINAL", "FINALLY", "FLOAT", "FOR", "IF", "GOTO", "IMPLEMENTS", + "IMPORT", "INSTANCEOF", "INT", "INTERFACE", "LONG", "NATIVE", "NEW", "PACKAGE", + "PRIVATE", "PROTECTED", "PUBLIC", "RETURN", "SHORT", "STATIC", "STRICTFP", + "SUPER", "SWITCH", "SYNCHRONIZED", "THIS", "THROW", "THROWS", "TRANSIENT", + "TRY", "VOID", "VOLATILE", "WHILE", "IntegerLiteral", "FloatingPointLiteral", + "BooleanLiteral", "CharacterLiteral", "StringLiteral", "NullLiteral", + "LPAREN", "RPAREN", "LBRACE", "RBRACE", "LBRACK", "RBRACK", "SEMI", "COMMA", + "DOT", "ASSIGN", "GT", "LT", "BANG", "TILDE", "QUESTION", "COLON", "EQUAL", + "LE", "GE", "NOTEQUAL", "AND", "OR", "INC", "DEC", "ADD", "SUB", "MUL", + "DIV", "BITAND", "BITOR", "CARET", "MOD", "ADD_ASSIGN", "SUB_ASSIGN", + "MUL_ASSIGN", "DIV_ASSIGN", "AND_ASSIGN", "OR_ASSIGN", "XOR_ASSIGN", "MOD_ASSIGN", + "LSHIFT_ASSIGN", "RSHIFT_ASSIGN", "URSHIFT_ASSIGN", "Identifier", "AT", + "ELLIPSIS", "WS", "COMMENT", "LINE_COMMENT" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "Java.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public JavaParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class CompilationUnitContext extends ParserRuleContext { + public TerminalNode EOF() { return getToken(JavaParser.EOF, 0); } + public PackageDeclarationContext packageDeclaration() { + return getRuleContext(PackageDeclarationContext.class,0); + } + public List importDeclaration() { + return getRuleContexts(ImportDeclarationContext.class); + } + public ImportDeclarationContext importDeclaration(int i) { + return getRuleContext(ImportDeclarationContext.class,i); + } + public List typeDeclaration() { + return getRuleContexts(TypeDeclarationContext.class); + } + public TypeDeclarationContext typeDeclaration(int i) { + return getRuleContext(TypeDeclarationContext.class,i); + } + public CompilationUnitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_compilationUnit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterCompilationUnit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitCompilationUnit(this); + } + } + + public final CompilationUnitContext compilationUnit() throws RecognitionException { + CompilationUnitContext _localctx = new CompilationUnitContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_compilationUnit); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(203); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) { + case 1: + { + setState(202); + packageDeclaration(); + } + break; + } + setState(208); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==IMPORT) { + { + { + setState(205); + importDeclaration(); + } + } + setState(210); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(214); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << CLASS) | (1L << ENUM) | (1L << FINAL) | (1L << INTERFACE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP) | (1L << SEMI))) != 0) || _la==AT) { + { + { + setState(211); + typeDeclaration(); + } + } + setState(216); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(217); + match(EOF); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PackageDeclarationContext extends ParserRuleContext { + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public PackageDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_packageDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterPackageDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitPackageDeclaration(this); + } + } + + public final PackageDeclarationContext packageDeclaration() throws RecognitionException { + PackageDeclarationContext _localctx = new PackageDeclarationContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_packageDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(222); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT) { + { + { + setState(219); + annotation(); + } + } + setState(224); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(225); + match(PACKAGE); + setState(226); + qualifiedName(); + setState(227); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportDeclarationContext extends ParserRuleContext { + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public ImportDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterImportDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitImportDeclaration(this); + } + } + + public final ImportDeclarationContext importDeclaration() throws RecognitionException { + ImportDeclarationContext _localctx = new ImportDeclarationContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_importDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(229); + match(IMPORT); + setState(231); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==STATIC) { + { + setState(230); + match(STATIC); + } + } + + setState(233); + qualifiedName(); + setState(236); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==DOT) { + { + setState(234); + match(DOT); + setState(235); + match(MUL); + } + } + + setState(238); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeDeclarationContext extends ParserRuleContext { + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public List classOrInterfaceModifier() { + return getRuleContexts(ClassOrInterfaceModifierContext.class); + } + public ClassOrInterfaceModifierContext classOrInterfaceModifier(int i) { + return getRuleContext(ClassOrInterfaceModifierContext.class,i); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public TypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterTypeDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitTypeDeclaration(this); + } + } + + public final TypeDeclarationContext typeDeclaration() throws RecognitionException { + TypeDeclarationContext _localctx = new TypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_typeDeclaration); + int _la; + try { + int _alt; + setState(269); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(243); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(240); + classOrInterfaceModifier(); + } + } + setState(245); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(246); + classDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(250); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(247); + classOrInterfaceModifier(); + } + } + setState(252); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(253); + enumDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(257); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0) || _la==AT) { + { + { + setState(254); + classOrInterfaceModifier(); + } + } + setState(259); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(260); + interfaceDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(264); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(261); + classOrInterfaceModifier(); + } + } + } + setState(266); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,9,_ctx); + } + setState(267); + annotationTypeDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(268); + match(SEMI); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ModifierContext extends ParserRuleContext { + public ClassOrInterfaceModifierContext classOrInterfaceModifier() { + return getRuleContext(ClassOrInterfaceModifierContext.class,0); + } + public ModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_modifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitModifier(this); + } + } + + public final ModifierContext modifier() throws RecognitionException { + ModifierContext _localctx = new ModifierContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_modifier); + int _la; + try { + setState(273); + _errHandler.sync(this); + switch (_input.LA(1)) { + case ABSTRACT: + case FINAL: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case STATIC: + case STRICTFP: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(271); + classOrInterfaceModifier(); + } + break; + case NATIVE: + case SYNCHRONIZED: + case TRANSIENT: + case VOLATILE: + enterOuterAlt(_localctx, 2); + { + setState(272); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << NATIVE) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOLATILE))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceModifierContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public ClassOrInterfaceModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterClassOrInterfaceModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitClassOrInterfaceModifier(this); + } + } + + public final ClassOrInterfaceModifierContext classOrInterfaceModifier() throws RecognitionException { + ClassOrInterfaceModifierContext _localctx = new ClassOrInterfaceModifierContext(_ctx, getState()); + enterRule(_localctx, 10, RULE_classOrInterfaceModifier); + int _la; + try { + setState(277); + _errHandler.sync(this); + switch (_input.LA(1)) { + case AT: + enterOuterAlt(_localctx, 1); + { + setState(275); + annotation(); + } + break; + case ABSTRACT: + case FINAL: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case STATIC: + case STRICTFP: + enterOuterAlt(_localctx, 2); + { + setState(276); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << FINAL) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << STATIC) | (1L << STRICTFP))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableModifierContext extends ParserRuleContext { + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public VariableModifierContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableModifier; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterVariableModifier(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitVariableModifier(this); + } + } + + public final VariableModifierContext variableModifier() throws RecognitionException { + VariableModifierContext _localctx = new VariableModifierContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_variableModifier); + try { + setState(281); + _errHandler.sync(this); + switch (_input.LA(1)) { + case FINAL: + enterOuterAlt(_localctx, 1); + { + setState(279); + match(FINAL); + } + break; + case AT: + enterOuterAlt(_localctx, 2); + { + setState(280); + annotation(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public ClassDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterClassDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitClassDeclaration(this); + } + } + + public final ClassDeclarationContext classDeclaration() throws RecognitionException { + ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_classDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(283); + match(CLASS); + setState(284); + match(Identifier); + setState(286); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LT) { + { + setState(285); + typeParameters(); + } + } + + setState(290); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(288); + match(EXTENDS); + setState(289); + typeType(); + } + } + + setState(294); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(292); + match(IMPLEMENTS); + setState(293); + typeList(); + } + } + + setState(296); + classBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParametersContext extends ParserRuleContext { + public List typeParameter() { + return getRuleContexts(TypeParameterContext.class); + } + public TypeParameterContext typeParameter(int i) { + return getRuleContext(TypeParameterContext.class,i); + } + public TypeParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterTypeParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitTypeParameters(this); + } + } + + public final TypeParametersContext typeParameters() throws RecognitionException { + TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_typeParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(298); + match(LT); + setState(299); + typeParameter(); + setState(304); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(300); + match(COMMA); + setState(301); + typeParameter(); + } + } + setState(306); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(307); + match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeParameterContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public TypeBoundContext typeBound() { + return getRuleContext(TypeBoundContext.class,0); + } + public TypeParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterTypeParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitTypeParameter(this); + } + } + + public final TypeParameterContext typeParameter() throws RecognitionException { + TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_typeParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(309); + match(Identifier); + setState(312); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(310); + match(EXTENDS); + setState(311); + typeBound(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeBoundContext extends ParserRuleContext { + public List typeType() { + return getRuleContexts(TypeTypeContext.class); + } + public TypeTypeContext typeType(int i) { + return getRuleContext(TypeTypeContext.class,i); + } + public TypeBoundContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeBound; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterTypeBound(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitTypeBound(this); + } + } + + public final TypeBoundContext typeBound() throws RecognitionException { + TypeBoundContext _localctx = new TypeBoundContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_typeBound); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(314); + typeType(); + setState(319); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITAND) { + { + { + setState(315); + match(BITAND); + setState(316); + typeType(); + } + } + setState(321); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumDeclarationContext extends ParserRuleContext { + public TerminalNode ENUM() { return getToken(JavaParser.ENUM, 0); } + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public EnumConstantsContext enumConstants() { + return getRuleContext(EnumConstantsContext.class,0); + } + public EnumBodyDeclarationsContext enumBodyDeclarations() { + return getRuleContext(EnumBodyDeclarationsContext.class,0); + } + public EnumDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterEnumDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitEnumDeclaration(this); + } + } + + public final EnumDeclarationContext enumDeclaration() throws RecognitionException { + EnumDeclarationContext _localctx = new EnumDeclarationContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_enumDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(322); + match(ENUM); + setState(323); + match(Identifier); + setState(326); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==IMPLEMENTS) { + { + setState(324); + match(IMPLEMENTS); + setState(325); + typeList(); + } + } + + setState(328); + match(LBRACE); + setState(330); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Identifier || _la==AT) { + { + setState(329); + enumConstants(); + } + } + + setState(333); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(332); + match(COMMA); + } + } + + setState(336); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==SEMI) { + { + setState(335); + enumBodyDeclarations(); + } + } + + setState(338); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantsContext extends ParserRuleContext { + public List enumConstant() { + return getRuleContexts(EnumConstantContext.class); + } + public EnumConstantContext enumConstant(int i) { + return getRuleContext(EnumConstantContext.class,i); + } + public EnumConstantsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstants; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterEnumConstants(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitEnumConstants(this); + } + } + + public final EnumConstantsContext enumConstants() throws RecognitionException { + EnumConstantsContext _localctx = new EnumConstantsContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_enumConstants); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(340); + enumConstant(); + setState(345); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(341); + match(COMMA); + setState(342); + enumConstant(); + } + } + } + setState(347); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,24,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public List annotation() { + return getRuleContexts(AnnotationContext.class); + } + public AnnotationContext annotation(int i) { + return getRuleContext(AnnotationContext.class,i); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public EnumConstantContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstant; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterEnumConstant(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitEnumConstant(this); + } + } + + public final EnumConstantContext enumConstant() throws RecognitionException { + EnumConstantContext _localctx = new EnumConstantContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_enumConstant); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(351); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==AT) { + { + { + setState(348); + annotation(); + } + } + setState(353); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(354); + match(Identifier); + setState(356); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(355); + arguments(); + } + } + + setState(359); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LBRACE) { + { + setState(358); + classBody(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumBodyDeclarationsContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public EnumBodyDeclarationsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumBodyDeclarations; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterEnumBodyDeclarations(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitEnumBodyDeclarations(this); + } + } + + public final EnumBodyDeclarationsContext enumBodyDeclarations() throws RecognitionException { + EnumBodyDeclarationsContext _localctx = new EnumBodyDeclarationsContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_enumBodyDeclarations); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(361); + match(SEMI); + setState(365); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(362); + classBodyDeclaration(); + } + } + setState(367); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public InterfaceBodyContext interfaceBody() { + return getRuleContext(InterfaceBodyContext.class,0); + } + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterInterfaceDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitInterfaceDeclaration(this); + } + } + + public final InterfaceDeclarationContext interfaceDeclaration() throws RecognitionException { + InterfaceDeclarationContext _localctx = new InterfaceDeclarationContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_interfaceDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(368); + match(INTERFACE); + setState(369); + match(Identifier); + setState(371); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LT) { + { + setState(370); + typeParameters(); + } + } + + setState(375); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EXTENDS) { + { + setState(373); + match(EXTENDS); + setState(374); + typeList(); + } + } + + setState(377); + interfaceBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeListContext extends ParserRuleContext { + public List typeType() { + return getRuleContexts(TypeTypeContext.class); + } + public TypeTypeContext typeType(int i) { + return getRuleContext(TypeTypeContext.class,i); + } + public TypeListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterTypeList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitTypeList(this); + } + } + + public final TypeListContext typeList() throws RecognitionException { + TypeListContext _localctx = new TypeListContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_typeList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(379); + typeType(); + setState(384); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(380); + match(COMMA); + setState(381); + typeType(); + } + } + setState(386); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyContext extends ParserRuleContext { + public List classBodyDeclaration() { + return getRuleContexts(ClassBodyDeclarationContext.class); + } + public ClassBodyDeclarationContext classBodyDeclaration(int i) { + return getRuleContext(ClassBodyDeclarationContext.class,i); + } + public ClassBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterClassBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitClassBody(this); + } + } + + public final ClassBodyContext classBody() throws RecognitionException { + ClassBodyContext _localctx = new ClassBodyContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_classBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(387); + match(LBRACE); + setState(391); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(388); + classBodyDeclaration(); + } + } + setState(393); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(394); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceBodyContext extends ParserRuleContext { + public List interfaceBodyDeclaration() { + return getRuleContexts(InterfaceBodyDeclarationContext.class); + } + public InterfaceBodyDeclarationContext interfaceBodyDeclaration(int i) { + return getRuleContext(InterfaceBodyDeclarationContext.class,i); + } + public InterfaceBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterInterfaceBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitInterfaceBody(this); + } + } + + public final InterfaceBodyContext interfaceBody() throws RecognitionException { + InterfaceBodyContext _localctx = new InterfaceBodyContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_interfaceBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(396); + match(LBRACE); + setState(400); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOID) | (1L << VOLATILE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(397); + interfaceBodyDeclaration(); + } + } + setState(402); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(403); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassBodyDeclarationContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public MemberDeclarationContext memberDeclaration() { + return getRuleContext(MemberDeclarationContext.class,0); + } + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public ClassBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classBodyDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterClassBodyDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitClassBodyDeclaration(this); + } + } + + public final ClassBodyDeclarationContext classBodyDeclaration() throws RecognitionException { + ClassBodyDeclarationContext _localctx = new ClassBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_classBodyDeclaration); + int _la; + try { + int _alt; + setState(417); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(405); + match(SEMI); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(407); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==STATIC) { + { + setState(406); + match(STATIC); + } + } + + setState(409); + block(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(413); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(410); + modifier(); + } + } + } + setState(415); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,35,_ctx); + } + setState(416); + memberDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MemberDeclarationContext extends ParserRuleContext { + public MethodDeclarationContext methodDeclaration() { + return getRuleContext(MethodDeclarationContext.class,0); + } + public GenericMethodDeclarationContext genericMethodDeclaration() { + return getRuleContext(GenericMethodDeclarationContext.class,0); + } + public FieldDeclarationContext fieldDeclaration() { + return getRuleContext(FieldDeclarationContext.class,0); + } + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public GenericConstructorDeclarationContext genericConstructorDeclaration() { + return getRuleContext(GenericConstructorDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public MemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_memberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitMemberDeclaration(this); + } + } + + public final MemberDeclarationContext memberDeclaration() throws RecognitionException { + MemberDeclarationContext _localctx = new MemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_memberDeclaration); + try { + setState(428); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(419); + methodDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(420); + genericMethodDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(421); + fieldDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(422); + constructorDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(423); + genericConstructorDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(424); + interfaceDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(425); + annotationTypeDeclaration(); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(426); + classDeclaration(); + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(427); + enumDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public MethodBodyContext methodBody() { + return getRuleContext(MethodBodyContext.class,0); + } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public MethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitMethodDeclaration(this); + } + } + + public final MethodDeclarationContext methodDeclaration() throws RecognitionException { + MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_methodDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(432); + _errHandler.sync(this); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + { + setState(430); + typeType(); + } + break; + case VOID: + { + setState(431); + match(VOID); + } + break; + default: + throw new NoViableAltException(this); + } + setState(434); + match(Identifier); + setState(435); + formalParameters(); + setState(440); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(436); + match(LBRACK); + setState(437); + match(RBRACK); + } + } + setState(442); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(445); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(443); + match(THROWS); + setState(444); + qualifiedNameList(); + } + } + + setState(449); + _errHandler.sync(this); + switch (_input.LA(1)) { + case LBRACE: + { + setState(447); + methodBody(); + } + break; + case SEMI: + { + setState(448); + match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericMethodDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public MethodDeclarationContext methodDeclaration() { + return getRuleContext(MethodDeclarationContext.class,0); + } + public GenericMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterGenericMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitGenericMethodDeclaration(this); + } + } + + public final GenericMethodDeclarationContext genericMethodDeclaration() throws RecognitionException { + GenericMethodDeclarationContext _localctx = new GenericMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_genericMethodDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(451); + typeParameters(); + setState(452); + methodDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public ConstructorBodyContext constructorBody() { + return getRuleContext(ConstructorBodyContext.class,0); + } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitConstructorDeclaration(this); + } + } + + public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException { + ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_constructorDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(454); + match(Identifier); + setState(455); + formalParameters(); + setState(458); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(456); + match(THROWS); + setState(457); + qualifiedNameList(); + } + } + + setState(460); + constructorBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericConstructorDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public ConstructorDeclarationContext constructorDeclaration() { + return getRuleContext(ConstructorDeclarationContext.class,0); + } + public GenericConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericConstructorDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterGenericConstructorDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitGenericConstructorDeclaration(this); + } + } + + public final GenericConstructorDeclarationContext genericConstructorDeclaration() throws RecognitionException { + GenericConstructorDeclarationContext _localctx = new GenericConstructorDeclarationContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_genericConstructorDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(462); + typeParameters(); + setState(463); + constructorDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FieldDeclarationContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public FieldDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_fieldDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterFieldDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitFieldDeclaration(this); + } + } + + public final FieldDeclarationContext fieldDeclaration() throws RecognitionException { + FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_fieldDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(465); + typeType(); + setState(466); + variableDeclarators(); + setState(467); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceBodyDeclarationContext extends ParserRuleContext { + public InterfaceMemberDeclarationContext interfaceMemberDeclaration() { + return getRuleContext(InterfaceMemberDeclarationContext.class,0); + } + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public InterfaceBodyDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceBodyDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterInterfaceBodyDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitInterfaceBodyDeclaration(this); + } + } + + public final InterfaceBodyDeclarationContext interfaceBodyDeclaration() throws RecognitionException { + InterfaceBodyDeclarationContext _localctx = new InterfaceBodyDeclarationContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_interfaceBodyDeclaration); + try { + int _alt; + setState(477); + _errHandler.sync(this); + switch (_input.LA(1)) { + case ABSTRACT: + case BOOLEAN: + case BYTE: + case CHAR: + case CLASS: + case DOUBLE: + case ENUM: + case FINAL: + case FLOAT: + case INT: + case INTERFACE: + case LONG: + case NATIVE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case SHORT: + case STATIC: + case STRICTFP: + case SYNCHRONIZED: + case TRANSIENT: + case VOID: + case VOLATILE: + case LT: + case Identifier: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(472); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(469); + modifier(); + } + } + } + setState(474); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,43,_ctx); + } + setState(475); + interfaceMemberDeclaration(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(476); + match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMemberDeclarationContext extends ParserRuleContext { + public ConstDeclarationContext constDeclaration() { + return getRuleContext(ConstDeclarationContext.class,0); + } + public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { + return getRuleContext(InterfaceMethodDeclarationContext.class,0); + } + public GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() { + return getRuleContext(GenericInterfaceMethodDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public InterfaceMemberDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMemberDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterInterfaceMemberDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitInterfaceMemberDeclaration(this); + } + } + + public final InterfaceMemberDeclarationContext interfaceMemberDeclaration() throws RecognitionException { + InterfaceMemberDeclarationContext _localctx = new InterfaceMemberDeclarationContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_interfaceMemberDeclaration); + try { + setState(486); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,45,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(479); + constDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(480); + interfaceMethodDeclaration(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(481); + genericInterfaceMethodDeclaration(); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(482); + interfaceDeclaration(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(483); + annotationTypeDeclaration(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(484); + classDeclaration(); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(485); + enumDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstDeclarationContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public List constantDeclarator() { + return getRuleContexts(ConstantDeclaratorContext.class); + } + public ConstantDeclaratorContext constantDeclarator(int i) { + return getRuleContext(ConstantDeclaratorContext.class,i); + } + public ConstDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterConstDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitConstDeclaration(this); + } + } + + public final ConstDeclarationContext constDeclaration() throws RecognitionException { + ConstDeclarationContext _localctx = new ConstDeclarationContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_constDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(488); + typeType(); + setState(489); + constantDeclarator(); + setState(494); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(490); + match(COMMA); + setState(491); + constantDeclarator(); + } + } + setState(496); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(497); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantDeclaratorContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public VariableInitializerContext variableInitializer() { + return getRuleContext(VariableInitializerContext.class,0); + } + public ConstantDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterConstantDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitConstantDeclarator(this); + } + } + + public final ConstantDeclaratorContext constantDeclarator() throws RecognitionException { + ConstantDeclaratorContext _localctx = new ConstantDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_constantDeclarator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(499); + match(Identifier); + setState(504); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(500); + match(LBRACK); + setState(501); + match(RBRACK); + } + } + setState(506); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(507); + match(ASSIGN); + setState(508); + variableInitializer(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InterfaceMethodDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public FormalParametersContext formalParameters() { + return getRuleContext(FormalParametersContext.class,0); + } + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public QualifiedNameListContext qualifiedNameList() { + return getRuleContext(QualifiedNameListContext.class,0); + } + public InterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_interfaceMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterInterfaceMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitInterfaceMethodDeclaration(this); + } + } + + public final InterfaceMethodDeclarationContext interfaceMethodDeclaration() throws RecognitionException { + InterfaceMethodDeclarationContext _localctx = new InterfaceMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_interfaceMethodDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(512); + _errHandler.sync(this); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + { + setState(510); + typeType(); + } + break; + case VOID: + { + setState(511); + match(VOID); + } + break; + default: + throw new NoViableAltException(this); + } + setState(514); + match(Identifier); + setState(515); + formalParameters(); + setState(520); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(516); + match(LBRACK); + setState(517); + match(RBRACK); + } + } + setState(522); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(525); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==THROWS) { + { + setState(523); + match(THROWS); + setState(524); + qualifiedNameList(); + } + } + + setState(527); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class GenericInterfaceMethodDeclarationContext extends ParserRuleContext { + public TypeParametersContext typeParameters() { + return getRuleContext(TypeParametersContext.class,0); + } + public InterfaceMethodDeclarationContext interfaceMethodDeclaration() { + return getRuleContext(InterfaceMethodDeclarationContext.class,0); + } + public GenericInterfaceMethodDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_genericInterfaceMethodDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterGenericInterfaceMethodDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitGenericInterfaceMethodDeclaration(this); + } + } + + public final GenericInterfaceMethodDeclarationContext genericInterfaceMethodDeclaration() throws RecognitionException { + GenericInterfaceMethodDeclarationContext _localctx = new GenericInterfaceMethodDeclarationContext(_ctx, getState()); + enterRule(_localctx, 62, RULE_genericInterfaceMethodDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(529); + typeParameters(); + setState(530); + interfaceMethodDeclaration(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorsContext extends ParserRuleContext { + public List variableDeclarator() { + return getRuleContexts(VariableDeclaratorContext.class); + } + public VariableDeclaratorContext variableDeclarator(int i) { + return getRuleContext(VariableDeclaratorContext.class,i); + } + public VariableDeclaratorsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarators; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterVariableDeclarators(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitVariableDeclarators(this); + } + } + + public final VariableDeclaratorsContext variableDeclarators() throws RecognitionException { + VariableDeclaratorsContext _localctx = new VariableDeclaratorsContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_variableDeclarators); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(532); + variableDeclarator(); + setState(537); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(533); + match(COMMA); + setState(534); + variableDeclarator(); + } + } + setState(539); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorContext extends ParserRuleContext { + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public VariableInitializerContext variableInitializer() { + return getRuleContext(VariableInitializerContext.class,0); + } + public VariableDeclaratorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclarator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterVariableDeclarator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitVariableDeclarator(this); + } + } + + public final VariableDeclaratorContext variableDeclarator() throws RecognitionException { + VariableDeclaratorContext _localctx = new VariableDeclaratorContext(_ctx, getState()); + enterRule(_localctx, 66, RULE_variableDeclarator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(540); + variableDeclaratorId(); + setState(543); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==ASSIGN) { + { + setState(541); + match(ASSIGN); + setState(542); + variableInitializer(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableDeclaratorIdContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public VariableDeclaratorIdContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableDeclaratorId; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterVariableDeclaratorId(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitVariableDeclaratorId(this); + } + } + + public final VariableDeclaratorIdContext variableDeclaratorId() throws RecognitionException { + VariableDeclaratorIdContext _localctx = new VariableDeclaratorIdContext(_ctx, getState()); + enterRule(_localctx, 68, RULE_variableDeclaratorId); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(545); + match(Identifier); + setState(550); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(546); + match(LBRACK); + setState(547); + match(RBRACK); + } + } + setState(552); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableInitializerContext extends ParserRuleContext { + public ArrayInitializerContext arrayInitializer() { + return getRuleContext(ArrayInitializerContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public VariableInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterVariableInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitVariableInitializer(this); + } + } + + public final VariableInitializerContext variableInitializer() throws RecognitionException { + VariableInitializerContext _localctx = new VariableInitializerContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_variableInitializer); + try { + setState(555); + _errHandler.sync(this); + switch (_input.LA(1)) { + case LBRACE: + enterOuterAlt(_localctx, 1); + { + setState(553); + arrayInitializer(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(554); + expression(0); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayInitializerContext extends ParserRuleContext { + public List variableInitializer() { + return getRuleContexts(VariableInitializerContext.class); + } + public VariableInitializerContext variableInitializer(int i) { + return getRuleContext(VariableInitializerContext.class,i); + } + public ArrayInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterArrayInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitArrayInitializer(this); + } + } + + public final ArrayInitializerContext arrayInitializer() throws RecognitionException { + ArrayInitializerContext _localctx = new ArrayInitializerContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_arrayInitializer); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(557); + match(LBRACE); + setState(569); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(558); + variableInitializer(); + setState(563); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(559); + match(COMMA); + setState(560); + variableInitializer(); + } + } + } + setState(565); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + } + setState(567); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(566); + match(COMMA); + } + } + + } + } + + setState(571); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnumConstantNameContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public EnumConstantNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enumConstantName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterEnumConstantName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitEnumConstantName(this); + } + } + + public final EnumConstantNameContext enumConstantName() throws RecognitionException { + EnumConstantNameContext _localctx = new EnumConstantNameContext(_ctx, getState()); + enterRule(_localctx, 74, RULE_enumConstantName); + try { + enterOuterAlt(_localctx, 1); + { + setState(573); + match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeTypeContext extends ParserRuleContext { + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public PrimitiveTypeContext primitiveType() { + return getRuleContext(PrimitiveTypeContext.class,0); + } + public TypeTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterTypeType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitTypeType(this); + } + } + + public final TypeTypeContext typeType() throws RecognitionException { + TypeTypeContext _localctx = new TypeTypeContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_typeType); + try { + int _alt; + setState(591); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(575); + classOrInterfaceType(); + setState(580); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,58,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(576); + match(LBRACK); + setState(577); + match(RBRACK); + } + } + } + setState(582); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,58,_ctx); + } + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + enterOuterAlt(_localctx, 2); + { + setState(583); + primitiveType(); + setState(588); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,59,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(584); + match(LBRACK); + setState(585); + match(RBRACK); + } + } + } + setState(590); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,59,_ctx); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassOrInterfaceTypeContext extends ParserRuleContext { + public List Identifier() { return getTokens(JavaParser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(JavaParser.Identifier, i); + } + public List typeArguments() { + return getRuleContexts(TypeArgumentsContext.class); + } + public TypeArgumentsContext typeArguments(int i) { + return getRuleContext(TypeArgumentsContext.class,i); + } + public ClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classOrInterfaceType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterClassOrInterfaceType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitClassOrInterfaceType(this); + } + } + + public final ClassOrInterfaceTypeContext classOrInterfaceType() throws RecognitionException { + ClassOrInterfaceTypeContext _localctx = new ClassOrInterfaceTypeContext(_ctx, getState()); + enterRule(_localctx, 78, RULE_classOrInterfaceType); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(593); + match(Identifier); + setState(595); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) { + case 1: + { + setState(594); + typeArguments(); + } + break; + } + setState(604); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,63,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(597); + match(DOT); + setState(598); + match(Identifier); + setState(600); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) { + case 1: + { + setState(599); + typeArguments(); + } + break; + } + } + } + } + setState(606); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,63,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PrimitiveTypeContext extends ParserRuleContext { + public PrimitiveTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primitiveType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterPrimitiveType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitPrimitiveType(this); + } + } + + public final PrimitiveTypeContext primitiveType() throws RecognitionException { + PrimitiveTypeContext _localctx = new PrimitiveTypeContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_primitiveType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(607); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsContext extends ParserRuleContext { + public List typeArgument() { + return getRuleContexts(TypeArgumentContext.class); + } + public TypeArgumentContext typeArgument(int i) { + return getRuleContext(TypeArgumentContext.class,i); + } + public TypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitTypeArguments(this); + } + } + + public final TypeArgumentsContext typeArguments() throws RecognitionException { + TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_typeArguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(609); + match(LT); + setState(610); + typeArgument(); + setState(615); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(611); + match(COMMA); + setState(612); + typeArgument(); + } + } + setState(617); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(618); + match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public TypeArgumentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgument; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterTypeArgument(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitTypeArgument(this); + } + } + + public final TypeArgumentContext typeArgument() throws RecognitionException { + TypeArgumentContext _localctx = new TypeArgumentContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_typeArgument); + int _la; + try { + setState(626); + _errHandler.sync(this); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(620); + typeType(); + } + break; + case QUESTION: + enterOuterAlt(_localctx, 2); + { + setState(621); + match(QUESTION); + setState(624); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==EXTENDS || _la==SUPER) { + { + setState(622); + _la = _input.LA(1); + if ( !(_la==EXTENDS || _la==SUPER) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(623); + typeType(); + } + } + + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class QualifiedNameListContext extends ParserRuleContext { + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public QualifiedNameListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualifiedNameList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterQualifiedNameList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitQualifiedNameList(this); + } + } + + public final QualifiedNameListContext qualifiedNameList() throws RecognitionException { + QualifiedNameListContext _localctx = new QualifiedNameListContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_qualifiedNameList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(628); + qualifiedName(); + setState(633); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(629); + match(COMMA); + setState(630); + qualifiedName(); + } + } + setState(635); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParametersContext extends ParserRuleContext { + public FormalParameterListContext formalParameterList() { + return getRuleContext(FormalParameterListContext.class,0); + } + public FormalParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameters; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterFormalParameters(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitFormalParameters(this); + } + } + + public final FormalParametersContext formalParameters() throws RecognitionException { + FormalParametersContext _localctx = new FormalParametersContext(_ctx, getState()); + enterRule(_localctx, 88, RULE_formalParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(636); + match(LPAREN); + setState(638); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << SHORT))) != 0) || _la==Identifier || _la==AT) { + { + setState(637); + formalParameterList(); + } + } + + setState(640); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterListContext extends ParserRuleContext { + public List formalParameter() { + return getRuleContexts(FormalParameterContext.class); + } + public FormalParameterContext formalParameter(int i) { + return getRuleContext(FormalParameterContext.class,i); + } + public LastFormalParameterContext lastFormalParameter() { + return getRuleContext(LastFormalParameterContext.class,0); + } + public FormalParameterListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameterList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterFormalParameterList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitFormalParameterList(this); + } + } + + public final FormalParameterListContext formalParameterList() throws RecognitionException { + FormalParameterListContext _localctx = new FormalParameterListContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_formalParameterList); + int _la; + try { + int _alt; + setState(655); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(642); + formalParameter(); + setState(647); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,69,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(643); + match(COMMA); + setState(644); + formalParameter(); + } + } + } + setState(649); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,69,_ctx); + } + setState(652); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(650); + match(COMMA); + setState(651); + lastFormalParameter(); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(654); + lastFormalParameter(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FormalParameterContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public FormalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_formalParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterFormalParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitFormalParameter(this); + } + } + + public final FormalParameterContext formalParameter() throws RecognitionException { + FormalParameterContext _localctx = new FormalParameterContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_formalParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(660); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(657); + variableModifier(); + } + } + setState(662); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(663); + typeType(); + setState(664); + variableDeclaratorId(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LastFormalParameterContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public LastFormalParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_lastFormalParameter; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterLastFormalParameter(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitLastFormalParameter(this); + } + } + + public final LastFormalParameterContext lastFormalParameter() throws RecognitionException { + LastFormalParameterContext _localctx = new LastFormalParameterContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_lastFormalParameter); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(669); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(666); + variableModifier(); + } + } + setState(671); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(672); + typeType(); + setState(673); + match(ELLIPSIS); + setState(674); + variableDeclaratorId(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public MethodBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterMethodBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitMethodBody(this); + } + } + + public final MethodBodyContext methodBody() throws RecognitionException { + MethodBodyContext _localctx = new MethodBodyContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_methodBody); + try { + enterOuterAlt(_localctx, 1); + { + setState(676); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstructorBodyContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public ConstructorBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constructorBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterConstructorBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitConstructorBody(this); + } + } + + public final ConstructorBodyContext constructorBody() throws RecognitionException { + ConstructorBodyContext _localctx = new ConstructorBodyContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_constructorBody); + try { + enterOuterAlt(_localctx, 1); + { + setState(678); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class QualifiedNameContext extends ParserRuleContext { + public List Identifier() { return getTokens(JavaParser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(JavaParser.Identifier, i); + } + public QualifiedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_qualifiedName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterQualifiedName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitQualifiedName(this); + } + } + + public final QualifiedNameContext qualifiedName() throws RecognitionException { + QualifiedNameContext _localctx = new QualifiedNameContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_qualifiedName); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(680); + match(Identifier); + setState(685); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,74,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(681); + match(DOT); + setState(682); + match(Identifier); + } + } + } + setState(687); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,74,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LiteralContext extends ParserRuleContext { + public TerminalNode IntegerLiteral() { return getToken(JavaParser.IntegerLiteral, 0); } + public TerminalNode FloatingPointLiteral() { return getToken(JavaParser.FloatingPointLiteral, 0); } + public TerminalNode CharacterLiteral() { return getToken(JavaParser.CharacterLiteral, 0); } + public TerminalNode StringLiteral() { return getToken(JavaParser.StringLiteral, 0); } + public TerminalNode BooleanLiteral() { return getToken(JavaParser.BooleanLiteral, 0); } + public LiteralContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_literal; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterLiteral(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitLiteral(this); + } + } + + public final LiteralContext literal() throws RecognitionException { + LiteralContext _localctx = new LiteralContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_literal); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(688); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationContext extends ParserRuleContext { + public AnnotationNameContext annotationName() { + return getRuleContext(AnnotationNameContext.class,0); + } + public ElementValuePairsContext elementValuePairs() { + return getRuleContext(ElementValuePairsContext.class,0); + } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public AnnotationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotation(this); + } + } + + public final AnnotationContext annotation() throws RecognitionException { + AnnotationContext _localctx = new AnnotationContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_annotation); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(690); + match(AT); + setState(691); + annotationName(); + setState(698); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LPAREN) { + { + setState(692); + match(LPAREN); + setState(695); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) { + case 1: + { + setState(693); + elementValuePairs(); + } + break; + case 2: + { + setState(694); + elementValue(); + } + break; + } + setState(697); + match(RPAREN); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationNameContext extends ParserRuleContext { + public QualifiedNameContext qualifiedName() { + return getRuleContext(QualifiedNameContext.class,0); + } + public AnnotationNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotationName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotationName(this); + } + } + + public final AnnotationNameContext annotationName() throws RecognitionException { + AnnotationNameContext _localctx = new AnnotationNameContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_annotationName); + try { + enterOuterAlt(_localctx, 1); + { + setState(700); + qualifiedName(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValuePairsContext extends ParserRuleContext { + public List elementValuePair() { + return getRuleContexts(ElementValuePairContext.class); + } + public ElementValuePairContext elementValuePair(int i) { + return getRuleContext(ElementValuePairContext.class,i); + } + public ElementValuePairsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValuePairs; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterElementValuePairs(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitElementValuePairs(this); + } + } + + public final ElementValuePairsContext elementValuePairs() throws RecognitionException { + ElementValuePairsContext _localctx = new ElementValuePairsContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_elementValuePairs); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(702); + elementValuePair(); + setState(707); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(703); + match(COMMA); + setState(704); + elementValuePair(); + } + } + setState(709); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValuePairContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public ElementValuePairContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValuePair; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterElementValuePair(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitElementValuePair(this); + } + } + + public final ElementValuePairContext elementValuePair() throws RecognitionException { + ElementValuePairContext _localctx = new ElementValuePairContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_elementValuePair); + try { + enterOuterAlt(_localctx, 1); + { + setState(710); + match(Identifier); + setState(711); + match(ASSIGN); + setState(712); + elementValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValueContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public AnnotationContext annotation() { + return getRuleContext(AnnotationContext.class,0); + } + public ElementValueArrayInitializerContext elementValueArrayInitializer() { + return getRuleContext(ElementValueArrayInitializerContext.class,0); + } + public ElementValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterElementValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitElementValue(this); + } + } + + public final ElementValueContext elementValue() throws RecognitionException { + ElementValueContext _localctx = new ElementValueContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_elementValue); + try { + setState(717); + _errHandler.sync(this); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(714); + expression(0); + } + break; + case AT: + enterOuterAlt(_localctx, 2); + { + setState(715); + annotation(); + } + break; + case LBRACE: + enterOuterAlt(_localctx, 3); + { + setState(716); + elementValueArrayInitializer(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ElementValueArrayInitializerContext extends ParserRuleContext { + public List elementValue() { + return getRuleContexts(ElementValueContext.class); + } + public ElementValueContext elementValue(int i) { + return getRuleContext(ElementValueContext.class,i); + } + public ElementValueArrayInitializerContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_elementValueArrayInitializer; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterElementValueArrayInitializer(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitElementValueArrayInitializer(this); + } + } + + public final ElementValueArrayInitializerContext elementValueArrayInitializer() throws RecognitionException { + ElementValueArrayInitializerContext _localctx = new ElementValueArrayInitializerContext(_ctx, getState()); + enterRule(_localctx, 114, RULE_elementValueArrayInitializer); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(719); + match(LBRACE); + setState(728); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + setState(720); + elementValue(); + setState(725); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(721); + match(COMMA); + setState(722); + elementValue(); + } + } + } + setState(727); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,79,_ctx); + } + } + } + + setState(731); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(730); + match(COMMA); + } + } + + setState(733); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeDeclarationContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public AnnotationTypeBodyContext annotationTypeBody() { + return getRuleContext(AnnotationTypeBodyContext.class,0); + } + public AnnotationTypeDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotationTypeDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotationTypeDeclaration(this); + } + } + + public final AnnotationTypeDeclarationContext annotationTypeDeclaration() throws RecognitionException { + AnnotationTypeDeclarationContext _localctx = new AnnotationTypeDeclarationContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_annotationTypeDeclaration); + try { + enterOuterAlt(_localctx, 1); + { + setState(735); + match(AT); + setState(736); + match(INTERFACE); + setState(737); + match(Identifier); + setState(738); + annotationTypeBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeBodyContext extends ParserRuleContext { + public List annotationTypeElementDeclaration() { + return getRuleContexts(AnnotationTypeElementDeclarationContext.class); + } + public AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration(int i) { + return getRuleContext(AnnotationTypeElementDeclarationContext.class,i); + } + public AnnotationTypeBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeBody; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotationTypeBody(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotationTypeBody(this); + } + } + + public final AnnotationTypeBodyContext annotationTypeBody() throws RecognitionException { + AnnotationTypeBodyContext _localctx = new AnnotationTypeBodyContext(_ctx, getState()); + enterRule(_localctx, 118, RULE_annotationTypeBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(740); + match(LBRACE); + setState(744); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NATIVE) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SYNCHRONIZED) | (1L << TRANSIENT) | (1L << VOLATILE) | (1L << SEMI))) != 0) || _la==Identifier || _la==AT) { + { + { + setState(741); + annotationTypeElementDeclaration(); + } + } + setState(746); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(747); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeElementDeclarationContext extends ParserRuleContext { + public AnnotationTypeElementRestContext annotationTypeElementRest() { + return getRuleContext(AnnotationTypeElementRestContext.class,0); + } + public List modifier() { + return getRuleContexts(ModifierContext.class); + } + public ModifierContext modifier(int i) { + return getRuleContext(ModifierContext.class,i); + } + public AnnotationTypeElementDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeElementDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotationTypeElementDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotationTypeElementDeclaration(this); + } + } + + public final AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration() throws RecognitionException { + AnnotationTypeElementDeclarationContext _localctx = new AnnotationTypeElementDeclarationContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_annotationTypeElementDeclaration); + try { + int _alt; + setState(757); + _errHandler.sync(this); + switch (_input.LA(1)) { + case ABSTRACT: + case BOOLEAN: + case BYTE: + case CHAR: + case CLASS: + case DOUBLE: + case ENUM: + case FINAL: + case FLOAT: + case INT: + case INTERFACE: + case LONG: + case NATIVE: + case PRIVATE: + case PROTECTED: + case PUBLIC: + case SHORT: + case STATIC: + case STRICTFP: + case SYNCHRONIZED: + case TRANSIENT: + case VOLATILE: + case Identifier: + case AT: + enterOuterAlt(_localctx, 1); + { + setState(752); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,83,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(749); + modifier(); + } + } + } + setState(754); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,83,_ctx); + } + setState(755); + annotationTypeElementRest(); + } + break; + case SEMI: + enterOuterAlt(_localctx, 2); + { + setState(756); + match(SEMI); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationTypeElementRestContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() { + return getRuleContext(AnnotationMethodOrConstantRestContext.class,0); + } + public ClassDeclarationContext classDeclaration() { + return getRuleContext(ClassDeclarationContext.class,0); + } + public InterfaceDeclarationContext interfaceDeclaration() { + return getRuleContext(InterfaceDeclarationContext.class,0); + } + public EnumDeclarationContext enumDeclaration() { + return getRuleContext(EnumDeclarationContext.class,0); + } + public AnnotationTypeDeclarationContext annotationTypeDeclaration() { + return getRuleContext(AnnotationTypeDeclarationContext.class,0); + } + public AnnotationTypeElementRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationTypeElementRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotationTypeElementRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotationTypeElementRest(this); + } + } + + public final AnnotationTypeElementRestContext annotationTypeElementRest() throws RecognitionException { + AnnotationTypeElementRestContext _localctx = new AnnotationTypeElementRestContext(_ctx, getState()); + enterRule(_localctx, 122, RULE_annotationTypeElementRest); + try { + setState(779); + _errHandler.sync(this); + switch (_input.LA(1)) { + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(759); + typeType(); + setState(760); + annotationMethodOrConstantRest(); + setState(761); + match(SEMI); + } + break; + case CLASS: + enterOuterAlt(_localctx, 2); + { + setState(763); + classDeclaration(); + setState(765); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,85,_ctx) ) { + case 1: + { + setState(764); + match(SEMI); + } + break; + } + } + break; + case INTERFACE: + enterOuterAlt(_localctx, 3); + { + setState(767); + interfaceDeclaration(); + setState(769); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) { + case 1: + { + setState(768); + match(SEMI); + } + break; + } + } + break; + case ENUM: + enterOuterAlt(_localctx, 4); + { + setState(771); + enumDeclaration(); + setState(773); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,87,_ctx) ) { + case 1: + { + setState(772); + match(SEMI); + } + break; + } + } + break; + case AT: + enterOuterAlt(_localctx, 5); + { + setState(775); + annotationTypeDeclaration(); + setState(777); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) { + case 1: + { + setState(776); + match(SEMI); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationMethodOrConstantRestContext extends ParserRuleContext { + public AnnotationMethodRestContext annotationMethodRest() { + return getRuleContext(AnnotationMethodRestContext.class,0); + } + public AnnotationConstantRestContext annotationConstantRest() { + return getRuleContext(AnnotationConstantRestContext.class,0); + } + public AnnotationMethodOrConstantRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationMethodOrConstantRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotationMethodOrConstantRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotationMethodOrConstantRest(this); + } + } + + public final AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() throws RecognitionException { + AnnotationMethodOrConstantRestContext _localctx = new AnnotationMethodOrConstantRestContext(_ctx, getState()); + enterRule(_localctx, 124, RULE_annotationMethodOrConstantRest); + try { + setState(783); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,90,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(781); + annotationMethodRest(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(782); + annotationConstantRest(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationMethodRestContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public DefaultValueContext defaultValue() { + return getRuleContext(DefaultValueContext.class,0); + } + public AnnotationMethodRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationMethodRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotationMethodRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotationMethodRest(this); + } + } + + public final AnnotationMethodRestContext annotationMethodRest() throws RecognitionException { + AnnotationMethodRestContext _localctx = new AnnotationMethodRestContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_annotationMethodRest); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(785); + match(Identifier); + setState(786); + match(LPAREN); + setState(787); + match(RPAREN); + setState(789); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==DEFAULT) { + { + setState(788); + defaultValue(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AnnotationConstantRestContext extends ParserRuleContext { + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public AnnotationConstantRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_annotationConstantRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterAnnotationConstantRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitAnnotationConstantRest(this); + } + } + + public final AnnotationConstantRestContext annotationConstantRest() throws RecognitionException { + AnnotationConstantRestContext _localctx = new AnnotationConstantRestContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_annotationConstantRest); + try { + enterOuterAlt(_localctx, 1); + { + setState(791); + variableDeclarators(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DefaultValueContext extends ParserRuleContext { + public ElementValueContext elementValue() { + return getRuleContext(ElementValueContext.class,0); + } + public DefaultValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_defaultValue; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterDefaultValue(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitDefaultValue(this); + } + } + + public final DefaultValueContext defaultValue() throws RecognitionException { + DefaultValueContext _localctx = new DefaultValueContext(_ctx, getState()); + enterRule(_localctx, 130, RULE_defaultValue); + try { + enterOuterAlt(_localctx, 1); + { + setState(793); + match(DEFAULT); + setState(794); + elementValue(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockContext extends ParserRuleContext { + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public BlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_block; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitBlock(this); + } + } + + public final BlockContext block() throws RecognitionException { + BlockContext _localctx = new BlockContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_block); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(796); + match(LBRACE); + setState(800); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + { + setState(797); + blockStatement(); + } + } + setState(802); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(803); + match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BlockStatementContext extends ParserRuleContext { + public LocalVariableDeclarationStatementContext localVariableDeclarationStatement() { + return getRuleContext(LocalVariableDeclarationStatementContext.class,0); + } + public StatementContext statement() { + return getRuleContext(StatementContext.class,0); + } + public TypeDeclarationContext typeDeclaration() { + return getRuleContext(TypeDeclarationContext.class,0); + } + public BlockStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_blockStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterBlockStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitBlockStatement(this); + } + } + + public final BlockStatementContext blockStatement() throws RecognitionException { + BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState()); + enterRule(_localctx, 134, RULE_blockStatement); + try { + setState(808); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(805); + localVariableDeclarationStatement(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(806); + statement(); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(807); + typeDeclaration(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LocalVariableDeclarationStatementContext extends ParserRuleContext { + public LocalVariableDeclarationContext localVariableDeclaration() { + return getRuleContext(LocalVariableDeclarationContext.class,0); + } + public LocalVariableDeclarationStatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_localVariableDeclarationStatement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterLocalVariableDeclarationStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitLocalVariableDeclarationStatement(this); + } + } + + public final LocalVariableDeclarationStatementContext localVariableDeclarationStatement() throws RecognitionException { + LocalVariableDeclarationStatementContext _localctx = new LocalVariableDeclarationStatementContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_localVariableDeclarationStatement); + try { + enterOuterAlt(_localctx, 1); + { + setState(810); + localVariableDeclaration(); + setState(811); + match(SEMI); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LocalVariableDeclarationContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public VariableDeclaratorsContext variableDeclarators() { + return getRuleContext(VariableDeclaratorsContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_localVariableDeclaration; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterLocalVariableDeclaration(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitLocalVariableDeclaration(this); + } + } + + public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException { + LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState()); + enterRule(_localctx, 138, RULE_localVariableDeclaration); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(816); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(813); + variableModifier(); + } + } + setState(818); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(819); + typeType(); + setState(820); + variableDeclarators(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public TerminalNode ASSERT() { return getToken(JavaParser.ASSERT, 0); } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public ParExpressionContext parExpression() { + return getRuleContext(ParExpressionContext.class,0); + } + public List statement() { + return getRuleContexts(StatementContext.class); + } + public StatementContext statement(int i) { + return getRuleContext(StatementContext.class,i); + } + public ForControlContext forControl() { + return getRuleContext(ForControlContext.class,0); + } + public FinallyBlockContext finallyBlock() { + return getRuleContext(FinallyBlockContext.class,0); + } + public List catchClause() { + return getRuleContexts(CatchClauseContext.class); + } + public CatchClauseContext catchClause(int i) { + return getRuleContext(CatchClauseContext.class,i); + } + public ResourceSpecificationContext resourceSpecification() { + return getRuleContext(ResourceSpecificationContext.class,0); + } + public List switchBlockStatementGroup() { + return getRuleContexts(SwitchBlockStatementGroupContext.class); + } + public SwitchBlockStatementGroupContext switchBlockStatementGroup(int i) { + return getRuleContext(SwitchBlockStatementGroupContext.class,i); + } + public List switchLabel() { + return getRuleContexts(SwitchLabelContext.class); + } + public SwitchLabelContext switchLabel(int i) { + return getRuleContext(SwitchLabelContext.class,i); + } + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public StatementExpressionContext statementExpression() { + return getRuleContext(StatementExpressionContext.class,0); + } + public StatementContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterStatement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitStatement(this); + } + } + + public final StatementContext statement() throws RecognitionException { + StatementContext _localctx = new StatementContext(_ctx, getState()); + enterRule(_localctx, 140, RULE_statement); + int _la; + try { + int _alt; + setState(926); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,107,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(822); + block(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(823); + match(ASSERT); + setState(824); + expression(0); + setState(827); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COLON) { + { + setState(825); + match(COLON); + setState(826); + expression(0); + } + } + + setState(829); + match(SEMI); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(831); + match(IF); + setState(832); + parExpression(); + setState(833); + statement(); + setState(836); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,96,_ctx) ) { + case 1: + { + setState(834); + match(ELSE); + setState(835); + statement(); + } + break; + } + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(838); + match(FOR); + setState(839); + match(LPAREN); + setState(840); + forControl(); + setState(841); + match(RPAREN); + setState(842); + statement(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(844); + match(WHILE); + setState(845); + parExpression(); + setState(846); + statement(); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(848); + match(DO); + setState(849); + statement(); + setState(850); + match(WHILE); + setState(851); + parExpression(); + setState(852); + match(SEMI); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(854); + match(TRY); + setState(855); + block(); + setState(865); + _errHandler.sync(this); + switch (_input.LA(1)) { + case CATCH: + { + setState(857); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(856); + catchClause(); + } + } + setState(859); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==CATCH ); + setState(862); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==FINALLY) { + { + setState(861); + finallyBlock(); + } + } + + } + break; + case FINALLY: + { + setState(864); + finallyBlock(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(867); + match(TRY); + setState(868); + resourceSpecification(); + setState(869); + block(); + setState(873); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CATCH) { + { + { + setState(870); + catchClause(); + } + } + setState(875); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(877); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==FINALLY) { + { + setState(876); + finallyBlock(); + } + } + + } + break; + case 9: + enterOuterAlt(_localctx, 9); + { + setState(879); + match(SWITCH); + setState(880); + parExpression(); + setState(881); + match(LBRACE); + setState(885); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(882); + switchBlockStatementGroup(); + } + } + } + setState(887); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,102,_ctx); + } + setState(891); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==CASE || _la==DEFAULT) { + { + { + setState(888); + switchLabel(); + } + } + setState(893); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(894); + match(RBRACE); + } + break; + case 10: + enterOuterAlt(_localctx, 10); + { + setState(896); + match(SYNCHRONIZED); + setState(897); + parExpression(); + setState(898); + block(); + } + break; + case 11: + enterOuterAlt(_localctx, 11); + { + setState(900); + match(RETURN); + setState(902); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(901); + expression(0); + } + } + + setState(904); + match(SEMI); + } + break; + case 12: + enterOuterAlt(_localctx, 12); + { + setState(905); + match(THROW); + setState(906); + expression(0); + setState(907); + match(SEMI); + } + break; + case 13: + enterOuterAlt(_localctx, 13); + { + setState(909); + match(BREAK); + setState(911); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(910); + match(Identifier); + } + } + + setState(913); + match(SEMI); + } + break; + case 14: + enterOuterAlt(_localctx, 14); + { + setState(914); + match(CONTINUE); + setState(916); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==Identifier) { + { + setState(915); + match(Identifier); + } + } + + setState(918); + match(SEMI); + } + break; + case 15: + enterOuterAlt(_localctx, 15); + { + setState(919); + match(SEMI); + } + break; + case 16: + enterOuterAlt(_localctx, 16); + { + setState(920); + statementExpression(); + setState(921); + match(SEMI); + } + break; + case 17: + enterOuterAlt(_localctx, 17); + { + setState(923); + match(Identifier); + setState(924); + match(COLON); + setState(925); + statement(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchClauseContext extends ParserRuleContext { + public CatchTypeContext catchType() { + return getRuleContext(CatchTypeContext.class,0); + } + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public CatchClauseContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchClause; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterCatchClause(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitCatchClause(this); + } + } + + public final CatchClauseContext catchClause() throws RecognitionException { + CatchClauseContext _localctx = new CatchClauseContext(_ctx, getState()); + enterRule(_localctx, 142, RULE_catchClause); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(928); + match(CATCH); + setState(929); + match(LPAREN); + setState(933); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(930); + variableModifier(); + } + } + setState(935); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(936); + catchType(); + setState(937); + match(Identifier); + setState(938); + match(RPAREN); + setState(939); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CatchTypeContext extends ParserRuleContext { + public List qualifiedName() { + return getRuleContexts(QualifiedNameContext.class); + } + public QualifiedNameContext qualifiedName(int i) { + return getRuleContext(QualifiedNameContext.class,i); + } + public CatchTypeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_catchType; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterCatchType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitCatchType(this); + } + } + + public final CatchTypeContext catchType() throws RecognitionException { + CatchTypeContext _localctx = new CatchTypeContext(_ctx, getState()); + enterRule(_localctx, 144, RULE_catchType); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(941); + qualifiedName(); + setState(946); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==BITOR) { + { + { + setState(942); + match(BITOR); + setState(943); + qualifiedName(); + } + } + setState(948); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FinallyBlockContext extends ParserRuleContext { + public BlockContext block() { + return getRuleContext(BlockContext.class,0); + } + public FinallyBlockContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_finallyBlock; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterFinallyBlock(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitFinallyBlock(this); + } + } + + public final FinallyBlockContext finallyBlock() throws RecognitionException { + FinallyBlockContext _localctx = new FinallyBlockContext(_ctx, getState()); + enterRule(_localctx, 146, RULE_finallyBlock); + try { + enterOuterAlt(_localctx, 1); + { + setState(949); + match(FINALLY); + setState(950); + block(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourceSpecificationContext extends ParserRuleContext { + public ResourcesContext resources() { + return getRuleContext(ResourcesContext.class,0); + } + public ResourceSpecificationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resourceSpecification; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterResourceSpecification(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitResourceSpecification(this); + } + } + + public final ResourceSpecificationContext resourceSpecification() throws RecognitionException { + ResourceSpecificationContext _localctx = new ResourceSpecificationContext(_ctx, getState()); + enterRule(_localctx, 148, RULE_resourceSpecification); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(952); + match(LPAREN); + setState(953); + resources(); + setState(955); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==SEMI) { + { + setState(954); + match(SEMI); + } + } + + setState(957); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourcesContext extends ParserRuleContext { + public List resource() { + return getRuleContexts(ResourceContext.class); + } + public ResourceContext resource(int i) { + return getRuleContext(ResourceContext.class,i); + } + public ResourcesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resources; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterResources(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitResources(this); + } + } + + public final ResourcesContext resources() throws RecognitionException { + ResourcesContext _localctx = new ResourcesContext(_ctx, getState()); + enterRule(_localctx, 150, RULE_resources); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(959); + resource(); + setState(964); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,111,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(960); + match(SEMI); + setState(961); + resource(); + } + } + } + setState(966); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,111,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ResourceContext extends ParserRuleContext { + public ClassOrInterfaceTypeContext classOrInterfaceType() { + return getRuleContext(ClassOrInterfaceTypeContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public ResourceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resource; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterResource(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitResource(this); + } + } + + public final ResourceContext resource() throws RecognitionException { + ResourceContext _localctx = new ResourceContext(_ctx, getState()); + enterRule(_localctx, 152, RULE_resource); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(970); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(967); + variableModifier(); + } + } + setState(972); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(973); + classOrInterfaceType(); + setState(974); + variableDeclaratorId(); + setState(975); + match(ASSIGN); + setState(976); + expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchBlockStatementGroupContext extends ParserRuleContext { + public List switchLabel() { + return getRuleContexts(SwitchLabelContext.class); + } + public SwitchLabelContext switchLabel(int i) { + return getRuleContext(SwitchLabelContext.class,i); + } + public List blockStatement() { + return getRuleContexts(BlockStatementContext.class); + } + public BlockStatementContext blockStatement(int i) { + return getRuleContext(BlockStatementContext.class,i); + } + public SwitchBlockStatementGroupContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchBlockStatementGroup; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterSwitchBlockStatementGroup(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitSwitchBlockStatementGroup(this); + } + } + + public final SwitchBlockStatementGroupContext switchBlockStatementGroup() throws RecognitionException { + SwitchBlockStatementGroupContext _localctx = new SwitchBlockStatementGroupContext(_ctx, getState()); + enterRule(_localctx, 154, RULE_switchBlockStatementGroup); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(979); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(978); + switchLabel(); + } + } + setState(981); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( _la==CASE || _la==DEFAULT ); + setState(984); + _errHandler.sync(this); + _la = _input.LA(1); + do { + { + { + setState(983); + blockStatement(); + } + } + setState(986); + _errHandler.sync(this); + _la = _input.LA(1); + } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABSTRACT) | (1L << ASSERT) | (1L << BOOLEAN) | (1L << BREAK) | (1L << BYTE) | (1L << CHAR) | (1L << CLASS) | (1L << CONTINUE) | (1L << DO) | (1L << DOUBLE) | (1L << ENUM) | (1L << FINAL) | (1L << FLOAT) | (1L << FOR) | (1L << IF) | (1L << INT) | (1L << INTERFACE) | (1L << LONG) | (1L << NEW) | (1L << PRIVATE) | (1L << PROTECTED) | (1L << PUBLIC) | (1L << RETURN) | (1L << SHORT) | (1L << STATIC) | (1L << STRICTFP) | (1L << SUPER) | (1L << SWITCH) | (1L << SYNCHRONIZED) | (1L << THIS) | (1L << THROW) | (1L << TRY) | (1L << VOID) | (1L << WHILE) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN) | (1L << LBRACE) | (1L << SEMI))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0) ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SwitchLabelContext extends ParserRuleContext { + public ConstantExpressionContext constantExpression() { + return getRuleContext(ConstantExpressionContext.class,0); + } + public EnumConstantNameContext enumConstantName() { + return getRuleContext(EnumConstantNameContext.class,0); + } + public SwitchLabelContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_switchLabel; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterSwitchLabel(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitSwitchLabel(this); + } + } + + public final SwitchLabelContext switchLabel() throws RecognitionException { + SwitchLabelContext _localctx = new SwitchLabelContext(_ctx, getState()); + enterRule(_localctx, 156, RULE_switchLabel); + try { + setState(998); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,115,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(988); + match(CASE); + setState(989); + constantExpression(); + setState(990); + match(COLON); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(992); + match(CASE); + setState(993); + enumConstantName(); + setState(994); + match(COLON); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(996); + match(DEFAULT); + setState(997); + match(COLON); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForControlContext extends ParserRuleContext { + public EnhancedForControlContext enhancedForControl() { + return getRuleContext(EnhancedForControlContext.class,0); + } + public ForInitContext forInit() { + return getRuleContext(ForInitContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ForUpdateContext forUpdate() { + return getRuleContext(ForUpdateContext.class,0); + } + public ForControlContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forControl; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterForControl(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitForControl(this); + } + } + + public final ForControlContext forControl() throws RecognitionException { + ForControlContext _localctx = new ForControlContext(_ctx, getState()); + enterRule(_localctx, 158, RULE_forControl); + int _la; + try { + setState(1012); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,119,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1000); + enhancedForControl(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1002); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FINAL) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)) | (1L << (AT - 68)))) != 0)) { + { + setState(1001); + forInit(); + } + } + + setState(1004); + match(SEMI); + setState(1006); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1005); + expression(0); + } + } + + setState(1008); + match(SEMI); + setState(1010); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1009); + forUpdate(); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForInitContext extends ParserRuleContext { + public LocalVariableDeclarationContext localVariableDeclaration() { + return getRuleContext(LocalVariableDeclarationContext.class,0); + } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ForInitContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forInit; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterForInit(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitForInit(this); + } + } + + public final ForInitContext forInit() throws RecognitionException { + ForInitContext _localctx = new ForInitContext(_ctx, getState()); + enterRule(_localctx, 160, RULE_forInit); + try { + setState(1016); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1014); + localVariableDeclaration(); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1015); + expressionList(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnhancedForControlContext extends ParserRuleContext { + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public VariableDeclaratorIdContext variableDeclaratorId() { + return getRuleContext(VariableDeclaratorIdContext.class,0); + } + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public List variableModifier() { + return getRuleContexts(VariableModifierContext.class); + } + public VariableModifierContext variableModifier(int i) { + return getRuleContext(VariableModifierContext.class,i); + } + public EnhancedForControlContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enhancedForControl; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterEnhancedForControl(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitEnhancedForControl(this); + } + } + + public final EnhancedForControlContext enhancedForControl() throws RecognitionException { + EnhancedForControlContext _localctx = new EnhancedForControlContext(_ctx, getState()); + enterRule(_localctx, 162, RULE_enhancedForControl); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1021); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==FINAL || _la==AT) { + { + { + setState(1018); + variableModifier(); + } + } + setState(1023); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1024); + typeType(); + setState(1025); + variableDeclaratorId(); + setState(1026); + match(COLON); + setState(1027); + expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ForUpdateContext extends ParserRuleContext { + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ForUpdateContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_forUpdate; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterForUpdate(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitForUpdate(this); + } + } + + public final ForUpdateContext forUpdate() throws RecognitionException { + ForUpdateContext _localctx = new ForUpdateContext(_ctx, getState()); + enterRule(_localctx, 164, RULE_forUpdate); + try { + enterOuterAlt(_localctx, 1); + { + setState(1029); + expressionList(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ParExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterParExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitParExpression(this); + } + } + + public final ParExpressionContext parExpression() throws RecognitionException { + ParExpressionContext _localctx = new ParExpressionContext(_ctx, getState()); + enterRule(_localctx, 166, RULE_parExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1031); + match(LPAREN); + setState(1032); + expression(0); + setState(1033); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionListContext extends ParserRuleContext { + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public ExpressionListContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionList; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterExpressionList(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitExpressionList(this); + } + } + + public final ExpressionListContext expressionList() throws RecognitionException { + ExpressionListContext _localctx = new ExpressionListContext(_ctx, getState()); + enterRule(_localctx, 168, RULE_expressionList); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1035); + expression(0); + setState(1040); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==COMMA) { + { + { + setState(1036); + match(COMMA); + setState(1037); + expression(0); + } + } + setState(1042); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class StatementExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public StatementExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_statementExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterStatementExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitStatementExpression(this); + } + } + + public final StatementExpressionContext statementExpression() throws RecognitionException { + StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState()); + enterRule(_localctx, 170, RULE_statementExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1043); + expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantExpressionContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public ConstantExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantExpression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterConstantExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitConstantExpression(this); + } + } + + public final ConstantExpressionContext constantExpression() throws RecognitionException { + ConstantExpressionContext _localctx = new ConstantExpressionContext(_ctx, getState()); + enterRule(_localctx, 172, RULE_constantExpression); + try { + enterOuterAlt(_localctx, 1); + { + setState(1045); + expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpressionContext extends ParserRuleContext { + public PrimaryContext primary() { + return getRuleContext(PrimaryContext.class,0); + } + public CreatorContext creator() { + return getRuleContext(CreatorContext.class,0); + } + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public InnerCreatorContext innerCreator() { + return getRuleContext(InnerCreatorContext.class,0); + } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public SuperSuffixContext superSuffix() { + return getRuleContext(SuperSuffixContext.class,0); + } + public ExplicitGenericInvocationContext explicitGenericInvocation() { + return getRuleContext(ExplicitGenericInvocationContext.class,0); + } + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ExpressionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expression; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterExpression(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitExpression(this); + } + } + + public final ExpressionContext expression() throws RecognitionException { + return expression(0); + } + + private ExpressionContext expression(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); + ExpressionContext _prevctx = _localctx; + int _startState = 174; + enterRecursionRule(_localctx, 174, RULE_expression, _p); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1060); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,123,_ctx) ) { + case 1: + { + setState(1048); + primary(); + } + break; + case 2: + { + setState(1049); + match(NEW); + setState(1050); + creator(); + } + break; + case 3: + { + setState(1051); + match(LPAREN); + setState(1052); + typeType(); + setState(1053); + match(RPAREN); + setState(1054); + expression(17); + } + break; + case 4: + { + setState(1056); + _la = _input.LA(1); + if ( !(((((_la - 79)) & ~0x3f) == 0 && ((1L << (_la - 79)) & ((1L << (INC - 79)) | (1L << (DEC - 79)) | (1L << (ADD - 79)) | (1L << (SUB - 79)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1057); + expression(15); + } + break; + case 5: + { + setState(1058); + _la = _input.LA(1); + if ( !(_la==BANG || _la==TILDE) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1059); + expression(14); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(1147); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,128,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + setState(1145); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,127,_ctx) ) { + case 1: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1062); + if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); + setState(1063); + _la = _input.LA(1); + if ( !(((((_la - 83)) & ~0x3f) == 0 && ((1L << (_la - 83)) & ((1L << (MUL - 83)) | (1L << (DIV - 83)) | (1L << (MOD - 83)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1064); + expression(14); + } + break; + case 2: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1065); + if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); + setState(1066); + _la = _input.LA(1); + if ( !(_la==ADD || _la==SUB) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1067); + expression(13); + } + break; + case 3: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1068); + if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); + setState(1076); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,124,_ctx) ) { + case 1: + { + setState(1069); + match(LT); + setState(1070); + match(LT); + } + break; + case 2: + { + setState(1071); + match(GT); + setState(1072); + match(GT); + setState(1073); + match(GT); + } + break; + case 3: + { + setState(1074); + match(GT); + setState(1075); + match(GT); + } + break; + } + setState(1078); + expression(12); + } + break; + case 4: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1079); + if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); + setState(1080); + _la = _input.LA(1); + if ( !(((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (GT - 67)) | (1L << (LT - 67)) | (1L << (LE - 67)) | (1L << (GE - 67)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1081); + expression(11); + } + break; + case 5: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1082); + if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); + setState(1083); + _la = _input.LA(1); + if ( !(_la==EQUAL || _la==NOTEQUAL) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1084); + expression(9); + } + break; + case 6: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1085); + if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); + setState(1086); + match(BITAND); + setState(1087); + expression(8); + } + break; + case 7: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1088); + if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); + setState(1089); + match(CARET); + setState(1090); + expression(7); + } + break; + case 8: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1091); + if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); + setState(1092); + match(BITOR); + setState(1093); + expression(6); + } + break; + case 9: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1094); + if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); + setState(1095); + match(AND); + setState(1096); + expression(5); + } + break; + case 10: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1097); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(1098); + match(OR); + setState(1099); + expression(4); + } + break; + case 11: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1100); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(1101); + match(QUESTION); + setState(1102); + expression(0); + setState(1103); + match(COLON); + setState(1104); + expression(3); + } + break; + case 12: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1106); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(1107); + _la = _input.LA(1); + if ( !(((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (ASSIGN - 66)) | (1L << (ADD_ASSIGN - 66)) | (1L << (SUB_ASSIGN - 66)) | (1L << (MUL_ASSIGN - 66)) | (1L << (DIV_ASSIGN - 66)) | (1L << (AND_ASSIGN - 66)) | (1L << (OR_ASSIGN - 66)) | (1L << (XOR_ASSIGN - 66)) | (1L << (MOD_ASSIGN - 66)) | (1L << (LSHIFT_ASSIGN - 66)) | (1L << (RSHIFT_ASSIGN - 66)) | (1L << (URSHIFT_ASSIGN - 66)))) != 0)) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + setState(1108); + expression(1); + } + break; + case 13: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1109); + if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); + setState(1110); + match(DOT); + setState(1111); + match(Identifier); + } + break; + case 14: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1112); + if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); + setState(1113); + match(DOT); + setState(1114); + match(THIS); + } + break; + case 15: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1115); + if (!(precpred(_ctx, 23))) throw new FailedPredicateException(this, "precpred(_ctx, 23)"); + setState(1116); + match(DOT); + setState(1117); + match(NEW); + setState(1119); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1118); + nonWildcardTypeArguments(); + } + } + + setState(1121); + innerCreator(); + } + break; + case 16: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1122); + if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); + setState(1123); + match(DOT); + setState(1124); + match(SUPER); + setState(1125); + superSuffix(); + } + break; + case 17: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1126); + if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); + setState(1127); + match(DOT); + setState(1128); + explicitGenericInvocation(); + } + break; + case 18: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1129); + if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); + setState(1130); + match(LBRACK); + setState(1131); + expression(0); + setState(1132); + match(RBRACK); + } + break; + case 19: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1134); + if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); + setState(1135); + match(LPAREN); + setState(1137); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1136); + expressionList(); + } + } + + setState(1139); + match(RPAREN); + } + break; + case 20: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1140); + if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); + setState(1141); + _la = _input.LA(1); + if ( !(_la==INC || _la==DEC) ) { + _errHandler.recoverInline(this); + } + else { + if ( _input.LA(1)==Token.EOF ) matchedEOF = true; + _errHandler.reportMatch(this); + consume(); + } + } + break; + case 21: + { + _localctx = new ExpressionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_expression); + setState(1142); + if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); + setState(1143); + match(INSTANCEOF); + setState(1144); + typeType(); + } + break; + } + } + } + setState(1149); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,128,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class PrimaryContext extends ParserRuleContext { + public ExpressionContext expression() { + return getRuleContext(ExpressionContext.class,0); + } + public LiteralContext literal() { + return getRuleContext(LiteralContext.class,0); + } + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public TypeTypeContext typeType() { + return getRuleContext(TypeTypeContext.class,0); + } + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { + return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); + } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public PrimaryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_primary; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterPrimary(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitPrimary(this); + } + } + + public final PrimaryContext primary() throws RecognitionException { + PrimaryContext _localctx = new PrimaryContext(_ctx, getState()); + enterRule(_localctx, 176, RULE_primary); + try { + setState(1171); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,130,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1150); + match(LPAREN); + setState(1151); + expression(0); + setState(1152); + match(RPAREN); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1154); + match(THIS); + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(1155); + match(SUPER); + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(1156); + literal(); + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(1157); + match(Identifier); + } + break; + case 6: + enterOuterAlt(_localctx, 6); + { + setState(1158); + typeType(); + setState(1159); + match(DOT); + setState(1160); + match(CLASS); + } + break; + case 7: + enterOuterAlt(_localctx, 7); + { + setState(1162); + match(VOID); + setState(1163); + match(DOT); + setState(1164); + match(CLASS); + } + break; + case 8: + enterOuterAlt(_localctx, 8); + { + setState(1165); + nonWildcardTypeArguments(); + setState(1169); + _errHandler.sync(this); + switch (_input.LA(1)) { + case SUPER: + case Identifier: + { + setState(1166); + explicitGenericInvocationSuffix(); + } + break; + case THIS: + { + setState(1167); + match(THIS); + setState(1168); + arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CreatorContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public CreatedNameContext createdName() { + return getRuleContext(CreatedNameContext.class,0); + } + public ClassCreatorRestContext classCreatorRest() { + return getRuleContext(ClassCreatorRestContext.class,0); + } + public ArrayCreatorRestContext arrayCreatorRest() { + return getRuleContext(ArrayCreatorRestContext.class,0); + } + public CreatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_creator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterCreator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitCreator(this); + } + } + + public final CreatorContext creator() throws RecognitionException { + CreatorContext _localctx = new CreatorContext(_ctx, getState()); + enterRule(_localctx, 178, RULE_creator); + try { + setState(1182); + _errHandler.sync(this); + switch (_input.LA(1)) { + case LT: + enterOuterAlt(_localctx, 1); + { + setState(1173); + nonWildcardTypeArguments(); + setState(1174); + createdName(); + setState(1175); + classCreatorRest(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(1177); + createdName(); + setState(1180); + _errHandler.sync(this); + switch (_input.LA(1)) { + case LBRACK: + { + setState(1178); + arrayCreatorRest(); + } + break; + case LPAREN: + { + setState(1179); + classCreatorRest(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CreatedNameContext extends ParserRuleContext { + public List Identifier() { return getTokens(JavaParser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(JavaParser.Identifier, i); + } + public List typeArgumentsOrDiamond() { + return getRuleContexts(TypeArgumentsOrDiamondContext.class); + } + public TypeArgumentsOrDiamondContext typeArgumentsOrDiamond(int i) { + return getRuleContext(TypeArgumentsOrDiamondContext.class,i); + } + public PrimitiveTypeContext primitiveType() { + return getRuleContext(PrimitiveTypeContext.class,0); + } + public CreatedNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_createdName; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterCreatedName(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitCreatedName(this); + } + } + + public final CreatedNameContext createdName() throws RecognitionException { + CreatedNameContext _localctx = new CreatedNameContext(_ctx, getState()); + enterRule(_localctx, 180, RULE_createdName); + int _la; + try { + setState(1199); + _errHandler.sync(this); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(1184); + match(Identifier); + setState(1186); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1185); + typeArgumentsOrDiamond(); + } + } + + setState(1195); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==DOT) { + { + { + setState(1188); + match(DOT); + setState(1189); + match(Identifier); + setState(1191); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1190); + typeArgumentsOrDiamond(); + } + } + + } + } + setState(1197); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case SHORT: + enterOuterAlt(_localctx, 2); + { + setState(1198); + primitiveType(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class InnerCreatorContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public ClassCreatorRestContext classCreatorRest() { + return getRuleContext(ClassCreatorRestContext.class,0); + } + public NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() { + return getRuleContext(NonWildcardTypeArgumentsOrDiamondContext.class,0); + } + public InnerCreatorContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_innerCreator; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterInnerCreator(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitInnerCreator(this); + } + } + + public final InnerCreatorContext innerCreator() throws RecognitionException { + InnerCreatorContext _localctx = new InnerCreatorContext(_ctx, getState()); + enterRule(_localctx, 182, RULE_innerCreator); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1201); + match(Identifier); + setState(1203); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==LT) { + { + setState(1202); + nonWildcardTypeArgumentsOrDiamond(); + } + } + + setState(1205); + classCreatorRest(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArrayCreatorRestContext extends ParserRuleContext { + public ArrayInitializerContext arrayInitializer() { + return getRuleContext(ArrayInitializerContext.class,0); + } + public List expression() { + return getRuleContexts(ExpressionContext.class); + } + public ExpressionContext expression(int i) { + return getRuleContext(ExpressionContext.class,i); + } + public ArrayCreatorRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arrayCreatorRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterArrayCreatorRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitArrayCreatorRest(this); + } + } + + public final ArrayCreatorRestContext arrayCreatorRest() throws RecognitionException { + ArrayCreatorRestContext _localctx = new ArrayCreatorRestContext(_ctx, getState()); + enterRule(_localctx, 184, RULE_arrayCreatorRest); + int _la; + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(1207); + match(LBRACK); + setState(1235); + _errHandler.sync(this); + switch (_input.LA(1)) { + case RBRACK: + { + setState(1208); + match(RBRACK); + setState(1213); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==LBRACK) { + { + { + setState(1209); + match(LBRACK); + setState(1210); + match(RBRACK); + } + } + setState(1215); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(1216); + arrayInitializer(); + } + break; + case BOOLEAN: + case BYTE: + case CHAR: + case DOUBLE: + case FLOAT: + case INT: + case LONG: + case NEW: + case SHORT: + case SUPER: + case THIS: + case VOID: + case IntegerLiteral: + case FloatingPointLiteral: + case BooleanLiteral: + case CharacterLiteral: + case StringLiteral: + case NullLiteral: + case LPAREN: + case LT: + case BANG: + case TILDE: + case INC: + case DEC: + case ADD: + case SUB: + case Identifier: + { + setState(1217); + expression(0); + setState(1218); + match(RBRACK); + setState(1225); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1219); + match(LBRACK); + setState(1220); + expression(0); + setState(1221); + match(RBRACK); + } + } + } + setState(1227); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,139,_ctx); + } + setState(1232); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,140,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(1228); + match(LBRACK); + setState(1229); + match(RBRACK); + } + } + } + setState(1234); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,140,_ctx); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ClassCreatorRestContext extends ParserRuleContext { + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ClassBodyContext classBody() { + return getRuleContext(ClassBodyContext.class,0); + } + public ClassCreatorRestContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_classCreatorRest; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterClassCreatorRest(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitClassCreatorRest(this); + } + } + + public final ClassCreatorRestContext classCreatorRest() throws RecognitionException { + ClassCreatorRestContext _localctx = new ClassCreatorRestContext(_ctx, getState()); + enterRule(_localctx, 186, RULE_classCreatorRest); + try { + enterOuterAlt(_localctx, 1); + { + setState(1237); + arguments(); + setState(1239); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,142,_ctx) ) { + case 1: + { + setState(1238); + classBody(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitGenericInvocationContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() { + return getRuleContext(ExplicitGenericInvocationSuffixContext.class,0); + } + public ExplicitGenericInvocationContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitGenericInvocation; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterExplicitGenericInvocation(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitExplicitGenericInvocation(this); + } + } + + public final ExplicitGenericInvocationContext explicitGenericInvocation() throws RecognitionException { + ExplicitGenericInvocationContext _localctx = new ExplicitGenericInvocationContext(_ctx, getState()); + enterRule(_localctx, 188, RULE_explicitGenericInvocation); + try { + enterOuterAlt(_localctx, 1); + { + setState(1241); + nonWildcardTypeArguments(); + setState(1242); + explicitGenericInvocationSuffix(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NonWildcardTypeArgumentsContext extends ParserRuleContext { + public TypeListContext typeList() { + return getRuleContext(TypeListContext.class,0); + } + public NonWildcardTypeArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonWildcardTypeArguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterNonWildcardTypeArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitNonWildcardTypeArguments(this); + } + } + + public final NonWildcardTypeArgumentsContext nonWildcardTypeArguments() throws RecognitionException { + NonWildcardTypeArgumentsContext _localctx = new NonWildcardTypeArgumentsContext(_ctx, getState()); + enterRule(_localctx, 190, RULE_nonWildcardTypeArguments); + try { + enterOuterAlt(_localctx, 1); + { + setState(1244); + match(LT); + setState(1245); + typeList(); + setState(1246); + match(GT); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class TypeArgumentsOrDiamondContext extends ParserRuleContext { + public TypeArgumentsContext typeArguments() { + return getRuleContext(TypeArgumentsContext.class,0); + } + public TypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_typeArgumentsOrDiamond; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterTypeArgumentsOrDiamond(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitTypeArgumentsOrDiamond(this); + } + } + + public final TypeArgumentsOrDiamondContext typeArgumentsOrDiamond() throws RecognitionException { + TypeArgumentsOrDiamondContext _localctx = new TypeArgumentsOrDiamondContext(_ctx, getState()); + enterRule(_localctx, 192, RULE_typeArgumentsOrDiamond); + try { + setState(1251); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,143,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1248); + match(LT); + setState(1249); + match(GT); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1250); + typeArguments(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NonWildcardTypeArgumentsOrDiamondContext extends ParserRuleContext { + public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { + return getRuleContext(NonWildcardTypeArgumentsContext.class,0); + } + public NonWildcardTypeArgumentsOrDiamondContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nonWildcardTypeArgumentsOrDiamond; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterNonWildcardTypeArgumentsOrDiamond(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitNonWildcardTypeArgumentsOrDiamond(this); + } + } + + public final NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamond() throws RecognitionException { + NonWildcardTypeArgumentsOrDiamondContext _localctx = new NonWildcardTypeArgumentsOrDiamondContext(_ctx, getState()); + enterRule(_localctx, 194, RULE_nonWildcardTypeArgumentsOrDiamond); + try { + setState(1256); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,144,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(1253); + match(LT); + setState(1254); + match(GT); + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(1255); + nonWildcardTypeArguments(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SuperSuffixContext extends ParserRuleContext { + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public SuperSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_superSuffix; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterSuperSuffix(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitSuperSuffix(this); + } + } + + public final SuperSuffixContext superSuffix() throws RecognitionException { + SuperSuffixContext _localctx = new SuperSuffixContext(_ctx, getState()); + enterRule(_localctx, 196, RULE_superSuffix); + try { + setState(1264); + _errHandler.sync(this); + switch (_input.LA(1)) { + case LPAREN: + enterOuterAlt(_localctx, 1); + { + setState(1258); + arguments(); + } + break; + case DOT: + enterOuterAlt(_localctx, 2); + { + setState(1259); + match(DOT); + setState(1260); + match(Identifier); + setState(1262); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,145,_ctx) ) { + case 1: + { + setState(1261); + arguments(); + } + break; + } + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExplicitGenericInvocationSuffixContext extends ParserRuleContext { + public SuperSuffixContext superSuffix() { + return getRuleContext(SuperSuffixContext.class,0); + } + public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } + public ArgumentsContext arguments() { + return getRuleContext(ArgumentsContext.class,0); + } + public ExplicitGenericInvocationSuffixContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_explicitGenericInvocationSuffix; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterExplicitGenericInvocationSuffix(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitExplicitGenericInvocationSuffix(this); + } + } + + public final ExplicitGenericInvocationSuffixContext explicitGenericInvocationSuffix() throws RecognitionException { + ExplicitGenericInvocationSuffixContext _localctx = new ExplicitGenericInvocationSuffixContext(_ctx, getState()); + enterRule(_localctx, 198, RULE_explicitGenericInvocationSuffix); + try { + setState(1270); + _errHandler.sync(this); + switch (_input.LA(1)) { + case SUPER: + enterOuterAlt(_localctx, 1); + { + setState(1266); + match(SUPER); + setState(1267); + superSuffix(); + } + break; + case Identifier: + enterOuterAlt(_localctx, 2); + { + setState(1268); + match(Identifier); + setState(1269); + arguments(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ArgumentsContext extends ParserRuleContext { + public ExpressionListContext expressionList() { + return getRuleContext(ExpressionListContext.class,0); + } + public ArgumentsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_arguments; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).enterArguments(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof JavaListener ) ((JavaListener)listener).exitArguments(this); + } + } + + public final ArgumentsContext arguments() throws RecognitionException { + ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); + enterRule(_localctx, 200, RULE_arguments); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(1272); + match(LPAREN); + setState(1274); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLEAN) | (1L << BYTE) | (1L << CHAR) | (1L << DOUBLE) | (1L << FLOAT) | (1L << INT) | (1L << LONG) | (1L << NEW) | (1L << SHORT) | (1L << SUPER) | (1L << THIS) | (1L << VOID) | (1L << IntegerLiteral) | (1L << FloatingPointLiteral) | (1L << BooleanLiteral) | (1L << CharacterLiteral) | (1L << StringLiteral) | (1L << NullLiteral) | (1L << LPAREN))) != 0) || ((((_la - 68)) & ~0x3f) == 0 && ((1L << (_la - 68)) & ((1L << (LT - 68)) | (1L << (BANG - 68)) | (1L << (TILDE - 68)) | (1L << (INC - 68)) | (1L << (DEC - 68)) | (1L << (ADD - 68)) | (1L << (SUB - 68)) | (1L << (Identifier - 68)))) != 0)) { + { + setState(1273); + expressionList(); + } + } + + setState(1276); + match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 87: + return expression_sempred((ExpressionContext)_localctx, predIndex); + } + return true; + } + private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 13); + case 1: + return precpred(_ctx, 12); + case 2: + return precpred(_ctx, 11); + case 3: + return precpred(_ctx, 10); + case 4: + return precpred(_ctx, 8); + case 5: + return precpred(_ctx, 7); + case 6: + return precpred(_ctx, 6); + case 7: + return precpred(_ctx, 5); + case 8: + return precpred(_ctx, 4); + case 9: + return precpred(_ctx, 3); + case 10: + return precpred(_ctx, 2); + case 11: + return precpred(_ctx, 1); + case 12: + return precpred(_ctx, 25); + case 13: + return precpred(_ctx, 24); + case 14: + return precpred(_ctx, 23); + case 15: + return precpred(_ctx, 22); + case 16: + return precpred(_ctx, 21); + case 17: + return precpred(_ctx, 20); + case 18: + return precpred(_ctx, 19); + case 19: + return precpred(_ctx, 16); + case 20: + return precpred(_ctx, 9); + } + return true; + } + + public static final String _serializedATN = + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3k\u0501\4\2\t\2\4"+ + "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ + "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\3\2\5\2\u00ce\n\2\3\2\7\2\u00d1"+ + "\n\2\f\2\16\2\u00d4\13\2\3\2\7\2\u00d7\n\2\f\2\16\2\u00da\13\2\3\2\3\2"+ + "\3\3\7\3\u00df\n\3\f\3\16\3\u00e2\13\3\3\3\3\3\3\3\3\3\3\4\3\4\5\4\u00ea"+ + "\n\4\3\4\3\4\3\4\5\4\u00ef\n\4\3\4\3\4\3\5\7\5\u00f4\n\5\f\5\16\5\u00f7"+ + "\13\5\3\5\3\5\7\5\u00fb\n\5\f\5\16\5\u00fe\13\5\3\5\3\5\7\5\u0102\n\5"+ + "\f\5\16\5\u0105\13\5\3\5\3\5\7\5\u0109\n\5\f\5\16\5\u010c\13\5\3\5\3\5"+ + "\5\5\u0110\n\5\3\6\3\6\5\6\u0114\n\6\3\7\3\7\5\7\u0118\n\7\3\b\3\b\5\b"+ + "\u011c\n\b\3\t\3\t\3\t\5\t\u0121\n\t\3\t\3\t\5\t\u0125\n\t\3\t\3\t\5\t"+ + "\u0129\n\t\3\t\3\t\3\n\3\n\3\n\3\n\7\n\u0131\n\n\f\n\16\n\u0134\13\n\3"+ + "\n\3\n\3\13\3\13\3\13\5\13\u013b\n\13\3\f\3\f\3\f\7\f\u0140\n\f\f\f\16"+ + "\f\u0143\13\f\3\r\3\r\3\r\3\r\5\r\u0149\n\r\3\r\3\r\5\r\u014d\n\r\3\r"+ + "\5\r\u0150\n\r\3\r\5\r\u0153\n\r\3\r\3\r\3\16\3\16\3\16\7\16\u015a\n\16"+ + "\f\16\16\16\u015d\13\16\3\17\7\17\u0160\n\17\f\17\16\17\u0163\13\17\3"+ + "\17\3\17\5\17\u0167\n\17\3\17\5\17\u016a\n\17\3\20\3\20\7\20\u016e\n\20"+ + "\f\20\16\20\u0171\13\20\3\21\3\21\3\21\5\21\u0176\n\21\3\21\3\21\5\21"+ + "\u017a\n\21\3\21\3\21\3\22\3\22\3\22\7\22\u0181\n\22\f\22\16\22\u0184"+ + "\13\22\3\23\3\23\7\23\u0188\n\23\f\23\16\23\u018b\13\23\3\23\3\23\3\24"+ + "\3\24\7\24\u0191\n\24\f\24\16\24\u0194\13\24\3\24\3\24\3\25\3\25\5\25"+ + "\u019a\n\25\3\25\3\25\7\25\u019e\n\25\f\25\16\25\u01a1\13\25\3\25\5\25"+ + "\u01a4\n\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\5\26\u01af\n"+ + "\26\3\27\3\27\5\27\u01b3\n\27\3\27\3\27\3\27\3\27\7\27\u01b9\n\27\f\27"+ + "\16\27\u01bc\13\27\3\27\3\27\5\27\u01c0\n\27\3\27\3\27\5\27\u01c4\n\27"+ + "\3\30\3\30\3\30\3\31\3\31\3\31\3\31\5\31\u01cd\n\31\3\31\3\31\3\32\3\32"+ + "\3\32\3\33\3\33\3\33\3\33\3\34\7\34\u01d9\n\34\f\34\16\34\u01dc\13\34"+ + "\3\34\3\34\5\34\u01e0\n\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u01e9"+ + "\n\35\3\36\3\36\3\36\3\36\7\36\u01ef\n\36\f\36\16\36\u01f2\13\36\3\36"+ + "\3\36\3\37\3\37\3\37\7\37\u01f9\n\37\f\37\16\37\u01fc\13\37\3\37\3\37"+ + "\3\37\3 \3 \5 \u0203\n \3 \3 \3 \3 \7 \u0209\n \f \16 \u020c\13 \3 \3"+ + " \5 \u0210\n \3 \3 \3!\3!\3!\3\"\3\"\3\"\7\"\u021a\n\"\f\"\16\"\u021d"+ + "\13\"\3#\3#\3#\5#\u0222\n#\3$\3$\3$\7$\u0227\n$\f$\16$\u022a\13$\3%\3"+ + "%\5%\u022e\n%\3&\3&\3&\3&\7&\u0234\n&\f&\16&\u0237\13&\3&\5&\u023a\n&"+ + "\5&\u023c\n&\3&\3&\3\'\3\'\3(\3(\3(\7(\u0245\n(\f(\16(\u0248\13(\3(\3"+ + "(\3(\7(\u024d\n(\f(\16(\u0250\13(\5(\u0252\n(\3)\3)\5)\u0256\n)\3)\3)"+ + "\3)\5)\u025b\n)\7)\u025d\n)\f)\16)\u0260\13)\3*\3*\3+\3+\3+\3+\7+\u0268"+ + "\n+\f+\16+\u026b\13+\3+\3+\3,\3,\3,\3,\5,\u0273\n,\5,\u0275\n,\3-\3-\3"+ + "-\7-\u027a\n-\f-\16-\u027d\13-\3.\3.\5.\u0281\n.\3.\3.\3/\3/\3/\7/\u0288"+ + "\n/\f/\16/\u028b\13/\3/\3/\5/\u028f\n/\3/\5/\u0292\n/\3\60\7\60\u0295"+ + "\n\60\f\60\16\60\u0298\13\60\3\60\3\60\3\60\3\61\7\61\u029e\n\61\f\61"+ + "\16\61\u02a1\13\61\3\61\3\61\3\61\3\61\3\62\3\62\3\63\3\63\3\64\3\64\3"+ + "\64\7\64\u02ae\n\64\f\64\16\64\u02b1\13\64\3\65\3\65\3\66\3\66\3\66\3"+ + "\66\3\66\5\66\u02ba\n\66\3\66\5\66\u02bd\n\66\3\67\3\67\38\38\38\78\u02c4"+ + "\n8\f8\168\u02c7\138\39\39\39\39\3:\3:\3:\5:\u02d0\n:\3;\3;\3;\3;\7;\u02d6"+ + "\n;\f;\16;\u02d9\13;\5;\u02db\n;\3;\5;\u02de\n;\3;\3;\3<\3<\3<\3<\3<\3"+ + "=\3=\7=\u02e9\n=\f=\16=\u02ec\13=\3=\3=\3>\7>\u02f1\n>\f>\16>\u02f4\13"+ + ">\3>\3>\5>\u02f8\n>\3?\3?\3?\3?\3?\3?\5?\u0300\n?\3?\3?\5?\u0304\n?\3"+ + "?\3?\5?\u0308\n?\3?\3?\5?\u030c\n?\5?\u030e\n?\3@\3@\5@\u0312\n@\3A\3"+ + "A\3A\3A\5A\u0318\nA\3B\3B\3C\3C\3C\3D\3D\7D\u0321\nD\fD\16D\u0324\13D"+ + "\3D\3D\3E\3E\3E\5E\u032b\nE\3F\3F\3F\3G\7G\u0331\nG\fG\16G\u0334\13G\3"+ + "G\3G\3G\3H\3H\3H\3H\3H\5H\u033e\nH\3H\3H\3H\3H\3H\3H\3H\5H\u0347\nH\3"+ + "H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\3H\6H\u035c\nH\r"+ + "H\16H\u035d\3H\5H\u0361\nH\3H\5H\u0364\nH\3H\3H\3H\3H\7H\u036a\nH\fH\16"+ + "H\u036d\13H\3H\5H\u0370\nH\3H\3H\3H\3H\7H\u0376\nH\fH\16H\u0379\13H\3"+ + "H\7H\u037c\nH\fH\16H\u037f\13H\3H\3H\3H\3H\3H\3H\3H\3H\5H\u0389\nH\3H"+ + "\3H\3H\3H\3H\3H\3H\5H\u0392\nH\3H\3H\3H\5H\u0397\nH\3H\3H\3H\3H\3H\3H"+ + "\3H\3H\5H\u03a1\nH\3I\3I\3I\7I\u03a6\nI\fI\16I\u03a9\13I\3I\3I\3I\3I\3"+ + "I\3J\3J\3J\7J\u03b3\nJ\fJ\16J\u03b6\13J\3K\3K\3K\3L\3L\3L\5L\u03be\nL"+ + "\3L\3L\3M\3M\3M\7M\u03c5\nM\fM\16M\u03c8\13M\3N\7N\u03cb\nN\fN\16N\u03ce"+ + "\13N\3N\3N\3N\3N\3N\3O\6O\u03d6\nO\rO\16O\u03d7\3O\6O\u03db\nO\rO\16O"+ + "\u03dc\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\5P\u03e9\nP\3Q\3Q\5Q\u03ed\nQ\3Q"+ + "\3Q\5Q\u03f1\nQ\3Q\3Q\5Q\u03f5\nQ\5Q\u03f7\nQ\3R\3R\5R\u03fb\nR\3S\7S"+ + "\u03fe\nS\fS\16S\u0401\13S\3S\3S\3S\3S\3S\3T\3T\3U\3U\3U\3U\3V\3V\3V\7"+ + "V\u0411\nV\fV\16V\u0414\13V\3W\3W\3X\3X\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\5Y\u0427\nY\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0437"+ + "\nY\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0462\nY"+ + "\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0474\nY\3Y\3Y\3Y"+ + "\3Y\3Y\3Y\7Y\u047c\nY\fY\16Y\u047f\13Y\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3"+ + "Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\3Z\5Z\u0494\nZ\5Z\u0496\nZ\3[\3[\3[\3[\3[\3[\3"+ + "[\5[\u049f\n[\5[\u04a1\n[\3\\\3\\\5\\\u04a5\n\\\3\\\3\\\3\\\5\\\u04aa"+ + "\n\\\7\\\u04ac\n\\\f\\\16\\\u04af\13\\\3\\\5\\\u04b2\n\\\3]\3]\5]\u04b6"+ + "\n]\3]\3]\3^\3^\3^\3^\7^\u04be\n^\f^\16^\u04c1\13^\3^\3^\3^\3^\3^\3^\3"+ + "^\7^\u04ca\n^\f^\16^\u04cd\13^\3^\3^\7^\u04d1\n^\f^\16^\u04d4\13^\5^\u04d6"+ + "\n^\3_\3_\5_\u04da\n_\3`\3`\3`\3a\3a\3a\3a\3b\3b\3b\5b\u04e6\nb\3c\3c"+ + "\3c\5c\u04eb\nc\3d\3d\3d\3d\5d\u04f1\nd\5d\u04f3\nd\3e\3e\3e\3e\5e\u04f9"+ + "\ne\3f\3f\5f\u04fd\nf\3f\3f\3f\2\3\u00b0g\2\4\6\b\n\f\16\20\22\24\26\30"+ + "\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080"+ + "\u0082\u0084\u0086\u0088\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098"+ + "\u009a\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0"+ + "\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8"+ + "\u00ca\2\17\6\2 ,,\60\60\63\63\6\2\3\3\24\24#%()\n\2\5\5\7\7\n\n\20\20"+ + "\26\26\35\35\37\37\'\'\4\2\23\23**\3\2\65:\3\2QT\3\2GH\4\2UVZZ\3\2ST\4"+ + "\2EFLM\4\2KKNN\4\2DD[e\3\2QR\2\u0573\2\u00cd\3\2\2\2\4\u00e0\3\2\2\2\6"+ + "\u00e7\3\2\2\2\b\u010f\3\2\2\2\n\u0113\3\2\2\2\f\u0117\3\2\2\2\16\u011b"+ + "\3\2\2\2\20\u011d\3\2\2\2\22\u012c\3\2\2\2\24\u0137\3\2\2\2\26\u013c\3"+ + "\2\2\2\30\u0144\3\2\2\2\32\u0156\3\2\2\2\34\u0161\3\2\2\2\36\u016b\3\2"+ + "\2\2 \u0172\3\2\2\2\"\u017d\3\2\2\2$\u0185\3\2\2\2&\u018e\3\2\2\2(\u01a3"+ + "\3\2\2\2*\u01ae\3\2\2\2,\u01b2\3\2\2\2.\u01c5\3\2\2\2\60\u01c8\3\2\2\2"+ + "\62\u01d0\3\2\2\2\64\u01d3\3\2\2\2\66\u01df\3\2\2\28\u01e8\3\2\2\2:\u01ea"+ + "\3\2\2\2<\u01f5\3\2\2\2>\u0202\3\2\2\2@\u0213\3\2\2\2B\u0216\3\2\2\2D"+ + "\u021e\3\2\2\2F\u0223\3\2\2\2H\u022d\3\2\2\2J\u022f\3\2\2\2L\u023f\3\2"+ + "\2\2N\u0251\3\2\2\2P\u0253\3\2\2\2R\u0261\3\2\2\2T\u0263\3\2\2\2V\u0274"+ + "\3\2\2\2X\u0276\3\2\2\2Z\u027e\3\2\2\2\\\u0291\3\2\2\2^\u0296\3\2\2\2"+ + "`\u029f\3\2\2\2b\u02a6\3\2\2\2d\u02a8\3\2\2\2f\u02aa\3\2\2\2h\u02b2\3"+ + "\2\2\2j\u02b4\3\2\2\2l\u02be\3\2\2\2n\u02c0\3\2\2\2p\u02c8\3\2\2\2r\u02cf"+ + "\3\2\2\2t\u02d1\3\2\2\2v\u02e1\3\2\2\2x\u02e6\3\2\2\2z\u02f7\3\2\2\2|"+ + "\u030d\3\2\2\2~\u0311\3\2\2\2\u0080\u0313\3\2\2\2\u0082\u0319\3\2\2\2"+ + "\u0084\u031b\3\2\2\2\u0086\u031e\3\2\2\2\u0088\u032a\3\2\2\2\u008a\u032c"+ + "\3\2\2\2\u008c\u0332\3\2\2\2\u008e\u03a0\3\2\2\2\u0090\u03a2\3\2\2\2\u0092"+ + "\u03af\3\2\2\2\u0094\u03b7\3\2\2\2\u0096\u03ba\3\2\2\2\u0098\u03c1\3\2"+ + "\2\2\u009a\u03cc\3\2\2\2\u009c\u03d5\3\2\2\2\u009e\u03e8\3\2\2\2\u00a0"+ + "\u03f6\3\2\2\2\u00a2\u03fa\3\2\2\2\u00a4\u03ff\3\2\2\2\u00a6\u0407\3\2"+ + "\2\2\u00a8\u0409\3\2\2\2\u00aa\u040d\3\2\2\2\u00ac\u0415\3\2\2\2\u00ae"+ + "\u0417\3\2\2\2\u00b0\u0426\3\2\2\2\u00b2\u0495\3\2\2\2\u00b4\u04a0\3\2"+ + "\2\2\u00b6\u04b1\3\2\2\2\u00b8\u04b3\3\2\2\2\u00ba\u04b9\3\2\2\2\u00bc"+ + "\u04d7\3\2\2\2\u00be\u04db\3\2\2\2\u00c0\u04de\3\2\2\2\u00c2\u04e5\3\2"+ + "\2\2\u00c4\u04ea\3\2\2\2\u00c6\u04f2\3\2\2\2\u00c8\u04f8\3\2\2\2\u00ca"+ + "\u04fa\3\2\2\2\u00cc\u00ce\5\4\3\2\u00cd\u00cc\3\2\2\2\u00cd\u00ce\3\2"+ + "\2\2\u00ce\u00d2\3\2\2\2\u00cf\u00d1\5\6\4\2\u00d0\u00cf\3\2\2\2\u00d1"+ + "\u00d4\3\2\2\2\u00d2\u00d0\3\2\2\2\u00d2\u00d3\3\2\2\2\u00d3\u00d8\3\2"+ + "\2\2\u00d4\u00d2\3\2\2\2\u00d5\u00d7\5\b\5\2\u00d6\u00d5\3\2\2\2\u00d7"+ + "\u00da\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d8\u00d9\3\2\2\2\u00d9\u00db\3\2"+ + "\2\2\u00da\u00d8\3\2\2\2\u00db\u00dc\7\2\2\3\u00dc\3\3\2\2\2\u00dd\u00df"+ + "\5j\66\2\u00de\u00dd\3\2\2\2\u00df\u00e2\3\2\2\2\u00e0\u00de\3\2\2\2\u00e0"+ + "\u00e1\3\2\2\2\u00e1\u00e3\3\2\2\2\u00e2\u00e0\3\2\2\2\u00e3\u00e4\7\""+ + "\2\2\u00e4\u00e5\5f\64\2\u00e5\u00e6\7A\2\2\u00e6\5\3\2\2\2\u00e7\u00e9"+ + "\7\33\2\2\u00e8\u00ea\7(\2\2\u00e9\u00e8\3\2\2\2\u00e9\u00ea\3\2\2\2\u00ea"+ + "\u00eb\3\2\2\2\u00eb\u00ee\5f\64\2\u00ec\u00ed\7C\2\2\u00ed\u00ef\7U\2"+ + "\2\u00ee\u00ec\3\2\2\2\u00ee\u00ef\3\2\2\2\u00ef\u00f0\3\2\2\2\u00f0\u00f1"+ + "\7A\2\2\u00f1\7\3\2\2\2\u00f2\u00f4\5\f\7\2\u00f3\u00f2\3\2\2\2\u00f4"+ + "\u00f7\3\2\2\2\u00f5\u00f3\3\2\2\2\u00f5\u00f6\3\2\2\2\u00f6\u00f8\3\2"+ + "\2\2\u00f7\u00f5\3\2\2\2\u00f8\u0110\5\20\t\2\u00f9\u00fb\5\f\7\2\u00fa"+ + "\u00f9\3\2\2\2\u00fb\u00fe\3\2\2\2\u00fc\u00fa\3\2\2\2\u00fc\u00fd\3\2"+ + "\2\2\u00fd\u00ff\3\2\2\2\u00fe\u00fc\3\2\2\2\u00ff\u0110\5\30\r\2\u0100"+ + "\u0102\5\f\7\2\u0101\u0100\3\2\2\2\u0102\u0105\3\2\2\2\u0103\u0101\3\2"+ + "\2\2\u0103\u0104\3\2\2\2\u0104\u0106\3\2\2\2\u0105\u0103\3\2\2\2\u0106"+ + "\u0110\5 \21\2\u0107\u0109\5\f\7\2\u0108\u0107\3\2\2\2\u0109\u010c\3\2"+ + "\2\2\u010a\u0108\3\2\2\2\u010a\u010b\3\2\2\2\u010b\u010d\3\2\2\2\u010c"+ + "\u010a\3\2\2\2\u010d\u0110\5v<\2\u010e\u0110\7A\2\2\u010f\u00f5\3\2\2"+ + "\2\u010f\u00fc\3\2\2\2\u010f\u0103\3\2\2\2\u010f\u010a\3\2\2\2\u010f\u010e"+ + "\3\2\2\2\u0110\t\3\2\2\2\u0111\u0114\5\f\7\2\u0112\u0114\t\2\2\2\u0113"+ + "\u0111\3\2\2\2\u0113\u0112\3\2\2\2\u0114\13\3\2\2\2\u0115\u0118\5j\66"+ + "\2\u0116\u0118\t\3\2\2\u0117\u0115\3\2\2\2\u0117\u0116\3\2\2\2\u0118\r"+ + "\3\2\2\2\u0119\u011c\7\24\2\2\u011a\u011c\5j\66\2\u011b\u0119\3\2\2\2"+ + "\u011b\u011a\3\2\2\2\u011c\17\3\2\2\2\u011d\u011e\7\13\2\2\u011e\u0120"+ + "\7f\2\2\u011f\u0121\5\22\n\2\u0120\u011f\3\2\2\2\u0120\u0121\3\2\2\2\u0121"+ + "\u0124\3\2\2\2\u0122\u0123\7\23\2\2\u0123\u0125\5N(\2\u0124\u0122\3\2"+ + "\2\2\u0124\u0125\3\2\2\2\u0125\u0128\3\2\2\2\u0126\u0127\7\32\2\2\u0127"+ + "\u0129\5\"\22\2\u0128\u0126\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u012a\3"+ + "\2\2\2\u012a\u012b\5$\23\2\u012b\21\3\2\2\2\u012c\u012d\7F\2\2\u012d\u0132"+ + "\5\24\13\2\u012e\u012f\7B\2\2\u012f\u0131\5\24\13\2\u0130\u012e\3\2\2"+ + "\2\u0131\u0134\3\2\2\2\u0132\u0130\3\2\2\2\u0132\u0133\3\2\2\2\u0133\u0135"+ + "\3\2\2\2\u0134\u0132\3\2\2\2\u0135\u0136\7E\2\2\u0136\23\3\2\2\2\u0137"+ + "\u013a\7f\2\2\u0138\u0139\7\23\2\2\u0139\u013b\5\26\f\2\u013a\u0138\3"+ + "\2\2\2\u013a\u013b\3\2\2\2\u013b\25\3\2\2\2\u013c\u0141\5N(\2\u013d\u013e"+ + "\7W\2\2\u013e\u0140\5N(\2\u013f\u013d\3\2\2\2\u0140\u0143\3\2\2\2\u0141"+ + "\u013f\3\2\2\2\u0141\u0142\3\2\2\2\u0142\27\3\2\2\2\u0143\u0141\3\2\2"+ + "\2\u0144\u0145\7\22\2\2\u0145\u0148\7f\2\2\u0146\u0147\7\32\2\2\u0147"+ + "\u0149\5\"\22\2\u0148\u0146\3\2\2\2\u0148\u0149\3\2\2\2\u0149\u014a\3"+ + "\2\2\2\u014a\u014c\7=\2\2\u014b\u014d\5\32\16\2\u014c\u014b\3\2\2\2\u014c"+ + "\u014d\3\2\2\2\u014d\u014f\3\2\2\2\u014e\u0150\7B\2\2\u014f\u014e\3\2"+ + "\2\2\u014f\u0150\3\2\2\2\u0150\u0152\3\2\2\2\u0151\u0153\5\36\20\2\u0152"+ + "\u0151\3\2\2\2\u0152\u0153\3\2\2\2\u0153\u0154\3\2\2\2\u0154\u0155\7>"+ + "\2\2\u0155\31\3\2\2\2\u0156\u015b\5\34\17\2\u0157\u0158\7B\2\2\u0158\u015a"+ + "\5\34\17\2\u0159\u0157\3\2\2\2\u015a\u015d\3\2\2\2\u015b\u0159\3\2\2\2"+ + "\u015b\u015c\3\2\2\2\u015c\33\3\2\2\2\u015d\u015b\3\2\2\2\u015e\u0160"+ + "\5j\66\2\u015f\u015e\3\2\2\2\u0160\u0163\3\2\2\2\u0161\u015f\3\2\2\2\u0161"+ + "\u0162\3\2\2\2\u0162\u0164\3\2\2\2\u0163\u0161\3\2\2\2\u0164\u0166\7f"+ + "\2\2\u0165\u0167\5\u00caf\2\u0166\u0165\3\2\2\2\u0166\u0167\3\2\2\2\u0167"+ + "\u0169\3\2\2\2\u0168\u016a\5$\23\2\u0169\u0168\3\2\2\2\u0169\u016a\3\2"+ + "\2\2\u016a\35\3\2\2\2\u016b\u016f\7A\2\2\u016c\u016e\5(\25\2\u016d\u016c"+ + "\3\2\2\2\u016e\u0171\3\2\2\2\u016f\u016d\3\2\2\2\u016f\u0170\3\2\2\2\u0170"+ + "\37\3\2\2\2\u0171\u016f\3\2\2\2\u0172\u0173\7\36\2\2\u0173\u0175\7f\2"+ + "\2\u0174\u0176\5\22\n\2\u0175\u0174\3\2\2\2\u0175\u0176\3\2\2\2\u0176"+ + "\u0179\3\2\2\2\u0177\u0178\7\23\2\2\u0178\u017a\5\"\22\2\u0179\u0177\3"+ + "\2\2\2\u0179\u017a\3\2\2\2\u017a\u017b\3\2\2\2\u017b\u017c\5&\24\2\u017c"+ + "!\3\2\2\2\u017d\u0182\5N(\2\u017e\u017f\7B\2\2\u017f\u0181\5N(\2\u0180"+ + "\u017e\3\2\2\2\u0181\u0184\3\2\2\2\u0182\u0180\3\2\2\2\u0182\u0183\3\2"+ + "\2\2\u0183#\3\2\2\2\u0184\u0182\3\2\2\2\u0185\u0189\7=\2\2\u0186\u0188"+ + "\5(\25\2\u0187\u0186\3\2\2\2\u0188\u018b\3\2\2\2\u0189\u0187\3\2\2\2\u0189"+ + "\u018a\3\2\2\2\u018a\u018c\3\2\2\2\u018b\u0189\3\2\2\2\u018c\u018d\7>"+ + "\2\2\u018d%\3\2\2\2\u018e\u0192\7=\2\2\u018f\u0191\5\66\34\2\u0190\u018f"+ + "\3\2\2\2\u0191\u0194\3\2\2\2\u0192\u0190\3\2\2\2\u0192\u0193\3\2\2\2\u0193"+ + "\u0195\3\2\2\2\u0194\u0192\3\2\2\2\u0195\u0196\7>\2\2\u0196\'\3\2\2\2"+ + "\u0197\u01a4\7A\2\2\u0198\u019a\7(\2\2\u0199\u0198\3\2\2\2\u0199\u019a"+ + "\3\2\2\2\u019a\u019b\3\2\2\2\u019b\u01a4\5\u0086D\2\u019c\u019e\5\n\6"+ + "\2\u019d\u019c\3\2\2\2\u019e\u01a1\3\2\2\2\u019f\u019d\3\2\2\2\u019f\u01a0"+ + "\3\2\2\2\u01a0\u01a2\3\2\2\2\u01a1\u019f\3\2\2\2\u01a2\u01a4\5*\26\2\u01a3"+ + "\u0197\3\2\2\2\u01a3\u0199\3\2\2\2\u01a3\u019f\3\2\2\2\u01a4)\3\2\2\2"+ + "\u01a5\u01af\5,\27\2\u01a6\u01af\5.\30\2\u01a7\u01af\5\64\33\2\u01a8\u01af"+ + "\5\60\31\2\u01a9\u01af\5\62\32\2\u01aa\u01af\5 \21\2\u01ab\u01af\5v<\2"+ + "\u01ac\u01af\5\20\t\2\u01ad\u01af\5\30\r\2\u01ae\u01a5\3\2\2\2\u01ae\u01a6"+ + "\3\2\2\2\u01ae\u01a7\3\2\2\2\u01ae\u01a8\3\2\2\2\u01ae\u01a9\3\2\2\2\u01ae"+ + "\u01aa\3\2\2\2\u01ae\u01ab\3\2\2\2\u01ae\u01ac\3\2\2\2\u01ae\u01ad\3\2"+ + "\2\2\u01af+\3\2\2\2\u01b0\u01b3\5N(\2\u01b1\u01b3\7\62\2\2\u01b2\u01b0"+ + "\3\2\2\2\u01b2\u01b1\3\2\2\2\u01b3\u01b4\3\2\2\2\u01b4\u01b5\7f\2\2\u01b5"+ + "\u01ba\5Z.\2\u01b6\u01b7\7?\2\2\u01b7\u01b9\7@\2\2\u01b8\u01b6\3\2\2\2"+ + "\u01b9\u01bc\3\2\2\2\u01ba\u01b8\3\2\2\2\u01ba\u01bb\3\2\2\2\u01bb\u01bf"+ + "\3\2\2\2\u01bc\u01ba\3\2\2\2\u01bd\u01be\7/\2\2\u01be\u01c0\5X-\2\u01bf"+ + "\u01bd\3\2\2\2\u01bf\u01c0\3\2\2\2\u01c0\u01c3\3\2\2\2\u01c1\u01c4\5b"+ + "\62\2\u01c2\u01c4\7A\2\2\u01c3\u01c1\3\2\2\2\u01c3\u01c2\3\2\2\2\u01c4"+ + "-\3\2\2\2\u01c5\u01c6\5\22\n\2\u01c6\u01c7\5,\27\2\u01c7/\3\2\2\2\u01c8"+ + "\u01c9\7f\2\2\u01c9\u01cc\5Z.\2\u01ca\u01cb\7/\2\2\u01cb\u01cd\5X-\2\u01cc"+ + "\u01ca\3\2\2\2\u01cc\u01cd\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\5d"+ + "\63\2\u01cf\61\3\2\2\2\u01d0\u01d1\5\22\n\2\u01d1\u01d2\5\60\31\2\u01d2"+ + "\63\3\2\2\2\u01d3\u01d4\5N(\2\u01d4\u01d5\5B\"\2\u01d5\u01d6\7A\2\2\u01d6"+ + "\65\3\2\2\2\u01d7\u01d9\5\n\6\2\u01d8\u01d7\3\2\2\2\u01d9\u01dc\3\2\2"+ + "\2\u01da\u01d8\3\2\2\2\u01da\u01db\3\2\2\2\u01db\u01dd\3\2\2\2\u01dc\u01da"+ + "\3\2\2\2\u01dd\u01e0\58\35\2\u01de\u01e0\7A\2\2\u01df\u01da\3\2\2\2\u01df"+ + "\u01de\3\2\2\2\u01e0\67\3\2\2\2\u01e1\u01e9\5:\36\2\u01e2\u01e9\5> \2"+ + "\u01e3\u01e9\5@!\2\u01e4\u01e9\5 \21\2\u01e5\u01e9\5v<\2\u01e6\u01e9\5"+ + "\20\t\2\u01e7\u01e9\5\30\r\2\u01e8\u01e1\3\2\2\2\u01e8\u01e2\3\2\2\2\u01e8"+ + "\u01e3\3\2\2\2\u01e8\u01e4\3\2\2\2\u01e8\u01e5\3\2\2\2\u01e8\u01e6\3\2"+ + "\2\2\u01e8\u01e7\3\2\2\2\u01e99\3\2\2\2\u01ea\u01eb\5N(\2\u01eb\u01f0"+ + "\5<\37\2\u01ec\u01ed\7B\2\2\u01ed\u01ef\5<\37\2\u01ee\u01ec\3\2\2\2\u01ef"+ + "\u01f2\3\2\2\2\u01f0\u01ee\3\2\2\2\u01f0\u01f1\3\2\2\2\u01f1\u01f3\3\2"+ + "\2\2\u01f2\u01f0\3\2\2\2\u01f3\u01f4\7A\2\2\u01f4;\3\2\2\2\u01f5\u01fa"+ + "\7f\2\2\u01f6\u01f7\7?\2\2\u01f7\u01f9\7@\2\2\u01f8\u01f6\3\2\2\2\u01f9"+ + "\u01fc\3\2\2\2\u01fa\u01f8\3\2\2\2\u01fa\u01fb\3\2\2\2\u01fb\u01fd\3\2"+ + "\2\2\u01fc\u01fa\3\2\2\2\u01fd\u01fe\7D\2\2\u01fe\u01ff\5H%\2\u01ff=\3"+ + "\2\2\2\u0200\u0203\5N(\2\u0201\u0203\7\62\2\2\u0202\u0200\3\2\2\2\u0202"+ + "\u0201\3\2\2\2\u0203\u0204\3\2\2\2\u0204\u0205\7f\2\2\u0205\u020a\5Z."+ + "\2\u0206\u0207\7?\2\2\u0207\u0209\7@\2\2\u0208\u0206\3\2\2\2\u0209\u020c"+ + "\3\2\2\2\u020a\u0208\3\2\2\2\u020a\u020b\3\2\2\2\u020b\u020f\3\2\2\2\u020c"+ + "\u020a\3\2\2\2\u020d\u020e\7/\2\2\u020e\u0210\5X-\2\u020f\u020d\3\2\2"+ + "\2\u020f\u0210\3\2\2\2\u0210\u0211\3\2\2\2\u0211\u0212\7A\2\2\u0212?\3"+ + "\2\2\2\u0213\u0214\5\22\n\2\u0214\u0215\5> \2\u0215A\3\2\2\2\u0216\u021b"+ + "\5D#\2\u0217\u0218\7B\2\2\u0218\u021a\5D#\2\u0219\u0217\3\2\2\2\u021a"+ + "\u021d\3\2\2\2\u021b\u0219\3\2\2\2\u021b\u021c\3\2\2\2\u021cC\3\2\2\2"+ + "\u021d\u021b\3\2\2\2\u021e\u0221\5F$\2\u021f\u0220\7D\2\2\u0220\u0222"+ + "\5H%\2\u0221\u021f\3\2\2\2\u0221\u0222\3\2\2\2\u0222E\3\2\2\2\u0223\u0228"+ + "\7f\2\2\u0224\u0225\7?\2\2\u0225\u0227\7@\2\2\u0226\u0224\3\2\2\2\u0227"+ + "\u022a\3\2\2\2\u0228\u0226\3\2\2\2\u0228\u0229\3\2\2\2\u0229G\3\2\2\2"+ + "\u022a\u0228\3\2\2\2\u022b\u022e\5J&\2\u022c\u022e\5\u00b0Y\2\u022d\u022b"+ + "\3\2\2\2\u022d\u022c\3\2\2\2\u022eI\3\2\2\2\u022f\u023b\7=\2\2\u0230\u0235"+ + "\5H%\2\u0231\u0232\7B\2\2\u0232\u0234\5H%\2\u0233\u0231\3\2\2\2\u0234"+ + "\u0237\3\2\2\2\u0235\u0233\3\2\2\2\u0235\u0236\3\2\2\2\u0236\u0239\3\2"+ + "\2\2\u0237\u0235\3\2\2\2\u0238\u023a\7B\2\2\u0239\u0238\3\2\2\2\u0239"+ + "\u023a\3\2\2\2\u023a\u023c\3\2\2\2\u023b\u0230\3\2\2\2\u023b\u023c\3\2"+ + "\2\2\u023c\u023d\3\2\2\2\u023d\u023e\7>\2\2\u023eK\3\2\2\2\u023f\u0240"+ + "\7f\2\2\u0240M\3\2\2\2\u0241\u0246\5P)\2\u0242\u0243\7?\2\2\u0243\u0245"+ + "\7@\2\2\u0244\u0242\3\2\2\2\u0245\u0248\3\2\2\2\u0246\u0244\3\2\2\2\u0246"+ + "\u0247\3\2\2\2\u0247\u0252\3\2\2\2\u0248\u0246\3\2\2\2\u0249\u024e\5R"+ + "*\2\u024a\u024b\7?\2\2\u024b\u024d\7@\2\2\u024c\u024a\3\2\2\2\u024d\u0250"+ + "\3\2\2\2\u024e\u024c\3\2\2\2\u024e\u024f\3\2\2\2\u024f\u0252\3\2\2\2\u0250"+ + "\u024e\3\2\2\2\u0251\u0241\3\2\2\2\u0251\u0249\3\2\2\2\u0252O\3\2\2\2"+ + "\u0253\u0255\7f\2\2\u0254\u0256\5T+\2\u0255\u0254\3\2\2\2\u0255\u0256"+ + "\3\2\2\2\u0256\u025e\3\2\2\2\u0257\u0258\7C\2\2\u0258\u025a\7f\2\2\u0259"+ + "\u025b\5T+\2\u025a\u0259\3\2\2\2\u025a\u025b\3\2\2\2\u025b\u025d\3\2\2"+ + "\2\u025c\u0257\3\2\2\2\u025d\u0260\3\2\2\2\u025e\u025c\3\2\2\2\u025e\u025f"+ + "\3\2\2\2\u025fQ\3\2\2\2\u0260\u025e\3\2\2\2\u0261\u0262\t\4\2\2\u0262"+ + "S\3\2\2\2\u0263\u0264\7F\2\2\u0264\u0269\5V,\2\u0265\u0266\7B\2\2\u0266"+ + "\u0268\5V,\2\u0267\u0265\3\2\2\2\u0268\u026b\3\2\2\2\u0269\u0267\3\2\2"+ + "\2\u0269\u026a\3\2\2\2\u026a\u026c\3\2\2\2\u026b\u0269\3\2\2\2\u026c\u026d"+ + "\7E\2\2\u026dU\3\2\2\2\u026e\u0275\5N(\2\u026f\u0272\7I\2\2\u0270\u0271"+ + "\t\5\2\2\u0271\u0273\5N(\2\u0272\u0270\3\2\2\2\u0272\u0273\3\2\2\2\u0273"+ + "\u0275\3\2\2\2\u0274\u026e\3\2\2\2\u0274\u026f\3\2\2\2\u0275W\3\2\2\2"+ + "\u0276\u027b\5f\64\2\u0277\u0278\7B\2\2\u0278\u027a\5f\64\2\u0279\u0277"+ + "\3\2\2\2\u027a\u027d\3\2\2\2\u027b\u0279\3\2\2\2\u027b\u027c\3\2\2\2\u027c"+ + "Y\3\2\2\2\u027d\u027b\3\2\2\2\u027e\u0280\7;\2\2\u027f\u0281\5\\/\2\u0280"+ + "\u027f\3\2\2\2\u0280\u0281\3\2\2\2\u0281\u0282\3\2\2\2\u0282\u0283\7<"+ + "\2\2\u0283[\3\2\2\2\u0284\u0289\5^\60\2\u0285\u0286\7B\2\2\u0286\u0288"+ + "\5^\60\2\u0287\u0285\3\2\2\2\u0288\u028b\3\2\2\2\u0289\u0287\3\2\2\2\u0289"+ + "\u028a\3\2\2\2\u028a\u028e\3\2\2\2\u028b\u0289\3\2\2\2\u028c\u028d\7B"+ + "\2\2\u028d\u028f\5`\61\2\u028e\u028c\3\2\2\2\u028e\u028f\3\2\2\2\u028f"+ + "\u0292\3\2\2\2\u0290\u0292\5`\61\2\u0291\u0284\3\2\2\2\u0291\u0290\3\2"+ + "\2\2\u0292]\3\2\2\2\u0293\u0295\5\16\b\2\u0294\u0293\3\2\2\2\u0295\u0298"+ + "\3\2\2\2\u0296\u0294\3\2\2\2\u0296\u0297\3\2\2\2\u0297\u0299\3\2\2\2\u0298"+ + "\u0296\3\2\2\2\u0299\u029a\5N(\2\u029a\u029b\5F$\2\u029b_\3\2\2\2\u029c"+ + "\u029e\5\16\b\2\u029d\u029c\3\2\2\2\u029e\u02a1\3\2\2\2\u029f\u029d\3"+ + "\2\2\2\u029f\u02a0\3\2\2\2\u02a0\u02a2\3\2\2\2\u02a1\u029f\3\2\2\2\u02a2"+ + "\u02a3\5N(\2\u02a3\u02a4\7h\2\2\u02a4\u02a5\5F$\2\u02a5a\3\2\2\2\u02a6"+ + "\u02a7\5\u0086D\2\u02a7c\3\2\2\2\u02a8\u02a9\5\u0086D\2\u02a9e\3\2\2\2"+ + "\u02aa\u02af\7f\2\2\u02ab\u02ac\7C\2\2\u02ac\u02ae\7f\2\2\u02ad\u02ab"+ + "\3\2\2\2\u02ae\u02b1\3\2\2\2\u02af\u02ad\3\2\2\2\u02af\u02b0\3\2\2\2\u02b0"+ + "g\3\2\2\2\u02b1\u02af\3\2\2\2\u02b2\u02b3\t\6\2\2\u02b3i\3\2\2\2\u02b4"+ + "\u02b5\7g\2\2\u02b5\u02bc\5l\67\2\u02b6\u02b9\7;\2\2\u02b7\u02ba\5n8\2"+ + "\u02b8\u02ba\5r:\2\u02b9\u02b7\3\2\2\2\u02b9\u02b8\3\2\2\2\u02b9\u02ba"+ + "\3\2\2\2\u02ba\u02bb\3\2\2\2\u02bb\u02bd\7<\2\2\u02bc\u02b6\3\2\2\2\u02bc"+ + "\u02bd\3\2\2\2\u02bdk\3\2\2\2\u02be\u02bf\5f\64\2\u02bfm\3\2\2\2\u02c0"+ + "\u02c5\5p9\2\u02c1\u02c2\7B\2\2\u02c2\u02c4\5p9\2\u02c3\u02c1\3\2\2\2"+ + "\u02c4\u02c7\3\2\2\2\u02c5\u02c3\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6o\3"+ + "\2\2\2\u02c7\u02c5\3\2\2\2\u02c8\u02c9\7f\2\2\u02c9\u02ca\7D\2\2\u02ca"+ + "\u02cb\5r:\2\u02cbq\3\2\2\2\u02cc\u02d0\5\u00b0Y\2\u02cd\u02d0\5j\66\2"+ + "\u02ce\u02d0\5t;\2\u02cf\u02cc\3\2\2\2\u02cf\u02cd\3\2\2\2\u02cf\u02ce"+ + "\3\2\2\2\u02d0s\3\2\2\2\u02d1\u02da\7=\2\2\u02d2\u02d7\5r:\2\u02d3\u02d4"+ + "\7B\2\2\u02d4\u02d6\5r:\2\u02d5\u02d3\3\2\2\2\u02d6\u02d9\3\2\2\2\u02d7"+ + "\u02d5\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02db\3\2\2\2\u02d9\u02d7\3\2"+ + "\2\2\u02da\u02d2\3\2\2\2\u02da\u02db\3\2\2\2\u02db\u02dd\3\2\2\2\u02dc"+ + "\u02de\7B\2\2\u02dd\u02dc\3\2\2\2\u02dd\u02de\3\2\2\2\u02de\u02df\3\2"+ + "\2\2\u02df\u02e0\7>\2\2\u02e0u\3\2\2\2\u02e1\u02e2\7g\2\2\u02e2\u02e3"+ + "\7\36\2\2\u02e3\u02e4\7f\2\2\u02e4\u02e5\5x=\2\u02e5w\3\2\2\2\u02e6\u02ea"+ + "\7=\2\2\u02e7\u02e9\5z>\2\u02e8\u02e7\3\2\2\2\u02e9\u02ec\3\2\2\2\u02ea"+ + "\u02e8\3\2\2\2\u02ea\u02eb\3\2\2\2\u02eb\u02ed\3\2\2\2\u02ec\u02ea\3\2"+ + "\2\2\u02ed\u02ee\7>\2\2\u02eey\3\2\2\2\u02ef\u02f1\5\n\6\2\u02f0\u02ef"+ + "\3\2\2\2\u02f1\u02f4\3\2\2\2\u02f2\u02f0\3\2\2\2\u02f2\u02f3\3\2\2\2\u02f3"+ + "\u02f5\3\2\2\2\u02f4\u02f2\3\2\2\2\u02f5\u02f8\5|?\2\u02f6\u02f8\7A\2"+ + "\2\u02f7\u02f2\3\2\2\2\u02f7\u02f6\3\2\2\2\u02f8{\3\2\2\2\u02f9\u02fa"+ + "\5N(\2\u02fa\u02fb\5~@\2\u02fb\u02fc\7A\2\2\u02fc\u030e\3\2\2\2\u02fd"+ + "\u02ff\5\20\t\2\u02fe\u0300\7A\2\2\u02ff\u02fe\3\2\2\2\u02ff\u0300\3\2"+ + "\2\2\u0300\u030e\3\2\2\2\u0301\u0303\5 \21\2\u0302\u0304\7A\2\2\u0303"+ + "\u0302\3\2\2\2\u0303\u0304\3\2\2\2\u0304\u030e\3\2\2\2\u0305\u0307\5\30"+ + "\r\2\u0306\u0308\7A\2\2\u0307\u0306\3\2\2\2\u0307\u0308\3\2\2\2\u0308"+ + "\u030e\3\2\2\2\u0309\u030b\5v<\2\u030a\u030c\7A\2\2\u030b\u030a\3\2\2"+ + "\2\u030b\u030c\3\2\2\2\u030c\u030e\3\2\2\2\u030d\u02f9\3\2\2\2\u030d\u02fd"+ + "\3\2\2\2\u030d\u0301\3\2\2\2\u030d\u0305\3\2\2\2\u030d\u0309\3\2\2\2\u030e"+ + "}\3\2\2\2\u030f\u0312\5\u0080A\2\u0310\u0312\5\u0082B\2\u0311\u030f\3"+ + "\2\2\2\u0311\u0310\3\2\2\2\u0312\177\3\2\2\2\u0313\u0314\7f\2\2\u0314"+ + "\u0315\7;\2\2\u0315\u0317\7<\2\2\u0316\u0318\5\u0084C\2\u0317\u0316\3"+ + "\2\2\2\u0317\u0318\3\2\2\2\u0318\u0081\3\2\2\2\u0319\u031a\5B\"\2\u031a"+ + "\u0083\3\2\2\2\u031b\u031c\7\16\2\2\u031c\u031d\5r:\2\u031d\u0085\3\2"+ + "\2\2\u031e\u0322\7=\2\2\u031f\u0321\5\u0088E\2\u0320\u031f\3\2\2\2\u0321"+ + "\u0324\3\2\2\2\u0322\u0320\3\2\2\2\u0322\u0323\3\2\2\2\u0323\u0325\3\2"+ + "\2\2\u0324\u0322\3\2\2\2\u0325\u0326\7>\2\2\u0326\u0087\3\2\2\2\u0327"+ + "\u032b\5\u008aF\2\u0328\u032b\5\u008eH\2\u0329\u032b\5\b\5\2\u032a\u0327"+ + "\3\2\2\2\u032a\u0328\3\2\2\2\u032a\u0329\3\2\2\2\u032b\u0089\3\2\2\2\u032c"+ + "\u032d\5\u008cG\2\u032d\u032e\7A\2\2\u032e\u008b\3\2\2\2\u032f\u0331\5"+ + "\16\b\2\u0330\u032f\3\2\2\2\u0331\u0334\3\2\2\2\u0332\u0330\3\2\2\2\u0332"+ + "\u0333\3\2\2\2\u0333\u0335\3\2\2\2\u0334\u0332\3\2\2\2\u0335\u0336\5N"+ + "(\2\u0336\u0337\5B\"\2\u0337\u008d\3\2\2\2\u0338\u03a1\5\u0086D\2\u0339"+ + "\u033a\7\4\2\2\u033a\u033d\5\u00b0Y\2\u033b\u033c\7J\2\2\u033c\u033e\5"+ + "\u00b0Y\2\u033d\u033b\3\2\2\2\u033d\u033e\3\2\2\2\u033e\u033f\3\2\2\2"+ + "\u033f\u0340\7A\2\2\u0340\u03a1\3\2\2\2\u0341\u0342\7\30\2\2\u0342\u0343"+ + "\5\u00a8U\2\u0343\u0346\5\u008eH\2\u0344\u0345\7\21\2\2\u0345\u0347\5"+ + "\u008eH\2\u0346\u0344\3\2\2\2\u0346\u0347\3\2\2\2\u0347\u03a1\3\2\2\2"+ + "\u0348\u0349\7\27\2\2\u0349\u034a\7;\2\2\u034a\u034b\5\u00a0Q\2\u034b"+ + "\u034c\7<\2\2\u034c\u034d\5\u008eH\2\u034d\u03a1\3\2\2\2\u034e\u034f\7"+ + "\64\2\2\u034f\u0350\5\u00a8U\2\u0350\u0351\5\u008eH\2\u0351\u03a1\3\2"+ + "\2\2\u0352\u0353\7\17\2\2\u0353\u0354\5\u008eH\2\u0354\u0355\7\64\2\2"+ + "\u0355\u0356\5\u00a8U\2\u0356\u0357\7A\2\2\u0357\u03a1\3\2\2\2\u0358\u0359"+ + "\7\61\2\2\u0359\u0363\5\u0086D\2\u035a\u035c\5\u0090I\2\u035b\u035a\3"+ + "\2\2\2\u035c\u035d\3\2\2\2\u035d\u035b\3\2\2\2\u035d\u035e\3\2\2\2\u035e"+ + "\u0360\3\2\2\2\u035f\u0361\5\u0094K\2\u0360\u035f\3\2\2\2\u0360\u0361"+ + "\3\2\2\2\u0361\u0364\3\2\2\2\u0362\u0364\5\u0094K\2\u0363\u035b\3\2\2"+ + "\2\u0363\u0362\3\2\2\2\u0364\u03a1\3\2\2\2\u0365\u0366\7\61\2\2\u0366"+ + "\u0367\5\u0096L\2\u0367\u036b\5\u0086D\2\u0368\u036a\5\u0090I\2\u0369"+ + "\u0368\3\2\2\2\u036a\u036d\3\2\2\2\u036b\u0369\3\2\2\2\u036b\u036c\3\2"+ + "\2\2\u036c\u036f\3\2\2\2\u036d\u036b\3\2\2\2\u036e\u0370\5\u0094K\2\u036f"+ + "\u036e\3\2\2\2\u036f\u0370\3\2\2\2\u0370\u03a1\3\2\2\2\u0371\u0372\7+"+ + "\2\2\u0372\u0373\5\u00a8U\2\u0373\u0377\7=\2\2\u0374\u0376\5\u009cO\2"+ + "\u0375\u0374\3\2\2\2\u0376\u0379\3\2\2\2\u0377\u0375\3\2\2\2\u0377\u0378"+ + "\3\2\2\2\u0378\u037d\3\2\2\2\u0379\u0377\3\2\2\2\u037a\u037c\5\u009eP"+ + "\2\u037b\u037a\3\2\2\2\u037c\u037f\3\2\2\2\u037d\u037b\3\2\2\2\u037d\u037e"+ + "\3\2\2\2\u037e\u0380\3\2\2\2\u037f\u037d\3\2\2\2\u0380\u0381\7>\2\2\u0381"+ + "\u03a1\3\2\2\2\u0382\u0383\7,\2\2\u0383\u0384\5\u00a8U\2\u0384\u0385\5"+ + "\u0086D\2\u0385\u03a1\3\2\2\2\u0386\u0388\7&\2\2\u0387\u0389\5\u00b0Y"+ + "\2\u0388\u0387\3\2\2\2\u0388\u0389\3\2\2\2\u0389\u038a\3\2\2\2\u038a\u03a1"+ + "\7A\2\2\u038b\u038c\7.\2\2\u038c\u038d\5\u00b0Y\2\u038d\u038e\7A\2\2\u038e"+ + "\u03a1\3\2\2\2\u038f\u0391\7\6\2\2\u0390\u0392\7f\2\2\u0391\u0390\3\2"+ + "\2\2\u0391\u0392\3\2\2\2\u0392\u0393\3\2\2\2\u0393\u03a1\7A\2\2\u0394"+ + "\u0396\7\r\2\2\u0395\u0397\7f\2\2\u0396\u0395\3\2\2\2\u0396\u0397\3\2"+ + "\2\2\u0397\u0398\3\2\2\2\u0398\u03a1\7A\2\2\u0399\u03a1\7A\2\2\u039a\u039b"+ + "\5\u00acW\2\u039b\u039c\7A\2\2\u039c\u03a1\3\2\2\2\u039d\u039e\7f\2\2"+ + "\u039e\u039f\7J\2\2\u039f\u03a1\5\u008eH\2\u03a0\u0338\3\2\2\2\u03a0\u0339"+ + "\3\2\2\2\u03a0\u0341\3\2\2\2\u03a0\u0348\3\2\2\2\u03a0\u034e\3\2\2\2\u03a0"+ + "\u0352\3\2\2\2\u03a0\u0358\3\2\2\2\u03a0\u0365\3\2\2\2\u03a0\u0371\3\2"+ + "\2\2\u03a0\u0382\3\2\2\2\u03a0\u0386\3\2\2\2\u03a0\u038b\3\2\2\2\u03a0"+ + "\u038f\3\2\2\2\u03a0\u0394\3\2\2\2\u03a0\u0399\3\2\2\2\u03a0\u039a\3\2"+ + "\2\2\u03a0\u039d\3\2\2\2\u03a1\u008f\3\2\2\2\u03a2\u03a3\7\t\2\2\u03a3"+ + "\u03a7\7;\2\2\u03a4\u03a6\5\16\b\2\u03a5\u03a4\3\2\2\2\u03a6\u03a9\3\2"+ + "\2\2\u03a7\u03a5\3\2\2\2\u03a7\u03a8\3\2\2\2\u03a8\u03aa\3\2\2\2\u03a9"+ + "\u03a7\3\2\2\2\u03aa\u03ab\5\u0092J\2\u03ab\u03ac\7f\2\2\u03ac\u03ad\7"+ + "<\2\2\u03ad\u03ae\5\u0086D\2\u03ae\u0091\3\2\2\2\u03af\u03b4\5f\64\2\u03b0"+ + "\u03b1\7X\2\2\u03b1\u03b3\5f\64\2\u03b2\u03b0\3\2\2\2\u03b3\u03b6\3\2"+ + "\2\2\u03b4\u03b2\3\2\2\2\u03b4\u03b5\3\2\2\2\u03b5\u0093\3\2\2\2\u03b6"+ + "\u03b4\3\2\2\2\u03b7\u03b8\7\25\2\2\u03b8\u03b9\5\u0086D\2\u03b9\u0095"+ + "\3\2\2\2\u03ba\u03bb\7;\2\2\u03bb\u03bd\5\u0098M\2\u03bc\u03be\7A\2\2"+ + "\u03bd\u03bc\3\2\2\2\u03bd\u03be\3\2\2\2\u03be\u03bf\3\2\2\2\u03bf\u03c0"+ + "\7<\2\2\u03c0\u0097\3\2\2\2\u03c1\u03c6\5\u009aN\2\u03c2\u03c3\7A\2\2"+ + "\u03c3\u03c5\5\u009aN\2\u03c4\u03c2\3\2\2\2\u03c5\u03c8\3\2\2\2\u03c6"+ + "\u03c4\3\2\2\2\u03c6\u03c7\3\2\2\2\u03c7\u0099\3\2\2\2\u03c8\u03c6\3\2"+ + "\2\2\u03c9\u03cb\5\16\b\2\u03ca\u03c9\3\2\2\2\u03cb\u03ce\3\2\2\2\u03cc"+ + "\u03ca\3\2\2\2\u03cc\u03cd\3\2\2\2\u03cd\u03cf\3\2\2\2\u03ce\u03cc\3\2"+ + "\2\2\u03cf\u03d0\5P)\2\u03d0\u03d1\5F$\2\u03d1\u03d2\7D\2\2\u03d2\u03d3"+ + "\5\u00b0Y\2\u03d3\u009b\3\2\2\2\u03d4\u03d6\5\u009eP\2\u03d5\u03d4\3\2"+ + "\2\2\u03d6\u03d7\3\2\2\2\u03d7\u03d5\3\2\2\2\u03d7\u03d8\3\2\2\2\u03d8"+ + "\u03da\3\2\2\2\u03d9\u03db\5\u0088E\2\u03da\u03d9\3\2\2\2\u03db\u03dc"+ + "\3\2\2\2\u03dc\u03da\3\2\2\2\u03dc\u03dd\3\2\2\2\u03dd\u009d\3\2\2\2\u03de"+ + "\u03df\7\b\2\2\u03df\u03e0\5\u00aeX\2\u03e0\u03e1\7J\2\2\u03e1\u03e9\3"+ + "\2\2\2\u03e2\u03e3\7\b\2\2\u03e3\u03e4\5L\'\2\u03e4\u03e5\7J\2\2\u03e5"+ + "\u03e9\3\2\2\2\u03e6\u03e7\7\16\2\2\u03e7\u03e9\7J\2\2\u03e8\u03de\3\2"+ + "\2\2\u03e8\u03e2\3\2\2\2\u03e8\u03e6\3\2\2\2\u03e9\u009f\3\2\2\2\u03ea"+ + "\u03f7\5\u00a4S\2\u03eb\u03ed\5\u00a2R\2\u03ec\u03eb\3\2\2\2\u03ec\u03ed"+ + "\3\2\2\2\u03ed\u03ee\3\2\2\2\u03ee\u03f0\7A\2\2\u03ef\u03f1\5\u00b0Y\2"+ + "\u03f0\u03ef\3\2\2\2\u03f0\u03f1\3\2\2\2\u03f1\u03f2\3\2\2\2\u03f2\u03f4"+ + "\7A\2\2\u03f3\u03f5\5\u00a6T\2\u03f4\u03f3\3\2\2\2\u03f4\u03f5\3\2\2\2"+ + "\u03f5\u03f7\3\2\2\2\u03f6\u03ea\3\2\2\2\u03f6\u03ec\3\2\2\2\u03f7\u00a1"+ + "\3\2\2\2\u03f8\u03fb\5\u008cG\2\u03f9\u03fb\5\u00aaV\2\u03fa\u03f8\3\2"+ + "\2\2\u03fa\u03f9\3\2\2\2\u03fb\u00a3\3\2\2\2\u03fc\u03fe\5\16\b\2\u03fd"+ + "\u03fc\3\2\2\2\u03fe\u0401\3\2\2\2\u03ff\u03fd\3\2\2\2\u03ff\u0400\3\2"+ + "\2\2\u0400\u0402\3\2\2\2\u0401\u03ff\3\2\2\2\u0402\u0403\5N(\2\u0403\u0404"+ + "\5F$\2\u0404\u0405\7J\2\2\u0405\u0406\5\u00b0Y\2\u0406\u00a5\3\2\2\2\u0407"+ + "\u0408\5\u00aaV\2\u0408\u00a7\3\2\2\2\u0409\u040a\7;\2\2\u040a\u040b\5"+ + "\u00b0Y\2\u040b\u040c\7<\2\2\u040c\u00a9\3\2\2\2\u040d\u0412\5\u00b0Y"+ + "\2\u040e\u040f\7B\2\2\u040f\u0411\5\u00b0Y\2\u0410\u040e\3\2\2\2\u0411"+ + "\u0414\3\2\2\2\u0412\u0410\3\2\2\2\u0412\u0413\3\2\2\2\u0413\u00ab\3\2"+ + "\2\2\u0414\u0412\3\2\2\2\u0415\u0416\5\u00b0Y\2\u0416\u00ad\3\2\2\2\u0417"+ + "\u0418\5\u00b0Y\2\u0418\u00af\3\2\2\2\u0419\u041a\bY\1\2\u041a\u0427\5"+ + "\u00b2Z\2\u041b\u041c\7!\2\2\u041c\u0427\5\u00b4[\2\u041d\u041e\7;\2\2"+ + "\u041e\u041f\5N(\2\u041f\u0420\7<\2\2\u0420\u0421\5\u00b0Y\23\u0421\u0427"+ + "\3\2\2\2\u0422\u0423\t\7\2\2\u0423\u0427\5\u00b0Y\21\u0424\u0425\t\b\2"+ + "\2\u0425\u0427\5\u00b0Y\20\u0426\u0419\3\2\2\2\u0426\u041b\3\2\2\2\u0426"+ + "\u041d\3\2\2\2\u0426\u0422\3\2\2\2\u0426\u0424\3\2\2\2\u0427\u047d\3\2"+ + "\2\2\u0428\u0429\f\17\2\2\u0429\u042a\t\t\2\2\u042a\u047c\5\u00b0Y\20"+ + "\u042b\u042c\f\16\2\2\u042c\u042d\t\n\2\2\u042d\u047c\5\u00b0Y\17\u042e"+ + "\u0436\f\r\2\2\u042f\u0430\7F\2\2\u0430\u0437\7F\2\2\u0431\u0432\7E\2"+ + "\2\u0432\u0433\7E\2\2\u0433\u0437\7E\2\2\u0434\u0435\7E\2\2\u0435\u0437"+ + "\7E\2\2\u0436\u042f\3\2\2\2\u0436\u0431\3\2\2\2\u0436\u0434\3\2\2\2\u0437"+ + "\u0438\3\2\2\2\u0438\u047c\5\u00b0Y\16\u0439\u043a\f\f\2\2\u043a\u043b"+ + "\t\13\2\2\u043b\u047c\5\u00b0Y\r\u043c\u043d\f\n\2\2\u043d\u043e\t\f\2"+ + "\2\u043e\u047c\5\u00b0Y\13\u043f\u0440\f\t\2\2\u0440\u0441\7W\2\2\u0441"+ + "\u047c\5\u00b0Y\n\u0442\u0443\f\b\2\2\u0443\u0444\7Y\2\2\u0444\u047c\5"+ + "\u00b0Y\t\u0445\u0446\f\7\2\2\u0446\u0447\7X\2\2\u0447\u047c\5\u00b0Y"+ + "\b\u0448\u0449\f\6\2\2\u0449\u044a\7O\2\2\u044a\u047c\5\u00b0Y\7\u044b"+ + "\u044c\f\5\2\2\u044c\u044d\7P\2\2\u044d\u047c\5\u00b0Y\6\u044e\u044f\f"+ + "\4\2\2\u044f\u0450\7I\2\2\u0450\u0451\5\u00b0Y\2\u0451\u0452\7J\2\2\u0452"+ + "\u0453\5\u00b0Y\5\u0453\u047c\3\2\2\2\u0454\u0455\f\3\2\2\u0455\u0456"+ + "\t\r\2\2\u0456\u047c\5\u00b0Y\3\u0457\u0458\f\33\2\2\u0458\u0459\7C\2"+ + "\2\u0459\u047c\7f\2\2\u045a\u045b\f\32\2\2\u045b\u045c\7C\2\2\u045c\u047c"+ + "\7-\2\2\u045d\u045e\f\31\2\2\u045e\u045f\7C\2\2\u045f\u0461\7!\2\2\u0460"+ + "\u0462\5\u00c0a\2\u0461\u0460\3\2\2\2\u0461\u0462\3\2\2\2\u0462\u0463"+ + "\3\2\2\2\u0463\u047c\5\u00b8]\2\u0464\u0465\f\30\2\2\u0465\u0466\7C\2"+ + "\2\u0466\u0467\7*\2\2\u0467\u047c\5\u00c6d\2\u0468\u0469\f\27\2\2\u0469"+ + "\u046a\7C\2\2\u046a\u047c\5\u00be`\2\u046b\u046c\f\26\2\2\u046c\u046d"+ + "\7?\2\2\u046d\u046e\5\u00b0Y\2\u046e\u046f\7@\2\2\u046f\u047c\3\2\2\2"+ + "\u0470\u0471\f\25\2\2\u0471\u0473\7;\2\2\u0472\u0474\5\u00aaV\2\u0473"+ + "\u0472\3\2\2\2\u0473\u0474\3\2\2\2\u0474\u0475\3\2\2\2\u0475\u047c\7<"+ + "\2\2\u0476\u0477\f\22\2\2\u0477\u047c\t\16\2\2\u0478\u0479\f\13\2\2\u0479"+ + "\u047a\7\34\2\2\u047a\u047c\5N(\2\u047b\u0428\3\2\2\2\u047b\u042b\3\2"+ + "\2\2\u047b\u042e\3\2\2\2\u047b\u0439\3\2\2\2\u047b\u043c\3\2\2\2\u047b"+ + "\u043f\3\2\2\2\u047b\u0442\3\2\2\2\u047b\u0445\3\2\2\2\u047b\u0448\3\2"+ + "\2\2\u047b\u044b\3\2\2\2\u047b\u044e\3\2\2\2\u047b\u0454\3\2\2\2\u047b"+ + "\u0457\3\2\2\2\u047b\u045a\3\2\2\2\u047b\u045d\3\2\2\2\u047b\u0464\3\2"+ + "\2\2\u047b\u0468\3\2\2\2\u047b\u046b\3\2\2\2\u047b\u0470\3\2\2\2\u047b"+ + "\u0476\3\2\2\2\u047b\u0478\3\2\2\2\u047c\u047f\3\2\2\2\u047d\u047b\3\2"+ + "\2\2\u047d\u047e\3\2\2\2\u047e\u00b1\3\2\2\2\u047f\u047d\3\2\2\2\u0480"+ + "\u0481\7;\2\2\u0481\u0482\5\u00b0Y\2\u0482\u0483\7<\2\2\u0483\u0496\3"+ + "\2\2\2\u0484\u0496\7-\2\2\u0485\u0496\7*\2\2\u0486\u0496\5h\65\2\u0487"+ + "\u0496\7f\2\2\u0488\u0489\5N(\2\u0489\u048a\7C\2\2\u048a\u048b\7\13\2"+ + "\2\u048b\u0496\3\2\2\2\u048c\u048d\7\62\2\2\u048d\u048e\7C\2\2\u048e\u0496"+ + "\7\13\2\2\u048f\u0493\5\u00c0a\2\u0490\u0494\5\u00c8e\2\u0491\u0492\7"+ + "-\2\2\u0492\u0494\5\u00caf\2\u0493\u0490\3\2\2\2\u0493\u0491\3\2\2\2\u0494"+ + "\u0496\3\2\2\2\u0495\u0480\3\2\2\2\u0495\u0484\3\2\2\2\u0495\u0485\3\2"+ + "\2\2\u0495\u0486\3\2\2\2\u0495\u0487\3\2\2\2\u0495\u0488\3\2\2\2\u0495"+ + "\u048c\3\2\2\2\u0495\u048f\3\2\2\2\u0496\u00b3\3\2\2\2\u0497\u0498\5\u00c0"+ + "a\2\u0498\u0499\5\u00b6\\\2\u0499\u049a\5\u00bc_\2\u049a\u04a1\3\2\2\2"+ + "\u049b\u049e\5\u00b6\\\2\u049c\u049f\5\u00ba^\2\u049d\u049f\5\u00bc_\2"+ + "\u049e\u049c\3\2\2\2\u049e\u049d\3\2\2\2\u049f\u04a1\3\2\2\2\u04a0\u0497"+ + "\3\2\2\2\u04a0\u049b\3\2\2\2\u04a1\u00b5\3\2\2\2\u04a2\u04a4\7f\2\2\u04a3"+ + "\u04a5\5\u00c2b\2\u04a4\u04a3\3\2\2\2\u04a4\u04a5\3\2\2\2\u04a5\u04ad"+ + "\3\2\2\2\u04a6\u04a7\7C\2\2\u04a7\u04a9\7f\2\2\u04a8\u04aa\5\u00c2b\2"+ + "\u04a9\u04a8\3\2\2\2\u04a9\u04aa\3\2\2\2\u04aa\u04ac\3\2\2\2\u04ab\u04a6"+ + "\3\2\2\2\u04ac\u04af\3\2\2\2\u04ad\u04ab\3\2\2\2\u04ad\u04ae\3\2\2\2\u04ae"+ + "\u04b2\3\2\2\2\u04af\u04ad\3\2\2\2\u04b0\u04b2\5R*\2\u04b1\u04a2\3\2\2"+ + "\2\u04b1\u04b0\3\2\2\2\u04b2\u00b7\3\2\2\2\u04b3\u04b5\7f\2\2\u04b4\u04b6"+ + "\5\u00c4c\2\u04b5\u04b4\3\2\2\2\u04b5\u04b6\3\2\2\2\u04b6\u04b7\3\2\2"+ + "\2\u04b7\u04b8\5\u00bc_\2\u04b8\u00b9\3\2\2\2\u04b9\u04d5\7?\2\2\u04ba"+ + "\u04bf\7@\2\2\u04bb\u04bc\7?\2\2\u04bc\u04be\7@\2\2\u04bd\u04bb\3\2\2"+ + "\2\u04be\u04c1\3\2\2\2\u04bf\u04bd\3\2\2\2\u04bf\u04c0\3\2\2\2\u04c0\u04c2"+ + "\3\2\2\2\u04c1\u04bf\3\2\2\2\u04c2\u04d6\5J&\2\u04c3\u04c4\5\u00b0Y\2"+ + "\u04c4\u04cb\7@\2\2\u04c5\u04c6\7?\2\2\u04c6\u04c7\5\u00b0Y\2\u04c7\u04c8"+ + "\7@\2\2\u04c8\u04ca\3\2\2\2\u04c9\u04c5\3\2\2\2\u04ca\u04cd\3\2\2\2\u04cb"+ + "\u04c9\3\2\2\2\u04cb\u04cc\3\2\2\2\u04cc\u04d2\3\2\2\2\u04cd\u04cb\3\2"+ + "\2\2\u04ce\u04cf\7?\2\2\u04cf\u04d1\7@\2\2\u04d0\u04ce\3\2\2\2\u04d1\u04d4"+ + "\3\2\2\2\u04d2\u04d0\3\2\2\2\u04d2\u04d3\3\2\2\2\u04d3\u04d6\3\2\2\2\u04d4"+ + "\u04d2\3\2\2\2\u04d5\u04ba\3\2\2\2\u04d5\u04c3\3\2\2\2\u04d6\u00bb\3\2"+ + "\2\2\u04d7\u04d9\5\u00caf\2\u04d8\u04da\5$\23\2\u04d9\u04d8\3\2\2\2\u04d9"+ + "\u04da\3\2\2\2\u04da\u00bd\3\2\2\2\u04db\u04dc\5\u00c0a\2\u04dc\u04dd"+ + "\5\u00c8e\2\u04dd\u00bf\3\2\2\2\u04de\u04df\7F\2\2\u04df\u04e0\5\"\22"+ + "\2\u04e0\u04e1\7E\2\2\u04e1\u00c1\3\2\2\2\u04e2\u04e3\7F\2\2\u04e3\u04e6"+ + "\7E\2\2\u04e4\u04e6\5T+\2\u04e5\u04e2\3\2\2\2\u04e5\u04e4\3\2\2\2\u04e6"+ + "\u00c3\3\2\2\2\u04e7\u04e8\7F\2\2\u04e8\u04eb\7E\2\2\u04e9\u04eb\5\u00c0"+ + "a\2\u04ea\u04e7\3\2\2\2\u04ea\u04e9\3\2\2\2\u04eb\u00c5\3\2\2\2\u04ec"+ + "\u04f3\5\u00caf\2\u04ed\u04ee\7C\2\2\u04ee\u04f0\7f\2\2\u04ef\u04f1\5"+ + "\u00caf\2\u04f0\u04ef\3\2\2\2\u04f0\u04f1\3\2\2\2\u04f1\u04f3\3\2\2\2"+ + "\u04f2\u04ec\3\2\2\2\u04f2\u04ed\3\2\2\2\u04f3\u00c7\3\2\2\2\u04f4\u04f5"+ + "\7*\2\2\u04f5\u04f9\5\u00c6d\2\u04f6\u04f7\7f\2\2\u04f7\u04f9\5\u00ca"+ + "f\2\u04f8\u04f4\3\2\2\2\u04f8\u04f6\3\2\2\2\u04f9\u00c9\3\2\2\2\u04fa"+ + "\u04fc\7;\2\2\u04fb\u04fd\5\u00aaV\2\u04fc\u04fb\3\2\2\2\u04fc\u04fd\3"+ + "\2\2\2\u04fd\u04fe\3\2\2\2\u04fe\u04ff\7<\2\2\u04ff\u00cb\3\2\2\2\u0097"+ + "\u00cd\u00d2\u00d8\u00e0\u00e9\u00ee\u00f5\u00fc\u0103\u010a\u010f\u0113"+ + "\u0117\u011b\u0120\u0124\u0128\u0132\u013a\u0141\u0148\u014c\u014f\u0152"+ + "\u015b\u0161\u0166\u0169\u016f\u0175\u0179\u0182\u0189\u0192\u0199\u019f"+ + "\u01a3\u01ae\u01b2\u01ba\u01bf\u01c3\u01cc\u01da\u01df\u01e8\u01f0\u01fa"+ + "\u0202\u020a\u020f\u021b\u0221\u0228\u022d\u0235\u0239\u023b\u0246\u024e"+ + "\u0251\u0255\u025a\u025e\u0269\u0272\u0274\u027b\u0280\u0289\u028e\u0291"+ + "\u0296\u029f\u02af\u02b9\u02bc\u02c5\u02cf\u02d7\u02da\u02dd\u02ea\u02f2"+ + "\u02f7\u02ff\u0303\u0307\u030b\u030d\u0311\u0317\u0322\u032a\u0332\u033d"+ + "\u0346\u035d\u0360\u0363\u036b\u036f\u0377\u037d\u0388\u0391\u0396\u03a0"+ + "\u03a7\u03b4\u03bd\u03c6\u03cc\u03d7\u03dc\u03e8\u03ec\u03f0\u03f4\u03f6"+ + "\u03fa\u03ff\u0412\u0426\u0436\u0461\u0473\u047b\u047d\u0493\u0495\u049e"+ + "\u04a0\u04a4\u04a9\u04ad\u04b1\u04b5\u04bf\u04cb\u04d2\u04d5\u04d9\u04e5"+ + "\u04ea\u04f0\u04f2\u04f8\u04fc"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/c/CMethodCallTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/c/CMethodCallTraversal.java new file mode 100755 index 0000000..504f9ee --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/c/CMethodCallTraversal.java @@ -0,0 +1,110 @@ +package it.unitn.repoman.core.lang.traversals.c; + +import java.util.HashSet; +import java.util.Set; +import it.unitn.repoman.core.lang.traversals.generic.DFSTraversal; +import it.unitn.repoman.core.lang.traversals.generic.MethodCallTraversal; +import it.unitn.repoman.core.lang.parsers.c.CParser; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.TerminalNode; + +public class CMethodCallTraversal extends MethodCallTraversal { + + public CMethodCallTraversal(ParseTree node) { + super(node); + } + + private class ParamsTraversal extends DFSTraversal { + private Set params = new HashSet<>(); + @Override + public void onEnterNode(ParseTree node) { + if (node instanceof CParser.PrimaryExpressionContext) { + params.add(node); + } + } + } + + @Override + public void onEnterNode(ParseTree node) { + skip--; + if (node.getParent() instanceof CParser.InitDeclaratorListContext) { + if (node.getChildCount() == 1) { + try { + this.methodContext = node.getParent().getParent(); + this.callNameNode = methodContext.getChild(0); + ParseTree declarator = node.getChild(0).getChild(0); + ParseTree lbrace = declarator.getChild(0); + this.paramsNode = declarator.getChild(1); + ParseTree rbrace = declarator.getChild(2); + if (lbrace.getText().equals("(")) { + if (paramsNode.getText().equals(")")) { + this.isMethodCall = true; + paramsNode = null; + } + else if (rbrace.getText().equals(")")) { + this.isMethodCall = true; + } + + } + if (paramsNode != null) { + this.params.add(paramsNode.getChild(0)); + } + + } + catch (NullPointerException e) { + this.isMethodCall = false; + } + return; + } + else { + skip = 5; + } + } + else if (node.getParent() instanceof CParser.ExpressionStatementContext + && !(node instanceof TerminalNode)) { + if (node.getChild(0).getChildCount() != 1) { + skip = 7; + } + else { + skip = 1; + } + } + if (skip == 0) { + if (node instanceof CParser.PostfixExpressionContext) { + if (node.getChild(0) instanceof CParser.PrimaryExpressionContext) { + skip = -1; + } + else { + try { + this.methodContext = node; + this.callNameNode = node.getChild(0); + ParseTree lbrace = node.getChild(1); + this.paramsNode = node.getChild(2); + ParseTree rbrace = node.getChild(3); + if (lbrace.getText().equals("(")) { + if (paramsNode.getText().equals(")")) { + this.isMethodCall = true; + paramsNode = null; + } + else if (rbrace.getText().equals(")")) { + this.isMethodCall = true; + } + + } + } + catch (NullPointerException e) { + this.isMethodCall = false; + } + if (this.paramsNode != null) { + ParamsTraversal pt = new ParamsTraversal(); + pt.traverse(paramsNode); + this.params.addAll(pt.params); + } + } + } + else { + skip++; + } + } + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/AssignmentSymbolExtractTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/AssignmentSymbolExtractTraversal.java new file mode 100755 index 0000000..9f1523a --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/AssignmentSymbolExtractTraversal.java @@ -0,0 +1,56 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import java.util.LinkedList; +import java.util.List; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +public class AssignmentSymbolExtractTraversal extends DFSTraversal { + private ParserRuleContext stmt = null; + private boolean isNextLeft = false; + private ParseTree lhs = null; + private List rhs = new LinkedList<>(); + + public AssignmentSymbolExtractTraversal(ParserRuleContext ctx) { + this.stmt = ctx; + traverse(); + } + + @Override + public void traverse() { + this.traverse(this.stmt); + } + + @Override + public void onEnterNode(ParseTree node) { + if (isWithinContext(node)) { + isNextLeft = true; + } + if (isNextLeft) { + if (wrapper.isTerminal(node) && wrapper.isToken(node)) { + isNextLeft = false; + lhs = node; + } + } + else { + SymbolExtractTraversal t = new SymbolExtractTraversal(stmt); + rhs.addAll(t.getSymbols()); + rhs.remove(lhs); + terminate(); + } + } + + @Override + protected boolean isWithinContext(ParseTree node) { + return wrapper.isStatement(node.getParent()) || + wrapper.isFieldDeclaration(node.getParent()); + } + + public ParseTree getLhs() { + return lhs; + } + + public List getRhsList() { + return rhs; + } +} \ No newline at end of file diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/ConditionTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/ConditionTraversal.java new file mode 100755 index 0000000..60bc870 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/ConditionTraversal.java @@ -0,0 +1,25 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import java.util.Set; +import java.util.HashSet; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +public class ConditionTraversal extends DFSTraversal { + private Set innerStmts = new HashSet<>(); + + public ConditionTraversal(ParserRuleContext cnd) { + traverse(cnd.getParent()); + } + + @Override + public void onEnterNode(ParseTree node) { + if (wrapper.isStatement(node)) { + innerStmts.add((ParserRuleContext)node); + } + } + + public Set getInnerStatements() { + return this.innerStmts; + } +} \ No newline at end of file diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/DFSTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/DFSTraversal.java new file mode 100755 index 0000000..6b48a04 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/DFSTraversal.java @@ -0,0 +1,58 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import it.unitn.repoman.core.lang.LanguageFactory; +import it.unitn.repoman.core.lang.wrappers.generic.Wrapper; +import java.lang.UnsupportedOperationException; +import org.antlr.v4.runtime.tree.ParseTree; + +public class DFSTraversal implements Traversal { + protected boolean isTerminated = false; + protected ParseTree lastNode = null; + protected Wrapper wrapper = LanguageFactory.getWrapper(); + + @Override + public void traverse(ParseTree root) { + if (root == null) { + return; + } + for (int i=0; i < root.getChildCount(); i++) { + if (isTerminated) { + onTerminate(); + break; + } + lastNode = root.getChild(i); + onEnterNode(lastNode); + traverse(lastNode); + onExitNode(lastNode); + } + } + + + public void traverse() { + throw new UnsupportedOperationException("ERROR: This method is not implemented!"); + } + + protected boolean isWithinContext(ParseTree node) { + return true; + } + + @Override + public void onEnterNode(ParseTree node) { + } + + @Override + public void onExitNode(ParseTree node) { + } + + protected void onTerminate() { + } + + protected void terminate() { + this.isTerminated = true; + } + + public ParseTree getLastNode() { + return this.lastNode; + } + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/DotSymbolTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/DotSymbolTraversal.java new file mode 100644 index 0000000..7ffbdf8 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/DotSymbolTraversal.java @@ -0,0 +1,51 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import org.antlr.v4.runtime.tree.ParseTree; + +import java.util.LinkedList; +import java.util.List; + +public class DotSymbolTraversal extends DFSTraversal{ + + private ParseTree rightmostNode = null; + private List nodes = new LinkedList<>(); + + public DotSymbolTraversal(ParseTree root) { + traverse(root); + rightmostNode = nodes.get(nodes.size()-1); + } + + @Override + public void onEnterNode(ParseTree node) { + if (wrapper.isTerminal(node)) { + if (!node.getText().equals(".")) { + nodes.add(node); + } + } + } + + public ParseTree getRightmostNode() { + return rightmostNode; + } + + public String getRightmostNodeName() { + return (rightmostNode != null) ? rightmostNode.getText() : ""; + } + + public List getLeftNodes() { + List leftNodes = new LinkedList<>(); + leftNodes.addAll(nodes); + if (rightmostNode != null) { + leftNodes.remove(rightmostNode); + } + return leftNodes; + } + + public List getLeftNodesNames() { + List leftNodesNames = new LinkedList<>(); + for (ParseTree node : getLeftNodes()) { + leftNodesNames.add(node.getText()); + } + return leftNodesNames; + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/FormalParameterTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/FormalParameterTraversal.java new file mode 100644 index 0000000..5b7913e --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/FormalParameterTraversal.java @@ -0,0 +1,52 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import it.unitn.repoman.core.lang.parsers.java.JavaParser; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +public class FormalParameterTraversal extends DFSTraversal { + + private ParseTree type; + private ParseTree variable; + + public FormalParameterTraversal(ParserRuleContext ctx) { + if (wrapper.isFormalParameter(ctx)) { + traverse(ctx); + } + } + + @Override + public void onEnterNode(ParseTree node) { + if (node.getClass().equals(JavaParser.TypeTypeContext.class)) { + type = node; + } + else if (node.getClass().equals(JavaParser.VariableDeclaratorIdContext.class)) { + variable = node; + } + } + + public String getTypeName() { + return type.getText(); + } + + public String getVariableName() { + return variable.getText(); + } + + public ParseTree getTypeTerminalNode() { + return type.getChild(0); + } + + public ParseTree getTypeNode() { + return type; + } + + public ParseTree getVariableTerminalNode() { + return variable.getChild(0); + } + + public ParseTree getVariableNode() { + return variable; + } + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/MethodCallTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/MethodCallTraversal.java new file mode 100755 index 0000000..a396ff3 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/MethodCallTraversal.java @@ -0,0 +1,64 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import java.util.LinkedList; +import java.util.List; +import org.antlr.v4.runtime.tree.ParseTree; + + +public abstract class MethodCallTraversal extends DFSTraversal { + protected boolean isMethodCall = false; + protected ParseTree callNameNode = null; + protected ParseTree paramsNode = null; + protected final List params = new LinkedList<>(); + protected final List paramNames = new LinkedList<>(); + protected final int numberOfParams; + protected int skip = -1; + protected ParseTree methodContext = null; + + + public MethodCallTraversal(ParseTree node) { + traverse(node); + for (ParseTree t : params) { + if (wrapper.isToken(t)) { + paramNames.add(t.getText()); + } + } + numberOfParams = params.size(); + } + + public String getMethodName() { + return (callNameNode != null) ? callNameNode.getText() : ""; + } + + public int getParamsNumber() { + return numberOfParams; + } + + public ParseTree getCallNameNode() { + return this.callNameNode; + } + + public List getParams() { + return this.params; + } + + public List getParamNames() { + return paramNames; + } + + public ParseTree getParamsNode() { + return this.paramsNode; + } + + public boolean isMethodCall() { + return this.isMethodCall; + } + + public ParseTree getMethodContextNode() { + return this.methodContext; + } + + public String getParamName(int pos) { + return getParamNames().get(pos); + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/MethodDeclarationTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/MethodDeclarationTraversal.java new file mode 100644 index 0000000..ce11e39 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/MethodDeclarationTraversal.java @@ -0,0 +1,69 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; +import java.util.LinkedList; +import java.util.List; + +public class MethodDeclarationTraversal extends DFSTraversal { + + private ParseTree methodName = null; + private ParseTree returnType = null; + private List paramNames = new LinkedList<>(); + private List paramNodes = new LinkedList<>(); + private final List parameters = new LinkedList<>(); + + public MethodDeclarationTraversal(ParserRuleContext ctx) { + if (wrapper.isMethodDeclaration(ctx)) { + traverse(ctx); + } // or else throw an exception? + for (ParserRuleContext param : parameters) { + FormalParameterTraversal t = new FormalParameterTraversal(param); + paramNames.add(t.getVariableName()); + paramNodes.add(t.getVariableTerminalNode()); + } + } + + @Override + public void onEnterNode(ParseTree node) { + if (returnType == null && wrapper.isTerminal(node)) { + returnType = node; + } + else if (methodName == null && wrapper.isTerminal(node)) { + methodName = node; + } + else if (methodName != null && returnType != null){ + if (wrapper.isFormalParameter(node)) { + parameters.add((ParserRuleContext) node); + } + } + } + + public String getMethodName() { + return methodName.getText(); + } + + public String getReturnType() { + return returnType.getText(); + } + + public List getParamNames() { + return paramNames; + } + + public int getParamsNumber() { + return parameters.size(); + } + + public String getParamName(int pos) { + return paramNames.get(pos); + } + + public ParseTree getParamNode(int pos) { + return paramNodes.get(pos); + } + + public ParseTree getParam(int pos) { + return parameters.get(pos); + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/NodeContainmentTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/NodeContainmentTraversal.java new file mode 100644 index 0000000..47569f7 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/NodeContainmentTraversal.java @@ -0,0 +1,27 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +public class NodeContainmentTraversal extends DFSTraversal { + + private boolean isFound = false; + private final ParseTree soughtNode; + + public NodeContainmentTraversal(ParserRuleContext root, ParseTree node) { + soughtNode = node; + traverse(root); + } + + @Override + public void onEnterNode(ParseTree node) { + if (node.equals(soughtNode)) { + isFound = true; + terminate(); + } + } + + public boolean isFound() { + return isFound; + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/ScopesTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/ScopesTraversal.java new file mode 100755 index 0000000..8b582dd --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/ScopesTraversal.java @@ -0,0 +1,56 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import java.util.Set; +import java.util.HashSet; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +public class ScopesTraversal extends DFSTraversal { + private Set fields = new HashSet<>(); + private Set methods = new HashSet<>(); + private int currentLine = 0; + private int totalLines = 0; + private final Set collectableLines = new HashSet<>(); + + public ScopesTraversal(ParserRuleContext root) { + traverse(root); + } + + @Override + public void onEnterNode(ParseTree node) { + //collect all "collectable" lines + if (wrapper.isCollectable(node)) { + int line = ((ParserRuleContext)node).getStart().getLine(); + this.collectableLines.add(line); + } + if (wrapper.isRuleContext(node)) { + int lookupLine = ((ParserRuleContext)node).getStart().getLine(); + if (currentLine != lookupLine) { + currentLine = lookupLine; + this.totalLines++; + } + } + if (wrapper.isFieldDeclaration(node)) { + fields.add((ParserRuleContext)node); + } + if (wrapper.isMethodDeclaration(node)) { + methods.add((ParserRuleContext)node); + } + } + + public Set getScopes() { + return this.methods; + } + + public Set getFields() { + return this.fields; + } + + public int getTotalLinesCount() { + return this.totalLines; + } + + public Set getCollectableLines() { + return this.collectableLines; + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/SeedTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/SeedTraversal.java new file mode 100755 index 0000000..5415bec --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/SeedTraversal.java @@ -0,0 +1,39 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +import it.unitn.repoman.core.exceptions.InvalidLineException; + +public final class SeedTraversal extends DFSTraversal { + private ParserRuleContext seedScope = null; + private ParserRuleContext seedStmt = null; + private int seedLine; + + public SeedTraversal(int line) { + this.seedLine = line; + } + + @Override + public void onEnterNode(ParseTree node) { + if (wrapper.isMethodDeclaration(node)) { + this.seedScope = (ParserRuleContext)node; + } + if (wrapper.isCollectable(node)) { + ParserRuleContext nodeCtx = (ParserRuleContext)node; + if (this.seedStmt == null && nodeCtx.getStart().getLine() == this.seedLine) { + this.seedStmt = (ParserRuleContext)node; + terminate(); + } + } + } + + public ParserRuleContext getSeedScope() throws InvalidLineException { + return this.seedScope; + } + + public ParserRuleContext getSeedStmt() throws InvalidLineException { + return this.seedStmt; + } +} + diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/StatementMappingTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/StatementMappingTraversal.java new file mode 100755 index 0000000..809c117 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/StatementMappingTraversal.java @@ -0,0 +1,31 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import java.util.LinkedHashSet; +import java.util.Set; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +public class StatementMappingTraversal extends DFSTraversal { + + private final Set methodDeclarations = new LinkedHashSet<>(); + private final Set statements = new LinkedHashSet<>(); + + @Override + public void onEnterNode(ParseTree node) { + if (wrapper.isCollectable(node)) { + this.statements.add((ParserRuleContext) node); + } + else if (wrapper.isMethodDeclaration(node)) { + this.methodDeclarations.add((ParserRuleContext) node); + } + } + + public Set getStatements() { + return this.statements; + } + + public Set getMethodDeclarations() { + return this.methodDeclarations; + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/SymbolExtractTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/SymbolExtractTraversal.java new file mode 100755 index 0000000..91f7f6b --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/SymbolExtractTraversal.java @@ -0,0 +1,42 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import java.util.LinkedHashSet; +import java.util.Set; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +public class SymbolExtractTraversal extends DFSTraversal { + + private Set symbols = new LinkedHashSet<>(); + + public SymbolExtractTraversal(ParserRuleContext ctx) { + MethodCallTraversal t = wrapper.getMethodCallTraversal(ctx); + if (!t.isMethodCall()) { + traverse(ctx); + } + else { + this.symbols.addAll(t.getParams()); + DotSymbolTraversal dott = new DotSymbolTraversal(t.getCallNameNode()); + symbols.addAll(dott.getLeftNodes()); + } + } + + + @Override + public void onEnterNode(ParseTree node) { + if (isWithinContext(node) && wrapper.isToken(node) && wrapper.isToken(node)) { + symbols.add(node); + } + } + + @Override + protected boolean isWithinContext(ParseTree node) { + return wrapper.isTerminal(node); + } + + public Set getSymbols() { + return this.symbols; + } + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/Traversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/Traversal.java new file mode 100755 index 0000000..e6a1880 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/generic/Traversal.java @@ -0,0 +1,9 @@ +package it.unitn.repoman.core.lang.traversals.generic; + +import org.antlr.v4.runtime.tree.ParseTree; + +public interface Traversal { + void traverse(ParseTree startNode); + void onEnterNode(ParseTree node); + void onExitNode(ParseTree node); +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/java/JavaAPISignatureTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/java/JavaAPISignatureTraversal.java new file mode 100644 index 0000000..73c4c5f --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/java/JavaAPISignatureTraversal.java @@ -0,0 +1,125 @@ +package it.unitn.repoman.core.lang.traversals.java; + +import java.util.HashSet; +import java.util.Set; + +import it.unitn.repoman.core.lang.traversals.generic.DFSTraversal; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +import it.unitn.repoman.core.lang.parsers.java.JavaParser; + +public class JavaAPISignatureTraversal extends DFSTraversal { + protected final Set signatures = new HashSet<>(); + + public JavaAPISignatureTraversal(ParseTree node) { + traverse(node); + } + + @Override + public void onEnterNode(ParseTree node) { + if (wrapper.isMethodDeclaration(node)) { + ParserRuleContext method = (ParserRuleContext) node; + this.signatures.add(getMethodSignature(method)); + } + } + + public String getMethodSignature(ParserRuleContext method) { + StringBuilder builder = new StringBuilder(); + if (wrapper.isMethodDeclaration(method)) { + ParserRuleContext declRoot = method.getParent().getParent(); + for (int i=0; i getPublicSignatures() { + Set s = new HashSet<>(); + for (String signature : this.signatures) { + if (this.isPublicMethod(signature)) { + s.add(signature); + } + } + return s; + } + + public Set getProtectedSignatures() { + Set s = new HashSet<>(); + for (String signature : this.signatures) { + if (this.isProtectedMethod(signature)) { + s.add(signature); + } + } + return s; + } + + public Set getPrivateSignatures() { + Set s = new HashSet<>(); + for (String signature : this.signatures) { + if (this.isPrivateMethod(signature)) { + s.add(signature); + } + } + return s; + } + + public Set getSignatures() { + return this.signatures; + } + + + public int getPublicSignaturesCount() { + return this.getPublicSignatures().size(); + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/java/JavaMethodCallTraversal.java b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/java/JavaMethodCallTraversal.java new file mode 100755 index 0000000..54afc22 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/traversals/java/JavaMethodCallTraversal.java @@ -0,0 +1,114 @@ +package it.unitn.repoman.core.lang.traversals.java; + +import java.util.LinkedList; +import java.util.List; + +import it.unitn.repoman.core.lang.traversals.generic.DotSymbolTraversal; +import it.unitn.repoman.core.lang.traversals.generic.MethodCallTraversal; +import it.unitn.repoman.core.lang.traversals.generic.DFSTraversal; +import it.unitn.repoman.core.lang.parsers.java.JavaParser; + +import org.antlr.v4.runtime.tree.ParseTree; + +public class JavaMethodCallTraversal extends MethodCallTraversal { + + public JavaMethodCallTraversal(ParseTree node) { + super(node); + } + + private class ParamsTraversal extends DFSTraversal { + private List params = new LinkedList<>(); + @Override + public void onEnterNode(ParseTree node) { + if (node.getClass().equals(JavaParser.ExpressionContext.class) && + node.getParent().getClass().equals(JavaParser.ExpressionListContext.class)) { + SingleParamTraversal t = new SingleParamTraversal(); + t.traverse(node); + if (t.paramName != null) { + params.add(t.paramName); + } + } + + } + } + + private class SingleParamTraversal extends DFSTraversal { + private ParseTree paramName = null; + @Override + public void onEnterNode(ParseTree node) { + if (wrapper.isTerminal(node) && wrapper.isToken(node)) { + paramName = node; + terminate(); + } + } + } + + @Override + public void onEnterNode(ParseTree node) { + skip--; + if (node.getClass().equals(JavaParser.LocalVariableDeclarationContext.class)) { + skip = 10; + } + if (node.getClass().equals(JavaParser.StatementExpressionContext.class)) { + if (node.getChild(0).getChild(1).getText().equals("(")) { + skip = 1; + } + else { + skip = 6; + } + } + else if (node.getClass().equals(JavaParser.ExpressionContext.class)) { + if (node.getChild(1) != null && node.getChild(1).getText().equals("(")) { + skip = 0; + } + else { + skip = 5; + } + } + + if (skip == 0) { + try { + this.methodContext = node; + this.callNameNode = node.getChild(0); + ParseTree lbrace = node.getChild(1); + this.paramsNode = node.getChild(2); + ParseTree rbrace = node.getChild(3); + + if (lbrace.getText().equals("(")) { + if (paramsNode.getText().equals(")")) { + this.isMethodCall = true; + paramsNode = null; + } else if (rbrace.getText().equals(")")) { + this.isMethodCall = true; + } + } + + if (paramsNode != null) { + ParamsTraversal pt = new ParamsTraversal(); + pt.traverse(paramsNode); + for (ParseTree param : pt.params) { + if (wrapper.isToken(param)) { + this.params.add(param); + } + } + } + } + catch (NullPointerException e) { + this.isMethodCall = false; + } + finally { + terminate(); + } + } + } + + @Override + public String getMethodName() { + if (callNameNode != null) { + DotSymbolTraversal t = new DotSymbolTraversal(callNameNode); + return t.getRightmostNodeName(); + } + return ""; + } + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/c/CWrapper.java b/repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/c/CWrapper.java new file mode 100755 index 0000000..43986fb --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/c/CWrapper.java @@ -0,0 +1,103 @@ +package it.unitn.repoman.core.lang.wrappers.c; + +import it.unitn.repoman.core.lang.traversals.c.CMethodCallTraversal; +import it.unitn.repoman.core.lang.traversals.generic.MethodCallTraversal; +import it.unitn.repoman.core.lang.wrappers.generic.Wrapper; +import it.unitn.repoman.core.lang.parsers.c.CParser; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.TerminalNodeImpl; + + +public class CWrapper extends Wrapper { + + public CWrapper() { + this.restrictedKeywords = new String[]{ "return", "true", "false"}; + } + + @Override + public boolean isStatement(ParseTree node) { + return node instanceof CParser.DeclarationContext || + node instanceof CParser.ExpressionStatementContext; + } + + @Override + public boolean isReturnStatement(ParseTree node) { + return (node instanceof CParser.JumpStatementContext && node.getChild(0).getText().equals("return")); + } + + @Override + public boolean isConditionalExpression(ParseTree node) { + return (node instanceof CParser.ExpressionContext && + node.getParent() instanceof CParser.SelectionStatementContext); + } + + @Override + public boolean isMethodDeclaration(ParseTree node) { + return node instanceof CParser.FunctionDefinitionContext; + } + + @Override + public boolean isFieldDeclaration(ParseTree node) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isToken(ParseTree node) { + Pattern pattern = Pattern.compile(this.validVarNameRegex); + Matcher matcher = pattern.matcher(node.getText()); + return (!isRestrictedKeyword(node) && matcher.matches() && + node instanceof TerminalNodeImpl); + } + + @Override + public boolean isFormalParameter(ParseTree node) { + return node instanceof CParser.DeclaratorContext && + node.getParent() instanceof CParser.ParameterDeclarationContext; + } + + @Override + protected String getMethodDeclarationName(ParseTree node) { + return node.getChild(1).getChild(0).getChild(0).getText(); + } + + @Override + protected ParseTree getMethodDeclarationParams(ParseTree node) { + return node.getChild(1).getChild(0).getChild(2); + } + + @Override + public MethodCallTraversal getMethodCallTraversal(ParseTree node) { + return new CMethodCallTraversal(node); + } + + @Override + public boolean isTerminal(ParseTree node) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isLocalVariableDeclaration(ParseTree node) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isAssignmentExpression(ParseTree node) { + // TODO Auto-generated method stub + return false; + } + + // TODO: implement the method + @Override + public boolean isPartOfExpression(ParseTree node) { + return false; + } + + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/generic/Wrapper.java b/repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/generic/Wrapper.java new file mode 100755 index 0000000..4ee4e63 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/generic/Wrapper.java @@ -0,0 +1,137 @@ +package it.unitn.repoman.core.lang.wrappers.generic; + +import it.unitn.repoman.core.lang.traversals.generic.MethodCallTraversal; +import it.unitn.repoman.core.lang.traversals.generic.SymbolExtractTraversal; +import it.unitn.repoman.core.lang.traversals.generic.AssignmentSymbolExtractTraversal; + +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.Set; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +public abstract class Wrapper { + + protected String validVarNameRegex = "[A-Za-z_][A-Za-z_0-9]*$"; + + protected String[] restrictedKeywords = {""}; + + public abstract boolean isTerminal(ParseTree node); + + public abstract boolean isStatement(ParseTree node); + + public abstract boolean isLocalVariableDeclaration(ParseTree node); + + public abstract boolean isAssignmentExpression(ParseTree node); + + public abstract boolean isPartOfExpression(ParseTree node); + + public abstract boolean isReturnStatement(ParseTree node); + + public abstract boolean isConditionalExpression(ParseTree node); + + public abstract boolean isMethodDeclaration(ParseTree node); + + public abstract boolean isFieldDeclaration(ParseTree node); + + public abstract boolean isToken(ParseTree node); + + public abstract boolean isFormalParameter(ParseTree node); + + + protected abstract String getMethodDeclarationName(ParseTree node); + + protected abstract ParseTree getMethodDeclarationParams(ParseTree node); + + public boolean isClassDeclaration(ParseTree node) { + return false; + } + + public boolean isTypeDeclaration(ParseTree node) { + return false; + } + + public boolean isCollectable(ParseTree node) { + if (!(node instanceof ParserRuleContext)) { + return false; + } + return (this.isStatement(node) || + this.isConditionalExpression(node) || + this.isReturnStatement(node) || + this.isFieldDeclaration(node)); + } + + public boolean isRuleContext(ParseTree node) { + return node instanceof ParserRuleContext; + } + + protected boolean isRestrictedKeyword(ParseTree node) { + for (int i = 0; i < this.restrictedKeywords.length; i++) { + if (this.restrictedKeywords[i].equals(node.getText())) { + return true; + } + } + return false; + } + + public ParseTree getDefinedVar(ParserRuleContext stmt) { + ParseTree defVar = null; + if (this.isLocalVariableDeclaration(stmt) || this.isAssignmentExpression(stmt) || + this.isFieldDeclaration(stmt)) { + AssignmentSymbolExtractTraversal traversal = new AssignmentSymbolExtractTraversal(stmt); + defVar = traversal.getLhs(); + } + return defVar; + } + + public Set getReferencedVars(ParserRuleContext stmt) { + Set refVars = new LinkedHashSet<>(); + if (isLocalVariableDeclaration(stmt) || isAssignmentExpression(stmt) || isFieldDeclaration(stmt)) { + AssignmentSymbolExtractTraversal traversal = new AssignmentSymbolExtractTraversal(stmt); + for (ParseTree var : traversal.getRhsList()) { + refVars.add(var); + } + } + else if (isConditionalExpression(stmt) || isMethodCall(stmt) || isReturnStatement(stmt)) { + SymbolExtractTraversal traversal = new SymbolExtractTraversal(stmt); + for (ParseTree var : traversal.getSymbols()) { + refVars.add(var); + } + } + return refVars; + } + + public ParserRuleContext getContainer(ParseTree ctx) { + ParseTree c = ctx.getParent(); + while (!isTypeDeclaration(c)) { + if (isMethodDeclaration(c)) { + return (ParserRuleContext)c; + } + c = c.getParent(); + } + return (ParserRuleContext)c; + } + + public boolean precedes(ParserRuleContext stmt1, ParserRuleContext stmt2) { + if (stmt1 == null || stmt2 == null) { + return false; + } + return (stmt1.getStart().getLine() < stmt2.getStart().getLine()); + } + + + public Collection getExternalSeeds(ParseTree method, ParseTree decl) { + // TODO Auto-generated method stub + final Set seeds = new HashSet<>(); + return seeds; + } + + public abstract MethodCallTraversal getMethodCallTraversal(ParseTree node); + + public boolean isMethodCall(ParseTree stmt) { + MethodCallTraversal traversal = this.getMethodCallTraversal(stmt); + return traversal.isMethodCall(); + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/java/JavaWrapper.java b/repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/java/JavaWrapper.java new file mode 100755 index 0000000..cd649f7 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/lang/wrappers/java/JavaWrapper.java @@ -0,0 +1,114 @@ +package it.unitn.repoman.core.lang.wrappers.java; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import it.unitn.repoman.core.lang.wrappers.generic.Wrapper; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.TerminalNodeImpl; + +import it.unitn.repoman.core.lang.traversals.java.JavaMethodCallTraversal; +import it.unitn.repoman.core.lang.traversals.generic.MethodCallTraversal; +import it.unitn.repoman.core.lang.parsers.java.JavaParser; + +public class JavaWrapper extends Wrapper { + + public JavaWrapper() { + this.restrictedKeywords = new String[]{"true", "false", "return", "null", "new", "this"}; + } + + @Override + public boolean isStatement(ParseTree node) { + return node.getClass().equals(JavaParser.StatementExpressionContext.class) || + node.getClass().equals(JavaParser.LocalVariableDeclarationContext.class) || + node.getClass().equals(JavaParser.FieldDeclarationContext.class); + } + + @Override + public boolean isReturnStatement(ParseTree node) { + return (node.getClass().equals(JavaParser.StatementContext.class) && node.getChild(0).getText().equals("return")); + } + + @Override + public boolean isConditionalExpression(ParseTree node) { + return node.getClass().equals(JavaParser.ParExpressionContext.class); + } + + @Override + public boolean isMethodDeclaration(ParseTree node) { + return node.getClass().equals(JavaParser.MethodDeclarationContext.class); + } + + @Override + public boolean isClassDeclaration(ParseTree node) { + return node.getClass().equals(JavaParser.ClassDeclarationContext.class); + } + + @Override + public boolean isTypeDeclaration(ParseTree node) { + return node.getClass().equals(JavaParser.TypeDeclarationContext.class); + } + + @Override + public boolean isFieldDeclaration(ParseTree node) { + return node.getClass().equals(JavaParser.FieldDeclarationContext.class); + } + + @Override + public boolean isToken(ParseTree node) { + Pattern pattern = Pattern.compile(this.validVarNameRegex); + Matcher matcher = pattern.matcher(node.getText()); + return (!isRestrictedKeyword(node) && matcher.matches() && + !(node.getParent().getClass().equals(JavaParser.ClassOrInterfaceTypeContext.class)) && + !(node.getParent().getClass().equals(JavaParser.PrimitiveTypeContext.class))); + } + + @Override + public boolean isFormalParameter(ParseTree node) { + return node.getClass().equals(JavaParser.FormalParameterContext.class); + } + + @Override + protected String getMethodDeclarationName(ParseTree node) { + return node.getChild(1).getText(); + } + + @Override + protected ParseTree getMethodDeclarationParams(ParseTree node) { + return node.getChild(2).getChild(1); + } + + @Override + public MethodCallTraversal getMethodCallTraversal(ParseTree node) { + return new JavaMethodCallTraversal(node.getParent()); + } + + @Override + public boolean isTerminal(ParseTree node) { + return node.getClass().equals(TerminalNodeImpl.class); + } + + @Override + public boolean isLocalVariableDeclaration(ParseTree node) { + return node.getClass().equals(JavaParser.LocalVariableDeclarationContext.class); + } + + @Override + public boolean isAssignmentExpression(ParseTree node) { + if (node.getClass().equals(JavaParser.StatementExpressionContext.class)) { + ParseTree child = node.getChild(0); + if (child.getChildCount() > 1) { + child = child.getChild(1); + if (child.getText().equals("=")) { + return true; + } + } + } + return false; + } + + @Override + public boolean isPartOfExpression(ParseTree node) { + return node.getClass().equals(JavaParser.ExpressionContext.class); + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/slicers/LightweightSlice.java b/repoman/src/main/java/it/unitn/repoman/core/slicers/LightweightSlice.java new file mode 100755 index 0000000..c1b4d15 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/slicers/LightweightSlice.java @@ -0,0 +1,124 @@ +package it.unitn.repoman.core.slicers; + +import java.util.*; + +import it.unitn.repoman.core.lang.LanguageFactory; +import it.unitn.repoman.core.lang.traversals.generic.MethodCallTraversal; +import it.unitn.repoman.core.lang.traversals.generic.MethodDeclarationTraversal; +import it.unitn.repoman.core.slicers.tainters.BackwardTainter; +import it.unitn.repoman.core.slicers.tainters.ForwardTainter; +import it.unitn.repoman.core.slicers.tainters.TaintedVariableSet; +import org.antlr.v4.runtime.ParserRuleContext; +import it.unitn.repoman.core.lang.traversals.generic.StatementMappingTraversal; +import org.antlr.v4.runtime.tree.ParseTree; + +public class LightweightSlice { + + protected final ParserRuleContext root; + protected final Set selectedLines = new LinkedHashSet<>(); + protected final Set collectables; + protected final Set methodDeclarations; + + public LightweightSlice(ParserRuleContext root, Set lines) throws Exception { + this.root = root; + StatementMappingTraversal statementGetter = new StatementMappingTraversal(); + statementGetter.traverse(this.root); + + collectables = statementGetter.getStatements(); + methodDeclarations = statementGetter.getMethodDeclarations(); + + Set toAdd = new LinkedHashSet<>(); + toAdd.addAll(makePass(lines)); + + selectedLines.addAll(toAdd); + } + + protected Set makePass(Set lines) { + Set matchedLines = new LinkedHashSet<>(); + Set statements = new LinkedHashSet<>(); + for (ParserRuleContext stmt : collectables) { + if (lines.contains(stmt.getStart().getLine())) { + statements.add(stmt); + } + } + + ForwardTainter forwardTainter = new ForwardTainter(collectables, statements); + matchedLines.addAll(forwardTainter.getCollectedLines()); + + BackwardTainter backwardTainter = new BackwardTainter(collectables, statements); + matchedLines.addAll(backwardTainter.getCollectedLines()); + + /* TODO: Experimental + Set inter = propagrateForwardTaint(collectables, methodDeclarations, forwardTainter); + matchedLines.addAll(inter); + */ + return matchedLines; + } + + // TODO: Experimental + protected Set propagrateForwardTaint(Set collectables, Set methodDeclarations, ForwardTainter forwardTainter) { + + Set collected = new LinkedHashSet<>(); + + // get intra-procedural tainted variables + TaintedVariableSet taintedVars = forwardTainter.getTaintedVars(); + + // get intra-procedural tainted method calls + Set taintedMethodCalls = forwardTainter.getTaintedMethodCalls(); + + // match a tainted method call to the corresponding method declaration + for (ParserRuleContext tmc : taintedMethodCalls) { + MethodCallTraversal t1 = LanguageFactory.getWrapper().getMethodCallTraversal(tmc); + String methodCallName = t1.getMethodName(); + for (ParserRuleContext md : methodDeclarations) { + MethodDeclarationTraversal t2 = new MethodDeclarationTraversal(md); + String methodDeclName = t2.getMethodName(); + if (methodCallName.equals(methodDeclName) && t1.getParamsNumber() == t2.getParamsNumber()) { + // ---------------- inter-procedural "expansion" goes here ---------------------------------------- + // get tainted variables for the method call statement + List vars = forwardTainter.getTaintedVars().getStatementVariables((ParserRuleContext) t1.getMethodContextNode()); + // keep only tainted parameters + List taintedParams = new LinkedList<>(); + List params = t1.getParamNames(); + for (int i=0; i matchedTaintedParams = new LinkedList<>(); + for (int i=0; i getSelectedLines() { + return this.selectedLines; + } + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/slicers/LightweightSlicePessimist.java b/repoman/src/main/java/it/unitn/repoman/core/slicers/LightweightSlicePessimist.java new file mode 100644 index 0000000..959bf3f --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/slicers/LightweightSlicePessimist.java @@ -0,0 +1,35 @@ +package it.unitn.repoman.core.slicers; + +import it.unitn.repoman.core.slicers.tainters.BackwardTainterPessimist; +import it.unitn.repoman.core.slicers.tainters.ForwardTainterPessimist; +import org.antlr.v4.runtime.ParserRuleContext; + +import java.util.LinkedHashSet; +import java.util.Set; + +public class LightweightSlicePessimist extends LightweightSlice { + + public LightweightSlicePessimist(ParserRuleContext root, Set lines) throws Exception { + super(root, lines); + } + + @Override + protected Set makePass(Set lines) { + Set matchedLines = new LinkedHashSet<>(); + Set statements = new LinkedHashSet<>(); + for (ParserRuleContext stmt : collectables) { + if (lines.contains(stmt.getStart().getLine())) { + statements.add(stmt); + } + } + + ForwardTainterPessimist forwardTainter = new ForwardTainterPessimist(collectables, statements); + matchedLines.addAll(forwardTainter.getCollectedLines()); + + BackwardTainterPessimist backwardTainter = new BackwardTainterPessimist(collectables, statements); + matchedLines.addAll(backwardTainter.getCollectedLines()); + + return matchedLines; + } + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/AbstractTainter.java b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/AbstractTainter.java new file mode 100644 index 0000000..eeda2e3 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/AbstractTainter.java @@ -0,0 +1,73 @@ +package it.unitn.repoman.core.slicers.tainters; + +import it.unitn.repoman.core.lang.LanguageFactory; +import it.unitn.repoman.core.lang.wrappers.generic.Wrapper; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +import java.util.*; + +public abstract class AbstractTainter { + + protected final Wrapper wrapper = LanguageFactory.getWrapper(); + protected final Set collectables; + protected final TaintedVariableSet taints = new TaintedVariableSet(); + protected final Set taintedStatements = new LinkedHashSet<>(); + + public AbstractTainter(Set collectables, List taintedVars) { + this.collectables = collectables; + Set seeds = new LinkedHashSet<>(); + + for (ParseTree taintedVar : taintedVars) { + ParserRuleContext taintedVarScope = wrapper.getContainer(taintedVar); + taints.addTaintedVariable(taintedVarScope, taintedVar); + + for (ParserRuleContext collectable : collectables) { + ParserRuleContext collectableScope = wrapper.getContainer(collectable); + if (taintedVarScope.equals(collectableScope)) { + Set referencedVars = wrapper.getReferencedVars(collectable); + for (ParseTree refVar : referencedVars) { + if (refVar.getText().equals(taintedVar.getText())) { + seeds.add(collectable); + taints.addTaintedVariable(collectableScope, refVar); + } + } + } + } + } + initSeeds(seeds); + expand(); + } + + public AbstractTainter(Set collectables, Set seeds) { + this.collectables = collectables; + initSeeds(seeds); + expand(); + } + + protected void expand() { + Queue q = new LinkedList<>(); + q.addAll(taintedStatements); + while (!q.isEmpty()) { + ParserRuleContext stmt = q.poll(); + Set growths = iterate(stmt); + taintedStatements.add(stmt); + q.addAll(growths); + } + } + + public Set getCollectedLines() { + Set lineNumbers = new LinkedHashSet<>(); + for (ParserRuleContext stmt : this.taintedStatements) { + lineNumbers.add(stmt.getStart().getLine()); + } + return lineNumbers; + } + + public TaintedVariableSet getTaintedVars() { + return this.taints; + } + + protected abstract void initSeeds(Set seeds); + public abstract Set iterate(ParserRuleContext taintedStmt); +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/BackwardTainter.java b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/BackwardTainter.java new file mode 100644 index 0000000..7d62d23 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/BackwardTainter.java @@ -0,0 +1,75 @@ +package it.unitn.repoman.core.slicers.tainters; + +import java.util.*; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; +import it.unitn.repoman.core.lang.traversals.generic.ConditionTraversal; + +public class BackwardTainter extends ForwardTainter { + + public BackwardTainter(Set collectables, Set seeds) { + super(collectables, seeds); + } + + @Override + protected void initSeed(ParserRuleContext stmt) { + this.taintedStatements.add(stmt); + ParserRuleContext scope = wrapper.getContainer(stmt); + Set refVars = wrapper.getReferencedVars(stmt); + for (ParseTree refVar : refVars) { + this.taints.addTaintedVariable(scope, refVar); + } + ParseTree defVar = wrapper.getDefinedVar(stmt); + if (defVar != null) { + this.taints.addTaintedVariable(scope, defVar); + } + } + + @Override + public Set iterate(ParserRuleContext taintedStmt) { + Set elementsToAdd = new LinkedHashSet<>(); + ParserRuleContext taintedScope = wrapper.getContainer(taintedStmt); + + LinkedList list = new LinkedList<>(this.collectables); + Iterator backwardIter = list.descendingIterator(); + while (backwardIter.hasNext()) { + ParserRuleContext collectable = backwardIter.next(); + if (taintedStatements.contains(collectable)) { + continue; + } + ParserRuleContext collectableScope = wrapper.getContainer(collectable); + if (collectableScope.equals(taintedScope) && wrapper.precedes(collectable, taintedStmt)) { + Set taintedVars = this.taints.getVariableNames(collectableScope); + // if the seed is an inner statement of a conditional statement, take the conditional statement----- + if (wrapper.isConditionalExpression(collectable)) { + ConditionTraversal t = new ConditionTraversal(collectable); + for (ParserRuleContext innerStmt : t.getInnerStatements()) { + if (this.taintedStatements.contains(innerStmt) || elementsToAdd.contains(innerStmt)) { + elementsToAdd.add(collectable); + Set referencedVars = wrapper.getReferencedVars(collectable); + for (ParseTree referencedVar : referencedVars) { + taints.addTaintedVariable(collectableScope, referencedVar); + } + break; + } + } + } + else { + ParseTree definedVar = wrapper.getDefinedVar(collectable); + if (definedVar != null) { + if (taintedVars.contains(definedVar.getText())) { + elementsToAdd.add(collectable); + Set referencedVars = wrapper.getReferencedVars(collectable); + for (ParseTree referencedVar : referencedVars) { + taints.addTaintedVariable(collectableScope, referencedVar); + } + } + } + } + } + } + return elementsToAdd; + } + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/BackwardTainterPessimist.java b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/BackwardTainterPessimist.java new file mode 100644 index 0000000..a582bb0 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/BackwardTainterPessimist.java @@ -0,0 +1,104 @@ +package it.unitn.repoman.core.slicers.tainters; + +import it.unitn.repoman.core.lang.traversals.generic.ConditionTraversal; +import it.unitn.repoman.core.lang.traversals.generic.MethodCallTraversal; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +import java.util.*; + +public class BackwardTainterPessimist extends BackwardTainter { + + public BackwardTainterPessimist(Set collectables, Set seeds) { + super(collectables, seeds); + } + + @Override + protected void initSeed(ParserRuleContext stmt) { + this.taintedStatements.add(stmt); + ParserRuleContext scope = wrapper.getContainer(stmt); + Set refVars = wrapper.getReferencedVars(stmt); + for (ParseTree refVar : refVars) { + this.taints.addTaintedVariable(scope, refVar); + } + ParseTree defVar = wrapper.getDefinedVar(stmt); + if (defVar != null) { + this.taints.addTaintedVariable(scope, defVar); + } + /* + * THIS SHOULD NOT HAPPEN IN AN "EFFECT-FREE" SLICE! + * taint ref. variables in a method call as well */ + if (wrapper.isMethodCall(stmt)) { + for (ParseTree var : wrapper.getReferencedVars(stmt)) { + this.taints.addTaintedVariable(scope, var); + } + } + } + + + @Override + public Set iterate(ParserRuleContext taintedStmt) { + Set elementsToAdd = new LinkedHashSet<>(); + ParserRuleContext taintedScope = wrapper.getContainer(taintedStmt); + + LinkedList list = new LinkedList<>(this.collectables); + Iterator backwardIter = list.descendingIterator(); + while (backwardIter.hasNext()) { + ParserRuleContext collectable = backwardIter.next(); + if (taintedStatements.contains(collectable)) { + continue; + } + ParserRuleContext collectableScope = wrapper.getContainer(collectable); + if (collectableScope.equals(taintedScope) && wrapper.precedes(collectable, taintedStmt)) { + Set taintedVars = this.taints.getVariableNames(collectableScope); + // if the seed is an inner statement of a conditional statement, take the conditional statement----- + if (wrapper.isConditionalExpression(collectable)) { + ConditionTraversal t = new ConditionTraversal(collectable); + for (ParserRuleContext innerStmt : t.getInnerStatements()) { + if (this.taintedStatements.contains(innerStmt) || elementsToAdd.contains(innerStmt)) { + elementsToAdd.add(collectable); + Set referencedVars = wrapper.getReferencedVars(collectable); + for (ParseTree referencedVar : referencedVars) { + taints.addTaintedVariable(collectableScope, referencedVar); + } + break; + } + } + } + else { + ParseTree definedVar = wrapper.getDefinedVar(collectable); + if (definedVar != null) { + if (taintedVars.contains(definedVar.getText())) { + elementsToAdd.add(collectable); + Set referencedVars = wrapper.getReferencedVars(collectable); + for (ParseTree referencedVar : referencedVars) { + taints.addTaintedVariable(collectableScope, referencedVar); + } + } + } + if (wrapper.isMethodCall(collectable)) { + MethodCallTraversal t = wrapper.getMethodCallTraversal(collectable); + List vars = t.getParams(); + boolean tainted = false; + for (ParseTree var : vars) { + if (taintedVars.contains(var.getText())) { + tainted = true; + break; + } + } + if (tainted) { + for (ParseTree var : vars) { + taints.addTaintedVariable(collectableScope, var); + } + taintedStatements.add(collectable); + } + } + + } + } + } + return elementsToAdd; + } + + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/ForwardTainter.java b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/ForwardTainter.java new file mode 100644 index 0000000..8376c6a --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/ForwardTainter.java @@ -0,0 +1,140 @@ +package it.unitn.repoman.core.slicers.tainters; + +import java.util.*; + +import it.unitn.repoman.core.lang.traversals.generic.MethodCallTraversal; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; +import it.unitn.repoman.core.lang.traversals.generic.ConditionTraversal; + +public class ForwardTainter extends AbstractTainter { + + protected final Set taintedMethodCalls = new LinkedHashSet<>(); + + public ForwardTainter(Set collectables, Set seeds) { + super(collectables, seeds); + } + + public ForwardTainter(Set collectables, List taintedVars) { + super(collectables, taintedVars); + } + + @Override + protected void initSeeds(Set seeds) { + for (ParserRuleContext seed : seeds) { + this.initSeed(seed); + } + } + + @Override + public Set iterate(ParserRuleContext taintedStmt) { + Set elementsToAdd = new LinkedHashSet<>(); + ParserRuleContext taintedScope = wrapper.getContainer(taintedStmt); + + for (ParserRuleContext collectable: this.collectables) { + // do nothing if a statement is already collected + if (taintedStatements.contains(collectable)) { + continue; + } + ParserRuleContext collectableScope = wrapper.getContainer(collectable); + if (collectableScope.equals(taintedScope) && wrapper.precedes(taintedStmt, collectable)) { + Set taintedVars = this.taints.getVariableNames(collectableScope); + Set referencedVars = wrapper.getReferencedVars(collectable); + MethodCallTraversal t = wrapper.getMethodCallTraversal(collectable); + if (t.isMethodCall()) { + List vars = t.getParams(); + for (ParseTree var : vars) { + if (taintedVars.contains(var.getText())) { + taints.addTaintedVariable(collectableScope, var); + } + } + } + for (ParseTree referencedVar : referencedVars) { + if (taintedVars.contains(referencedVar.getText())) { + elementsToAdd.add(collectable); + ParseTree definedVar = wrapper.getDefinedVar(collectable); + if (definedVar != null) { + taints.addTaintedVariable(collectableScope, definedVar); + } + } + } + } + } + Set taintedInnerStatements = new HashSet<>(); + for (ParserRuleContext ctx : elementsToAdd) { + if (wrapper.isConditionalExpression(ctx)) { + taintedInnerStatements.addAll(taintInnerStatements(ctx)); + } + } + elementsToAdd.addAll(taintedInnerStatements); + return elementsToAdd; + } + + protected void initSeed(ParserRuleContext stmt) { + this.taintedStatements.add(stmt); + ParserRuleContext scope = wrapper.getContainer(stmt); + ParseTree defVar = wrapper.getDefinedVar(stmt); + if (defVar != null) { + this.taints.addTaintedVariable(scope, defVar); + } + /* + * THIS SHOULD NOT HAPPEN IN AN "EFFECT-FREE" SLICE! + * taint ref. variables in a method call as well + if (wrapper.isMethodCall(stmt)) { + for (ParseTree var : wrapper.getReferencedVars(stmt)) { + this.taints.addTaintedVariable(scope, var); + } + } + */ + // if the seed is a conditional statement or a return statement, take all inner statements + else if (wrapper.isConditionalExpression(stmt)) { + this.taintedStatements.addAll(taintConditionalExpression(stmt)); + // and taint all variables within the condition + Set vars = wrapper.getReferencedVars(stmt); + for (ParseTree var : vars) { + taints.addTaintedVariable(scope, var); + } + } + } + + protected Set taintInnerStatements(ParserRuleContext cnd) { + Set addedStmts = new HashSet<>(); + ConditionTraversal t = new ConditionTraversal(cnd); + for (ParserRuleContext innerStmt : t.getInnerStatements()) { + ParseTree defVar = wrapper.getDefinedVar(innerStmt); + if (defVar != null) { + taints.addTaintedVariable(wrapper.getContainer(innerStmt), defVar); + } + addedStmts.add(innerStmt); + } + return addedStmts; + } + + protected Set taintConditionalExpression(ParserRuleContext cnd) { + ConditionTraversal t = new ConditionTraversal(cnd); + Set addedStmts = new LinkedHashSet<>(); + addedStmts.add(cnd); + for (ParserRuleContext innerStmt : t.getInnerStatements()) { + ParseTree innerStmtDefVar = wrapper.getDefinedVar(innerStmt); + if (innerStmtDefVar != null) { + taints.addTaintedVariable(wrapper.getContainer(innerStmt), innerStmtDefVar); + } + addedStmts.add(innerStmt); + } + return addedStmts; + } + + public Set getTaintedMethodCalls() { + if (taintedMethodCalls.size() == 0) { + for (ParserRuleContext ctx : this.collectables) { + if (getCollectedLines().contains(ctx.getStart().getLine())) { + MethodCallTraversal t = wrapper.getMethodCallTraversal(ctx); + if (t.isMethodCall()) { + taintedMethodCalls.add(ctx); + } + } + } + } + return taintedMethodCalls; + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/ForwardTainterPessimist.java b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/ForwardTainterPessimist.java new file mode 100644 index 0000000..3d5539e --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/ForwardTainterPessimist.java @@ -0,0 +1,119 @@ +package it.unitn.repoman.core.slicers.tainters; + +import it.unitn.repoman.core.lang.traversals.generic.ConditionTraversal; +import it.unitn.repoman.core.lang.traversals.generic.MethodCallTraversal; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +public class ForwardTainterPessimist extends ForwardTainter { + + public ForwardTainterPessimist(Set collectables, Set seeds) { + super(collectables, seeds); + } + + @Override + protected void initSeed(ParserRuleContext stmt) { + this.taintedStatements.add(stmt); + ParserRuleContext scope = wrapper.getContainer(stmt); + ParseTree defVar = wrapper.getDefinedVar(stmt); + if (defVar != null) { + this.taints.addTaintedVariable(scope, defVar); + } + /* + * THIS SHOULD NOT HAPPEN IN AN "EFFECT-FREE" SLICE! + * taint ref. variables in a method call as well */ + if (wrapper.isMethodCall(stmt)) { + for (ParseTree var : wrapper.getReferencedVars(stmt)) { + this.taints.addTaintedVariable(scope, var); + } + } + // if the seed is a conditional statement or a return statement, take all inner statements + else if (wrapper.isConditionalExpression(stmt)) { + this.taintedStatements.addAll(taintConditionalExpression(stmt)); + // and taint all variables within the condition + Set vars = wrapper.getReferencedVars(stmt); + for (ParseTree var : vars) { + taints.addTaintedVariable(scope, var); + } + } + } + + @Override + public Set iterate(ParserRuleContext taintedStmt) { + Set elementsToAdd = new LinkedHashSet<>(); + ParserRuleContext taintedScope = wrapper.getContainer(taintedStmt); + + for (ParserRuleContext collectable: this.collectables) { + ParserRuleContext collectableScope = wrapper.getContainer(collectable); + // do nothing if a statement is already collected + if (taintedStatements.contains(collectable)) { + if (wrapper.isMethodCall(collectable)) { + for (ParseTree var : wrapper.getReferencedVars(collectable)) { + this.taints.addTaintedVariable(collectableScope, var); + } + } + continue; + } + if (collectableScope.equals(taintedScope) && wrapper.precedes(taintedStmt, collectable)) { + Set taintedVars = this.taints.getVariableNames(collectableScope); + Set referencedVars = wrapper.getReferencedVars(collectable); + MethodCallTraversal t = wrapper.getMethodCallTraversal(collectable); + if (t.isMethodCall()) { + List vars = t.getParams(); + boolean tainted = false; + for (ParseTree var : vars) { + if (taintedVars.contains(var.getText())) { + tainted = true; + break; + } + } + if (tainted) { + for (ParseTree var : vars) { + taints.addTaintedVariable(collectableScope, var); + } + } + } + for (ParseTree referencedVar : referencedVars) { + if (taintedVars.contains(referencedVar.getText())) { + elementsToAdd.add(collectable); + ParseTree definedVar = wrapper.getDefinedVar(collectable); + if (definedVar != null) { + taints.addTaintedVariable(collectableScope, definedVar); + } + } + } + } + } + Set taintedInnerStatements = new HashSet<>(); + for (ParserRuleContext ctx : elementsToAdd) { + if (wrapper.isConditionalExpression(ctx)) { + taintedInnerStatements.addAll(taintInnerStatements(ctx)); + } + } + elementsToAdd.addAll(taintedInnerStatements); + return elementsToAdd; + } + + @Override + protected Set taintInnerStatements(ParserRuleContext cnd) { + Set addedStmts = new HashSet<>(); + ConditionTraversal t = new ConditionTraversal(cnd); + for (ParserRuleContext innerStmt : t.getInnerStatements()) { + ParseTree defVar = wrapper.getDefinedVar(innerStmt); + if (defVar != null) { + taints.addTaintedVariable(wrapper.getContainer(innerStmt), defVar); + } + addedStmts.add(innerStmt); + } + return addedStmts; + } + + + + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/MethodCallTainter.java b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/MethodCallTainter.java new file mode 100644 index 0000000..42e1832 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/MethodCallTainter.java @@ -0,0 +1,38 @@ +package it.unitn.repoman.core.slicers.tainters; + +import it.unitn.repoman.core.lang.traversals.generic.MethodCallTraversal; +import org.antlr.v4.runtime.ParserRuleContext; + +import java.util.*; + +public class MethodCallTainter extends AbstractTainter { + + public MethodCallTainter(Set collectables, Set seeds) { + super(collectables, seeds); + } + + @Override + protected void initSeeds(Set seeds) { + this.taintedStatements.addAll(seeds); + } + + @Override + public Set iterate(ParserRuleContext taintedStmt) { + Set elementsToAdd = new LinkedHashSet<>(); + ParserRuleContext taintedScope = wrapper.getContainer(taintedStmt); + + for (ParserRuleContext collectable : collectables) { + if (!taintedStatements.contains(collectable)) { + if (wrapper.getContainer(collectable).equals(taintedScope)) { + MethodCallTraversal t = wrapper.getMethodCallTraversal(collectable); + MethodCallTraversal tt = wrapper.getMethodCallTraversal(taintedStmt); + if (t.getMethodName().equals(tt.getMethodName()) && t.getParamsNumber() == tt.getParamsNumber()) { + elementsToAdd.add(collectable); + } + } + } + } + + return elementsToAdd; + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/TaintedVariable.java b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/TaintedVariable.java new file mode 100755 index 0000000..5578d28 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/TaintedVariable.java @@ -0,0 +1,29 @@ +package it.unitn.repoman.core.slicers.tainters; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +public class TaintedVariable { + private final ParseTree variable; + private final ParserRuleContext scope; + + public TaintedVariable(ParserRuleContext scope, ParseTree variable) { + this.scope = scope; + this.variable = variable; + } + + public ParserRuleContext getScope() { + return this.scope; + } + + public ParseTree getVariable() { + return this.variable; + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("[" + this.scope.getStart().getLine() + "] -> " + this.variable.getText() + "\n"); + return builder.toString(); + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/TaintedVariableSet.java b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/TaintedVariableSet.java new file mode 100755 index 0000000..b0ea932 --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/slicers/tainters/TaintedVariableSet.java @@ -0,0 +1,95 @@ +package it.unitn.repoman.core.slicers.tainters; + +import java.util.*; + +import it.unitn.repoman.core.lang.LanguageFactory; +import it.unitn.repoman.core.lang.traversals.generic.NodeContainmentTraversal; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; + +public class TaintedVariableSet { + + private final Set taintedVars = new LinkedHashSet<>(); + + public void addTaintedVariable(TaintedVariable newVariable) { +// for (TaintedVariable var : this.taintedVars) { +// if (var.getScope().equals(newVariable.getScope()) +// && var.getVariable().getText().equals(newVariable.getVariable().getText())) { +// return; +// } +// } + for (TaintedVariable var : this.taintedVars) { + if (var.getVariable().equals(newVariable.getVariable())) { + return; + } + } + taintedVars.add(newVariable); + } + + public void addTaintedVariable(ParserRuleContext scope, ParseTree variable) { + this.addTaintedVariable((new TaintedVariable(scope, variable))); + } + + public Set getVariableNames(ParserRuleContext scope) { + Set vars = new LinkedHashSet<>(); + for (TaintedVariable var : this.taintedVars) { + if (var.getScope().equals(scope)) { + vars.add(var.getVariable().getText()); + } + } + return vars; + } + + public Set getVariables(ParserRuleContext scope) { + Set vars = new LinkedHashSet<>(); + for (TaintedVariable var : this.taintedVars) { + if (var.getScope().equals(scope)) { + vars.add(var.getVariable()); + } + } + return vars; + } + + public List getStatementVariables(ParserRuleContext statement) { + List vars = new LinkedList<>(); + ParserRuleContext scope = LanguageFactory.getWrapper().getContainer(statement); + for (TaintedVariable var : this.taintedVars) { + if (var.getScope().equals(scope)) { + NodeContainmentTraversal t = new NodeContainmentTraversal(statement, var.getVariable()); + if (t.isFound()) { + vars.add(var.getVariable()); + } + } + } + return vars; + } + +// public void removeVariable(ParserRuleContext scope, ParseTree variable) { +// Iterator it = this.taintedVars.iterator(); +// while (it.hasNext()) { +// TaintedVariable var = it.next(); +// if (var.getScope().equals(scope) && +// var.getVariable().getText().equals(variable.getText())) { +// it.remove(); +// } +// } +// } + + public boolean isVariableTainted(ParserRuleContext scope, ParseTree variable) { + for (TaintedVariable var : this.taintedVars) { + if (var.getScope().equals(scope) && var.getVariable().getText().equals(variable.getText())) { + return true; + } + } + return false; + } + + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + for (TaintedVariable var : this.taintedVars) { + builder.append(var.toString()); + } + return builder.toString(); + } +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/utils/printers/ConsolePrinterListener.java b/repoman/src/main/java/it/unitn/repoman/core/utils/printers/ConsolePrinterListener.java new file mode 100755 index 0000000..724ce5e --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/utils/printers/ConsolePrinterListener.java @@ -0,0 +1,102 @@ +package it.unitn.repoman.core.utils.printers; + +import java.util.Set; + + +import it.unitn.repoman.core.lang.LanguageFactory; +import it.unitn.repoman.core.slicers.LightweightSlice; +import org.antlr.v4.runtime.Parser; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.Utils; +import org.antlr.v4.runtime.tree.*; + +public class ConsolePrinterListener implements ParseTreeListener { + private final Set selectedLines; + private final Parser parser; + private final StringBuilder builder = new StringBuilder(); + private int indent = 0; + private boolean marked = false; + private String MARK_START = "\u001B[31m"; + private String MARK_END = "\u001B[0m"; + + public ConsolePrinterListener(Parser parser, LightweightSlice slice) { + this.parser = parser; + this.selectedLines = slice.getSelectedLines(); + builder.append("Selected lines: " + slice.getSelectedLines() + "\n"); + builder.append("#Selected lines: " + slice.getSelectedLines().size() + "\n"); + builder.append("\n\n"); + ParseTreeWalker.DEFAULT.walk(this, LanguageFactory.getRoot()); + } + + @Override + public void visitTerminal(TerminalNode node) { + if (marked) { + mark(builder); + } + + if (builder.length() > 0) + builder.append(' '); + + String text = Trees.getNodeText(node, this.parser); + if (text.equals("{")) { + indent++; + builder.append(Utils.escapeWhitespace(text, false)); + unmark(builder); + appendNewline(); + } + else if (text.equals(";")) { + builder.append(Utils.escapeWhitespace(text, false)); + unmark(builder); + appendNewline(); + } + else if (text.equals("}")) { + indent--; + appendNewline(); + builder.append(" " + Utils.escapeWhitespace(text, false)); + unmark(builder); + appendNewline(); + } + else { + if (!text.contains("")) { + builder.append(Utils.escapeWhitespace(text, false)); + } + } + } + + @Override + public void visitErrorNode(ErrorNode node) { + builder.append(Utils.escapeWhitespace(Trees.getNodeText(node, this.parser), false)); + } + + @Override + public void enterEveryRule(ParserRuleContext ctx) { + marked = this.selectedLines.contains(ctx.getStart().getLine()); + } + + @Override + public void exitEveryRule(ParserRuleContext ctx) { + } + + private void appendNewline() { + builder.append("\n"); + for (int i=0; i selectedLines) { + + } + + @Override + public String toString() { + return builder.toString(); + } + +} diff --git a/repoman/src/main/java/it/unitn/repoman/core/utils/printers/TextPrinterListener.java b/repoman/src/main/java/it/unitn/repoman/core/utils/printers/TextPrinterListener.java new file mode 100644 index 0000000..2fd513e --- /dev/null +++ b/repoman/src/main/java/it/unitn/repoman/core/utils/printers/TextPrinterListener.java @@ -0,0 +1,73 @@ +package it.unitn.repoman.core.utils.printers; + +import it.unitn.repoman.core.lang.LanguageFactory; +import it.unitn.repoman.core.slicers.LightweightSlice; +import org.antlr.v4.runtime.Parser; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.misc.Utils; +import org.antlr.v4.runtime.tree.*; + +import java.util.Set; + +public class TextPrinterListener implements ParseTreeListener { + private final Set selectedLines; + private final Parser parser; + private final StringBuilder builder = new StringBuilder(); + private boolean marked = false; + private int currentLineNumber = -1; + + public TextPrinterListener(Parser parser, LightweightSlice slice) { + this.parser = parser; + this.selectedLines = slice.getSelectedLines(); + builder.append("Selected lines: " + slice.getSelectedLines() + "\n"); + builder.append("#Selected lines: " + slice.getSelectedLines().size() + "\n"); + ParseTreeWalker.DEFAULT.walk(this, LanguageFactory.getRoot()); + } + + @Override + public void enterEveryRule(ParserRuleContext ctx) { + int lineNumber = ctx.getStart().getLine(); + marked = (selectedLines.contains(lineNumber)); + if (lineNumber != currentLineNumber && marked) { + builder.append("\n"); + currentLineNumber = lineNumber; + builder.append(lineNumber); + builder.append(": "); + } + } + + @Override + public void visitTerminal(TerminalNode node) { + if (marked) { + if (builder.length() > 0) { + builder.append(' '); + } + String text = Trees.getNodeText(node, this.parser); + if (text.equals("{")) { + builder.append(Utils.escapeWhitespace(text, false)); + } else if (text.equals(";")) { + builder.append(Utils.escapeWhitespace(text, false)); + } else if (text.equals("}")) { + builder.append(" " + Utils.escapeWhitespace(text, false)); + } else { + if (!text.contains("")) { + builder.append(Utils.escapeWhitespace(text, false)); + } + } + } + } + + @Override + public void visitErrorNode(ErrorNode node) { + builder.append(Utils.escapeWhitespace(Trees.getNodeText(node, this.parser), false)); + } + + @Override + public void exitEveryRule(ParserRuleContext ctx) { + } + + @Override + public String toString() { + return builder.toString(); + } +}