yast2-core
|
#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_state * | YY_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 |
SymbolTable * | builtinTable = NULL |
static SymbolTable * | namespaceTable = NULL |
static char * | namespace_prefix = 0 |
static tokenValue | token_value |
static std::string | saved_comment |
YY_DECL | |
register char * | yy_cp |
register char * | yy_bp |
register int | yy_act |
#define BEGIN (yy_start) = 1 + 2 * |
Referenced by while().
#define bybl 1 |
Referenced by while().
#define comment 3 |
Referenced by IniParser::parse_helper(), ModulesConf::parseFile(), YCode::setCommentAfter(), YCode::setCommentBefore(), and 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 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 |
Referenced by StaticDeclaration::active_predefined(), FunctionType::canCast(), IniParser::changeCase(), YCPPathRep::Component::Component(), ScriptingAgent::dirSubagents(), stringutil::dumpOn(), YCPStringRep::isAscii(), NFlexType::isBasetype(), TupleType::isBasetype(), IniParser::isFlat(), YBlock::isNamespace(), YEVariable::isReferenceable(), YBreakpoint::kind(), YEReference::kind(), YETerm::kind(), YSExpression::kind(), YECompare::kind(), YSBlock::kind(), YELocale::kind(), Type::kind(), YSReturn::kind(), YEList::kind(), YSTypedef::kind(), YEMap::kind(), YSFunction::kind(), YEPropagate::kind(), YEUnary::kind(), YSAssign::kind(), YEBinary::kind(), YSBracket::kind(), YETriple::kind(), YSIf::kind(), YEIs::kind(), YLocale::kind(), YSWhile::kind(), YEReturn::kind(), YEBracket::kind(), YSRepeat::kind(), YFunction::kind(), YSDo::kind(), YEBuiltin::kind(), YSTextdomain::kind(), YSInclude::kind(), YSFilename::kind(), YSSwitch::kind(), Point::mem_size(), TableEntry::mem_size(), CountedRep::objectCount(), stringutil::octstring(), Pathname::operator+=(), operator<<(), print_error(), Rep::repName(), BlockType::returnType(), IniSection::setSectionProp(), stringutil::strtonum(), YCPVoidRep::toStream(), YEVariable::toStream(), YCPExternalRep::toStream(), YCPIntegerRep::toStream(), Point::toStream(), TableEntry::toStream(), YEReference::toStream(), YSymbolEntry::toStream(), YCPBreakRep::toStream(), YCPMapRep::toStream(), YCPPathRep::toStream(), Type::toStream(), YCPListRep::toStream(), YCPReturnRep::toStream(), YEMap::toStream(), YBlock::toStream(), YSIf::toStream(), FlexType::toStream(), NFlexType::toStream(), YCPReferenceRep::toStream(), YSWhile::toStream(), VariableType::toStream(), ListType::toStream(), YFunction::toStream(), YEBuiltin::toStream(), MapType::toStream(), BlockType::toStream(), YECall::toStream(), YSImport::toStream(), TupleType::toStream(), FunctionType::toStream(), YFunction::toStreamDefinition(), YCPExternalRep::toXml(), YCPSymbolRep::toXml(), YSymbolEntry::toXml(), YSExpression::toXml(), YCPPathRep::toXml(), YELocale::toXml(), Type::toXml(), YBlock::toXml(), YConst::toXml(), YLocale::toXml(), YCPReferenceRep::toXml(), YFunction::toXml(), YSTextdomain::toXml(), YFunction::toXmlDefinition(), YBlock::toXmlSwitch(), VariableType::type(), ListType::type(), MapType::valuetype(), while(), StaticDeclaration::writeDeclaration(), Xmlcode::writeEntry(), SymbolTable::writeUsage(), Bytecode::writeValue(), StaticDeclaration::writeXmlDeclaration(), SymbolTable::writeXmlUsage(), Xmlcode::writeYCodelist(), Bytecode::writeYCodelist(), YCPBoolean::YCPBoolean(), YCPByteblock::YCPByteblock(), YCPCode::YCPCode(), YCPEntry::YCPEntry(), YCPExternal::YCPExternal(), YCPFloat::YCPFloat(), YCPInteger::YCPInteger(), YCPList::YCPList(), YCPMap::YCPMap(), YCPPath::YCPPath(), YCPString::YCPString(), YCPSymbol::YCPSymbol(), YCPTerm::YCPTerm(), YConst::~YConst(), YCPEntryRep::~YCPEntryRep(), YCPListRep::~YCPListRep(), YCPMapRep::~YCPMapRep(), YCPReferenceRep::~YCPReferenceRep(), YCPTermRep::~YCPTermRep(), and YStatement::~YStatement().
#define TOKEN | ( | token | ) |
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 | |||
) |
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_BUFFER_EOF_PENDING 2 |
Referenced by while().
#define YY_BUFFER_NEW 0 |
Referenced by while().
#define YY_BUFFER_NORMAL 1 |
Referenced by while().
#define YY_CURRENT_BUFFER |
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
#define YY_DECL int Scanner::yylex() |
#define YY_DO_BEFORE_ACTION |
#define YY_END_OF_BUFFER 131 |
Referenced by while().
#define YY_END_OF_BUFFER_CHAR 0 |
Referenced by while().
#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 | |||
) |
Referenced by while().
#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 |
Referenced by while().
#define YY_RESTORE_YY_MORE_OFFSET |
Referenced by while().
#define YY_RULE_SETUP |
Referenced by while().
#define YY_SC_TO_UI | ( | c | ) | ((unsigned int) (unsigned char) c) |
Referenced by while().
#define yy_set_bol | ( | at_bol | ) |
#define yy_set_interactive | ( | is_interactive | ) |
#define YY_SKIP_YYWRAP |
#define YY_START (((yy_start) - 1) / 2) |
Referenced by while().
#define YY_START_STACK_INCR 25 |
Referenced by while().
#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 |
Referenced by while().
#define yyless | ( | n | ) |
#define yyless | ( | n | ) |
#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 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 struct yy_buffer_state* YY_BUFFER_STATE |
typedef unsigned char YY_CHAR |
typedef size_t yy_size_t |
|
inlinestatic |
References static_declarations.
Referenced by while().
if | ( | ! | yy_init | ) |
References YY_BUF_SIZE, YY_CURRENT_BUFFER, and YY_CURRENT_BUFFER_LVALUE.
Referenced by while().
|
static |
void save_comment | ( | const char * | text | ) |
References saved_comment.
Referenced by while().
while | ( | 1 | ) |
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, file, SymbolTable::find(), Type::Float, fromhex(), tokenValue::fval, GE, GLOBAL, I18N, IDENTIFIER, IF, if(), IMPORT, INC_LINE, INCLUDE, INITIAL, Type::Integer, IS, tokenValue::ival, LE, LEFT, LINE_VAR, LIST, Type::Locale, LOOKUP, MAP, MAPEXPR, MODULE, name, namespace_prefix, NEQ, tokenValue::nval, OR, Type::Path, tokenValue::pval, QUOTED_BLOCK, QUOTED_EXPRESSION, REPEAT, result(), 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_buffer_state::yy_at_bol, YY_AT_BOL, yy_base, YY_BREAK, yy_buffer_state::yy_bs_column, yy_buffer_state::yy_bs_lineno, yy_buffer_state::yy_buf_pos, YY_BUF_SIZE, yy_buffer_state::yy_buf_size, YY_BUFFER_EOF_PENDING, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_buffer_state::yy_buffer_status, yy_buffer_state::yy_ch_buf, yy_chk, yy_cp, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_def, YY_DO_BEFORE_ACTION, yy_ec, YY_END_OF_BUFFER, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_buffer_state::yy_fill_buffer, YY_INPUT, yy_buffer_state::yy_input_file, yy_buffer_state::yy_is_interactive, yy_buffer_state::yy_is_our_buffer, yy_meta, YY_MORE_ADJ, yy_buffer_state::yy_n_chars, YY_NEW_FILE, yy_nxt, YY_READ_BUF_SIZE, YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, YY_START_STACK_INCR, YY_STATE_EOF, yyalloc(), yyFlexLexer, yyfree(), yyleng, yyrealloc(), and yytext_ptr.
void yyfree | ( | void * | ptr | ) |
Referenced by while().
SymbolTable* builtinTable = NULL |
Referenced by switch().
|
static |
Referenced by while().
|
static |
Referenced by StaticDeclaration::registerDeclarations().
|
static |
Referenced by save_comment().
StaticDeclaration static_declarations |
Referenced by fromhex().
|
static |
|
static |
Referenced by while().
register int yy_act |
|
static |
Referenced by while().
register char * yy_bp |
|
static |
Referenced by while().
register char* yy_cp |
Referenced by while().
YY_DECL |
The main scanner function which does all the work.
|
static |
Referenced by while().
|
static |
Referenced by while().
|
static |
Referenced by while().
|
static |
Referenced by while().