[ANN] TagTreeScanner 0.6

Discussion in 'Ruby' started by Gavin Kistner, Jul 5, 2005.

  1. From http://phrogz.net/RubyLibs/rdoc/OWLScribble/doc/tts.html:

    "The TagTreeScanner class provides a generic framework for creating a
    nested hierarchy of tags and text (like XML or HTML) by parsing text.
    An example use (and the reason it was written) is to convert a wiki
    markup syntax into HTML."

    It's not yet as easy as I'd like to understand the core concepts, but
    in a nutshell you specify a series of states which your parser may go
    through, and for each state supply a set of tags to look for in that
    state. Though both it and the Syntax library use StringScanner (and
    thus regular expressions) to do the job, TagTreeScanner is distinct
    in that:

    1) It automatically handles the opening and closing of tags for you
    (particularly the "close_match" property of a TagFactory)

    2) It automatically handles state (the @tag_genres hash and the
    allowed_genre property of factories)

    3) It keeps track of a nested tree during building, automatically
    pushing and popping nodes as necessary, and (when no tags can be
    found) pushing text into the current tag.

    I'm not yet cool enough to put this into a gem...hopefully I'll do
    that in the next week or so.

    This library is useless by itself; it exists to allow you to define
    your own syntax parser as a subclass of TagTreeScanner. Which is what
    I've done with the OWLScribble class, documented along side
    TagTreeScanner.

    I appreciate all feedback, positive and negative, about the
    efficiency of the code, clarity of the documentation, or interface to
    the class.


    --
    "When I am working on a problem I never think about beauty. I only
    think about how to solve the problem. But when I have finished, if
    the solution is not beautiful, I know it is wrong."
    - R. Buckminster Fuller
     
    Gavin Kistner, Jul 5, 2005
    #1
    1. Advertising

  2. Gavin Kistner

    Takashi Sano Guest

    Hi,=20

    2005/7/5, Gavin Kistner <>:
    > From http://phrogz.net/RubyLibs/rdoc/OWLScribble/doc/tts.html:
    >=20
    > "The TagTreeScanner class provides a generic framework for creating a
    > nested hierarchy of tags and text (like XML or HTML) by parsing text.
    > An example use (and the reason it was written) is to convert a wiki
    > markup syntax into HTML."
    >=20


    I'm very interested in this library, but where can I download it? It
    seems that the link above only takes me to its rdoc. Thanks.

    Takashi Sano
     
    Takashi Sano, Jul 5, 2005
    #2
    1. Advertising

  3. --Apple-Mail-1-536860927
    Content-Transfer-Encoding: 7bit
    Content-Type: text/plain;
    charset=US-ASCII;
    delsp=yes;
    format=flowed

    On Jul 5, 2005, at 4:25 AM, Takashi Sano wrote:
    >> From http://phrogz.net/RubyLibs/rdoc/OWLScribble/doc/tts.html:

    >
    > I'm very interested in this library, but where can I download it? It
    > seems that the link above only takes me to its rdoc. Thanks.


    Sorry, I should have pointed that out.
    The TagTreeScanner.rb page has in its documentation a link to the
    TagTreeScanner.rb file, at:
    http://phrogz.net/RubyLibs/rdoc/OWLScribble/TagTreeScanner.rb

    You can also just browse the directory at:
    http://phrogz.net/RubyLibs/rdoc/OWLScribble/

    and get at things like test cases.

    --Apple-Mail-1-536860927--
     
    Gavin Kistner, Jul 5, 2005
    #3
  4. Gavin Kistner

    Takashi Sano Guest

    2005/7/6, Gavin Kistner <>:
    > On Jul 5, 2005, at 4:25 AM, Takashi Sano wrote:
    > >> From http://phrogz.net/RubyLibs/rdoc/OWLScribble/doc/tts.html:

    > >
    > > I'm very interested in this library, but where can I download it? It
    > > seems that the link above only takes me to its rdoc. Thanks.

    >=20
    > Sorry, I should have pointed that out.
    > The TagTreeScanner.rb page has in its documentation a link to the
    > TagTreeScanner.rb file, at:
    > http://phrogz.net/RubyLibs/rdoc/OWLScribble/TagTreeScanner.rb
    >=20


    Oops, I overlooked that link. Thanks!

    Takashi Sano
     
    Takashi Sano, Jul 6, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Sampson [MSFT]

    [ANN]: NNTP Server slow downs.

    Mike Sampson [MSFT], Oct 7, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    430
    Mike Sampson [MSFT]
    Oct 7, 2003
  2. Mike Sampson [MSFT]

    [ANN]: NNTP Server slow downs.

    Mike Sampson [MSFT], Dec 6, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    521
    Mike Sampson [MSFT]
    Dec 6, 2003
  3. Michael Livsey
    Replies:
    3
    Views:
    453
    Michael Livsey
    May 27, 2004
  4. Patrick Gundlach

    TagTreeScanner help

    Patrick Gundlach, Oct 24, 2005, in forum: Ruby
    Replies:
    4
    Views:
    87
    Patrick Gundlach
    Oct 29, 2005
  5. Phrogz
    Replies:
    0
    Views:
    94
    Phrogz
    Nov 26, 2007
Loading...

Share This Page