Mesa (glsl2): glcpp: Explicitly expect 0 shift/reduce conflicts.

Carl Worth cworth at kemper.freedesktop.org
Wed Jul 28 18:12:03 UTC 2010


Module: Mesa
Branch: glsl2
Commit: efef950f393dfe6cb7ef60bee646f2197143df41
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=efef950f393dfe6cb7ef60bee646f2197143df41

Author: Carl Worth <cworth at cworth.org>
Date:   Wed Jul 28 11:10:52 2010 -0700

glcpp: Explicitly expect 0 shift/reduce conflicts.

The "%expect 0" construct will make bison emit an error if any future
changes to the grammar introduce shift/reduce conflicts, (without also
increasing the number after "%expect").

---

 src/glsl/glcpp/glcpp-parse.y |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
index 3322db0..41cfff5 100644
--- a/src/glsl/glcpp/glcpp-parse.y
+++ b/src/glsl/glcpp/glcpp-parse.y
@@ -141,6 +141,7 @@ glcpp_parser_lex_from (glcpp_parser_t *parser, token_list_t *list);
 %parse-param {glcpp_parser_t *parser}
 %lex-param {glcpp_parser_t *parser}
 
+%expect 0
 %token COMMA_FINAL DEFINED ELIF_EXPANDED HASH HASH_DEFINE_FUNC HASH_DEFINE_OBJ HASH_ELIF HASH_ELSE HASH_ENDIF HASH_IF HASH_IFDEF HASH_IFNDEF HASH_UNDEF IDENTIFIER IF_EXPANDED INTEGER INTEGER_STRING NEWLINE OTHER PLACEHOLDER SPACE
 %token PASTE
 %type <ival> expression INTEGER operator SPACE




More information about the mesa-commit mailing list