yast2-core
Classes | Macros | Typedefs | Functions | Variables
scanner.cc File Reference
#include <iostream>
#include <errno.h>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <FlexLexer.h>
#include <list>
#include <string>
#include <sstream>
#include <stdlib.h>
#include "ycp/y2log.h"
#include "ycp/Import.h"
#include "parser.hh"
#include "ycp/Scanner.h"
#include "ycp/Type.h"
#include "ycp/StaticDeclaration.h"
#include "ycp/SymbolTable.h"
#include "y2/SymbolEntry.h"
#include "ycp/YBlock.h"
#include <unistd.h>

Classes

struct  yy_buffer_state
 
struct  yy_trans_info
 

Macros

#define YY_INT_ALIGNED   short int
 
#define FLEX_SCANNER
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   5
 
#define YY_FLEX_SUBMINOR_VERSION   37
 
#define FLEX_BETA
 
#define yyFlexLexer   yyFlexLexer
 
#define FLEXINT_H
 
#define INT8_MIN   (-128)
 
#define INT16_MIN   (-32767-1)
 
#define INT32_MIN   (-2147483647-1)
 
#define INT8_MAX   (127)
 
#define INT16_MAX   (32767)
 
#define INT32_MAX   (2147483647)
 
#define UINT8_MAX   (255U)
 
#define UINT16_MAX   (65535U)
 
#define UINT32_MAX   (4294967295U)
 
#define yyconst
 
#define YY_NULL   0
 
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
 
#define BEGIN   (yy_start) = 1 + 2 *
 
#define YY_START   (((yy_start) - 1) / 2)
 
#define YYSTATE   YY_START
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_NEW_FILE   yyrestart( yyin )
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_BUF_SIZE   16384
 
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
 
#define YY_TYPEDEF_YY_BUFFER_STATE
 
#define YY_TYPEDEF_YY_SIZE_T
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define YY_LESS_LINENO(n)
 
#define yyless(n)
 
#define unput(c)   yyunput( c, (yytext_ptr) )
 
#define YY_STRUCT_YY_BUFFER_STATE
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_CURRENT_BUFFER
 
#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]
 
#define yy_new_buffer   yy_create_buffer
 
#define yy_set_interactive(is_interactive)
 
#define yy_set_bol(at_bol)
 
#define YY_AT_BOL()   (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)
 
#define YY_SKIP_YYWRAP
 
#define yytext_ptr   yytext
 
#define YY_INTERACTIVE
 
#define YY_DECL   int Scanner::yylex()
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   130
 
#define YY_END_OF_BUFFER   131
 
#define REJECT   reject_used_but_not_detected
 
#define yymore()   yymore_used_but_not_detected
 
#define YY_MORE_ADJ   0
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define LINE_VAR   m_lineNumber
 
#define INC_LINE   ++LINE_VAR
 
#define debug_scanner   nix
 
#define TOKEN(token)
 
#define VALUE_TOKEN(type, token)
 
#define INITIAL   0
 
#define bybl   1
 
#define str   2
 
#define comment   3
 
#define namespace   4
 
#define YY_EXTRA_TYPE   void *
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   LexerOutput( yytext, yyleng )
 
#define YY_INPUT(buf, result, max_size)
 
#define yyterminate()   return YY_NULL
 
#define YY_START_STACK_INCR   25
 
#define YY_FATAL_ERROR(msg)   LexerError( msg )
 
#define YY_USER_ACTION
 
#define YY_BREAK   break;
 
#define YY_RULE_SETUP
 
#define YY_EXIT_FAILURE   2
 
#define yyless(n)
 
#define YYTABLES_NAME   "yytables"
 

Typedefs

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 short int flex_uint16_t
 
typedef unsigned int flex_uint32_t
 
typedef struct yy_buffer_stateYY_BUFFER_STATE
 
typedef size_t yy_size_t
 
typedef unsigned char YY_CHAR
 

Functions

void * yyalloc (yy_size_t)
 
void * yyrealloc (void *, yy_size_t)
 
void yyfree (void *)
 
static void nix (...)
 
static unsigned fromhex (char hex)
 
void save_comment (const char *text)
 
 if (!(yy_init))
 
 while (1)
 

Variables

yy_size_t yyleng
 
static yyconst flex_int16_t yy_accept [519]
 
static yyconst flex_int32_t yy_ec [256]
 
