[antlr-interest] Exit Status from ANTLR

Randall R Schulz rschulz at sonic.net
Mon Jun 25 14:03:35 PDT 2007


On Monday 25 June 2007 13:32, Kay Roepke wrote:
> On Jun 25, 2007, at 8:18 PM, Randall R Schulz wrote:
> > I don't understand what you're suggesting.
> >
> > I want an exit status from the ANTLR parser generator tool, not
> > from the
> > parsers it generates.
>
> I will make the case when I see Terence. It probably doesn't comfort
> you, but I need this, too,
> but unfortunately I'm way to busy to invest time into it right now.

For the moment, I'm just hacking around it with grep, though I don't 
think it handles all the possible error cases. As I encounter them, 
I'll just add them to the grep patterns.

-==--==--==--==--==-buildParser-==--==--==--==--==-
#!/bin/bash --norc


  # Clean up old generated source and class files
  # [ elided ]

  # Run ANTLR
  antlr "$@" CLIF.g >|CLIF-err 2>&1

  if egrep -q '^(warning|error)' CLIF-err; then
    cat CLIF-err
  fi

  if egrep -v -q '^error' CLIF-err; then
    build CL
  fi
-==--==--==--==--==-buildParser-==--==--==--==--==-



> cheers,
> -k


Randall Schulz


More information about the antlr-interest mailing list