[antlr-interest] Regular Expression vs CFG

Terence Parr parrt at cs.usfca.edu
Mon Mar 5 18:38:38 PST 2007

On Mar 5, 2007, at 6:34 PM, Randall R Schulz wrote:

> Dennis,
> On Monday 05 March 2007 18:29, Dennis Katumalla wrote:
>> Can someone give me a simple example where a regular expression alone
>> (using java.util.regex) is not sufficient to parse a SQL statement
>> and requires specification of a full grammar?
> The mere fact that there are balanced and nested constructs (e.g.,
> parenthesized sub-expressions) is enough to tell you that no finite
> automaton alone can recognize the language. Such constructs demand a
> push-down automaton of some sort.

Oohhhh...was that gleaned from my "The nature of computer languages"  
chapter or your automata theory class? ;)


More information about the antlr-interest mailing list