[gtksourceview] yacc.lang: handle multidigit semantic values



commit dcbb3a92db3e26418558ec79fd9b453a529e41f8
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Fri Oct 24 18:43:19 2014 -0500

    yacc.lang: handle multidigit semantic values
    
    A semantic value $n can have any number of digits. Highlight the entire
    value, not just the first digit.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739155

 data/language-specs/yacc.lang    |    2 +-
 tests/syntax-highlighting/file.y |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/data/language-specs/yacc.lang b/data/language-specs/yacc.lang
index f177668..3550e5d 100644
--- a/data/language-specs/yacc.lang
+++ b/data/language-specs/yacc.lang
@@ -123,7 +123,7 @@
           </include>
         </context>
         <context style-ref="keyword">
-          <match>(\$(&lt;[\w\d_-]*&gt;)?[\$0-9]|[ ][$0-9])</match>
+          <match>(\$(&lt;[\w\d_-]*&gt;)?[\$0-9]+|[ ][$0-9]+)</match>
         </context>
         <context ref="c:c"/>
       </include>
diff --git a/tests/syntax-highlighting/file.y b/tests/syntax-highlighting/file.y
index 66a7853..bd0f198 100644
--- a/tests/syntax-highlighting/file.y
+++ b/tests/syntax-highlighting/file.y
@@ -43,7 +43,7 @@
 script:   program           { _ms_parser_set_top_node (parser, $1); }
 ;
 
-program:  stmt_or_error             { $$ = node_list_add (parser, NULL, $1); }
+program:  stmt_or_error             { $$ = node_list_add (parser, NULL, $1234); }
         | program stmt_or_error     { $$ = node_list_add (parser, MS_NODE_LIST ($1), $2); }
 ;
 


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