This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Maciej Stachowiak writes: > > I took a look at the Bigloo regular grammar syntax, and I do not think > it is appropriate for guile. First of all, it is new syntax rather > than a procedure, and second, it has a built-in concept of semantic > actions associated with regular expressions. Since we will likely > break that anyway, since we only want to search for regexps, one of > the other ideas posted here would be a better starting point. I wasn't saying to implement the bigloo regular parsing interface (which consists of the three fcns read/rp, regular-grammar, and regular-search - read/rp reads from a port using a lex tokenizer created by regular-grammar. regular-search takes a regexp & a port as arguments and reads the longest string matching the regexp). I was just saying that the syntax used for the regular expressions should be adopted. The bigloo regexp syntax is very close to what I've implemented for emacs & scheme, and what Bob Glickstein implemented for emacs. It's also a little closer to normal regular expressions in that it uses + & * for zero-or-more & one-or-more. It also has ranging fcns - for example, one could use (inside #\a #\z) instead of (set "a-z"), etc. I don't see any advantage at all to my syntax. On the other hand, if you're going to provide regular expressions, and you want to be able to process other languages, you might as well provide some of the higher level features that bigloo provides, namely this easy way of generating & using lexers as well its yacc equivalent. As far as I'm concerned, the only things really lacking from the bigloo implementation are in the yacc implementation - it lacks operator precedence and error recovery. One can work around the former, but it's hard to get around the latter. -- Harvey J. Stein Berger Financial Research hjstein@bfr.co.il