mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Scanner performance improvements
Use flex flags -CF. Pass the to-be-scanned string around as StringInfo type, to avoid querying the length repeatedly. Clean up some code and remove lex-compatibility cruft. Escape backslash sequences inline. Use flex-provided yy_scan_buffer() function to set up input, rather than using myinput().
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: gramparse.h,v 1.20 2002/04/09 20:35:55 tgl Exp $
|
||||
* $Id: gramparse.h,v 1.21 2002/04/20 21:56:15 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -15,11 +15,14 @@
|
||||
#ifndef GRAMPARSE_H
|
||||
#define GRAMPARSE_H
|
||||
|
||||
#include "lib/stringinfo.h"
|
||||
|
||||
/* from parser.c */
|
||||
extern int yylex(void);
|
||||
|
||||
/* from scan.l */
|
||||
extern void scanner_init(void);
|
||||
extern void scanner_init(StringInfo str);
|
||||
extern void scanner_finish(void);
|
||||
extern int base_yylex(void);
|
||||
extern void yyerror(const char *message);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user