bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

doc: spell check


From: Akim Demaille
Subject: doc: spell check
Date: Mon, 13 Apr 2020 18:51:42 +0200

commit 758172a8b9a5dc7ca58037b16f5d83adb0ba8e9d
Author: Akim Demaille <address@hidden>
Date:   Mon Apr 13 18:34:50 2020 +0200

    doc: spell check
    
    * doc/bison.texi, NEWS, README-hacking.md: here.
    And elsewhere.

diff --git a/NEWS b/NEWS
index ceaca65b..b4e279cc 100644
--- a/NEWS
+++ b/NEWS
@@ -99,13 +99,13 @@ GNU Bison NEWS
   To avoid the confusion with typing in programming languages, we now refer
   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,
   LPAREN, etc.  Users are invited to replace their uses of "enum
   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
   now have string aliases, internationalized if internationalization is
   enabled.  Therefore, by default, error messages now refer to "end of file"
@@ -121,11 +121,13 @@ GNU Bison NEWS
 **** Symbol kinds
 
   The "symbol kinds" is what the parser actually uses.  (Unless the
-  api.token.raw %define variable was used, the internal symbol kind of a
-  terminal differs from the corresponding token kind.)
+  api.token.raw %define variable is used, the symbol kind of a terminal
+  differs from the corresponding token kind.)
 
   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
 
   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:  YYPRINT Mangold Bonzini's Wdangling exVal baz checkable gcc
  LocalWords:  fsanitize Vogelsgesang lis redeclared stdint automata yytname
- LocalWords:  yysymbol yytnamerr yyreport ctx ARGMAX yysyntax stderr
- LocalWords:  symrec yypcontext TOKENMAX yyexpected YYEMPTY yypstate
+ LocalWords:  yysymbol yytnamerr yyreport ctx ARGMAX yysyntax stderr LPAREN
+ LocalWords:  symrec yypcontext TOKENMAX yyexpected YYEMPTY yypstate YYEOF
  LocalWords:  autocompletion bistromathic submessages Cayuela lexcalc
+ LocalWords:  yytoken YYUNDEF YYERRCODE
 
 Local Variables:
 ispell-dictionary: "american"
