[Laszlo-dev] For Review: Change 20080107-dda-C Summary: SWF9: Fix grammar glitches in support for ...rest and optional parameters
P T Withington
ptw at pobox.com
Mon Jan 7 14:38:58 PST 2008
Much simpler. Approved. (And I apologize for making the suggestion
that sent you down the wrong path in the first place. :)
On 2008-01-07, at 17:34 EST, Donald Anderson wrote:
> Change 20080107-dda-C by dda at lester.local on 2008-01-07 16:44:28 EST
> in /Users/dda/laszlo/src/svn/openlaszlo/branches/devildog
> for http://svn.openlaszlo.org/openlaszlo/branches/devildog
>
> Summary: SWF9: Fix grammar glitches in support for ...rest and
> optional parameters
>
> New Features:
>
> Bugs Fixed: LPP-5234
>
> Technical Reviewer: ptw (pending)
> QA Reviewer: hminsky (pending)
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
> Previously, parsing of functions with optional or variable
> parameters had glitches.
> The known problems were that seeing a 'public' (and presumably
> any visibility keyword)
> before function caused a function with optional parameters to
> give an error.
> Also, if the function was the first item in the class (before any
> var) this would cause
> an error. To fix this, I chose to simplify the grammar. Before,
> the rules that
> any optional parameters must appear after regular parameters, and
> that the vararg parameter
> must appear last was built into the rules of the grammar. This
> made the grammar complicated,
> and required extra LOOKAHEAD macros to resolve ambigulities. Now
> the grammar is simple,
> and the rules for the ordering of kinds of parameters are
> enforced after
> the parsing for each element is complete. All the strange error
> cases related to this part
> of the grammar now appear resolved.
>
> Tests:
> Tried the two cases reported by Henry: 'public' appearing before
> function with opt args,
> and function with opt args appearing first in a class.
>
> Tried the test/optargs.lzs case for coverage of legal cases.
>
> Added some (commented) illegal cases in test/optargs.lzs to test
> coverage for illegal cases.
>
> Files:
> M test/optargs.lzx
> M WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080107-dda-C.tar
>
>
>
> --
>
> Don Anderson
> Java/C/C++, Berkeley DB, systems consultant
>
> voice: 617-547-7881
> email: dda at ddanderson.com
> www: http://www.ddanderson.com
>
>
>
>
More information about the Laszlo-dev
mailing list