mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
doc: spell check
* doc/bison.texi, NEWS, README-hacking.md: here. And elsewhere.
This commit is contained in:
15
NEWS
15
NEWS
@@ -99,13 +99,13 @@ GNU Bison NEWS
|
|||||||
To avoid the confusion with typing in programming languages, we now refer
|
To avoid the confusion with typing in programming languages, we now refer
|
||||||
to token and symbol "kinds" instead of token and symbol "types".
|
to token and symbol "kinds" instead of token and symbol "types".
|
||||||
|
|
||||||
**** Token kind
|
**** Token kinds
|
||||||
|
|
||||||
The "token kind" is what is returned by the scanner, e.g., PLUS, NUMBER,
|
The "token kind" is what is returned by the scanner, e.g., PLUS, NUMBER,
|
||||||
LPAREN, etc. Users are invited to replace their uses of "enum
|
LPAREN, etc. Users are invited to replace their uses of "enum
|
||||||
yytokentype" by "yytoken_kind_t".
|
yytokentype" by "yytoken_kind_t".
|
||||||
|
|
||||||
This type now also includes tokens that were proviously hidden: YYEOF (end
|
This type now also includes tokens that were previously hidden: YYEOF (end
|
||||||
of input), YYUNDEF (undefined token), and YYERRCODE (error token). They
|
of input), YYUNDEF (undefined token), and YYERRCODE (error token). They
|
||||||
now have string aliases, internationalized if internationalization is
|
now have string aliases, internationalized if internationalization is
|
||||||
enabled. Therefore, by default, error messages now refer to "end of file"
|
enabled. Therefore, by default, error messages now refer to "end of file"
|
||||||
@@ -121,11 +121,13 @@ GNU Bison NEWS
|
|||||||
**** Symbol kinds
|
**** Symbol kinds
|
||||||
|
|
||||||
The "symbol kinds" is what the parser actually uses. (Unless the
|
The "symbol kinds" is what the parser actually uses. (Unless the
|
||||||
api.token.raw %define variable was used, the internal symbol kind of a
|
api.token.raw %define variable is used, the symbol kind of a terminal
|
||||||
terminal differs from the corresponding token kind.)
|
differs from the corresponding token kind.)
|
||||||
|
|
||||||
They are now exposed as a enum, "yysymbol_kind_t".
|
They are now exposed as a enum, "yysymbol_kind_t".
|
||||||
|
|
||||||
|
This allows users to tailor the error messages the way they want.
|
||||||
|
|
||||||
*** Modernize display of explanatory statements in diagnostics
|
*** Modernize display of explanatory statements in diagnostics
|
||||||
|
|
||||||
Since Bison 2.7, output was indented four spaces for explanatory
|
Since Bison 2.7, output was indented four spaces for explanatory
|
||||||
@@ -4077,9 +4079,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
LocalWords: noexcept constexpr ispell american deprecations backend Teoh
|
LocalWords: noexcept constexpr ispell american deprecations backend Teoh
|
||||||
LocalWords: YYPRINT Mangold Bonzini's Wdangling exVal baz checkable gcc
|
LocalWords: YYPRINT Mangold Bonzini's Wdangling exVal baz checkable gcc
|
||||||
LocalWords: fsanitize Vogelsgesang lis redeclared stdint automata yytname
|
LocalWords: fsanitize Vogelsgesang lis redeclared stdint automata yytname
|
||||||
LocalWords: yysymbol yytnamerr yyreport ctx ARGMAX yysyntax stderr
|
LocalWords: yysymbol yytnamerr yyreport ctx ARGMAX yysyntax stderr LPAREN
|
||||||
LocalWords: symrec yypcontext TOKENMAX yyexpected YYEMPTY yypstate
|
LocalWords: symrec yypcontext TOKENMAX yyexpected YYEMPTY yypstate YYEOF
|
||||||
LocalWords: autocompletion bistromathic submessages Cayuela lexcalc
|
LocalWords: autocompletion bistromathic submessages Cayuela lexcalc
|
||||||
|
LocalWords: yytoken YYUNDEF YYERRCODE
|
||||||
|
|
||||||
Local Variables:
|
Local Variables:
|
||||||
ispell-dictionary: "american"
|
ispell-dictionary: "american"
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ Follow the GNU Coding Standards.
|
|||||||
|
|
||||||
Don't reinvent the wheel: we use gnulib, which features many components.
|
Don't reinvent the wheel: we use gnulib, which features many components.
|
||||||
Actually, Bison has legacy code that we should replace with gnulib modules
|
Actually, Bison has legacy code that we should replace with gnulib modules
|
||||||
(e.g., many adhoc implementations of lists).
|
(e.g., many ad hoc implementations of lists).
|
||||||
|
|
||||||
### Skeletons
|
### Skeletons
|
||||||
We try to use the "typical" coding style for each language.
|
We try to use the "typical" coding style for each language.
|
||||||
@@ -87,7 +87,7 @@ Use `*_type` for type aliases. Use `foo_get()` and `foo_set(v)` for
|
|||||||
accessors, or simply `foo()` and `foo(v)`.
|
accessors, or simply `foo()` and `foo(v)`.
|
||||||
|
|
||||||
Use the `yy` prefix for private stuff, but there's no need for it in the
|
Use the `yy` prefix for private stuff, but there's no need for it in the
|
||||||
public api. The `yy` prefix is already taken care of via the namespace.
|
public API. The `yy` prefix is already taken care of via the namespace.
|
||||||
|
|
||||||
#### Java
|
#### Java
|
||||||
We follow https://www.oracle.com/technetwork/java/codeconventions-150003.pdf
|
We follow https://www.oracle.com/technetwork/java/codeconventions-150003.pdf
|
||||||
@@ -482,9 +482,11 @@ LocalWords: submodule init cd distcheck ChangeLog valgrind sigreturn sudo
|
|||||||
LocalWords: UC gcc DGNULIB POSIXCHECK xml XSLT glr lalr README po runtime rc
|
LocalWords: UC gcc DGNULIB POSIXCHECK xml XSLT glr lalr README po runtime rc
|
||||||
LocalWords: gnupload gnupg gpg keyserver BDF ncftp filename clearsign cvs dir
|
LocalWords: gnupload gnupg gpg keyserver BDF ncftp filename clearsign cvs dir
|
||||||
LocalWords: symlinks vti html lt POSIX Cc'ed Graphviz Texinfo autoconf jN
|
LocalWords: symlinks vti html lt POSIX Cc'ed Graphviz Texinfo autoconf jN
|
||||||
LocalWords: automake autopoint graphviz texinfo PROG Wother parsers
|
LocalWords: automake autopoint graphviz texinfo PROG Wother parsers YYFOO
|
||||||
LocalWords: TESTSUITEFLAGS deprec struct gnulib's getopt config ggdb
|
LocalWords: TESTSUITEFLAGS deprec struct gnulib's getopt config ggdb yyfoo
|
||||||
LocalWords: bitset fsanitize symlink CFLAGS MERCHANTABILITY ispell
|
LocalWords: bitset fsanitize symlink CFLAGS MERCHANTABILITY ispell wrt YY
|
||||||
LocalWords: american
|
LocalWords: american Administrivia camlCase yy accessors namespace src
|
||||||
|
LocalWords: getExpectedTokens yyexpectedTokens yygetExpectedTokens
|
||||||
|
LocalWords: regen dogfooding Autotest testsuite
|
||||||
|
|
||||||
-->
|
-->
|
||||||
|
|||||||
4
TODO
4
TODO
@@ -155,8 +155,8 @@ $ ./tests/testsuite -l | grep errors | sed q
|
|||||||
Besides yytoknum is wrong when api.token.raw is defined.
|
Besides yytoknum is wrong when api.token.raw is defined.
|
||||||
|
|
||||||
** Better design for diagnostics
|
** Better design for diagnostics
|
||||||
The current implementation of diagnostics is adhoc, it grew organically. It
|
The current implementation of diagnostics is ad hoc, it grew organically.
|
||||||
works as a series of calls to several functions, with dependency of the
|
It works as a series of calls to several functions, with dependency of the
|
||||||
latter calls on the former. For instance:
|
latter calls on the former. For instance:
|
||||||
|
|
||||||
complain (&sym->location,
|
complain (&sym->location,
|
||||||
|
|||||||
@@ -645,7 +645,7 @@ m4_define([b4_sync_end], [ b4_comment([$2:$1])]
|
|||||||
# This generates dependencies on the Bison skeletons hence lots of
|
# This generates dependencies on the Bison skeletons hence lots of
|
||||||
# useless 'git diff'. This location is useless for the regular
|
# useless 'git diff'. This location is useless for the regular
|
||||||
# user (who does not care about the skeletons) and is actually not
|
# user (who does not care about the skeletons) and is actually not
|
||||||
# useful for Bison developpers too (I, Akim, never used this to locate
|
# useful for Bison developers too (I, Akim, never used this to locate
|
||||||
# the code in skeletons that generated output). So disable it
|
# the code in skeletons that generated output). So disable it
|
||||||
# completely. If someone thinks this was actually useful, a %define
|
# completely. If someone thinks this was actually useful, a %define
|
||||||
# variable should be provided to control the level of verbosity of
|
# variable should be provided to control the level of verbosity of
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ int ]b4_prefix[parse (]m4_ifset([b4_parse_param], [b4_formals(b4_parse_param)],
|
|||||||
# members of this union.
|
# members of this union.
|
||||||
#
|
#
|
||||||
# To avoid this issue, just generate the header before the
|
# To avoid this issue, just generate the header before the
|
||||||
# implementation file. But we should also make them more independant.
|
# implementation file. But we should also make them more independent.
|
||||||
|
|
||||||
# ----------------- #
|
# ----------------- #
|
||||||
# The header file. #
|
# The header file. #
|
||||||
|
|||||||
@@ -12657,7 +12657,7 @@ then the parser's to get the set of defined tokens.
|
|||||||
# pragma GCC diagnostic ignored "-Wnull-dereference"
|
# pragma GCC diagnostic ignored "-Wnull-dereference"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// This example uses Flex's C backend, yet compiles it as C++.
|
// This example uses Flex's C back end, yet compiles it as C++.
|
||||||
// So expect warnings about C style casts and NULL.
|
// So expect warnings about C style casts and NULL.
|
||||||
#if defined CLANG_VERSION && 500 <= CLANG_VERSION
|
#if defined CLANG_VERSION && 500 <= CLANG_VERSION
|
||||||
# pragma clang diagnostic ignored "-Wold-style-cast"
|
# pragma clang diagnostic ignored "-Wold-style-cast"
|
||||||
@@ -14933,9 +14933,9 @@ A finite enumeration of all the possible grammar symbols, as processed by
|
|||||||
the parser. @xref{Symbols}.
|
the parser. @xref{Symbols}.
|
||||||
|
|
||||||
@item Symbol table
|
@item Symbol table
|
||||||
A data structure where symbol names and associated data are stored
|
A data structure where symbol names and associated data are stored during
|
||||||
during parsing to allow for recognition and use of existing
|
parsing to allow for recognition and use of existing information in repeated
|
||||||
information in repeated uses of a symbol. @xref{Multi-function Calc}.
|
uses of a symbol. @xref{Multi-function Calc}.
|
||||||
|
|
||||||
@item Syntax error
|
@item Syntax error
|
||||||
An error encountered during parsing of an input stream due to invalid
|
An error encountered during parsing of an input stream due to invalid
|
||||||
@@ -14947,13 +14947,13 @@ grammatically indivisible. The piece of text it represents is a token.
|
|||||||
@xref{Language and Grammar}.
|
@xref{Language and Grammar}.
|
||||||
|
|
||||||
@item Token
|
@item Token
|
||||||
A basic, grammatically indivisible unit of a language. The symbol
|
A basic, grammatically indivisible unit of a language. The symbol that
|
||||||
that describes a token in the grammar is a terminal symbol.
|
describes a token in the grammar is a terminal symbol. The input of the
|
||||||
The input of the Bison parser is a stream of tokens which comes from
|
Bison parser is a stream of tokens which comes from the lexical analyzer.
|
||||||
the lexical analyzer. @xref{Symbols}.
|
@xref{Symbols}.
|
||||||
|
|
||||||
@item Token kind
|
@item Token kind
|
||||||
A finite enumeration of all the possible grammar terminals, as disciminated
|
A finite enumeration of all the possible grammar terminals, as discriminated
|
||||||
by the scanner. @xref{Symbols}.
|
by the scanner. @xref{Symbols}.
|
||||||
|
|
||||||
@item Unreachable state
|
@item Unreachable state
|
||||||
@@ -15078,7 +15078,7 @@ London, Department of Computer Science, TR-00-12 (December 2000).
|
|||||||
@c LocalWords: YYENABLE bindtextdomain Makefile DEFS CPPFLAGS DBISON DeRemer
|
@c LocalWords: YYENABLE bindtextdomain Makefile DEFS CPPFLAGS DBISON DeRemer
|
||||||
@c LocalWords: autoreconf Pennello multisets nondeterminism Generalised baz ACM
|
@c LocalWords: autoreconf Pennello multisets nondeterminism Generalised baz ACM
|
||||||
@c LocalWords: redeclare automata Dparse localedir datadir XSLT midrule Wno
|
@c LocalWords: redeclare automata Dparse localedir datadir XSLT midrule Wno
|
||||||
@c LocalWords: multitable headitem hh basename Doxygen fno filename gdef
|
@c LocalWords: multitable headitem hh basename Doxygen fno filename gdef de
|
||||||
@c LocalWords: doxygen ival sval deftypemethod deallocate pos deftypemethodx
|
@c LocalWords: doxygen ival sval deftypemethod deallocate pos deftypemethodx
|
||||||
@c LocalWords: Ctor defcv defcvx arg accessors arithmetics CPP ifndef CALCXX
|
@c LocalWords: Ctor defcv defcvx arg accessors arithmetics CPP ifndef CALCXX
|
||||||
@c LocalWords: lexer's calcxx bool LPAREN RPAREN deallocation cerrno climits
|
@c LocalWords: lexer's calcxx bool LPAREN RPAREN deallocation cerrno climits
|
||||||
@@ -15102,7 +15102,7 @@ London, Department of Computer Science, TR-00-12 (December 2000).
|
|||||||
@c LocalWords: fdiagnostics setlocale nullptr ast srcdir iff drv rgbWarning
|
@c LocalWords: fdiagnostics setlocale nullptr ast srcdir iff drv rgbWarning
|
||||||
@c LocalWords: deftypefunx pragma Wnull dereference Wdocumentation elif ish
|
@c LocalWords: deftypefunx pragma Wnull dereference Wdocumentation elif ish
|
||||||
@c LocalWords: Wdeprecated Wregister noinput yyloc yypos PODs sstream Wsign
|
@c LocalWords: Wdeprecated Wregister noinput yyloc yypos PODs sstream Wsign
|
||||||
@c LocalWords: typename emplace Wconversion Wshorten yacchack reentrancy
|
@c LocalWords: typename emplace Wconversion Wshorten yacchack reentrancy ou
|
||||||
@c LocalWords: Relocatability exprs fixit Wyacc parseable fixits ffixit svg
|
@c LocalWords: Relocatability exprs fixit Wyacc parseable fixits ffixit svg
|
||||||
@c LocalWords: DNDEBUG cstring Wzero workalike POPL workalikes byacc UCB
|
@c LocalWords: DNDEBUG cstring Wzero workalike POPL workalikes byacc UCB
|
||||||
@c LocalWords: Penello's Penello Byson Byson's Corbett's CSD TOPLAS PDP
|
@c LocalWords: Penello's Penello Byson Byson's Corbett's CSD TOPLAS PDP
|
||||||
@@ -15111,7 +15111,10 @@ London, Department of Computer Science, TR-00-12 (December 2000).
|
|||||||
@c LocalWords: colorOff maincolor inlineraw darkviolet darkcyan dwarning
|
@c LocalWords: colorOff maincolor inlineraw darkviolet darkcyan dwarning
|
||||||
@c LocalWords: dnotice copyable stdint ptrdiff bufsize yyreport invariants
|
@c LocalWords: dnotice copyable stdint ptrdiff bufsize yyreport invariants
|
||||||
@c LocalWords: xrefautomaticsectiontitle yysyntax yysymbol ARGMAX cond
|
@c LocalWords: xrefautomaticsectiontitle yysyntax yysymbol ARGMAX cond
|
||||||
@c LocalWords: Wdangling
|
@c LocalWords: Wdangling yytoken erreur syntaxe inattendu attendait nombre
|
||||||
|
@c LocalWords: YYUNDEF SymbolKind yypcontext YYENOMEM TOKENMAX getBundle
|
||||||
|
@c LocalWords: ResourceBundle myResources getString getName getToken
|
||||||
|
@c LocalWords: getLocation getExpectedTokens reportSyntaxError
|
||||||
|
|
||||||
@c Local Variables:
|
@c Local Variables:
|
||||||
@c ispell-dictionary: "american"
|
@c ispell-dictionary: "american"
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ AT_DATA_GRAMMAR([list.y],
|
|||||||
// Starting with :: to ensure we don't output "<::" which starts by the
|
// Starting with :: to ensure we don't output "<::" which starts by the
|
||||||
// digraph for the left square bracket.
|
// digraph for the left square bracket.
|
||||||
%type <::string> item;
|
%type <::string> item;
|
||||||
// Using the template type to exercize its parsing.
|
// Using the template type to exercise its parsing.
|
||||||
%type <::std::vector<string>> list;
|
%type <::std::vector<string>> list;
|
||||||
|
|
||||||
%printer { yyo << $$; } <int> <::string> <::std::vector<string>>;
|
%printer { yyo << $$; } <int> <::string> <::std::vector<string>>;
|
||||||
|
|||||||
@@ -857,7 +857,7 @@ AT_CHECK([cat stderr], 0, [expout])
|
|||||||
# AT_CHECK_SPACES([FILES])
|
# AT_CHECK_SPACES([FILES])
|
||||||
# ------------------------
|
# ------------------------
|
||||||
# Make sure we did not introduce bad spaces. Checked here because all
|
# Make sure we did not introduce bad spaces. Checked here because all
|
||||||
# the skeletons are (or should be) exercized here.
|
# the skeletons are (or should be) exercised here.
|
||||||
m4_define([AT_CHECK_SPACES],
|
m4_define([AT_CHECK_SPACES],
|
||||||
[AT_PERL_CHECK([-ne '
|
[AT_PERL_CHECK([-ne '
|
||||||
chomp;
|
chomp;
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ input.y: <warning>warning:</warning> fix-its can be applied. Rerun with option
|
|||||||
## ------------------------------------- ##
|
## ------------------------------------- ##
|
||||||
|
|
||||||
# We trust the "#line", since that's what allows us to quote the
|
# We trust the "#line", since that's what allows us to quote the
|
||||||
# actual source from which the gramar file was generated. But #line
|
# actual source from which the grammar file was generated. But #line
|
||||||
# can also be wrong, and point to a line which is shorter that the bad
|
# can also be wrong, and point to a line which is shorter that the bad
|
||||||
# one. In which case we can easily forget to close the styling.
|
# one. In which case we can easily forget to close the styling.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ AT_CLEANUP
|
|||||||
|
|
||||||
# AT_TEST([DIRECTIVES], [COMPILER-FLAGS])
|
# AT_TEST([DIRECTIVES], [COMPILER-FLAGS])
|
||||||
# ---------------------------------------
|
# ---------------------------------------
|
||||||
# Check that headers are self-contained and protected againt multiple
|
# Check that headers are self-contained and protected against multiple
|
||||||
# inclusions.
|
# inclusions.
|
||||||
|
|
||||||
m4_pushdef([AT_TEST],
|
m4_pushdef([AT_TEST],
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ start: 'a' 'b' 'c' ;
|
|||||||
%%
|
%%
|
||||||
]])
|
]])
|
||||||
|
|
||||||
# Define comon code across to be included in
|
# Define common code across to be included in
|
||||||
# class Main for the trivial parser tests.
|
# class Main for the trivial parser tests.
|
||||||
m4_define([AT_TRIVIAL_COMMON],[[
|
m4_define([AT_TRIVIAL_COMMON],[[
|
||||||
static class YYerror implements YYParser.Lexer
|
static class YYerror implements YYParser.Lexer
|
||||||
|
|||||||
@@ -1172,7 +1172,7 @@ m4_define([AT_BISON_CHECK_XML],
|
|||||||
# AT_SET_ENV_IF(EXIT-STATUS)
|
# AT_SET_ENV_IF(EXIT-STATUS)
|
||||||
# --------------------------
|
# --------------------------
|
||||||
# Put this before a Bison invocation to set the environment to:
|
# Put this before a Bison invocation to set the environment to:
|
||||||
# - define COLUMNS to make the test suite independant of the user's
|
# - define COLUMNS to make the test suite independent of the user's
|
||||||
# environment;
|
# environment;
|
||||||
# - keep Valgrind from complaining about reachable memory (when
|
# - keep Valgrind from complaining about reachable memory (when
|
||||||
# EXIT-STATUS is not 0).
|
# EXIT-STATUS is not 0).
|
||||||
|
|||||||
@@ -633,7 +633,7 @@ AT_CLEANUP
|
|||||||
# extremely specific situations. web2c.y exhibits this situation.
|
# extremely specific situations. web2c.y exhibits this situation.
|
||||||
# Below is a stripped version of the grammar. It looks like one can
|
# Below is a stripped version of the grammar. It looks like one can
|
||||||
# simplify it further, but just don't: it is tuned to exhibit a bug,
|
# simplify it further, but just don't: it is tuned to exhibit a bug,
|
||||||
# which disapears when applying sane grammar transformations.
|
# which disappears when applying sane grammar transformations.
|
||||||
#
|
#
|
||||||
# It used to be wrong on yydefact only:
|
# It used to be wrong on yydefact only:
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user