mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
style: s/non-terminal/nonterminal/
I personally prefer 'non terminal', or 'non-terminal', but 'nonterminal' is the common spelling. * data/glr.c, src/parse-gram.y, src/symtab.c, src/symtab.h, * tests/input.at, doc/refcard.tex: here.
This commit is contained in:
8
TODO
8
TODO
@@ -8,7 +8,6 @@ Several features are not available in all the backends.
|
|||||||
|
|
||||||
* Short term
|
* Short term
|
||||||
** consistency
|
** consistency
|
||||||
nonterminal vs non terminal vs non-terminal
|
|
||||||
token vs terminal
|
token vs terminal
|
||||||
|
|
||||||
** yacc.c
|
** yacc.c
|
||||||
@@ -214,9 +213,10 @@ Provide better assistance for understanding the conflicts by providing
|
|||||||
a sample text exhibiting the (LALR) ambiguity. See the paper from
|
a sample text exhibiting the (LALR) ambiguity. See the paper from
|
||||||
DeRemer and Penello: they already provide the algorithm.
|
DeRemer and Penello: they already provide the algorithm.
|
||||||
|
|
||||||
** Statically check for potential ambiguities in GLR grammars. See
|
** Statically check for potential ambiguities in GLR grammars
|
||||||
<http://www.i3s.unice.fr/~schmitz/papers.html#expamb> for an approach.
|
See <http://www.lsv.fr/~schmitz/pub/expamb.pdf> for an approach.
|
||||||
|
An Experimental Ambiguity Detection Tool ∗ Sylvain Schmitz
|
||||||
|
LORIA, INRIA Nancy - Grand Est, Nancy, France
|
||||||
|
|
||||||
* Extensions
|
* Extensions
|
||||||
** Multiple start symbols
|
** Multiple start symbols
|
||||||
|
|||||||
@@ -639,7 +639,7 @@ struct yyGLRState {
|
|||||||
size_t yyposn;
|
size_t yyposn;
|
||||||
union {
|
union {
|
||||||
/** First in a chain of alternative reductions producing the
|
/** First in a chain of alternative reductions producing the
|
||||||
* non-terminal corresponding to this state, threaded through
|
* nonterminal corresponding to this state, threaded through
|
||||||
* yynext. */
|
* yynext. */
|
||||||
yySemanticOption* yyfirstVal;
|
yySemanticOption* yyfirstVal;
|
||||||
/** Semantic value for this state. */
|
/** Semantic value for this state. */
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ otherwise it will have the format {\tt {\it name}.tab.h}, where
|
|||||||
|
|
||||||
In the above, {\it t} is a {\it type} defined in the {\tt \%union}
|
In the above, {\it t} is a {\it type} defined in the {\tt \%union}
|
||||||
definition, {\it n} is a {\it terminal} symbol name, {\it m} is a
|
definition, {\it n} is a {\it terminal} symbol name, {\it m} is a
|
||||||
{\it non-terminal} symbol name, and {\it association} can be one of
|
{\it nonterminal} symbol name, and {\it association} can be one of
|
||||||
{\tt \%left}, {\tt \%right}, or {\tt \%nonassoc}.
|
{\tt \%left}, {\tt \%right}, or {\tt \%nonassoc}.
|
||||||
|
|
||||||
\vskip .10truein
|
\vskip .10truein
|
||||||
@@ -401,7 +401,7 @@ Rules take the form:
|
|||||||
|
|
||||||
\vskip -\baselineskip
|
\vskip -\baselineskip
|
||||||
\beginexample
|
\beginexample
|
||||||
non-terminal : {\it statement} 1
|
nonterminal : {\it statement} 1
|
||||||
| {\it statement} 2
|
| {\it statement} 2
|
||||||
\vdots
|
\vdots
|
||||||
| {\it statement n}
|
| {\it statement n}
|
||||||
@@ -410,7 +410,7 @@ Rules take the form:
|
|||||||
|
|
||||||
Where {\it statements} can be either empty, or contain
|
Where {\it statements} can be either empty, or contain
|
||||||
a mixture of C code (enclosed in {\tt \{...\}}), and the
|
a mixture of C code (enclosed in {\tt \{...\}}), and the
|
||||||
symbols that make up the non-terminal. For example:
|
symbols that make up the nonterminal. For example:
|
||||||
|
|
||||||
\vskip -\baselineskip
|
\vskip -\baselineskip
|
||||||
\beginexample
|
\beginexample
|
||||||
|
|||||||
@@ -2705,7 +2705,7 @@ yyreduce:
|
|||||||
if (current_class == nterm_sym)
|
if (current_class == nterm_sym)
|
||||||
{
|
{
|
||||||
gram_error (&(yylsp[0]),
|
gram_error (&(yylsp[0]),
|
||||||
_("character literals cannot be non-terminals"));
|
_("character literals cannot be nonterminals"));
|
||||||
YYERROR;
|
YYERROR;
|
||||||
}
|
}
|
||||||
(yyval.id) = symbol_get (char_name ((yyvsp[0].CHAR)), (yylsp[0]));
|
(yyval.id) = symbol_get (char_name ((yyvsp[0].CHAR)), (yylsp[0]));
|
||||||
|
|||||||
@@ -641,7 +641,7 @@ id:
|
|||||||
if (current_class == nterm_sym)
|
if (current_class == nterm_sym)
|
||||||
{
|
{
|
||||||
gram_error (&@1,
|
gram_error (&@1,
|
||||||
_("character literals cannot be non-terminals"));
|
_("character literals cannot be nonterminals"));
|
||||||
YYERROR;
|
YYERROR;
|
||||||
}
|
}
|
||||||
$$ = symbol_get (char_name ($1), @1);
|
$$ = symbol_get (char_name ($1), @1);
|
||||||
|
|||||||
@@ -478,7 +478,7 @@ symbol_user_token_number_set (symbol *sym, int user_token_number, location loc)
|
|||||||
int *user_token_numberp = &sym->content->user_token_number;
|
int *user_token_numberp = &sym->content->user_token_number;
|
||||||
if (sym->content->class != token_sym)
|
if (sym->content->class != token_sym)
|
||||||
complain (&loc, complaint,
|
complain (&loc, complaint,
|
||||||
_("non-terminals cannot be given an explicit number"));
|
_("nonterminals cannot be given an explicit number"));
|
||||||
else if (*user_token_numberp != USER_NUMBER_UNDEFINED
|
else if (*user_token_numberp != USER_NUMBER_UNDEFINED
|
||||||
&& *user_token_numberp != user_token_number)
|
&& *user_token_numberp != user_token_number)
|
||||||
complain (&loc, complaint, _("redefining user token number of %s"),
|
complain (&loc, complaint, _("redefining user token number of %s"),
|
||||||
@@ -614,7 +614,7 @@ symbol_make_alias (symbol *sym, symbol *str, location loc)
|
|||||||
{
|
{
|
||||||
if (sym->content->class != token_sym)
|
if (sym->content->class != token_sym)
|
||||||
complain (&loc, complaint,
|
complain (&loc, complaint,
|
||||||
_("non-terminals cannot be given a string alias"));
|
_("nonterminals cannot be given a string alias"));
|
||||||
else if (str->alias)
|
else if (str->alias)
|
||||||
complain (&loc, Wother,
|
complain (&loc, Wother,
|
||||||
_("symbol %s used more than once as a literal string"), str->tag);
|
_("symbol %s used more than once as a literal string"), str->tag);
|
||||||
@@ -677,7 +677,7 @@ complain_user_token_number_redeclared (int num, symbol *first, symbol *second)
|
|||||||
static inline bool
|
static inline bool
|
||||||
symbol_translation (symbol *this)
|
symbol_translation (symbol *this)
|
||||||
{
|
{
|
||||||
/* Non-terminal? */
|
/* Nonterminal? */
|
||||||
if (this->content->class == token_sym
|
if (this->content->class == token_sym
|
||||||
&& !this->is_alias)
|
&& !this->is_alias)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ typedef enum
|
|||||||
{
|
{
|
||||||
unknown_sym, /**< Undefined. */
|
unknown_sym, /**< Undefined. */
|
||||||
token_sym, /**< Terminal. */
|
token_sym, /**< Terminal. */
|
||||||
nterm_sym /**< Non-terminal. */
|
nterm_sym /**< Nonterminal. */
|
||||||
} symbol_class;
|
} symbol_class;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -152,28 +152,28 @@ AT_BISON_CHECK([-fcaret input.y], [1], [],
|
|||||||
[[input.y:1.1-6: warning: deprecated directive, use '%type' [-Wdeprecated]
|
[[input.y:1.1-6: warning: deprecated directive, use '%type' [-Wdeprecated]
|
||||||
%nterm expr "expression";
|
%nterm expr "expression";
|
||||||
^^^^^^
|
^^^^^^
|
||||||
input.y:1.13-24: error: non-terminals cannot be given a string alias
|
input.y:1.13-24: error: nonterminals cannot be given a string alias
|
||||||
%nterm expr "expression";
|
%nterm expr "expression";
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
input.y:2.1-6: warning: deprecated directive, use '%type' [-Wdeprecated]
|
input.y:2.1-6: warning: deprecated directive, use '%type' [-Wdeprecated]
|
||||||
%nterm term 123;
|
%nterm term 123;
|
||||||
^^^^^^
|
^^^^^^
|
||||||
input.y:2.13-15: error: non-terminals cannot be given an explicit number
|
input.y:2.13-15: error: nonterminals cannot be given an explicit number
|
||||||
%nterm term 123;
|
%nterm term 123;
|
||||||
^^^
|
^^^
|
||||||
input.y:3.1-6: warning: deprecated directive, use '%type' [-Wdeprecated]
|
input.y:3.1-6: warning: deprecated directive, use '%type' [-Wdeprecated]
|
||||||
%nterm fact 124 "factor";
|
%nterm fact 124 "factor";
|
||||||
^^^^^^
|
^^^^^^
|
||||||
input.y:3.13-15: error: non-terminals cannot be given an explicit number
|
input.y:3.13-15: error: nonterminals cannot be given an explicit number
|
||||||
%nterm fact 124 "factor";
|
%nterm fact 124 "factor";
|
||||||
^^^
|
^^^
|
||||||
input.y:3.17-24: error: non-terminals cannot be given a string alias
|
input.y:3.17-24: error: nonterminals cannot be given a string alias
|
||||||
%nterm fact 124 "factor";
|
%nterm fact 124 "factor";
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
input.y:4.1-6: warning: deprecated directive, use '%type' [-Wdeprecated]
|
input.y:4.1-6: warning: deprecated directive, use '%type' [-Wdeprecated]
|
||||||
%nterm '+' '*';
|
%nterm '+' '*';
|
||||||
^^^^^^
|
^^^^^^
|
||||||
input.y:4.8-10: error: character literals cannot be non-terminals
|
input.y:4.8-10: error: character literals cannot be nonterminals
|
||||||
%nterm '+' '*';
|
%nterm '+' '*';
|
||||||
^^^
|
^^^
|
||||||
input.y:5.1-6: warning: deprecated directive, use '%type' [-Wdeprecated]
|
input.y:5.1-6: warning: deprecated directive, use '%type' [-Wdeprecated]
|
||||||
|
|||||||
Reference in New Issue
Block a user