static yyconst flex_int32_t yy_meta [72]
 
static yyconst flex_int16_t yy_base [550]
 
static yyconst flex_int16_t yy_def [550]
 
static yyconst flex_int16_t yy_nxt [1377]
 
static yyconst flex_int16_t yy_chk [1377]
 
StaticDeclaration static_declarations
 
SymbolTablebuiltinTable = NULL
 
static SymbolTablenamespaceTable = NULL
 
static char * namespace_prefix = 0
 
static tokenValue token_value
 
static std::string saved_comment
 
YY_DECL register yy_state_type yy_current_state
 
register char * yy_cp
 
register char * yy_bp
 
register int yy_act
 

Macro Definition Documentation

#define BEGIN   (yy_start) = 1 + 2 *

Referenced by while().

#define bybl   1

Referenced by while().

#define comment   3
#define debug_scanner   nix

Referenced by while().

#define ECHO   LexerOutput( yytext, yyleng )

Referenced by while().

#define EOB_ACT_CONTINUE_SCAN   0

Referenced by while().

#define EOB_ACT_END_OF_FILE   1

Referenced by while().

#define EOB_ACT_LAST_MATCH   2

Referenced by while().

#define FLEX_BETA
#define FLEX_SCANNER
#define FLEXINT_H
#define INC_LINE   ++LINE_VAR

Referenced by while().

#define INITIAL   0

Referenced by while().

#define INT16_MAX   (32767)
#define INT16_MIN   (-32767-1)
#define INT32_MAX   (2147483647)
#define INT32_MIN   (-2147483647-1)
#define INT8_MAX   (127)
#define INT8_MIN   (-128)
#define LINE_VAR   m_lineNumber

Referenced by while().

#define namespace   4
#define REJECT   reject_used_but_not_detected
#define str   2
#define TOKEN (   token)
Value:
do { \
setCommentBefore(saved_comment); \
return (token); \
} while(0)
static std::string saved_comment
Definition: scanner.cc:972

Referenced by while().

#define UINT16_MAX   (65535U)
#define UINT32_MAX   (4294967295U)
#define UINT8_MAX   (255U)
#define unput (   c)    yyunput( c, (yytext_ptr) )
#define VALUE_TOKEN (   type,
  token 
)
Value:
do { \
setScannedToken(token_value, type); \
TOKEN(token); \
} while (0)
#define TOKEN(token)
Definition: scanner.cc:981
static tokenValue token_value
Definition: scanner.cc:968

Referenced by while().

#define YY_AT_BOL ( )    (YY_CURRENT_BUFFER_LVALUE->yy_at_bol)

Referenced by while().

#define YY_BREAK   break;

Referenced by while().

#define YY_BUF_SIZE   16384

Referenced by if().

#define YY_BUFFER_EOF_PENDING   2
#define YY_BUFFER_NEW   0

Referenced by while().

#define YY_BUFFER_NORMAL   1

Referenced by while().

#define YY_CURRENT_BUFFER
Value:
( (yy_buffer_stack) \
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
: NULL)

Referenced by if().

#define YY_CURRENT_BUFFER_LVALUE   (yy_buffer_stack)[(yy_buffer_stack_top)]

Referenced by if(), and while().

