PostGIS  3.7.0dev-r@@SVN_REVISION@@
lwin_wkt_parse.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "lwin_wkt.h"
#include "lwin_wkt_parse.h"
#include "lwgeom_log.h"
#include <limits.h>
Include dependency graph for lwin_wkt_parse.c:

Go to the source code of this file.

Data Structures

union  yyalloc
 
struct  yypcontext_t
 

Macros

#define YYBISON   30802
 
#define YYBISON_VERSION   "3.8.2"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   0
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define yyparse   wkt_yyparse
 
#define yylex   wkt_yylex
 
#define yyerror   wkt_yyerror
 
#define yydebug   wkt_yydebug
 
#define yynerrs   wkt_yynerrs
 
#define yylval   wkt_yylval
 
#define yychar   wkt_yychar
 
#define yylloc   wkt_yylloc
 
#define WKT_ERROR()   { if ( global_parser_result.errcode != 0 ) { YYERROR; } }
 
#define YY_CAST(Type, Val)   ((Type) (Val))
 
#define YY_REINTERPRET_CAST(Type, Val)   ((Type) (Val))
 
#define YY_NULLPTR   ((void*)0)
 
#define YYPTRDIFF_T   long
 
#define YYPTRDIFF_MAXIMUM   LONG_MAX
 
#define YYSIZE_T   unsigned
 
#define YYSIZE_MAXIMUM
 
#define YYSIZEOF(X)   YY_CAST (YYPTRDIFF_T, sizeof (X))
 
#define YY_(Msgid)   Msgid
 
#define YY_ATTRIBUTE_PURE
 
#define YY_ATTRIBUTE_UNUSED
 
#define YY_USE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YY_IGNORE_USELESS_CAST_BEGIN
 
#define YY_IGNORE_USELESS_CAST_END
 
#define YY_ASSERT(E)   ((void) (0 && (E)))
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYMALLOC   malloc
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYFINAL   80
 
#define YYLAST   294
 
#define YYNTOKENS   26
 
#define YYNNTS   40
 
#define YYNRULES   136
 
#define YYNSTATES   264
 
#define YYMAXUTOK   280
 
#define YYTRANSLATE(YYX)
 
#define YY_ACCESSING_SYMBOL(State)   YY_CAST (yysymbol_kind_t, yystos[State])
 Accessing symbol of state STATE. More...
 
#define YYPACT_NINF   (-90)
 
#define yypact_value_is_default(Yyn)    ((Yyn) == YYPACT_NINF)
 
#define YYTABLE_NINF   (-1)
 
#define yytable_value_is_error(Yyn)    0
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYNOMEM   goto yyexhaustedlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYERRCODE   YYUNDEF
 
#define YYLLOC_DEFAULT(Current, Rhs, N)
 
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
 
#define YYDPRINTF(Args)   ((void) 0)
 
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYCASE_(N, S)
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
 

Typedefs

typedef enum yysymbol_kind_t yysymbol_kind_t
 
typedef signed char yytype_int8
 
typedef short yytype_int16
 
typedef unsigned char yytype_uint8
 
typedef unsigned short yytype_uint16
 
typedef yytype_int16 yy_state_t
 
typedef int yy_state_fast_t
 

Enumerations

