This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gcc-wwwdocs".
The branch, master has been updated via e1e17c97a8ae35cfb6b2f7428fb52b05f82450d1 (commit) from 9f4538d8d6faf660b3dd469d6bfdfeb77a7022c5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e1e17c97a8ae35cfb6b2f7428fb52b05f82450d1 Author: Gerald Pfeifer <ger...@pfeifer.com> Date: Sun Aug 18 12:43:40 2024 +0200 projects: Remove parser-related simple project(s) 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, ----------------------------------------------------------------------- Summary of changes: htdocs/projects/beginner.html | 37 ------------------------------------- 1 file changed, 37 deletions(-) hooks/post-receive -- gcc-wwwdocs