#define YY_DECL   int Scanner::yylex()
#define YY_DO_BEFORE_ACTION
Value:
yyleng = (size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
register char * yy_bp
Definition: scanner.cc:1097
#define yytext_ptr
Definition: scanner.cc:311
yy_size_t yyleng
register char * yy_cp
Definition: scanner.cc:1097

Referenced by while().

#define YY_END_OF_BUFFER   131

Referenced by while().

#define YY_END_OF_BUFFER_CHAR   0
#define YY_EXIT_FAILURE   2
#define YY_EXTRA_TYPE   void *
#define YY_FATAL_ERROR (   msg)    LexerError( msg )

Referenced by while().

#define YY_FLEX_MAJOR_VERSION   2
#define YY_FLEX_MINOR_VERSION   5
#define YY_FLEX_SUBMINOR_VERSION   37
#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
if(!(yy_init))
Definition: scanner.cc:1110
#define YY_FATAL_ERROR(msg)
Definition: scanner.cc:1061
#define YY_INT_ALIGNED   short int
#define YY_INTERACTIVE
#define YY_LESS_LINENO (   n)
#define YY_MORE_ADJ   0

Referenced by while().

#define yy_new_buffer   yy_create_buffer
#define YY_NEW_FILE   yyrestart( yyin )

Referenced by while().

#define YY_NULL   0
#define YY_NUM_RULES   130
#define YY_READ_BUF_SIZE   8192
#define YY_RESTORE_YY_MORE_OFFSET

Referenced by while().

#define YY_RULE_SETUP
Value:
if ( yyleng > 0 ) \
(yytext[yyleng - 1] == '\n'); \
#define YY_USER_ACTION
Definition: scanner.cc:1078
yy_size_t yyleng
#define YY_CURRENT_BUFFER_LVALUE
Definition: scanner.cc:277

Referenced by while().

#define YY_SC_TO_UI (   c)    ((unsigned int) (unsigned char) c)

Referenced by while().

#define yy_set_bol (   at_bol)
Value:
{ \
yyensure_buffer_stack (); \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
}
if(!(yy_init))
Definition: scanner.cc:1110
#define YY_CURRENT_BUFFER
Definition: scanner.cc:270
#define YY_BUF_SIZE
Definition: scanner.cc:157
#define YY_CURRENT_BUFFER_LVALUE
Definition: scanner.cc:277
#define yy_set_interactive (   is_interactive)
Value:
{ \
yyensure_buffer_stack (); \
yy_create_buffer( yyin, YY_BUF_SIZE ); \
} \
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
}
if(!(yy_init))
Definition: scanner.cc:1110
#define YY_CURRENT_BUFFER
Definition: scanner.cc:270
#define YY_BUF_SIZE
Definition: scanner.cc:157
#define YY_CURRENT_BUFFER_LVALUE
Definition: scanner.cc:277
#define YY_SKIP_YYWRAP
#define YY_START   (((yy_start) - 1) / 2)

Referenced by while().

#define YY_START_STACK_INCR   25
#define YY_STATE_BUF_SIZE   ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)

Referenced by while().

#define YY_STRUCT_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_SIZE_T
#define YY_USER_ACTION
#define yyconst
#define yyFlexLexer   yyFlexLexer
#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
*yy_cp = (yy_hold_char); \
(yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
register char * yy_bp
Definition: scanner.cc:1097
#define YY_RESTORE_YY_MORE_OFFSET
Definition: scanner.cc:893
#define YY_MORE_ADJ
Definition: scanner.cc:892
while(1)
Definition: scanner.cc:1136
#define YY_DO_BEFORE_ACTION
Definition: scanner.cc:328
register char * yy_cp
Definition: scanner.cc:1097
#define YY_LESS_LINENO(n)
Definition: scanner.cc:180
#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up yytext. */ \
int yyless_macro_arg = (n); \
YY_LESS_LINENO(yyless_macro_arg);\
yytext[yyleng] = (yy_hold_char); \
(yy_c_buf_p) = yytext + yyless_macro_arg; \
(yy_hold_char) = *(yy_c_buf_p); \
*(yy_c_buf_p) = '\0'; \
yyleng = yyless_macro_arg; \
} \
while ( 0 )
while(1)
Definition: scanner.cc:1136
yy_size_t yyleng
#define YY_LESS_LINENO(n)
Definition: scanner.cc:180
#define yymore ( )    yymore_used_but_not_detected
#define YYSTATE   YY_START
#define YYTABLES_NAME   "yytables"
#define yyterminate ( )    return YY_NULL
#define yytext_ptr   yytext

Referenced by while().

Typedef Documentation

typedef short int flex_int16_t
typedef int flex_int32_t
typedef signed char flex_int8_t
typedef unsigned short int flex_uint16_t
typedef unsigned int flex_uint32_t
typedef unsigned char flex_uint8_t
typedef unsigned char YY_CHAR
typedef size_t yy_size_t

Function Documentation

static unsigned fromhex ( char  hex)
inlinestatic

Referenced by while().

if ( yy_init)
static void nix (   ...)
static
void save_comment ( const char *  text)

References saved_comment.

Referenced by while().

while ( )

