<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Let me know if there is anything I can look at...  I can tell you what we accept in the bsh JavaCC grammar, but yes, it should be simple to skip during tokenization.<DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Pat<DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On Jan 8, 2007, at 6:54 PM, Daniel Leuck wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><O:SMARTTAGTYPE namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"><DIV class="Section1"><P class="MsoNormal"><FONT size="2" color="navy" face="Arial"><SPAN style="font-size: 10.0pt;font-family:Arial;color:navy; color: rgb(0, 0, 128); font-size: 13.3333px; "><SPAN class="Apple-style-span" style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; ">Hi Jesse,</SPAN><O:P style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; "></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" color="navy" face="Arial"><SPAN style="font-size: 10.0pt;font-family:Arial;color:navy; color: rgb(0, 0, 128); font-size: 13.3333px; "><O:P style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; "> </SPAN></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" color="navy" face="Arial"><SPAN style="font-size: 10.0pt;font-family:Arial;color:navy; color: rgb(0, 0, 128); font-size: 13.3333px; "><SPAN class="Apple-style-span" style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; ">I would just write a method to consume the multiline comments during the tokenization phase.  At this point, I don’t think SDL’s grammar is complex enough to require use of a parser generator.  I considered using JJTree as we do for BeanShell (<A href="https://javacc.dev.java.net/doc/JJTree.html">https://javacc.dev.java.net/doc/JJTree.html</A>), but I discovered writing it by hand wasn’t too hard, and the Java and C# implementations are very fast.</SPAN><O:P style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; "></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" color="navy" face="Arial"><SPAN style="font-size: 10.0pt;font-family:Arial;color:navy; color: rgb(0, 0, 128); font-size: 13.3333px; "><O:P style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; "> </SPAN></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" color="navy" face="Arial"><SPAN style="font-size: 10.0pt;font-family:Arial;color:navy; color: rgb(0, 0, 128); font-size: 13.3333px; "><SPAN class="Apple-style-span" style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; ">Dan</SPAN><O:P style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; "></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" color="navy" face="Arial"><SPAN style="font-size: 10.0pt;font-family:Arial;color:navy; color: rgb(0, 0, 128); font-size: 13.3333px; "><O:P style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13.3333px; "> </SPAN></O:P></SPAN></FONT></P><DIV style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><DIV><DIV class="MsoNormal" align="center" style="text-align:center; font-family: Times New Roman; "><FONT size="3" face="Times New Roman"><SPAN style="font-size:12.0pt; font-family: Times New Roman; text-align: center; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; text-align: center; "></SPAN><HR size="2" width="100%" align="center" tabindex="-1"></SPAN></FONT></DIV><P class="MsoNormal"><B style="font-family: Times New Roman; font-weight: bold; "><FONT size="2" face="Tahoma"><SPAN style="font-size:10.0pt; font-family:Tahoma;font-weight:bold; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; font-weight: bold; ">From:</SPAN></SPAN></FONT></B><FONT size="2" face="Tahoma"><SPAN style="font-size:10.0pt;font-family:Tahoma; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; "> sdl-developers-bounces@ikayzo.org [<A href="mailto:sdl-developers-bounces@ikayzo.org">mailto:sdl-developers-bounces@ikayzo.org</A>] </SPAN><B style="font-family: Tahoma; font-size: 13.3333px; font-weight: bold; "><SPAN style="font-weight:bold; font-family: Tahoma; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; font-weight: bold; ">On Behalf Of </SPAN></SPAN></B><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; ">Jesse Weaver</SPAN><BR style="font-family: Tahoma; font-size: 13.3333px; "><B style="font-family: Tahoma; font-size: 13.3333px; font-weight: bold; "><SPAN style="font-weight:bold; font-family: Tahoma; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; font-weight: bold; ">Sent:</SPAN></SPAN></B><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; "> Monday, January 08, 2007 2:29 PM</SPAN><BR style="font-family: Tahoma; font-size: 13.3333px; "><B style="font-family: Tahoma; font-size: 13.3333px; font-weight: bold; "><SPAN style="font-weight:bold; font-family: Tahoma; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; font-weight: bold; ">To:</SPAN></SPAN></B><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; "> </SPAN><ST1:PERSONNAME w:st="on"><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; "><A href="mailto:sdl-developers@ikayzo.org">sdl-developers@ikayzo.org</A>:Information relating to SDL development</SPAN></ST1:PERSONNAME><BR style="font-family: Tahoma; font-size: 13.3333px; "><B style="font-family: Tahoma; font-size: 13.3333px; font-weight: bold; "><SPAN style="font-weight:bold; font-family: Tahoma; font-size: 13.3333px; "><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; font-weight: bold; ">Subject:</SPAN></SPAN></B><SPAN class="Apple-style-span" style="font-family: Tahoma; font-size: 13.3333px; "> Re: [Sdl-developers] ABNF Grammar</SPAN></SPAN></FONT><O:P style="font-family: Times New Roman; "></O:P></P></DIV><P class="MsoNormal"><FONT size="3" face="Times New Roman"><SPAN style="font-size: 12.0pt; font-family: Times New Roman; "><O:P style="font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; "> </SPAN></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="3" face="Times New Roman"><SPAN style="font-size: 12.0pt; font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; ">Just in case it makes a difference, I'm writing a completely handcoded recursive descent parser for the C++ version (Boost::Spirit is a lot of library overhead). Right now, the parsing functions for each part of the grammar will look at the text stream directly. Should I add a lexer-type class, and implement the multiline comments in there, or simply write in multiline comments as a fallback when nothing else can be matched? </SPAN><BR clear="all"><BR style="font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; ">-- </SPAN><BR style="font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; ">Jesse</SPAN><BR style="font-family: Times New Roman; "><BR style="font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; ">-----------</SPAN><BR style="font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; ">There is a theory which states that if anybody ever discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory which states that this has already happened. - Douglas Adams, author of Hitchhiker's Guide to the Galaxy</SPAN><O:P style="font-family: Times New Roman; "></O:P></SPAN></FONT></P></DIV></DIV></O:SMARTTAGTYPE><BR class="Apple-interchange-newline"></SPAN></BLOCKQUOTE></DIV><BR><DIV> <DIV>Pat</DIV> </DIV><BR></DIV></DIV></BODY></HTML>