This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Best way to interface Java?


"Nic Ferrier" <nferrier@tapsellferrier.co.uk> writes:

> 3. I could pass a OO style proc to the parser
> The proc would take a symbol parameter and a list. The symbol would
> define the action and the list would be the rest of the args.
> 
> As for 1. there is no type-checking which puts me off a bit.

Consider doing what SAX does:  Define a DocumentHandler class
(or use the SAX version), and pass such a handler to your parser:

For example:

public class ScmDocumentHandler extends org.xml.sax.HandlerBase
{
  public void text(FString str)
  { characters(...); }
  ...
}

(parser
  (object (<org.xml.sax.HandlerBase>)
    ((text (arg :: <string)) <void> (print-text arg))
    ...))
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]