From: Dido Sevilla Date: 2006-12-06T20:31:14+09:00 Subject: Re: Using Relax NG as a grammar On 12/6/06, Vidar Hokstad wrote: > It _is_ meant to be used for language specification, so that's why it > looks suitable. It's only that it's meant for specifying grammars for > languages using XML syntax, and so it's (rightly) very limited in terms > of tokenization etc. which makes it unsuitable for more general > languages like Ruby. Ah, but after you're done tokenizing and have generated an abstract syntax tree, what have you got? You could output the syntax tree into Lisp S-Expressions, which are isomorphic to XML in a very real way. It would, of course, be trivial if your source language was a Lisp dialect. Relax-NG might be useful for defining the higher-level semantics of a language, but the lower-level (and generally less interesting) work of defining the syntactic details of the language you need to do yourself.