Standard Parser vs. My Object Model for Very Abstract ML

Discussion in 'Ruby' started by T. Sawyer, Aug 18, 2004.

  1. T. Sawyer

    T. Sawyer Guest

    OKay this is kind of an odd one, so I thought others might be interested. I have developed a new "meta-language" that uses an abstract ascii-art template syntax. I'm sure you have all seen ascii diagrams like this before:

    +---------------+
    | foo.bar |
    +---------------+
    | [click.btn] |
    +---------------+

    This is a very simplistic example, but I use something like this to generate user interface. Anyway, I'm currently converting the above diagram into an abstract object model by brute force. That is to say I wrote my own parser and I build a tree like structure with an object hierarchy, which is then used to produce other markup, like html.

    So here's the deal. I don't know a lot about standard parsers. I'm wondering if this could be handled better by somthing like yacc? or others?

    Thanks,
    T.
     
    T. Sawyer, Aug 18, 2004
    #1
    1. Advertising

  2. Standard parser-generators like yacc are designed to support the kind
    of syntax you see in most programming languages: line-oriented,
    balanced delimiters, simple tokens, etc. What you seem to be
    describing is almost closer to image analysis (find bounding boxes,
    determine containment based on size and location, etc.) than normal
    code lexing and parsing.

    Basically, if you have a parser for this syntax which works, I'd say
    you should stick with it, as the work needed to shoehorn a traditional
    parser generator into this role would probably be substantial.

    --
    Lennon
    rcoder.net
     
    Lennon Day-Reynolds, Aug 18, 2004
    #2
    1. Advertising

  3. T. Sawyer

    T. Sawyer Guest

    > Standard parser-generators like yacc are designed to support the kind
    > of syntax you see in most programming languages: line-oriented,
    > balanced delimiters, simple tokens, etc. What you seem to be
    > describing is almost closer to image analysis (find bounding boxes,
    > determine containment based on size and location, etc.) than normal
    > code lexing and parsing.
    >
    > Basically, if you have a parser for this syntax which works, I'd say
    > you should stick with it, as the work needed to shoehorn a traditional
    > parser generator into this role would probably be substantial.
    >
    > --
    > Lennon
    > rcoder.net


    Thank you. That's what I need to know.

    T.
     
    T. Sawyer, Aug 18, 2004
    #3
    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. Raymond Arthur St. Marie II of III

    very Very VERY dumb Question About The new Set( ) 's

    Raymond Arthur St. Marie II of III, Jul 23, 2003, in forum: Python
    Replies:
    4
    Views:
    483
    Raymond Hettinger
    Jul 27, 2003
  2. shanx__=|;-

    very very very long integer

    shanx__=|;-, Oct 16, 2004, in forum: C Programming
    Replies:
    19
    Views:
    1,631
    Merrill & Michele
    Oct 19, 2004
  3. Abhishek Jha

    very very very long integer

    Abhishek Jha, Oct 16, 2004, in forum: C Programming
    Replies:
    4
    Views:
    427
    jacob navia
    Oct 17, 2004
  4. Peter

    Very very very basic question

    Peter, Feb 8, 2005, in forum: C Programming
    Replies:
    14
    Views:
    519
    Dave Thompson
    Feb 14, 2005
  5. olivier.melcher

    Help running a very very very simple code

    olivier.melcher, May 12, 2008, in forum: Java
    Replies:
    8
    Views:
    2,304
Loading...

Share This Page