Re: Import Filters - lex/yacc
Stéphane Bonhomme (Stephane.Bonhomme@imag.fr)
Wed, 07 May 1997 10:26:07 +0200
> > Concerning the import of formats in Thot, there is no generic tool similar to
> >transformation schema. A way to write such converters in thot is the use of
> >the API to build the structure tree in memory and then saving this document in
> >a piv file.
> Now that's a bit rude:
> First I define a structure schema for my type of documents, but then I have to
> build an internal representation "by hand" (or reenter the whole document) ?!
> What about the possibility to write an interface to the lexx/yacc tools?
It is possible to include API functions as semantic actions in a lex/yacc
based parser. As the api functions are designed to build structure tree, it is
not much different than building a syntax tree. It is quite straightforward to
write a filter from you format to Thot.
API manual : http://opera.inrialpes.fr/thot/APIman.toc.html
especially : http://opera.inrialpes.fr/thot/APIman.html#secta9
structure language manual :