Loading ...
Sorry, an error occurred while loading the content.

ANTLR Suggestions

Expand Messages
  • Sean Fausett
    Hi guys, I get the feeling I m the only one parsing *binary* files... I ve got a couple of suggestions which would make debugging easier: (1) tracking the
    Message 1 of 1 , Dec 22, 1998
    • 0 Attachment
      Hi guys,

      I get the feeling I'm the only one parsing *binary* files... I've got a
      couple of suggestions which
      would make debugging easier:

      (1) tracking the character number, rather than just the line and/or
      column number, is essential
      to finding where input is not being matched.
      (2) when input is mismatched it's not very useful to display a binary
      character on a terminal
      without also giving it's code (in hexadecimal say). Ideally both the
      character and it's code are
      displayed. A simple test along the lines of the standard C library's
      isprint function can be used
      to determine if a code is printable and '.' could be displayed for
      unprintable characters.

      Also I came across a problem using multiple dot ('.' excluding quotes)
      chars in the grammar to
      match sequences of 'anything'. I had to put spaces between all the dots
      to avoid a mismatch
      with the range operator '..'. Getting a little bit picky I know, but I
      thought I'd mention it just in case
      you hadn't intended this behaviour.

      I must say ANTLR is nice to use though... keep up the great work guys!
      :)

      Cheers, Sean.
      ----
      Software Engineer
      Pharos Systems Ltd
      sean@...
    Your message has been successfully submitted and would be delivered to recipients shortly.