summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Scanner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/Scanner.cpp')
-rw-r--r--cpp/src/Slice/Scanner.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/cpp/src/Slice/Scanner.cpp b/cpp/src/Slice/Scanner.cpp
index 7ca426ab691..39aae134d86 100644
--- a/cpp/src/Slice/Scanner.cpp
+++ b/cpp/src/Slice/Scanner.cpp
@@ -54,7 +54,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -71,7 +71,7 @@ typedef uint32_t flex_uint32_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
@@ -188,7 +188,7 @@ extern FILE *slice_in, *slice_out;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -245,7 +245,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -689,7 +689,7 @@ extern int slice_wrap (void );
#endif
static void yyunput (int c,char *buf_ptr );
-
+
#ifndef yytext_ptr
static void yy_flex_strncpy (char *,yyconst char *,int );
#endif
@@ -813,7 +813,7 @@ YY_DECL
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
-
+
#line 97 "src/Slice/Scanner.l"
@@ -1682,7 +1682,7 @@ static int yy_get_next_buffer (void)
{
register yy_state_type yy_current_state;
register char *yy_cp;
-
+
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
@@ -1737,7 +1737,7 @@ static int yy_get_next_buffer (void)
static void yyunput (int c, register char * yy_bp )
{
register char *yy_cp;
-
+
yy_cp = (yy_c_buf_p);
/* undo effects of setting up slice_text */
@@ -1780,7 +1780,7 @@ static int yy_get_next_buffer (void)
{
int c;
-
+
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@@ -1849,12 +1849,12 @@ static int yy_get_next_buffer (void)
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
- *
+ *
* @note This function does not reset the start condition to @c INITIAL .
*/
void slice_restart (FILE * input_file )
{
-
+
if ( ! YY_CURRENT_BUFFER ){
slice_ensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
@@ -1867,11 +1867,11 @@ static int yy_get_next_buffer (void)
/** Switch to a different input buffer.
* @param new_buffer The new input buffer.
- *
+ *
*/
void slice__switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
-
+
/* TODO. We should be able to replace this entire function body
* with
* slice_pop_buffer_state();
@@ -1911,13 +1911,13 @@ static void slice__load_buffer_state (void)
/** Allocate and initialize an input buffer state.
* @param file A readable stream.
* @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- *
+ *
* @return the allocated buffer state.
*/
YY_BUFFER_STATE slice__create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) slice_alloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in slice__create_buffer()" );
@@ -1940,11 +1940,11 @@ static void slice__load_buffer_state (void)
/** Destroy the buffer.
* @param b a buffer created with slice__create_buffer()
- *
+ *
*/
void slice__delete_buffer (YY_BUFFER_STATE b )
{
-
+
if ( ! b )
return;
@@ -1965,7 +1965,7 @@ static void slice__load_buffer_state (void)
{
int oerrno = errno;
-
+
slice__flush_buffer(b );
b->yy_input_file = file;
@@ -1981,13 +1981,13 @@ static void slice__load_buffer_state (void)
}
b->yy_is_interactive = 0;
-
+
errno = oerrno;
}
/** Discard all buffered characters. On the next scan, YY_INPUT will be called.
* @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- *
+ *
*/
void slice__flush_buffer (YY_BUFFER_STATE b )
{
@@ -2016,7 +2016,7 @@ static void slice__load_buffer_state (void)
* the current state. This function will allocate the stack
* if necessary.
* @param new_buffer The new state.
- *
+ *
*/
void slice_push_buffer_state (YY_BUFFER_STATE new_buffer )
{
@@ -2046,7 +2046,7 @@ void slice_push_buffer_state (YY_BUFFER_STATE new_buffer )
/** Removes and deletes the top of the stack, if present.
* The next element becomes the new top.
- *
+ *
*/
void slice_pop_buffer_state (void)
{
@@ -2070,7 +2070,7 @@ void slice_pop_buffer_state (void)
static void slice_ensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
-
+
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
@@ -2083,9 +2083,9 @@ static void slice_ensure_buffer_stack (void)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in slice_ensure_buffer_stack()" );
-
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
@@ -2113,13 +2113,13 @@ static void slice_ensure_buffer_stack (void)
/** Setup the input buffer state to scan directly from a user-specified character buffer.
* @param base the character buffer
* @param size the size in bytes of the character buffer
- *
- * @return the newly allocated buffer state object.
+ *
+ * @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE slice__scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -2148,14 +2148,14 @@ YY_BUFFER_STATE slice__scan_buffer (char * base, yy_size_t size )
/** Setup the input buffer state to scan a string. The next call to slice_lex() will
* scan from a @e copy of @a str.
* @param yystr a NUL-terminated string to scan
- *
+ *
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* slice__scan_bytes() instead.
*/
YY_BUFFER_STATE slice__scan_string (yyconst char * yystr )
{
-
+
return slice__scan_bytes(yystr,strlen(yystr) );
}
@@ -2163,7 +2163,7 @@ YY_BUFFER_STATE slice__scan_string (yyconst char * yystr )
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
- *
+ *
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE slice__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
@@ -2172,7 +2172,7 @@ YY_BUFFER_STATE slice__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_
char *buf;
yy_size_t n;
int i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) slice_alloc(n );
@@ -2226,16 +2226,16 @@ static void yy_fatal_error (yyconst char* msg )
/* Accessor methods (get/set functions) to struct members. */
/** Get the current line number.
- *
+ *
*/
int slice_get_lineno (void)
{
-
+
return slice_lineno;
}
/** Get the input stream.
- *
+ *
*/
FILE *slice_get_in (void)
{
@@ -2243,7 +2243,7 @@ FILE *slice_get_in (void)
}
/** Get the output stream.
- *
+ *
*/
FILE *slice_get_out (void)
{
@@ -2251,7 +2251,7 @@ FILE *slice_get_out (void)
}
/** Get the length of the current token.
- *
+ *
*/
yy_size_t slice_get_leng (void)
{
@@ -2259,7 +2259,7 @@ yy_size_t slice_get_leng (void)
}
/** Get the current token.
- *
+ *
*/
char *slice_get_text (void)
@@ -2269,18 +2269,18 @@ char *slice_get_text (void)
/** Set the current line number.
* @param line_number
- *
+ *
*/
void slice_set_lineno (int line_number )
{
-
+
slice_lineno = line_number;
}
/** Set the input stream. This does not discard the current
* input buffer.
* @param in_str A readable stream.
- *
+ *
* @see slice__switch_to_buffer
*/
void slice_set_in (FILE * in_str )
@@ -2334,7 +2334,7 @@ static int yy_init_globals (void)
/* slice_lex_destroy is for both reentrant and non-reentrant scanners. */
int slice_lex_destroy (void)
{
-
+
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
slice__delete_buffer(YY_CURRENT_BUFFER );