org.antlr.tool.templates.messages.languages.en.stg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of antlr-complete Show documentation
Show all versions of antlr-complete Show documentation
Complete distribution for ANTLR 3
/*
[The "BSD license"]
Copyright (c) 2010 Terence Parr
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
New style messages. This file only contains the messages in English, but no
information about which file, line, or column it occurred in.
The location and message ids are taken out of the formats directory.
Kay Roepke
*/
group en_US;
// TOOL ERRORS
// file errors
CANNOT_WRITE_FILE(arg,exception,stackTrace) ::= <<
cannot write file :
>>
CANNOT_CLOSE_FILE(arg,exception,stackTrace) ::= "cannot close file : "
CANNOT_FIND_TOKENS_FILE(arg) ::= "cannot find tokens file "
ERROR_READING_TOKENS_FILE(arg,exception,stackTrace) ::= <<
problem reading token vocabulary file :
>>
DIR_NOT_FOUND(arg,exception,stackTrace) ::= "directory not found: "
OUTPUT_DIR_IS_FILE(arg,exception,stackTrace) ::= "output directory is a file: "
CANNOT_OPEN_FILE(arg,exception,stackTrace) ::= "cannot find or open file: ; reason: "
CIRCULAR_DEPENDENCY() ::= "your grammars contain a circular dependency and cannot be sorted into a valid build order."
INTERNAL_ERROR(arg,arg2,exception,stackTrace) ::= <<
internal error: :
>>
INTERNAL_WARNING(arg) ::= "internal warning: "
ERROR_CREATING_ARTIFICIAL_RULE(arg,exception,stackTrace) ::= <<
problems creating lexer rule listing all tokens:
>>
TOKENS_FILE_SYNTAX_ERROR(arg,arg2) ::=
"problems parsing token vocabulary file on line "
CANNOT_GEN_DOT_FILE(arg,exception,stackTrace) ::=
"cannot write DFA DOT file : "
BAD_ACTION_AST_STRUCTURE(exception,stackTrace) ::=
"bad internal tree structure for action '': "
BAD_AST_STRUCTURE(arg,exception,stackTrace) ::= <<
bad internal tree structure '':
>>
FILE_AND_GRAMMAR_NAME_DIFFER(arg,arg2) ::=
"file contains grammar ; names must be identical"
FILENAME_EXTENSION_ERROR(arg) ::=
"file must end in a file extension, normally .g"
// code gen errors
MISSING_CODE_GEN_TEMPLATES(arg) ::=
"cannot find code generation templates .stg"
MISSING_CYCLIC_DFA_CODE_GEN_TEMPLATES() ::=
"cannot find code generation cyclic DFA templates for language "
CODE_GEN_TEMPLATES_INCOMPLETE(arg) ::=
"at least one code generation template missing for language "
CANNOT_CREATE_TARGET_GENERATOR(arg,exception,stackTrace) ::=
"cannot create target code generator: "
STRING_TEMPLATE_ERROR(arg,exception,stackTrace) ::=
"template error: "
CANNOT_COMPUTE_SAMPLE_INPUT_SEQ() ::=
"cannot generate a sample input sequence from lookahead DFA"
// grammar interpretation errors
/*
NO_VIABLE_DFA_ALT(arg,arg2) ::=
"no viable transition from state on while interpreting DFA"
*/
// GRAMMAR ERRORS
SYNTAX_ERROR(arg) ::= "syntax error: "
RULE_REDEFINITION(arg) ::=
"rule redefinition"
LEXER_RULES_NOT_ALLOWED(arg) ::=
"lexer rule not allowed in parser"
PARSER_RULES_NOT_ALLOWED(arg) ::=
"parser rule not allowed in lexer"
CANNOT_FIND_ATTRIBUTE_NAME_IN_DECL(arg) ::=
"cannot find an attribute name in attribute declaration"
NO_TOKEN_DEFINITION(arg) ::=
"no lexer rule corresponding to token: "
UNDEFINED_RULE_REF(arg) ::=
"reference to undefined rule: "
LITERAL_NOT_ASSOCIATED_WITH_LEXER_RULE(arg) ::=
"literal has no associated lexer rule: "
CANNOT_ALIAS_TOKENS_IN_LEXER(arg) ::=
"literals are illegal in lexer tokens{} section: "
ATTRIBUTE_REF_NOT_IN_RULE(arg,arg2) ::=
"reference to attribute outside of a rule: ."
UNKNOWN_ATTRIBUTE_IN_SCOPE(arg,arg2) ::=
"unknown attribute for : "
UNKNOWN_RULE_ATTRIBUTE(arg,arg2) ::=
"unknown attribute for rule : "
UNKNOWN_SIMPLE_ATTRIBUTE(arg,args2) ::=
"attribute is not a token, parameter, or return value: "
ISOLATED_RULE_SCOPE(arg) ::=
"missing attribute access on rule scope: "
INVALID_RULE_PARAMETER_REF(arg,arg2) ::=
"cannot access rule 's parameter: "
INVALID_RULE_SCOPE_ATTRIBUTE_REF(arg,arg2) ::=
"cannot access rule 's dynamically-scoped attribute: "
SYMBOL_CONFLICTS_WITH_GLOBAL_SCOPE(arg) ::=
"symbol conflicts with global dynamic scope with same name"
WRITE_TO_READONLY_ATTR(arg,arg2,arg3) ::=
"cannot write to read only attribute: $."
LABEL_CONFLICTS_WITH_RULE(arg) ::=
"label conflicts with rule with same name"
LABEL_CONFLICTS_WITH_TOKEN(arg) ::=
"label conflicts with token with same name"
LABEL_CONFLICTS_WITH_RULE_SCOPE_ATTRIBUTE(arg,arg2) ::=
"label conflicts with rule 's dynamically-scoped attribute with same name"
LABEL_CONFLICTS_WITH_RULE_ARG_RETVAL(arg,arg2) ::=
"label conflicts with rule 's return value or parameter with same name"
ATTRIBUTE_CONFLICTS_WITH_RULE(arg,arg2) ::=
"rule 's dynamically-scoped attribute conflicts with the rule name"
ATTRIBUTE_CONFLICTS_WITH_RULE_ARG_RETVAL(arg,arg2) ::=
"rule 's dynamically-scoped attribute conflicts with's return value or parameter with same name"
LABEL_TYPE_CONFLICT(arg,arg2) ::=
"label type mismatch with previous definition: "
ARG_RETVAL_CONFLICT(arg,arg2) ::=
"rule 's argument conflicts a return value with same name"
NONUNIQUE_REF(arg) ::=
" is a non-unique reference"
FORWARD_ELEMENT_REF(arg) ::=
"illegal forward reference: "
MISSING_RULE_ARGS(arg) ::=
"missing parameter(s) on rule reference: "
RULE_HAS_NO_ARGS(arg) ::=
"rule has no defined parameters"
ARGS_ON_TOKEN_REF(arg) ::=
"token reference may not have parameters"
ILLEGAL_OPTION(arg) ::=
"illegal option "
LIST_LABEL_INVALID_UNLESS_RETVAL_STRUCT(arg) ::=
"rule '+=' list labels are not allowed w/o output option: "
UNDEFINED_TOKEN_REF_IN_REWRITE(arg) ::=
"reference to undefined token in rewrite rule: "
REWRITE_ELEMENT_NOT_PRESENT_ON_LHS(arg) ::=
"reference to rewrite element without reference on left of ->"
UNDEFINED_LABEL_REF_IN_REWRITE(arg) ::=
"reference to undefined label in rewrite rule: $"
NO_GRAMMAR_START_RULE (arg) ::=
"grammar : no start rule (no rule can obviously be followed by EOF)"
EMPTY_COMPLEMENT(arg) ::= <<
set complement ~ is empty
set complement is empty
>>
UNKNOWN_DYNAMIC_SCOPE(arg) ::=
"unknown dynamic scope: "
UNKNOWN_DYNAMIC_SCOPE_ATTRIBUTE(arg,arg2) ::=
"unknown dynamically-scoped attribute for scope : "
RULE_REF_AMBIG_WITH_RULE_IN_ALT(arg) ::=
"reference $ is ambiguous; rule is enclosing rule and referenced in the production (assuming enclosing rule)"
ISOLATED_RULE_ATTRIBUTE(arg) ::=
"reference to locally-defined rule scope attribute without rule name: "
INVALID_ACTION_SCOPE(arg,arg2) ::=
"unknown or invalid action scope for grammar: "
ACTION_REDEFINITION(arg) ::=
"redefinition of action"
DOUBLE_QUOTES_ILLEGAL(arg) ::=
"string literals must use single quotes (such as \'begin\'): "
INVALID_TEMPLATE_ACTION(arg) ::=
"invalid StringTemplate % shorthand syntax: ''"
MISSING_ATTRIBUTE_NAME() ::=
"missing attribute name on $ reference"
ARG_INIT_VALUES_ILLEGAL(arg) ::=
"rule parameters may not have init values: "
REWRITE_OR_OP_WITH_NO_OUTPUT_OPTION(arg) ::=
"rule uses rewrite syntax or operator with no output option; setting output=AST"
AST_OP_WITH_NON_AST_OUTPUT_OPTION(arg) ::=
"AST operator with non-AST output option: "
NO_RULES(arg) ::= "grammar file has no rules"
MISSING_AST_TYPE_IN_TREE_GRAMMAR(arg) ::=
"tree grammar has no ASTLabelType option"
REWRITE_FOR_MULTI_ELEMENT_ALT(arg) ::=
"with rewrite=true, alt not simple node or obvious tree element; text attribute for rule not guaranteed to be correct"
RULE_INVALID_SET(arg) ::=
"Cannot complement rule ; not a simple set or element"
HETERO_ILLEGAL_IN_REWRITE_ALT(arg) ::=
"alts with rewrites can't use heterogeneous types left of ->"
NO_SUCH_GRAMMAR_SCOPE(arg,arg2) ::=
"reference to undefined grammar in rule reference: ."
NO_SUCH_RULE_IN_SCOPE(arg,arg2) ::=
"rule is not defined in grammar "
TOKEN_ALIAS_CONFLICT(arg,arg2) ::=
"cannot alias ; string already assigned to "
TOKEN_ALIAS_REASSIGNMENT(arg,arg2) ::=
"cannot alias ; token name already assigned to "
TOKEN_VOCAB_IN_DELEGATE(arg,arg2) ::=
"tokenVocab option ignored in imported grammar "
INVALID_IMPORT(arg,arg2) ::=
" grammar cannot import grammar "
IMPORTED_TOKENS_RULE_EMPTY(arg,arg2) ::=
"no lexer rules contributed to from imported grammar "
IMPORT_NAME_CLASH(arg,arg2) ::=
"combined grammar and imported grammar both generate ; import ignored"
AST_OP_IN_ALT_WITH_REWRITE(arg,arg2) ::=
"rule alt uses rewrite syntax and also an AST operator"
WILDCARD_AS_ROOT(arg) ::= "Wildcard invalid as root; wildcard can itself be a tree"
CONFLICTING_OPTION_IN_TREE_FILTER(arg,arg2) ::= "option = conflicts with tree grammar filter mode"
ILLEGAL_OPTION_VALUE(arg, arg2) ::= "value '' invalid for option "
ALL_OPS_NEED_SAME_ASSOC(arg) ::= "all operators of alt of left-recursive rule must have same associativity"
RANGE_OP_ILLEGAL(arg) ::= "the .. range operator isn't allowed in parser rules"
// GRAMMAR WARNINGS
GRAMMAR_NONDETERMINISM(input,conflictingAlts,paths,disabled,hasPredicateBlockedByAction) ::=
<<
Decision can match input such as "" using multiple alternatives:
via NFA path <\n>}>
Decision can match input such as "" using multiple alternatives:
<\n>As a result, alternative(s) were disabled for that input<\n>Semantic predicates were present but were hidden by actions.
>>
DANGLING_STATE(danglingAlts,input) ::= <<
the decision cannot distinguish between alternative(s) for input such as ""
>>
UNREACHABLE_ALTS(alts) ::= <<
The following alternatives can never be matched: <\n>
>>
INSUFFICIENT_PREDICATES(upon,altToLocations,hasPredicateBlockedByAction) ::= <<
Input such as "" is insufficiently covered with predicates at locations: : : at }; separator=", ">}; separator=", "><\n>Semantic predicates were present but were hidden by actions.
>>
DUPLICATE_SET_ENTRY(arg) ::=
"duplicate token type when collapsing subrule into set"
ANALYSIS_ABORTED(enclosingRule) ::= <<
ANTLR could not analyze this decision in rule ; often this is because of recursive rule references visible from the left edge of alternatives. ANTLR will re-analyze the decision with a fixed lookahead of k=1. Consider using "options {k=1;}" for that decision and possibly adding a syntactic predicate.
>>
RECURSION_OVERLOW(alt,input,targetRules,callSiteStates) ::= <<
Alternative : after matching input such as decision cannot predict what comes next due to recursion overflow from };separator=", ">}; separator=" and ">
>>
LEFT_RECURSION(targetRules,alt,callSiteStates) ::= <<
Alternative discovers infinite left-recursion from };separator=", ">}; separator=" and ">
>>
UNREACHABLE_TOKENS(tokens) ::= <<
The following token definitions can never be matched because prior tokens match the same input:
>>
TOKEN_NONDETERMINISM(input,conflictingTokens,paths,disabled,hasPredicateBlockedByAction) ::=
<<
Decision can match input such as "" using multiple alternatives:
via NFA path <\n>}>
Multiple token rules can match input such as "": <\n>
<\n>As a result, token(s) were disabled for that input<\n>Semantic predicates were present but were hidden by actions.
>>
LEFT_RECURSION_CYCLES(listOfCycles) ::= <<
The following sets of rules are mutually left-recursive }; separator=", ">]}; separator=" and ">
>>
NONREGULAR_DECISION(ruleName,alts) ::= <<
[fatal] rule has non-LL(*) decision due to recursive rule invocations reachable from alts . Resolve by left-factoring or using syntactic predicates or using backtrack=true option.
>>
/* l10n for message levels */
warning() ::= "warning"
error() ::= "error"
© 2015 - 2024 Weber Informatics LLC | Privacy Policy