doc: clarify the glossary item about kinds

* doc/bison.texi (Glossary): here.
This commit is contained in:
Akim Demaille
2020-05-07 08:34:45 +02:00
parent 76dab18af3
commit 52bb6f0525

View File

@@ -14942,12 +14942,21 @@ A continuous flow of data between devices or programs.
@item Kind @item Kind
``Token'' and ``symbol'' are each overloaded to mean either a grammar symbol ``Token'' and ``symbol'' are each overloaded to mean either a grammar symbol
(kind) or all parse info (kind, value, location) associated with occurrences (kind) or all parse info (kind, value, location) associated with occurrences
of that grammar symbol from the input. To disambiguate, we use ``token of that grammar symbol from the input. To disambiguate,
kind'' and ``symbol kind'' to mean both grammar symbols and the types that
represent them in a base programming language (C, C++, etc.). However, we @itemize
use ``token'' and ``symbol'' without the word ``kind'' to mean parsed @item
we use ``token kind'' and ``symbol kind'' to mean both grammar symbols and
the values that represent them in a base programming language (C, C++,
etc.). The names of the types of these values are typically
@code{token_kind_t}, or @code{token_kind_type}, or @code{TokenKind},
depending on the programming language.
@item
we use ``token'' and ``symbol'' without the word ``kind'' to mean parsed
occurrences, and we append the word ``type'' to refer to the types that occurrences, and we append the word ``type'' to refer to the types that
represent them in a base programming language. represent them in a base programming language.
@end itemize
In summary: When you see ``kind'', interpret ``symbol'' or ``token'' to mean In summary: When you see ``kind'', interpret ``symbol'' or ``token'' to mean
a @emph{grammar symbol}. When you don't see ``kind'' (including when you a @emph{grammar symbol}. When you don't see ``kind'' (including when you