gcc-wwwdocs branch master updated. e1e17c97a8ae35cfb6b2f7428fb52b05f82450d1
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 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: -Remove as much code from parser actions as possible. - -This goes more or less with the above. Good existing code: - - -expr_no_commas: -expr_no_commas '+' expr_no_commas -{ $$ = parser_build_binary_op ($2, $1, $3); } - - -Bad existing code: - - -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); } - - -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. - -We also want to minimize the number of helper functions embedded in -the grammar file. - - Break up enormous functions. 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
gcc-wwwdocs branch python-formatting created. e1e17c97a8ae35cfb6b2f7428fb52b05f82450d1
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, python-formatting has been created at e1e17c97a8ae35cfb6b2f7428fb52b05f82450d1 (commit) - Log - --- hooks/post-receive -- gcc-wwwdocs
gcc-wwwdocs branch python-formatting updated. b107360d994dd97cbea8c6ded3364a0d843cd5bd
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, python-formatting has been updated via b107360d994dd97cbea8c6ded3364a0d843cd5bd (commit) from e1e17c97a8ae35cfb6b2f7428fb52b05f82450d1 (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 b107360d994dd97cbea8c6ded3364a0d843cd5bd Author: Eric Gallager Date: Sun Aug 18 20:11:45 2024 -0400 Update gcc-color-to-html.py apply flake8 formatting suggestions diff --git a/bin/gcc-color-to-html.py b/bin/gcc-color-to-html.py index 0d97ead4..18c63fda 100755 --- a/bin/gcc-color-to-html.py +++ b/bin/gcc-color-to-html.py @@ -25,37 +25,40 @@ import unittest # Colors from gcc/color-macros.h: -COLOR_SEPARATOR = ";" -COLOR_NONE = "00" -COLOR_BOLD = "01" +COLOR_SEPARATOR = ";" +COLOR_NONE = "00" +COLOR_BOLD = "01" COLOR_UNDERSCORE = "04" -COLOR_BLINK = "05" -COLOR_REVERSE= "07" -COLOR_FG_BLACK = "30" -COLOR_FG_RED = "31" -COLOR_FG_GREEN = "32" -COLOR_FG_YELLOW = "33" -COLOR_FG_BLUE= "34" +COLOR_BLINK = "05" +COLOR_REVERSE = "07" +COLOR_FG_BLACK = "30" +COLOR_FG_RED = "31" +COLOR_FG_GREEN = "32" +COLOR_FG_YELLOW = "33" +COLOR_FG_BLUE = "34" COLOR_FG_MAGENTA = "35" -COLOR_FG_CYAN= "36" -COLOR_FG_WHITE = "37" -COLOR_BG_BLACK = "40" -COLOR_BG_RED = "41" -COLOR_BG_GREEN = "42" -COLOR_BG_YELLOW = "43" -COLOR_BG_BLUE= "44" +COLOR_FG_CYAN = "36" +COLOR_FG_WHITE = "37" +COLOR_BG_BLACK = "40" +COLOR_BG_RED = "41" +COLOR_BG_GREEN = "42" +COLOR_BG_YELLOW = "43" +COLOR_BG_BLUE = "44" COLOR_BG_MAGENTA = "45" -COLOR_BG_CYAN= "46" -COLOR_BG_WHITE = "47" +COLOR_BG_CYAN = "46" +COLOR_BG_WHITE = "47" SGR_START = "\33[" -SGR_END = "m\33[K" +SGR_END = "m\33[K" + def SGR_SEQ(str): return SGR_START + str + SGR_END + SGR_RESET = SGR_SEQ("") + def ansi_to_html(text): text = html.escape(text) pattern = ('(' + re.escape(SGR_START) + ')' @@ -89,6 +92,7 @@ def ansi_to_html(text): text = text[:m.start(1)] + replacement + text[m.end(3):] return text + class AnsiToHtmlTests(unittest.TestCase): def assert_html(self, ansi_text, expected_html): html = ansi_to_html(ansi_text) @@ -109,6 +113,7 @@ class AnsiToHtmlTests(unittest.TestCase): def test_escaping(self): self.assert_html("#include ", "#include") + if len(sys.argv) > 1: sys.exit(unittest.main()) --- Summary of changes: bin/gcc-color-to-html.py | 45 + 1 file changed, 25 insertions(+), 20 deletions(-) hooks/post-receive -- gcc-wwwdocs