[Ur] calling sml

Gian Perrone gdpe at itu.dk
Mon Feb 21 08:30:18 EST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you were merely looking for a simple way to do parser generation that
works with Ur/Web, then perhaps you could consider investing the small
amount of work that would be required to make this setup generate Ur/Web
code:

https://github.com/gian/kuru/tree/master/src/kupeg

It is a self-compiling PEG (Parsing Expression Grammar) generator.  The
only work involved (assuming you have a working SML compiler) would be
to alter kupeg.kpg such that the body of each rule is Ur/Web code, and
then use the existing bootstrap SML PEG (in the same directory) to
execute your new Ur/Web PEG.  The result would be a parser generator
that generates parsers in Ur/Web code.  I used this approach to
bootstrap a compiler for a language for which no compiler existed
previously.

You are welcome to contact me off-list if you would like some assistance
getting something like this going, because it might be something that
would be useful to the wider Ur/Web community.

- --Gian

On 2/21/11 2:11 PM, Gergely Buday wrote:
> Hi,
> 
> is it possible to call SML functions - e.g. yacc or antlr parsers -
> from Ur/Web code? If not, how much work would it be to implement this?
> 
> - Gergely
> 
> _______________________________________________
> Ur mailing list
> Ur at impredicative.com
> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNYmjnAAoJEDd5xfOXfbYMQE8IALGh0PnsMN1pzAbOu574Q65h
M6TzVGMLKvfizj8vVMjDE+Q2gKzgw43buxX2zAWjzl2u7gSIbLwJs0JVx7MllXOB
X17iHIvRtDtTn4l4HyXs1XeEa3WlZRZtlZ3FKotORyo+wfvjDecfMnccnfAdFK3/
JlEufvNvhJajAsKLkGvIQxeaoaxQzrM19D6hbcnLX00YLDEh6FUCf50VaB0AhhW3
6hfZgvTcNT9jnihespmzQMXkrIBXxtbTUUF+dMpazmHoDIDumA78J0G6O9tAbrIT
0uOS4wxYCU14j8ePK0MdpmuWNkciQqBJnkw57N9ZYbxRdtkB7zjnR29cezyMxu0=
=s7hZ
-----END PGP SIGNATURE-----



More information about the Ur mailing list