From: Paul Ramsey Date: Mon, 11 Feb 2019 17:18:56 +0000 (+0000) Subject: Add generated file X-Git-Tag: 2.5.2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f5573073660885dcab549a57e9ed37e37bb1991;p=postgis Add generated file git-svn-id: http://svn.osgeo.org/postgis/branches/2.5@17237 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwin_wkt_lex.c b/liblwgeom/lwin_wkt_lex.c index bce3b1f8d..9d918ae06 100644 --- a/liblwgeom/lwin_wkt_lex.c +++ b/liblwgeom/lwin_wkt_lex.c @@ -863,12 +863,12 @@ char *yytext; #include "lwin_wkt_parse.h" #include "lwgeom_log.h" -static YY_BUFFER_STATE wkt_yy_buf_state; +static YY_BUFFER_STATE wkt_yy_buf_state; /* * Handle errors due to unexpected junk in WKT strings. */ -static void wkt_lexer_unknown() +static void wkt_lexer_unknown() { /* Set the global error state */ global_parser_result.errcode = PARSER_ERROR_OTHER; @@ -876,8 +876,8 @@ static void wkt_lexer_unknown() global_parser_result.errlocation = wkt_yylloc.last_column; } -/* -* This macro is magically run after a rule is found but before the main +/* +* This macro is magically run after a rule is found but before the main * action is run. We use it to update the parse location information * so we can report on where things fail. Also optionally to dump * debugging info. @@ -889,7 +889,7 @@ static void wkt_lexer_unknown() LWDEBUGF(5,"lex: %s", wkt_yytext); \ } while (0); - + #line 893 "lwin_wkt_lex.c" #define YY_NO_INPUT 1 /* Suppress the default implementations. */ @@ -1172,16 +1172,16 @@ YY_RULE_SETUP LWDEBUG(5,"DOUBLE"); wkt_yylval.doublevalue = atof(wkt_yytext); yyless(wkt_yyleng-1); - return DOUBLE_TOK; + return DOUBLE_TOK; } YY_BREAK case 2: YY_RULE_SETUP #line 58 "lwin_wkt_lex.l" -{ +{ LWDEBUG(5,"SRID"); - wkt_yylval.integervalue = wkt_lexer_read_srid(wkt_yytext); - return SRID_TOK; + wkt_yylval.integervalue = wkt_lexer_read_srid(wkt_yytext); + return SRID_TOK; } YY_BREAK case 3: @@ -1267,10 +1267,10 @@ YY_RULE_SETUP case 19: YY_RULE_SETUP #line 81 "lwin_wkt_lex.l" -{ +{ LWDEBUG(5,"DIMENSIONALITY"); wkt_yylval.stringvalue = wkt_yytext; - return DIMENSIONALITY_TOK; + return DIMENSIONALITY_TOK; } YY_BREAK case 20: @@ -1303,9 +1303,9 @@ case 25: YY_RULE_SETUP #line 94 "lwin_wkt_lex.l" { /* Error out and stop parsing on unknown/unexpected characters */ - LWDEBUG(5,"UNKNOWN"); + LWDEBUG(5,"UNKNOWN"); wkt_lexer_unknown(); - yyterminate(); + yyterminate(); } YY_BREAK case 26: @@ -2280,17 +2280,18 @@ void wkt_yyfree (void * ptr ) /* * Set up the lexer! */ -void wkt_lexer_init(char *src) -{ - wkt_yy_buf_state = wkt_yy_scan_string(src); -} +void wkt_lexer_init(char *src) +{ + yy_init_globals(); + wkt_yy_buf_state = wkt_yy_scan_string(src); +} /* * Clean up the lexer! */ -void wkt_lexer_close() -{ - wkt_yy_delete_buffer(wkt_yy_buf_state); -} +void wkt_lexer_close() +{ + wkt_yy_delete_buffer(wkt_yy_buf_state); +}