Merge branch 'fix_typos' of git://github.com/sebkur/antlr4 into sebkur-fix_typos

This commit is contained in:
parrt 2016-11-19 11:52:17 -08:00
commit 5153154658
10 changed files with 16 additions and 11 deletions

View File

@ -110,4 +110,5 @@ YYYY/MM/DD, github id, Full name, email
2016/11/05, runner-mei, meifakun, runner.mei@gmail.com 2016/11/05, runner-mei, meifakun, runner.mei@gmail.com
2016/11/15, hanjoes, Hanzhou Shi, hanzhou87@gmail.com 2016/11/15, hanjoes, Hanzhou Shi, hanzhou87@gmail.com
2016/11/16, sridharxp, Sridharan S, aurosridhar@gmail.com 2016/11/16, sridharxp, Sridharan S, aurosridhar@gmail.com
2016/11/06, NoodleOfDeath, Thom Morgan, github@bytemeapp.com 2016/11/06, NoodleOfDeath, Thom Morgan, github@bytemeapp.com
2016/11/01, sebkur, Sebastian Kürten, sebastian@topobyte.de

View File

@ -50,7 +50,7 @@ import java.util.List;
* The root node always has a null pointer and invokingState of -1. * The root node always has a null pointer and invokingState of -1.
* *
* Upon entry to parsing, the first invoked rule function creates a * Upon entry to parsing, the first invoked rule function creates a
* context object (asubclass specialized for that rule such as * context object (a subclass specialized for that rule such as
* SContext) and makes it the root of a parse tree, recorded by field * SContext) and makes it the root of a parse tree, recorded by field
* Parser._ctx. * Parser._ctx.
* *

View File

@ -545,7 +545,11 @@ public enum PredictionMode {
return all; return all;
} }
/** Get union of all alts from configs. @since 4.5.1 */ /**
* Get union of all alts from configs.
*
* @since 4.5.1
*/
public static BitSet getAlts(ATNConfigSet configs) { public static BitSet getAlts(ATNConfigSet configs) {
BitSet alts = new BitSet(); BitSet alts = new BitSet();
for (ATNConfig config : configs) { for (ATNConfig config : configs) {

View File

@ -65,7 +65,7 @@ public class TestSymbolIssues extends BaseJavaTest {
"warning(" + ErrorType.IMPLICIT_TOKEN_DEFINITION.code + "): A.g4:10:20: implicit definition of token Y in parser\n" + "warning(" + ErrorType.IMPLICIT_TOKEN_DEFINITION.code + "): A.g4:10:20: implicit definition of token Y in parser\n" +
"warning(" + ErrorType.IMPLICIT_TOKEN_DEFINITION.code + "): A.g4:11:4: implicit definition of token FJKD in parser\n" + "warning(" + ErrorType.IMPLICIT_TOKEN_DEFINITION.code + "): A.g4:11:4: implicit definition of token FJKD in parser\n" +
"error(" + ErrorType.RULE_HAS_NO_ARGS.code + "): A.g4:9:37: rule b has no defined parameters\n" + "error(" + ErrorType.RULE_HAS_NO_ARGS.code + "): A.g4:9:37: rule b has no defined parameters\n" +
"error(" + ErrorType.MISSING_RULE_ARGS.code + "): A.g4:10:31: missing arguments(s) on rule reference: a\n" "error(" + ErrorType.MISSING_RULE_ARGS.code + "): A.g4:10:31: missing argument(s) on rule reference: a\n"
}; };
static String[] B = { static String[] B = {

View File

@ -713,7 +713,7 @@ public class Tool {
* *
* The output dir -o spec takes precedence if it's absolute. * The output dir -o spec takes precedence if it's absolute.
* E.g., if the grammar file dir is absolute the output dir is given * E.g., if the grammar file dir is absolute the output dir is given
* precendence. "-o /tmp /usr/lib/t.g4" results in "/tmp/T.java" as * precedence. "-o /tmp /usr/lib/t.g4" results in "/tmp/T.java" as
* output (assuming t.g4 holds T.java). * output (assuming t.g4 holds T.java).
* *
* If no -o is specified, then just write to the directory where the * If no -o is specified, then just write to the directory where the

View File

@ -65,7 +65,7 @@ public class ElementFrequenciesVisitor extends GrammarTreeVisitor {
* @param b The second set. * @param b The second set.
* @param clip The maximum value to allow for any output. * @param clip The maximum value to allow for any output.
* @return The sum of the two sets, with the individual elements clipped * @return The sum of the two sets, with the individual elements clipped
* to the maximum value gived by {@code clip}. * to the maximum value given by {@code clip}.
*/ */
protected static FrequencySet<String> combineAndClip(FrequencySet<String> a, FrequencySet<String> b, int clip) { protected static FrequencySet<String> combineAndClip(FrequencySet<String> a, FrequencySet<String> b, int clip) {
FrequencySet<String> result = new FrequencySet<String>(); FrequencySet<String> result = new FrequencySet<String>();

View File

@ -120,7 +120,7 @@ public class Utils {
return b; return b;
} }
/** Find exact object type or sublass of cl in list */ /** Find exact object type or subclass of cl in list */
public static <T> T find(List<?> ops, Class<T> cl) { public static <T> T find(List<?> ops, Class<T> cl) {
for (Object o : ops) { for (Object o : ops) {
if ( cl.isInstance(o) ) return cl.cast(o); if ( cl.isInstance(o) ) return cl.cast(o);

View File

@ -157,7 +157,7 @@ public class ErrorManager {
} }
/** /**
* Raise a predefined message with some number of paramters for the StringTemplate but for which there * Raise a predefined message with some number of parameters for the StringTemplate but for which there
* is no location information possible. * is no location information possible.
* @param errorType The Message Descriptor * @param errorType The Message Descriptor
* @param args The arguments to pass to the StringTemplate * @param args The arguments to pass to the StringTemplate

View File

@ -61,7 +61,7 @@ public enum ErrorSeverity {
/** /**
* Standard constructor to build an instance of the Enum entries * Standard constructor to build an instance of the Enum entries
* *
* @param text The human readable string representing the serverity level * @param text The human readable string representing the severity level
*/ */
private ErrorSeverity(String text) { this.text = text; } private ErrorSeverity(String text) { this.text = text; }
} }

View File

@ -328,9 +328,9 @@ public enum ErrorType {
/** /**
* Compiler Error 79. * Compiler Error 79.
* *
* <p>missing arguments(s) on rule reference: <em>rule</em></p> * <p>missing argument(s) on rule reference: <em>rule</em></p>
*/ */
MISSING_RULE_ARGS(79, "missing arguments(s) on rule reference: <arg>", ErrorSeverity.ERROR), MISSING_RULE_ARGS(79, "missing argument(s) on rule reference: <arg>", ErrorSeverity.ERROR),
/** /**
* Compiler Error 80. * Compiler Error 80.
* *