Author: theraven
Date: Wed Jan 13 01:19:01 2010
New Revision: 5801

URL: http://svn.gna.org/viewcvs/etoile?rev=5801&view=rev
Log:
Implemented test parametric rule.  This is the equivalent of the following in 
OMeta:

tsName = listOf(#letter, #letterOrDigit).
name = spaces tsName.
keyword :ks = token(ks) ~letterOrDigit.
repeatedThingTest = name:n keyword(n).

This parses the same string twice, but the second time it is parsing with a 
parser constructed specifically to parse the first thing that was created.  
Note that this particular example can be implemented in other (much faster) 
ways using the PEG code, but this is a higher-level version.  keyword could be 
any other parametric rule; for a trivial example it could parse only an 
upper-case version.  

It should now be very easy to transcribe the OMeta grammar into the 
OMetaBootstrap class.  We now have templates in that class that match all of 
the constructs used to define OMeta, with the exception of foreign (which is 
just a message send that retrieves a parser that doesn't exist yet).


Modified:
    branches/guenther/ObjMeta/OMTest.tool/Resources/OMGrammar.st
    branches/guenther/ObjMeta/OMTest.tool/Resources/OMTest.st


_______________________________________________
Etoile-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-cvs

Reply via email to