<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><p style="margin: 0.0px 0.0px 0.0px 0.0px">Change 20090303-dda-0 by <a href="mailto:dda@lester-2.local">dda@lester-2.local</a> on 2009-03-03 09:29:19 PST</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>in /Users/dda/laszlo/src/svn/openlaszlo/trunk-b</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>for <a href="http://svn.openlaszlo.org/openlaszlo/trunk">http://svn.openlaszlo.org/openlaszlo/trunk</a></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Summary: Capture filename information in parser errors</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">New Features:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Bugs Fixed:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Technical Reviewer: ptw (pending)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">QA Reviewer: (pending)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Doc Reviewer: (pending)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Documentation:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Release Notes:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Details:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/Token.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ParseException.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>This introduce of a better way to track filenames in the parser.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>Javacc does not have a direct way to track filename information for use in error messages, etc.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>Since it already keeps line/column information in tokens, it seems sensible to keep that information there, too.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>These changes overrides the standard Javacc Token.java with our own version that contains the filename,</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>and a way to set it from the Parser.<span class="Apple-converted-space"> </span>It removes the knowledge of the current filename from the</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>TokenManager.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>A ParseException, which only has access to the token, not the tokenmanager, is now equipped to tag</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>an error message to include the file name.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>When parsing a dependency expression, add the current filename location information.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>Added a 'dumpSourceInput' which is turned on when using -SS that dumps that exact input source</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>that the script compiler sees into <name>-src-<count>.txt</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>Note - this change leaves in place the behavior that a stack trace is produced.<span class="Apple-converted-space"> </span>A simple attempt</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>at modifying this to producing a normal error message resulted in a message with the line/file information</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>removed(!)<span class="Apple-converted-space"> </span>This can be addressed via a separate JIRA.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Tests:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>Test case now produces a message (still with a stack trace) that includes the filename, and</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>correct line and column numbers.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>Compiling: LPP-7839.lzx to LPP-7839.swf9.swf</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>Exception in thread "main" org.openlaszlo.sc.parser.ParseException: Syntax error: the token "0" was not expected at this position at file LPP-7839.lzx, line 2, column 36.</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px"><span class="Apple-converted-space"> </span>Usual regression tests: (smokecheck,weather,lzpix on all platforms).</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Files:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">M<span class="Apple-converted-space"> </span>WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">M<span class="Apple-converted-space"> </span>WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">M<span class="Apple-converted-space"> </span>WEB-INF/lps/server/src/org/openlaszlo/compiler/Main.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">M<span class="Apple-converted-space"> </span>WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">A<span class="Apple-converted-space"> </span>WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/Token.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">M<span class="Apple-converted-space"> </span>WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ParseException.java</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px">Changeset: <a href="http://svn.openlaszlo.org/openlaszlo/patches/20090303-dda-0.tar">http://svn.openlaszlo.org/openlaszlo/patches/20090303-dda-0.tar</a></p>
<br><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="Apple-interchange-newline">--</div><div><br>Don Anderson<br>Java/C/C++, Berkeley DB, systems consultant<br><br>voice: 617-306-2057<br>email: <a href="mailto:dda@ddanderson.com">dda@ddanderson.com</a><br>www: <a href="http://www.ddanderson.com/">http://www.ddanderson.com</a><br></div></div></span></span><br class="Apple-interchange-newline"></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></body></html>