[BeginnerQuestion]Why I compile lex.yy.c failed?

From: Wen Yi <chuxuec(at)outlook(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: [BeginnerQuestion]Why I compile lex.yy.c failed?
Date: 2022-09-30 08:42:46
Message-ID: TYAP286MB06368D99921B88BA8E957A48A9569@TYAP286MB0636.JPNP286.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi community,
I am a beginner who are interested in database,when I do my study on the lex and yacc,I write a example.l like this:

%%
.\|n ECHO
%%

and then I generate a lex.yy.c use lex
but when I compile this file,something wrong happend:

[beginnerc(at)bogon temp]$ flex '/home/beginnerc/work/temp/example.l'
[beginnerc(at)bogon temp]$ cc lex.yy.c -o first -ll
/home/beginnerc/work/temp/example.l: In function ‘yylex’:
lex.yy.c:619:28: error: expected ‘;’ before ‘break’
619 | #ifndef YY_BREAK
| ^
/home/beginnerc/work/temp/example.l:3:2: note: in expansion of macro ‘YY_BREAK’
3 | %%
| ^
[beginnerc(at)bogon temp]$

Can some one give me some suggestion?
Thanks in advance!
Yours,
JingZhang.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2022-09-30 13:43:41 Re: [BeginnerQuestion]Why I compile lex.yy.c failed?
Previous Message vignesh C 2022-09-30 07:47:13 Re: Support logical replication of DDLs