From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: help needed with yacc/bison |
Date: | 2003-07-01 13:05:08 |
Message-ID: | Pine.GSO.4.56.0307011704450.4628@ra.sai.msu.su |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Sorry,
forgot to attach archive :)
Oleg
On Tue, 1 Jul 2003, Oleg Bartunov wrote:
> Hi there,
>
> attached archive contains simple parser demonstrating our
> problem. untar it, make, make test
>
> Good test:
> echo -n 12 34.1234 ... | ./parser
> INTEGER: '12'
> CHAR: ' '
> VERSION: '34.1234'
> CHAR: ' '
> DOT: '.'
> DOT: '.'
> DOT: '.'
> Wrong:
> echo -n 12 34.1234. ... | ./parser
> INTEGER: '12'
> CHAR: ' '
> yyerror: syntax error, unexpected CHAR, expecting INTEGER
>
> The problem is recognizing VERSION
> (from gram.y)
>
> version:
> INTEGER DOT INTEGER { $$ = strconcat($1, $3, $2); }
> | version DOT INTEGER { $$ = strconcat($1, $3, $2); }
> ;
>
> For last query '34.1234.' we want to print VERSION '34.1234' and
> return DOT.
> This is just an test example, actually we know workaround
> for this case, but we need something simple and universal :)
>
>
> Regards,
> Oleg
> _____________________________________________________________
> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
> Sternberg Astronomical Institute, Moscow University (Russia)
> Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
> phone: +007(095)939-16-83, +007(095)939-23-83
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
Attachment | Content-Type | Size |
---|---|---|
ex.tar.gz | application/octet-stream | 1.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | greg | 2003-07-01 13:21:58 | Re: Datetime patch |
Previous Message | Oleg Bartunov | 2003-07-01 12:49:02 | help needed with yacc/bison |