Re: [Beginner Question]A question about yacc & lex - Mailing list pgsql-general

From Tom Lane
Subject Re: [Beginner Question]A question about yacc & lex
Date
Msg-id 49210.1685707632@sss.pgh.pa.us
Whole thread Raw
In response to [Beginner Question]A question about yacc & lex  ("Wen Yi" <896634148@qq.com>)
List pgsql-general
"=?ISO-8859-1?B?V2VuIFlp?=" <896634148@qq.com> writes:
> I don't know why are there many extra spaces in the output, and why the error message 'syntax error' is showed.

You didn't say exactly what you typed at it, but:

Your flex lexer lacks actions for many possible input characters,
notably spaces.  I seem to recall that the default action in
such cases is to print the character on stdout.

The grammar lacks any way to deal with any input after the
first newline.  Anything except EOF will draw a syntax error.

            regards, tom lane



pgsql-general by date:

Previous
From: "Wen Yi"
Date:
Subject: [Beginner Question]A question about yacc & lex
Next
From: "Jonathan S. Katz"
Date:
Subject: Re: Pg 16: will pg_dump & pg_restore be faster?