<table><tr><td style="">nibags edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-ehgsggoi2qi4jm6/" rel="noreferrer">(Show Details)</a><br />nibags added a reviewer: Framework: Syntax Highlighting.<br />nibags added a project: Framework: Syntax Highlighting.<br />nibags added a subscriber: Framework: Syntax Highlighting.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10783" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div>The Yacc/Bison file highlights as 'dsError' the '$' symbol (it is used as pseudo-variable). The problem comes from the 'isocpp.xml' file of C++, which highlights it as 'Error' (probably, this was added to the C++ file later).<br />
<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">**</span>data/syntax/yacc.xml<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">**</span> (lines 131 & 132):<div style="padding: 8px 0;">...</div>   133|  </context><br />
<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">**</span>autotests/reference/highlight.y.ref<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">**</span> :<div style="padding: 8px 0;">...</div>That is corrected. Also, this file is outdated for Bison. Therefore, it is updated according to the parser of the latest version of Bison (3.0.4).<br />
<br />
<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">**</span>Changes/fixes for Bison:<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">**</span><br />
* Add declarations that contain blocks of code that are not currently highlighted. For example:<br />
     <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
   </span>%code { C++ code... }<br />
   <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">  </span>%destructor { C++ code, with symbols $… }<br />
   <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">  </span>%initial-action { C++ code, with symbols $… }<br />
<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
</span>* Add the Bison variable '@' (@$, @n, @[name], $@n).<div style="padding: 8px 0;">...</div>* Allow a tag in %union declarations. Ex:<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">  </span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
</span>   %union tag { code … }<br />
<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
</span>* Allow grammar declarations in the grammar rules section, such as: %union, %code, %type, etc.<div style="padding: 8px 0;">...</div>     <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
   </span>%token<br />
        <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> </span>PERCENT_DEBUG           "%debug"<br />
        <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"> </span>PERCENT_DEFAULT_PREC    "%default-prec"<br />
   <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">  </span>;<br />
<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
</span>* The ';' char is not necessary to finish a rule. Allow ';' followed by ‘|’, within a rule (See line 603 in the “src/parse-gram.y” file, from the Bison 3.0.4 source [2]).<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10783" rel="noreferrer">https://phabricator.kde.org/D10783</a></div></div><br /><div><strong>To: </strong>nibags, Framework: Syntax Highlighting<br /><strong>Cc: </strong>Framework: Syntax Highlighting, Frameworks, michaelh, genethomas, cullmann, vkrause, dhaumann<br /></div>