<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : lex class definition for &quot;C language&quot; string</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Syntax Edit : lex class definition for &quot;C language&quot; string]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 05 Apr 2026 11:11:14 +0000</pubDate>
  <lastBuildDate>Tue, 29 Jul 2014 04:36:02 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=22314</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[lex class definition for &quot;C language&quot; string : you have to change the skip:tag...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22314&amp;PID=72689&amp;title=lex-class-definition-for-c-language-string#72689</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8731">flashermail</a><br /><strong>Subject:</strong> 22314<br /><strong>Posted:</strong> 29 July 2014 at 4:36am<br /><br />you have to change the skip:tag section, so that it looks like that:<br><br>lexClass:<br>name&nbsp;&nbsp;&nbsp; = c_String&nbsp;&nbsp;&nbsp; <br>parent:dyn&nbsp;&nbsp;&nbsp; = c_CPP, c_CPPCodeBlock<br>children&nbsp;&nbsp;&nbsp; = c_URL<br>start:Tag&nbsp;&nbsp;&nbsp; = '"'<br>skip:Tag&nbsp;&nbsp;&nbsp; = '\\\r\n', '\\\n\r', '\\\n', '\\\r'<br>end:Tag&nbsp;&nbsp;&nbsp; = '"', @eol<br>txt:colorFG&nbsp;&nbsp;&nbsp; = 0xE00000<br>DisplayName&nbsp;&nbsp;&nbsp; = 'String (Double Quotes)'<br><br>But if you would like to get something like this:<br><br><font color="#FF0000"><font color="#000000">1 </font>"c:\\fdsasdf\\"</font> + 333.3<br><font color="#FF0000"><font color="#000000">2 </font></font><br><font color="#FF0000"><font color="#FF0000"><font color="#000000">3 </font></font>"c:\\fd\n\r</font><br><font color="#FF0000"><font color="#000000">4 </font></font><br><font color="#FF0000"><font color="#FF0000"><font color="#000000">5 </font></font>sasdf\\"</font> + 333.3<br><br>You need to change it to:<br><br>lexClass:<br>name&nbsp;&nbsp;&nbsp; = c_String&nbsp;&nbsp;&nbsp; <br>parent:dyn&nbsp;&nbsp;&nbsp; = c_CPP, c_CPPCodeBlock<br>children&nbsp;&nbsp;&nbsp; = c_URL<br>start:Tag&nbsp;&nbsp;&nbsp; = '"'<br>skip:Tag&nbsp;&nbsp;&nbsp; = '\\\r\n', '\\\n\r', '\\\n', '\\\r', '\n', '\n\r', '\r\n', '\r'<br>end:Tag&nbsp;&nbsp;&nbsp; = '"', @eol<br>txt:colorFG&nbsp;&nbsp;&nbsp; = 0xE00000<br>DisplayName&nbsp;&nbsp;&nbsp; = 'String (Double Quotes)'<br><br>Best regards<br>&nbsp;Flashermail<br>]]>
   </description>
   <pubDate>Tue, 29 Jul 2014 04:36:02 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22314&amp;PID=72689&amp;title=lex-class-definition-for-c-language-string#72689</guid>
  </item> 
  <item>
   <title><![CDATA[lex class definition for &quot;C language&quot; string : I&amp;#039;m trying to define lex...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22314&amp;PID=72519&amp;title=lex-class-definition-for-c-language-string#72519</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8713">popek_777</a><br /><strong>Subject:</strong> 22314<br /><strong>Posted:</strong> 01 June 2014 at 2:25pm<br /><br />I'm trying to define lex class definition for C strings. First step was to take a class definition&nbsp;<div><span style="line-height: 1.4;">from one already defined in codejock samples. It looks like below (taken from file _cpp.schclass):</span></div><div><span style="line-height: 1.4;"><br></span></div><div><div>lexClass: <span ="Apple-tab-span" style="white-space: pre;">	</span></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>name<span ="Apple-tab-span" style="white-space:pre">			</span>= c_String<span ="Apple-tab-span" style="white-space:pre">	</span></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>parent:dyn<span ="Apple-tab-span" style="white-space:pre">		</span>= c_CPP, c_CPPCodeBlock</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>children<span ="Apple-tab-span" style="white-space:pre">		</span>= c_URL</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>start:Tag<span ="Apple-tab-span" style="white-space:pre">		</span>= '"'</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>skip:Tag<span ="Apple-tab-span" style="white-space:pre">		</span>= '\\"', '\\\r\n', '\\\n\r', '\\\n', '\\\r'<span ="Apple-tab-span" style="white-space:pre">	</span></div><div><span ="Apple-tab-span" style="white-space:pre">	</span>end:Tag<span ="Apple-tab-span" style="white-space:pre">			</span>= '"', @eol</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>txt:colorFG<span ="Apple-tab-span" style="white-space:pre">		</span>= 0xE00000</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>DisplayName<span ="Apple-tab-span" style="white-space:pre">		</span>= 'String (Double Quotes)'</div><div style="line-height: 1.4;"><br></div></div><div style="line-height: 1.4;">Class above does not cope well with text like one below:</div><div style="line-height: 1.4;"><br></div><div style="line-height: 1.4;"><span style="line-height: 1.4;">"c:\\fdsasdf\\" + 333.3</span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;"><br></span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;">result:</span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;">whole line is colored like text</span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;"><br></span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;">expected:</span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;">only text between quotes is colored like text</span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;"><br></span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;">To fix this issue I thought that when I additionally skip '\\' it will to the job but this didn't help.</span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;"><br></span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;">Does anyone have an idea how to define C like string lex class to cope well with scenario described above?</span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;"><br></span></div><div style="line-height: 1.4;"><span style="line-height: 1.4;"><br></span></div>]]>
   </description>
   <pubDate>Sun, 01 Jun 2014 14:25:41 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22314&amp;PID=72519&amp;title=lex-class-definition-for-c-language-string#72519</guid>
  </item> 
 </channel>
</rss>