Thread: double inclusion of '-p' flex flag
Hi, I see that we have included '-p' flex flag twice in the commands used to generate the scanner files. See below: src/backend/parser/Makefile:60: scan.c: FLEXFLAGS = -CF -p -p src/backend/utils/adt/Makefile:122: jsonpath_scan.c: FLEXFLAGS = -CF -p -p src/bin/psql/Makefile:61: psqlscanslash.c: FLEXFLAGS = -Cfe -p -p src/fe_utils/Makefile:43: psqlscan.c: FLEXFLAGS = -Cfe -p -p src/backend/utils/adt/Makefile:122: jsonpath_scan.c: FLEXFLAGS = -CF -p -p src/bin/psql/Makefile:61: psqlscanslash.c: FLEXFLAGS = -Cfe -p -p Do we need this or can the extra -p flag be removed? -- With Regards, Ashutosh Sharma.
On Tue, Apr 26, 2022 at 7:16 PM Ashutosh Sharma <ashu.coek88@gmail.com> wrote: > > Hi, > > I see that we have included '-p' flex flag twice in the commands used > to generate the scanner files. See below: > > src/backend/parser/Makefile:60: scan.c: FLEXFLAGS = -CF -p -p > src/backend/utils/adt/Makefile:122: jsonpath_scan.c: FLEXFLAGS = -CF -p -p > src/bin/psql/Makefile:61: psqlscanslash.c: FLEXFLAGS = -Cfe -p -p > src/fe_utils/Makefile:43: psqlscan.c: FLEXFLAGS = -Cfe -p -p > src/backend/utils/adt/Makefile:122: jsonpath_scan.c: FLEXFLAGS = -CF -p -p > src/bin/psql/Makefile:61: psqlscanslash.c: FLEXFLAGS = -Cfe -p -p > > Do we need this or can the extra -p flag be removed? From the Flex manual: "generates a performance report to stderr. The report consists of comments regarding features of the flex input file which will cause a serious loss of performance in the resulting scanner. If you give the flag twice, you will also get comments regarding features that lead to minor performance losses." -- John Naylor EDB: http://www.enterprisedb.com
On Tue, Apr 26, 2022 at 5:55 PM John Naylor <john.naylor@enterprisedb.com> wrote: > > On Tue, Apr 26, 2022 at 7:16 PM Ashutosh Sharma <ashu.coek88@gmail.com> wrote: > > > > Hi, > > > > I see that we have included '-p' flex flag twice in the commands used > > to generate the scanner files. See below: > > > > src/backend/parser/Makefile:60: scan.c: FLEXFLAGS = -CF -p -p > > src/backend/utils/adt/Makefile:122: jsonpath_scan.c: FLEXFLAGS = -CF -p -p > > src/bin/psql/Makefile:61: psqlscanslash.c: FLEXFLAGS = -Cfe -p -p > > src/fe_utils/Makefile:43: psqlscan.c: FLEXFLAGS = -Cfe -p -p > > src/backend/utils/adt/Makefile:122: jsonpath_scan.c: FLEXFLAGS = -CF -p -p > > src/bin/psql/Makefile:61: psqlscanslash.c: FLEXFLAGS = -Cfe -p -p > > > > Do we need this or can the extra -p flag be removed? > > From the Flex manual: > > "generates a performance report to stderr. The report consists of > comments regarding features of the flex input file which will cause a > serious loss of performance in the resulting scanner. If you give the > flag twice, you will also get comments regarding features that lead to > minor performance losses." > Ahh. I see. This information is missing in the man page. thanks.! -- With Regards, Ashutosh Sharma.