diff --git a/README-hacking.md b/README-hacking.md
index 34d09903..0914cb1f 100644
--- a/README-hacking.md
+++ b/README-hacking.md
@@ -52,7 +52,7 @@ Follow the GNU Coding Standards.
 
 Don't reinvent the wheel: we use gnulib, which features many components.
 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
 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)`.
 
 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
 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:  gnupload gnupg gpg keyserver BDF ncftp filename clearsign cvs dir
 LocalWords:  symlinks vti html lt POSIX Cc'ed Graphviz Texinfo autoconf jN
-LocalWords:  automake autopoint graphviz texinfo PROG Wother parsers
-LocalWords:  TESTSUITEFLAGS deprec struct gnulib's getopt config ggdb
-LocalWords:  bitset fsanitize symlink CFLAGS MERCHANTABILITY ispell
-LocalWords:  american
+LocalWords:  automake autopoint graphviz texinfo PROG Wother parsers YYFOO
+LocalWords:  TESTSUITEFLAGS deprec struct gnulib's getopt config ggdb yyfoo
+LocalWords:  bitset fsanitize symlink CFLAGS MERCHANTABILITY ispell wrt YY
+LocalWords:  american Administrivia camlCase yy accessors namespace src
+LocalWords:  getExpectedTokens yyexpectedTokens yygetExpectedTokens
+LocalWords:  regen dogfooding Autotest testsuite
 
 -->
diff --git a/TODO b/TODO
index d6ade4c9..9555a621 100644
--- a/TODO
+++ b/TODO
@@ -155,8 +155,8 @@ $ ./tests/testsuite -l | grep errors | sed q
 Besides yytoknum is wrong when api.token.raw is defined.
 
 ** Better design for diagnostics
-The current implementation of diagnostics is adhoc, it grew organically.  It
-works as a series of calls to several functions, with dependency of the
+The current implementation of diagnostics is ad hoc, it grew organically.
+It works as a series of calls to several functions, with dependency of the
 latter calls on the former.  For instance:
 
       complain (&sym->location,
diff --git a/data/skeletons/bison.m4 b/data/skeletons/bison.m4
index c1cd6606..007d5eb0 100644
--- a/data/skeletons/bison.m4
+++ b/data/skeletons/bison.m4
@@ -645,7 +645,7 @@ m4_define([b4_sync_end],   [ b4_comment([$2:$1])]
 # This generates dependencies on the Bison skeletons hence lots of
 # useless 'git diff'.  This location is useless for the regular
 # 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
 # completely.  If someone thinks this was actually useful, a %define
 # variable should be provided to control the level of verbosity of
diff --git a/data/skeletons/glr.c b/data/skeletons/glr.c
index b2d54abe..630b4cc7 100644
--- a/data/skeletons/glr.c
+++ b/data/skeletons/glr.c
@@ -177,7 +177,7 @@ int ]b4_prefix[parse (]m4_ifset([b4_parse_param], 
[b4_formals(b4_parse_param)],
 # members of this union.
 #
 # 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.  #
diff --git a/doc/bison.texi b/doc/bison.texi
index a462850d..fadd5648 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -12657,7 +12657,7 @@ then the parser's to get the set of defined tokens.
 # pragma GCC diagnostic ignored "-Wnull-dereference"
 #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.
 #if defined CLANG_VERSION && 500 <= CLANG_VERSION
 # 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}.
 
 @item Symbol table
-A data structure where symbol names and associated data are stored
-during parsing to allow for recognition and use of existing
-information in repeated uses of a symbol.  @xref{Multi-function Calc}.
+A data structure where symbol names and associated data are stored during
+parsing to allow for recognition and use of existing information in repeated
+uses of a symbol.  @xref{Multi-function Calc}.
 
 @item Syntax error
 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}.
 
 @item Token
-A basic, grammatically indivisible unit of a language.  The symbol
-that describes a token in the grammar is a terminal symbol.
-The input of the Bison parser is a stream of tokens which comes from
-the lexical analyzer.  @xref{Symbols}.
+A basic, grammatically indivisible unit of a language.  The symbol that
+describes a token in the grammar is a terminal symbol.  The input of the
+Bison parser is a stream of tokens which comes from the lexical analyzer.
+@xref{Symbols}.
 
 @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}.
 
 @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: autoreconf Pennello multisets nondeterminism Generalised baz ACM
 @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: Ctor defcv defcvx arg accessors arithmetics CPP ifndef CALCXX
 @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: deftypefunx pragma Wnull dereference Wdocumentation elif ish
 @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: DNDEBUG cstring Wzero workalike POPL workalikes byacc UCB
 @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: dnotice copyable stdint ptrdiff bufsize yyreport invariants
 @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 ispell-dictionary: "american"
diff --git a/tests/c++.at b/tests/c++.at
index 5facc63a..490c6c25 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -385,7 +385,7 @@ AT_DATA_GRAMMAR([list.y],
 // Starting with :: to ensure we don't output "<::" which starts by the
 // digraph for the left square bracket.
 %type <::string> item;
-// Using the template type to exercize its parsing.
+// Using the template type to exercise its parsing.
 %type <::std::vector<string>> list;
 
 %printer { yyo << $$; } <int> <::string> <::std::vector<string>>;
diff --git a/tests/calc.at b/tests/calc.at
index 1cdbb9af..95a6e5e7 100644
--- a/tests/calc.at
+++ b/tests/calc.at
@@ -857,7 +857,7 @@ AT_CHECK([cat stderr], 0, [expout])
 # AT_CHECK_SPACES([FILES])
 # ------------------------
 # 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],
 [AT_PERL_CHECK([-ne '
   chomp;
diff --git a/tests/diagnostics.at b/tests/diagnostics.at
index df6b0c81..150dd00b 100644
--- a/tests/diagnostics.at
+++ b/tests/diagnostics.at
@@ -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
-# 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
 # one.  In which case we can easily forget to close the styling.
 #
diff --git a/tests/headers.at b/tests/headers.at
index 20a9e4c5..ebe02ee8 100644
--- a/tests/headers.at
+++ b/tests/headers.at
@@ -115,7 +115,7 @@ AT_CLEANUP
 
 # 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.
 
 m4_pushdef([AT_TEST],
diff --git a/tests/javapush.at b/tests/javapush.at
index e3aa49bd..fc1d911f 100644
--- a/tests/javapush.at
+++ b/tests/javapush.at
@@ -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.
 m4_define([AT_TRIVIAL_COMMON],[[
   static class YYerror implements YYParser.Lexer
diff --git a/tests/local.at b/tests/local.at
index d3ded8f4..33a8afa8 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -1172,7 +1172,7 @@ m4_define([AT_BISON_CHECK_XML],
 # AT_SET_ENV_IF(EXIT-STATUS)
 # --------------------------
 # 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;
 # - keep Valgrind from complaining about reachable memory (when
 #   EXIT-STATUS is not 0).
diff --git a/tests/regression.at b/tests/regression.at
index 6014bc8d..833b4f0b 100644
--- a/tests/regression.at
+++ b/tests/regression.at
@@ -633,7 +633,7 @@ AT_CLEANUP
 # extremely specific situations.  web2c.y exhibits this situation.
 # 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,
-# which disapears when applying sane grammar transformations.
+# which disappears when applying sane grammar transformations.
 #
 # It used to be wrong on yydefact only:
 #




reply via email to

[Prev in Thread] Current Thread [Next in Thread]