enum  yysymbol_kind_t {
  YYSYMBOL_YYEMPTY = -2 , YYSYMBOL_YYEOF = 0 , YYSYMBOL_YYerror = 1 , YYSYMBOL_YYUNDEF = 2 ,
  YYSYMBOL_POINT_TOK = 3 , YYSYMBOL_LINESTRING_TOK = 4 , YYSYMBOL_POLYGON_TOK = 5 , YYSYMBOL_MPOINT_TOK = 6 ,
  YYSYMBOL_MLINESTRING_TOK = 7 , YYSYMBOL_MPOLYGON_TOK = 8 , YYSYMBOL_MSURFACE_TOK = 9 , YYSYMBOL_MCURVE_TOK = 10 ,
  YYSYMBOL_CURVEPOLYGON_TOK = 11 , YYSYMBOL_COMPOUNDCURVE_TOK = 12 , YYSYMBOL_CIRCULARSTRING_TOK = 13 , YYSYMBOL_COLLECTION_TOK = 14 ,
  YYSYMBOL_RBRACKET_TOK = 15 , YYSYMBOL_LBRACKET_TOK = 16 , YYSYMBOL_COMMA_TOK = 17 , YYSYMBOL_EMPTY_TOK = 18 ,
  YYSYMBOL_SEMICOLON_TOK = 19 , YYSYMBOL_TRIANGLE_TOK = 20 , YYSYMBOL_TIN_TOK = 21 , YYSYMBOL_POLYHEDRALSURFACE_TOK = 22 ,
  YYSYMBOL_DOUBLE_TOK = 23 , YYSYMBOL_DIMENSIONALITY_TOK = 24 , YYSYMBOL_SRID_TOK = 25 , YYSYMBOL_YYACCEPT = 26 ,
  YYSYMBOL_geometry = 27 , YYSYMBOL_geometry_no_srid = 28 , YYSYMBOL_geometrycollection = 29 , YYSYMBOL_geometry_list = 30 ,
  YYSYMBOL_multisurface = 31 , YYSYMBOL_surface_list = 32 , YYSYMBOL_tin = 33 , YYSYMBOL_polyhedralsurface = 34 ,
  YYSYMBOL_multipolygon = 35 , YYSYMBOL_polygon_list = 36 , YYSYMBOL_patch_list = 37 , YYSYMBOL_polygon = 38 ,
  YYSYMBOL_polygon_untagged = 39 , YYSYMBOL_patch = 40 , YYSYMBOL_curvepolygon = 41 , YYSYMBOL_curvering_list = 42 ,
  YYSYMBOL_curvering = 43 , YYSYMBOL_patchring_list = 44 , YYSYMBOL_ring_list = 45 , YYSYMBOL_patchring = 46 ,
  YYSYMBOL_ring = 47 , YYSYMBOL_compoundcurve = 48 , YYSYMBOL_compound_list = 49 , YYSYMBOL_multicurve = 50 ,
  YYSYMBOL_curve_list = 51 , YYSYMBOL_multilinestring = 52 , YYSYMBOL_linestring_list = 53 , YYSYMBOL_circularstring = 54 ,
  YYSYMBOL_linestring = 55 , YYSYMBOL_linestring_untagged = 56 , YYSYMBOL_triangle_list = 57 , YYSYMBOL_triangle = 58 ,
  YYSYMBOL_triangle_untagged = 59 , YYSYMBOL_multipoint = 60 , YYSYMBOL_point_list = 61 , YYSYMBOL_point_untagged = 62 ,
  YYSYMBOL_point = 63 , YYSYMBOL_ptarray = 64 , YYSYMBOL_coordinate = 65
}
 
enum  { YYENOMEM = -2 }
 

Functions

int wkt_yyparse (void)
 
void wkt_yyerror (const char *str)
 
int wkt_yylex (void)
 
void wkt_yyerror (__attribute__((__unused__)) const char *str)
 
int lwgeom_parse_wkt (LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int parser_check_flags)
 Parse a WKT geometry string into an LWGEOM structure. More...
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
static const char * yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED
 
static int yypcontext_expected_tokens (const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn)
 
static YYPTRDIFF_T yystrlen (const char *yystr)
 
static char * yystpcpy (char *yydest, const char *yysrc)
 
static YYPTRDIFF_T yytnamerr (char *yyres, const char *yystr)
 
static int yy_syntax_error_arguments (const yypcontext_t *yyctx, yysymbol_kind_t yyarg[], int yyargn)
 
static int yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, const yypcontext_t *yyctx)
 
static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
 

Variables

LWGEOM_PARSER_RESULT global_parser_result
 
int wkt_yydebug = 0
 
static const yytype_int8 yytranslate []
 
static const char *const yytname []
 
static const yytype_int16 yypact []
 
static const yytype_uint8 yydefact []
 
static const yytype_int16 yypgoto []
 
static const yytype_uint8 yydefgoto []
 
static const yytype_int16 yytable []
 
static const yytype_uint8 yycheck []
 
static const yytype_int8 yystos []
 
static const yytype_int8 yyr1 []
 
static const yytype_int8 yyr2 []
 
int yychar
 
YYSTYPE yylval
 
YYLTYPE yylloc = { 1, 1, 1, 1 }
 
int yynerrs