Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
ANTLR Tool Source Code
ANTLR is a powerful parser generator for multiple programming languages including Java.
ANTLR contains 2 major modules:
ANTLR Tool Source Code files are provided in the distribution packge (antlr4-4.10.1.zip). You can download them at ANTLR Website.
You can also browse the source code below:
✍: FYIcenter
⏎ org/antlr/v4/automata/RangeBorderCharactersData.java
package org.antlr.v4.automata; import org.antlr.runtime.tree.CommonTree; import org.antlr.v4.tool.ErrorType; import org.antlr.v4.tool.Grammar; public class RangeBorderCharactersData { public final int lowerFrom; public final int upperFrom; public final int lowerTo; public final int upperTo; public final boolean mixOfLowerAndUpperCharCase; public RangeBorderCharactersData(int lowerFrom, int upperFrom, int lowerTo, int upperTo, boolean mixOfLowerAndUpperCharCase) { this.lowerFrom = lowerFrom; this.upperFrom = upperFrom; this.lowerTo = lowerTo; this.upperTo = upperTo; this.mixOfLowerAndUpperCharCase = mixOfLowerAndUpperCharCase; } public static RangeBorderCharactersData getAndCheckCharactersData(int from, int to, Grammar grammar, CommonTree tree, boolean reportRangeContainsNotImpliedCharacters ) { int lowerFrom = Character.toLowerCase(from); int upperFrom = Character.toUpperCase(from); int lowerTo = Character.toLowerCase(to); int upperTo = Character.toUpperCase(to); boolean isLowerFrom = lowerFrom == from; boolean isLowerTo = lowerTo == to; boolean mixOfLowerAndUpperCharCase = isLowerFrom && !isLowerTo || !isLowerFrom && isLowerTo; if (reportRangeContainsNotImpliedCharacters && mixOfLowerAndUpperCharCase && from <= 0x7F && to <= 0x7F) { StringBuilder notImpliedCharacters = new StringBuilder(); for (int i = from; i < to; i++) { if (!Character.isAlphabetic(i)) { notImpliedCharacters.append((char)i); } } if (notImpliedCharacters.length() > 0) { grammar.tool.errMgr.grammarError(ErrorType.RANGE_PROBABLY_CONTAINS_NOT_IMPLIED_CHARACTERS, grammar.fileName, tree.getToken(), (char) from, (char) to, notImpliedCharacters.toString()); } } return new RangeBorderCharactersData(lowerFrom, upperFrom, lowerTo, upperTo, mixOfLowerAndUpperCharCase); } public boolean isSingleRange() { return lowerFrom == upperFrom && lowerTo == upperTo || mixOfLowerAndUpperCharCase || lowerTo - lowerFrom != upperTo - upperFrom; } }
⏎ org/antlr/v4/automata/RangeBorderCharactersData.java
Or download all of them as a single archive file:
File name: antlr-tool-4.10.1-sources.jar File size: 347718 bytes Release date: 2022-04-15 Download
2022-04-24, 32053👍, 0💬
Popular Posts:
JDK 11 jdk.internal.vm.compiler .jmodis the JMOD file for JDK 11 Internal VM Compiler module. JDK 11...
Apache Log4j 1.2 Bridge allows applications coded to use Log4j 1.2 API to use Log4j 2 instead. Bytec...
Apache Log4j SLF4J Binding allows applications coded to the SLF4J API to use Log4j 2 as the implemen...
What Is jsse.jar (JDK 6) Java Secure Socket Extension? jsse.jar, Java Secure Socket Extension, is Ja...
SLF4J API is a simple API that allows to plug in any desired logging library at deployment time. Her...