Daniel Kraft <d...@domob.eu> writes: >>> 2) Write a seperate elisp reader, possibly in Scheme (but could be C >>> as well if that's important for performance). This helps us keep >>> "both" readers clean and seperate, but all has to be done from ground >>> up and the code is probably slower (when written in Scheme). >> >> This sounds like the best option to me. You could use SILex to build >> the lexer (http://www.iro.umontreal.ca/~dube/) and `(text parse-lalr)' >> for the parser. > > Hm, ok, I'll look into those. On the other hand I guess that Lisp has > such a simple syntax that hand-writing some recursive-descent parser > may be an equally good option? Well, I'll simply give it a try!
Well, yes, you may be right. > But it seems that the LALR parser generator is part of guile-lib, and > will introduce that as a new dependency for Guile; Actually it's already in `master', because it's used for ECMAScript. I'd need to be made part of the official API, though. > do you think that's ok? (Haven't checked how SILex works and if it > may introduce dependencies.) SILex generates a source file containing the lexer, so there's no additional run-time dependency. Guile's tarball could come with the generated file, such that end-users don't need to have SILex installed. For convenience, it may be helpful to have SILex in the repository, though (that's what Guile-RPC does). Thanks, Ludo'.