public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] wwwdocs: projects: Remove parser-related simple project(s)
@ 2024-08-18 12:22 Gerald Pfeifer
  0 siblings, 0 replies; only message in thread
From: Gerald Pfeifer @ 2024-08-18 12:22 UTC (permalink / raw)
  To: gcc-patches; +Cc: Christopher Higgs

Christopher pointed out these did not appear applicable any longer.
From what I found I agree, so removed this from the beginner projects 
list.

Pushed.

Gerald

---
 htdocs/projects/beginner.html | 37 -----------------------------------
 1 file changed, 37 deletions(-)

diff --git a/htdocs/projects/beginner.html b/htdocs/projects/beginner.html
index 83efbd86..a6ea9525 100644
--- a/htdocs/projects/beginner.html
+++ b/htdocs/projects/beginner.html
@@ -164,43 +164,6 @@ following shell command, run from the gcc subdirectory:</p>
 </pre>
 </li>
 
-<li>Remove as much code from parser actions as possible.
-
-<p>This goes more or less with the above.  Good existing code:</p>
-
-<pre>
-expr_no_commas:
-        expr_no_commas '+' expr_no_commas
-                { $$ = parser_build_binary_op ($2, $1, $3); }
-</pre>
-
-<p>Bad existing code:</p>
-
-<pre>
-cast_expr:
-        '(' typename ')' cast_expr  %prec UNARY
-                { tree type;
-                  int SAVED_warn_strict_prototypes = warn_strict_prototypes;
-                  /* This avoids warnings about unprototyped casts on
-                     integers.  E.g. "#define SIG_DFL (void(*)())0".  */
-                  if (TREE_CODE ($4) == INTEGER_CST)
-                    warn_strict_prototypes = 0;
-                  type = groktypename ($2);
-                  warn_strict_prototypes = SAVED_warn_strict_prototypes;
-                  $$ = build_c_cast (type, $4); }
-</pre>
-
-<p>All the logic here should be moved into a separate function in
-c-typeck.c, named something like parser_build_c_cast.  The point of
-doing this is, the less code in Yacc input files, the easier it is to
-rearrange the grammar and/or replace it entirely.  Also it makes it
-less likely that someone will muck with action code and then forget to
-rebuild the generated parser and check it in.</p>
-
-<p>We also want to minimize the number of helper functions embedded in
-the grammar file.</p>
-</li>
-
 <li>Break up enormous functions.
 
 <p>This is in the same vein as the above, but significantly harder,
-- 
2.46.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-18 12:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-18 12:22 [pushed] wwwdocs: projects: Remove parser-related simple project(s) Gerald Pfeifer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).