References AND, Type::Any, BEGIN, BLOCK, Type::Boolean, BREAK, tokenValue::bval, bybl, Type::Byteblock, C_BOOLEAN, SymbolEntry::c_builtin, C_BYTEBLOCK, SymbolEntry::c_const, SymbolEntry::c_filename, C_FLOAT, SymbolEntry::c_function, SymbolEntry::c_global, C_INTEGER, SymbolEntry::c_module, SymbolEntry::c_namespace, C_PATH, SymbolEntry::c_predefined, SymbolEntry::c_reference, SymbolEntry::c_self, C_SYMBOL, C_TYPE, SymbolEntry::c_typedef, SymbolEntry::c_unspec, SymbolEntry::c_variable, C_VOID, CASE, CLOSEBRACKET, comment, CONST, Type::ConstBoolean, Type::ConstByteblock, Type::ConstFloat, Type::ConstInteger, Type::ConstPath, Type::ConstString, Type::ConstSymbol, Type::ConstVoid, CONTINUE, tokenValue::cval, DCQUOTED_BLOCK, debug_scanner, DEFAULT, DEFINE, DO, Scanner::doStrdup(), ECHO, ELSE, EMPTY, END_OF_FILE, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, EQUALS, EXPORT, EXTERN, SymbolTable::find(), Type::Float, fromhex(), tokenValue::fval, GE, GLOBAL, I18N, IDENTIFIER, IF, IMPORT, INC_LINE, INCLUDE, INITIAL, Type::Integer, IS, tokenValue::ival, LE, LEFT, LINE_VAR, LIST, Type::Locale, LOOKUP, MAP, MAPEXPR, MODULE, namespace_prefix, NEQ, tokenValue::nval, OR, Type::Path, tokenValue::pval, QUOTED_BLOCK, QUOTED_EXPRESSION, REPEAT, RETURN, RIGHT, save_comment(), SCANNER_ERROR, SELECT, TableEntry::sentry(), STATIC, str, Type::String, STRING, STRUCT, tokenValue::sval, SWITCH, SYM_NAMESPACE, Type::Symbol, SYMBOL, Y2Namespace::table(), Type::Term, TEXTDOMAIN, TOKEN, TableEntry::toString(), tokenValue::tval, TYPEDEF, UNDEFINE, Type::Unspec, UNTIL, VALUE_TOKEN, Type::Void, WHILE, XREFDEBUG, y2debug, y2milestone, tokenValue::yval, yy_accept, YY_AT_BOL, yy_base, YY_BREAK, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_chk, yy_cp, YY_CURRENT_BUFFER_LVALUE, yy_current_state, yy_def, YY_DO_BEFORE_ACTION, yy_ec, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_meta, YY_MORE_ADJ, YY_NEW_FILE, yy_nxt, YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, YY_STATE_EOF, yyleng, and yytext_ptr.

void * yyalloc ( yy_size_t  size)
void yyfree ( void *  ptr)
void * yyrealloc ( void *  ptr,
yy_size_t  size 
)

Variable Documentation

SymbolTable* builtinTable = NULL

Referenced by switch().

char* namespace_prefix = 0
static

Referenced by while().

SymbolTable* namespaceTable = NULL
static
std::string saved_comment
static

Referenced by save_comment().

StaticDeclaration static_declarations
tokenValue token_value
static
yyconst flex_int16_t yy_accept[519]
static

Referenced by while().

register int yy_act
yyconst flex_int16_t yy_base[550]
static

Referenced by while().

register char * yy_bp
yyconst flex_int16_t yy_chk[1377]
static

Referenced by while().

register char* yy_cp

Referenced by while().

YY_DECL register yy_state_type yy_current_state

The main scanner function which does all the work.

Referenced by while().

yyconst flex_int16_t yy_def[550]
static

Referenced by while().

yyconst flex_int32_t yy_ec[256]
static

Referenced by while().

yyconst flex_int32_t yy_meta[72]
static
Initial value:
=
{ 0,
1, 1, 2, 1, 1, 1, 3, 1, 1, 1,
1, 4, 1, 5, 1, 1, 6, 6, 1, 7,
7, 7, 8, 1, 1, 1, 1, 1, 9, 9,
9, 10, 10, 10, 10, 10, 10, 1, 11, 1,
1, 12, 13, 9, 9, 9, 9, 9, 9, 10,
10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 14, 1, 1,
1
}

Referenced by while().

yyconst flex_int16_t yy_nxt[1377]
static

Referenced by while().

yy_size_t yyleng

Referenced by while().


Generated on a sunny day for yast2-core by doxygen 1.8.8