Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
You can find a dotted-decimal representation of the same syntax diagrams (meant for screen readers) in the DB2 for zSeries online documentation which should be much easier to parse. Unfortunately, getting to the dotted-decimal representation isn't all that easy... here's a quick summary.
  1. Open the DB2 for zSeries information center in your Web browser.
  2. Find the statement or command you're interested in.
  3. View the source of the frame to find <img src="c.gif" alt="Read syntax diagram" longdesc="syntax.htm" border="0" />. syntax.htm will be some long HTML filename that contains the dotted-decimal version of the syntax.
  4. View the dotted-decimal syntax by copying the frame URL and changing the filename to point to the dotted-decimal filename. The DB2 for zSeries information center uses frames heavily, so the base URL doesn't change to reflect the content of the page you're looking at.

Here's an example of two "normal" syntax diagrams and their dotted decimal equivalents (1 (subselect) and 2 (select-clause)).

These should be much easier to parse if you can get LWP to grab the dotted-decimal syntax files.

Update: Duh, here's a page that describes the dotted-decimal syntax format.

Update 2: If you need the DB2 for Linux, UNIX, Windows version of the syntax, you can install the DB2 8.2 Information Center locally, unzip the files in eclipse/plugins/, and work with the HTML files directly rather than going through LWP and the Web. Nice way of avoiding the relative URI problems with the framesets, too. Unfortunately, DB2 8.2 for Linux, UNIX, and Windows won't be released for a little while -- in the meantime, if you can still get your hands on the DB2 Stinger beta information center that will also do the job. Versions of DB2 prior to 8.2 don't include the dotted-decimal syntax diagrams.

In reply to Re^2: Parsing BNF syntax diagrams.. by dazzle
in thread Parsing BNF syntax diagrams.. by castaway

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (4)
    As of 2019-08-24 18:43 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found