PostGIS  2.1.10dev-r@@SVN_REVISION@@
static int input ( void  )
static

Definition at line 1418 of file lwin_wkt_lex.c.

References EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, wkt_yyin, wkt_yyrestart(), wkt_yywrap, yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, YY_END_OF_BUFFER_CHAR, yy_get_next_buffer(), yy_hold_char, yy_n_chars, YY_NEW_FILE, and yytext_ptr.

Referenced by chartrim(), LWGEOM_in(), rtpg_chartrim(), rtpg_trim(), sfcgal_area(), sfcgal_area3D(), sfcgal_extrude(), sfcgal_force_lhr(), sfcgal_is_planar(), sfcgal_orientation(), sfcgal_straight_skeleton(), sfcgal_tesselate(), sfcgal_triangulate(), ST_CollectionExtract(), ST_CollectionHomogenize(), ST_FlipCoordinates(), ST_RemoveRepeatedPoints(), and trim().

1421 {
1422  int c;
1423 
1424  *(yy_c_buf_p) = (yy_hold_char);
1425 
1426  if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
1427  {
1428  /* yy_c_buf_p now points to the character we want to return.
1429  * If this occurs *before* the EOB characters, then it's a
1430  * valid NUL; if not, then we've hit the end of the buffer.
1431  */
1432  if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
1433  /* This was really a NUL. */
1434  *(yy_c_buf_p) = '\0';
1435 
1436  else
1437  { /* need more input */
1438  yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
1439  ++(yy_c_buf_p);
1440 
1441  switch ( yy_get_next_buffer( ) )
1442  {
1443  case EOB_ACT_LAST_MATCH:
1444  /* This happens because yy_g_n_b()
1445  * sees that we've accumulated a
1446  * token and flags that we need to
1447  * try matching the token before
1448  * proceeding. But for input(),
1449  * there's no matching to consider.
1450  * So convert the EOB_ACT_LAST_MATCH
1451  * to EOB_ACT_END_OF_FILE.
1452  */
1453 
1454  /* Reset buffer status. */
1456 
1457  /*FALLTHROUGH*/
1458 
1459  case EOB_ACT_END_OF_FILE:
1460  {
1461  if ( wkt_yywrap( ) )
1462  return 0;
1463 
1464  if ( ! (yy_did_buffer_switch_on_eof) )
1465  YY_NEW_FILE;
1466 #ifdef __cplusplus
1467  return yyinput();
1468 #else
1469  return input();
1470 #endif
1471  }
1472 
1473  case EOB_ACT_CONTINUE_SCAN:
1474  (yy_c_buf_p) = (yytext_ptr) + offset;
1475  break;
1476  }
1477  }
1478  }
1479 
1480  c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
1481  *(yy_c_buf_p) = '\0'; /* preserve wkt_yytext */
1482  (yy_hold_char) = *++(yy_c_buf_p);
1483 
1484  return c;
1485 }
static int yy_did_buffer_switch_on_eof
Definition: lwin_wkt_lex.c:304
#define EOB_ACT_LAST_MATCH
Definition: lwin_wkt_lex.c:186
static int yy_get_next_buffer(void)
FILE * wkt_yyin
Definition: lwin_wkt_lex.c:359
size_t yy_size_t
Definition: lwin_wkt_lex.c:177
#define wkt_yywrap(n)
Definition: lwin_wkt_lex.c:354
static int input(void)
void wkt_yyrestart(FILE *input_file)
Immediately switch to a different input stream.
#define EOB_ACT_END_OF_FILE
Definition: lwin_wkt_lex.c:185
#define YY_END_OF_BUFFER_CHAR
Definition: lwin_wkt_lex.c:159
static yy_size_t yy_n_chars
Definition: lwin_wkt_lex.c:293
#define YY_CURRENT_BUFFER_LVALUE
Definition: lwin_wkt_lex.c:289
static char * yy_c_buf_p
Definition: lwin_wkt_lex.c:297
#define EOB_ACT_CONTINUE_SCAN
Definition: lwin_wkt_lex.c:184
#define YY_NEW_FILE
Definition: lwin_wkt_lex.c:157
static char yy_hold_char
Definition: lwin_wkt_lex.c:292
#define yytext_ptr
Definition: lwin_wkt_lex.c:368

Here is the call graph for this function:

Here is the caller graph for this function: