<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #copied {background-color:#ccccff;}
  tr.alt #copied {background-color:#bbbbf7;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="5">Commit in <b><tt>metaas/trunk/src</tt></b></td></tr>
<tr><td><tt>main/java/uk/co/badgersinfoil/metaas/impl/parser/<a href="#file1">E4XHelper.java</a></tt> </td><td></td><td align="right" id="added">+3</td><td align="right" id="removed">-7</td><td nowrap="nowrap" align="center">371 -&gt; 372</td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file2">RegexSimpleHelper.java</a></tt> </td><td></td><td align="right" id="added">+3</td><td align="right" id="removed">-7</td><td nowrap="nowrap" align="center">371 -&gt; 372</td></tr>
<tr><td><tt>test/java/uk/co/badgersinfoil/metaas/<a href="#file3">BasicTests.java</a></tt> </td><td></td><td align="right" id="added">+1</td><td></td><td nowrap="nowrap" align="center">371 -&gt; 372</td></tr>
<tr><td></td><td></td><td align="right" id="added">+7</td><td align="right" id="removed">-14</td><td></td></tr>
</table>
<small id="info">3 modified files</small><br />
<pre class="comment">
Fix errors seen when multiple instances of island-grammar-input appear,
by not attempting to replace the original CharStream (we failed to replace *all* refs to the original).
Might actually be a bit more efficient this way, too
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/parser</span><br />
<div class="fileheader"><big><b>E4XHelper.java</b></big> <small id="info">371 -&gt; 372</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/parser/E4XHelper.java        2007-01-30 21:16:08 UTC (rev 371)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/parser/E4XHelper.java        2007-01-30 23:34:34 UTC (rev 372)
@@ -43,6 +43,7 @@
</small></pre><pre class="diff" id="context">         public static LinkedListTree parseXMLLiteral(LinkedListToken startMarker, AS3Lexer lexer, CharStream cs, LinkedListTokenStream stream) throws RecognitionException {
                 String tail = startMarker.getText()  // the '&lt;'
                             + cs.substring(cs.index(), cs.size()-1);  // the rest
</pre><pre class="diff" id="added">+                int initialTailLength = tail.length();
</pre><pre class="diff" id="context">                 E4XParser parser;
                 try {
                         parser = e4xParserOn(new StringReader(tail), stream);
</pre><pre class="diff"><small id="info">@@ -52,13 +53,8 @@
</small></pre><pre class="diff" id="context">                 }
                 LinkedListTree ast = AS3FragmentParser.tree(parser.xmlPrimary());
                 tail = parser.getInputTail();
</pre><pre class="diff" id="removed">-                try {
-                        cs = new ANTLRReaderStream(new StringReader(tail));
-                } catch (IOException e) {
-                        // TODO: better exception type?
-                        throw new RuntimeException(e);
-                }
-                lexer.setCharStream(cs);
</pre><pre class="diff" id="added">+                // skip over the XML in the original, underlying CharStream
+                cs.seek(cs.index() + (initialTailLength - tail.length()) - 1);
</pre><pre class="diff" id="context">                 LinkedListTokenSource source = (LinkedListTokenSource)stream.getTokenSource();
                 stream.setTokenSource(source);  // cause any remembered E4X state to be dropped
                 stream.scrub(1); // erase the subsequent token that the E4X parser got from this stream
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/parser</span><br />
<div class="fileheader"><big><b>RegexSimpleHelper.java</b></big> <small id="info">371 -&gt; 372</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/parser/RegexSimpleHelper.java        2007-01-30 21:16:08 UTC (rev 371)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/parser/RegexSimpleHelper.java        2007-01-30 23:34:34 UTC (rev 372)
@@ -42,6 +42,7 @@
</small></pre><pre class="diff" id="context">         public static LinkedListTree parseRegexpLiteral(LinkedListToken startMarker, AS3Lexer lexer, CharStream cs, LinkedListTokenStream stream) throws RecognitionException {
                 String tail = startMarker.getText()  // the '/'
                             + cs.substring(cs.index(), cs.size()-1);  // the rest
</pre><pre class="diff" id="added">+                int initialTailLength = tail.length();
</pre><pre class="diff" id="context">                 RegexSimpleParser parser;
                 try {
                         parser = regexpParserOn(new StringReader(tail), stream);
</pre><pre class="diff"><small id="info">@@ -51,13 +52,8 @@
</small></pre><pre class="diff" id="context">                 }
                 LinkedListTree ast = AS3FragmentParser.tree(parser.regexpLiteral());
                 tail = parser.getInputTail();
</pre><pre class="diff" id="removed">-                try {
-                        cs = new ANTLRReaderStream(new StringReader(tail));
-                } catch (IOException e) {
-                        // TODO: better exception type?
-                        throw new RuntimeException(e);
-                }
-                lexer.setCharStream(cs);
</pre><pre class="diff" id="added">+                // skip over the regexp in the original, underlying CharStream
+                cs.seek(cs.index() + (initialTailLength - tail.length()) - 1);
</pre><pre class="diff" id="context">                 LinkedListTokenSource source = (LinkedListTokenSource)stream.getTokenSource();
                 stream.setTokenSource(source);  // cause any remembered E4X state to be dropped
                 source.setDelegate(lexer);
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">metaas/trunk/src/test/java/uk/co/badgersinfoil/metaas</span><br />
<div class="fileheader"><big><b>BasicTests.java</b></big> <small id="info">371 -&gt; 372</small></div>
<pre class="diff"><small id="info">--- trunk/src/test/java/uk/co/badgersinfoil/metaas/BasicTests.java        2007-01-30 21:16:08 UTC (rev 371)
+++ trunk/src/test/java/uk/co/badgersinfoil/metaas/BasicTests.java        2007-01-30 23:34:34 UTC (rev 372)
@@ -54,6 +54,7 @@
</small></pre><pre class="diff" id="context">                                                 " xx = doc.ns::name;" +
                                                 " m={a:null};" +
                                                 " d = &lt;foo bar=\"{blat}\"/&gt;;" +
</pre><pre class="diff" id="added">+                                                " r = /regexp/;" +
</pre><pre class="diff" id="context">                                                 " /* unary expressions */" +
                                                 " --a; ++a; a--; a++; a = -a;" +
                                                 " return a.call(i.j*k, l[m]);" +
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.12</small></center>
</body></html>