From e5782b214d839fe5d8b2f527ae331a246c6e012f Mon Sep 17 00:00:00 2001 From: Stefan Radomski Date: Mon, 22 Aug 2016 16:53:14 +0200 Subject: Progress on the apache-commons wrapper --- CMakeLists.txt | 12 + contrib/cmake/BuildPicoC.cmake | 38 + contrib/patches/picoc/CMakeLists.txt | 21 + contrib/patches/picoc/platform.h | 147 + src/bindings/swig/java/uscxml.i | 3 + src/bindings/swig/uscxml_beautify.i | 2 + src/bindings/swig/uscxml_ignores.i | 1 - .../swig/wrapped/WrappedActionLanguage.cpp | 33 + src/bindings/swig/wrapped/WrappedActionLanguage.h | 48 + src/uscxml/Interpreter.h | 6 +- src/uscxml/plugins/datamodel/c89/C89DataModel.cpp | 4 +- src/uscxml/plugins/datamodel/c89/C89DataModel.h | 9 +- src/uscxml/plugins/datamodel/c89/C89Parser.cpp | 285 - src/uscxml/plugins/datamodel/c89/C89Parser.h | 107 - src/uscxml/plugins/datamodel/c89/parser/c89.l | 158 - .../plugins/datamodel/c89/parser/c89.lex.yy.cpp | 2721 --------- src/uscxml/plugins/datamodel/c89/parser/c89.output | 6137 -------------------- .../plugins/datamodel/c89/parser/c89.tab.cpp | 3587 ------------ .../plugins/datamodel/c89/parser/c89.tab.hpp | 153 - src/uscxml/plugins/datamodel/c89/parser/c89.ypp | 681 --- .../org/uscxml/apache/commons/scxml2/Context.java | 7 + .../uscxml/apache/commons/scxml2/Evaluator.java | 7 + .../apache/commons/scxml2/JexlEvaluator.java | 19 + .../org/uscxml/apache/commons/scxml2/SCXML.java | 8 + .../apache/commons/scxml2/SCXMLExecutor.java | 49 + .../uscxml/apache/commons/scxml2/SCXMLReader.java | 13 + .../apache/commons/scxml2/SimpleErrorReporter.java | 5 + .../java/org/uscxml/dm/jexl/JEXLDataModel.java | 7 +- .../java/org/uscxml/examples/ApacheCommonsAPI.java | 45 + .../java/org/uscxml/examples/hello-world.xml | 25 + 30 files changed, 502 insertions(+), 13836 deletions(-) create mode 100644 contrib/cmake/BuildPicoC.cmake create mode 100644 contrib/patches/picoc/CMakeLists.txt create mode 100644 contrib/patches/picoc/platform.h create mode 100644 src/bindings/swig/wrapped/WrappedActionLanguage.cpp create mode 100644 src/bindings/swig/wrapped/WrappedActionLanguage.h delete mode 100644 src/uscxml/plugins/datamodel/c89/C89Parser.cpp delete mode 100644 src/uscxml/plugins/datamodel/c89/C89Parser.h delete mode 100644 src/uscxml/plugins/datamodel/c89/parser/c89.l delete mode 100644 src/uscxml/plugins/datamodel/c89/parser/c89.lex.yy.cpp delete mode 100644 src/uscxml/plugins/datamodel/c89/parser/c89.output delete mode 100644 src/uscxml/plugins/datamodel/c89/parser/c89.tab.cpp delete mode 100644 src/uscxml/plugins/datamodel/c89/parser/c89.tab.hpp delete mode 100644 src/uscxml/plugins/datamodel/c89/parser/c89.ypp create mode 100644 test/bindings/java/org/uscxml/apache/commons/scxml2/Context.java create mode 100644 test/bindings/java/org/uscxml/apache/commons/scxml2/Evaluator.java create mode 100644 test/bindings/java/org/uscxml/apache/commons/scxml2/JexlEvaluator.java create mode 100644 test/bindings/java/org/uscxml/apache/commons/scxml2/SCXML.java create mode 100644 test/bindings/java/org/uscxml/apache/commons/scxml2/SCXMLExecutor.java create mode 100644 test/bindings/java/org/uscxml/apache/commons/scxml2/SCXMLReader.java create mode 100644 test/bindings/java/org/uscxml/apache/commons/scxml2/SimpleErrorReporter.java create mode 100644 test/bindings/java/org/uscxml/examples/ApacheCommonsAPI.java create mode 100644 test/bindings/java/org/uscxml/examples/hello-world.xml diff --git a/CMakeLists.txt b/CMakeLists.txt index cca6649..d5110dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -371,6 +371,18 @@ if (WITH_DM_LUA) endif() OPTION(WITH_DM_C89 "Do build with C89 datamodel support" OFF) +if (WITH_DM_C89) + include("${CMAKE_MODULE_PATH}/BuildPicoC.cmake") + message(STATUS "Did not look for picoc interpreter") + message(STATUS "--> will download and compile") + if (PICOC_BUILT) + include_directories(${PICOC_INCLUDE_DIR}) + list (APPEND USCXML_CORE_LIBS ${PICOC_LIBRARY}) + list (APPEND USCXML_PREREQS picoc) + else() + message(FATAL_ERROR "Could not build picoc") + endif() +endif() add_subdirectory(src/uscxml) add_subdirectory(src/bindings) diff --git a/contrib/cmake/BuildPicoC.cmake b/contrib/cmake/BuildPicoC.cmake new file mode 100644 index 0000000..620f01f --- /dev/null +++ b/contrib/cmake/BuildPicoC.cmake @@ -0,0 +1,38 @@ +include(ExternalProject) + +if ("${CMAKE_GENERATOR}" STREQUAL "Xcode") + set(PICOC_LIBNAME "Debug/libpicoc.a") +elseif (WIN32) + set(PICOC_LIBNAME "picoc.lib") +elseif(UNIX) + set(PICOC_LIBNAME "libpicoc.a") +endif() + +externalproject_add(picoc + GIT_REPOSITORY https://github.com/zsaleeba/picoc.git + BUILD_IN_SOURCE 0 + PREFIX ${CMAKE_BINARY_DIR}/deps/picoc + UPDATE_COMMAND "" + PATCH_COMMAND + ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/contrib/patches/picoc/CMakeLists.txt" /CMakeLists.txt && + ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/contrib/patches/picoc/platform.h" /platform.h + CONFIGURE_COMMAND + ${CMAKE_COMMAND} + -G ${CMAKE_GENERATOR} + -DCMAKE_BUILD_TYPE=Release + ${CMAKE_PARAM_TOOLCHAIN} + ${CMAKE_PARAM_ANDROID_ABI} + ${CMAKE_PARAM_API_LEVEL} + ${CMAKE_PARAM_SHARED} + -DCMAKE_VERBOSE_MAKEFILE=OFF + -DBUILD_SHARED_LIBS=OFF + + INSTALL_COMMAND "" +) + +set(PICOC_INCLUDE_DIR ${CMAKE_BINARY_DIR}/deps/picoc/src/picoc) +set(PICOC_LIBRARY ${CMAKE_BINARY_DIR}/deps/picoc/src/picoc-build/${PICOC_LIBNAME}) + +set(PICOC_BUILT ON) + + diff --git a/contrib/patches/picoc/CMakeLists.txt b/contrib/patches/picoc/CMakeLists.txt new file mode 100644 index 0000000..92cc2c7 --- /dev/null +++ b/contrib/patches/picoc/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 2.8.4) +project(picoc) + +# include_directories(${PROJECT_SOURCE_DIR}/include) + +file(GLOB PICOC_FILES + ${PROJECT_SOURCE_DIR}/*.h + ${PROJECT_SOURCE_DIR}/*.c + ${PROJECT_SOURCE_DIR}/cstdlib/*.h + ${PROJECT_SOURCE_DIR}/cstdlib/*.c) + + if (UNIX) + add_definitions("-DUNIX_HOST") + list (APPEND PICOC_FILES ${PROJECT_SOURCE_DIR}/platform/library_unix.c) + list (APPEND PICOC_FILES ${PROJECT_SOURCE_DIR}/platform/platform_unix.c) + + endif() + +add_library(picoc ${PICOC_FILES}) + +# set_target_properties(uriparser PROPERTIES PREFIX "") diff --git a/contrib/patches/picoc/platform.h b/contrib/patches/picoc/platform.h new file mode 100644 index 0000000..25d6dc4 --- /dev/null +++ b/contrib/patches/picoc/platform.h @@ -0,0 +1,147 @@ +/* all platform-specific includes and defines go in this file */ +#ifndef PLATFORM_H +#define PLATFORM_H + +/* configurable options */ +/* select your host type (or do it in the Makefile): + * #define UNIX_HOST + * #define FLYINGFOX_HOST + * #define SURVEYOR_HOST + * #define SRV1_UNIX_HOST + * #define UMON_HOST + * #define WIN32 (predefined on MSVC) + */ + +#define LARGE_INT_POWER_OF_TEN 1000000000 /* the largest power of ten which fits in an int on this architecture */ +#if defined(__hppa__) || defined(__sparc__) +#define ALIGN_TYPE double /* the default data type to use for alignment */ +#else +#define ALIGN_TYPE void * /* the default data type to use for alignment */ +#endif + +#define GLOBAL_TABLE_SIZE 97 /* global variable table */ +#define STRING_TABLE_SIZE 97 /* shared string table size */ +#define STRING_LITERAL_TABLE_SIZE 97 /* string literal table size */ +#define RESERVED_WORD_TABLE_SIZE 97 /* reserved word table size */ +#define PARAMETER_MAX 16 /* maximum number of parameters to a function */ +#define LINEBUFFER_MAX 256 /* maximum number of characters on a line */ +#define LOCAL_TABLE_SIZE 11 /* size of local variable table (can expand) */ +#define STRUCT_TABLE_SIZE 11 /* size of struct/union member table (can expand) */ + +#define INTERACTIVE_PROMPT_START "starting picoc " PICOC_VERSION "\n" +#define INTERACTIVE_PROMPT_STATEMENT "picoc> " +#define INTERACTIVE_PROMPT_LINE " > " + +/* host platform includes */ +#ifdef UNIX_HOST +# define USE_MALLOC_STACK /* stack is allocated using malloc() */ +# define USE_MALLOC_HEAP /* heap is allocated using malloc() */ +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# ifndef NO_FP +# include +# define PICOC_MATH_LIBRARY +// # define USE_READLINE +# undef BIG_ENDIAN +# if defined(__powerpc__) || defined(__hppa__) || defined(__sparc__) +# define BIG_ENDIAN +# endif +# endif + +extern jmp_buf ExitBuf; + +#else +# ifdef WIN32 +# define USE_MALLOC_STACK /* stack is allocated using malloc() */ +# define USE_MALLOC_HEAP /* heap is allocated using malloc() */ +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# define PICOC_MATH_LIBRARY +# undef BIG_ENDIAN + +extern jmp_buf ExitBuf; + +# else +# ifdef FLYINGFOX_HOST +# define HEAP_SIZE (16*1024) /* space for the heap and the stack */ +# define NO_HASH_INCLUDE +# include +# include +# include +# include +# include +# include +# include +# define assert(x) +# define BUILTIN_MINI_STDLIB +# undef BIG_ENDIAN + +# else +# ifdef SURVEYOR_HOST +# define HEAP_SIZE C_HEAPSIZE +# define NO_FP +# define NO_CTYPE +# define NO_HASH_INCLUDE +# define NO_MODULUS +# include +# include "../string.h" +# include "../print.h" +# include "../srv.h" +# include "../setjmp.h" +# include "../stdarg.h" +# include "../colors.h" +# include "../neural.h" +# include "../gps.h" +# include "../i2c.h" +# include "../jpeg.h" +# include "../malloc.h" +# include "../xmodem.h" +# define assert(x) +# undef BIG_ENDIAN +# define NO_CALLOC +# define NO_REALLOC +# define BROKEN_FLOAT_CASTS +# define BUILTIN_MINI_STDLIB +# else +# ifdef UMON_HOST +# define HEAP_SIZE (128*1024) /* space for the heap and the stack */ +# define NO_FP +# define BUILTIN_MINI_STDLIB +# include +# include +# include +# include +# include +# include +# include "monlib.h" +# define assert(x) +# define malloc mon_malloc +# define calloc(a,b) mon_malloc(a*b) +# define realloc mon_realloc +# define free mon_free +# endif +# endif +# endif + +extern int ExitBuf[]; + +# endif +#endif + +#endif /* PLATFORM_H */ diff --git a/src/bindings/swig/java/uscxml.i b/src/bindings/swig/java/uscxml.i index 03d8232..db3b221 100644 --- a/src/bindings/swig/java/uscxml.i +++ b/src/bindings/swig/java/uscxml.i @@ -68,6 +68,7 @@ typedef uscxml::InterpreterIssue InterpreterIssue; #include "../wrapped/WrappedInvoker.h" #include "../wrapped/WrappedDataModel.h" +#include "../wrapped/WrappedActionLanguage.h" #include "../wrapped/WrappedExecutableContent.h" #include "../wrapped/WrappedIOProcessor.h" #include "../wrapped/WrappedInterpreterMonitor.h" @@ -78,6 +79,7 @@ using namespace XERCESC_NS; // the wrapped* C++ classes get rid of DOM nodes and provide more easily wrapped base classes #include "../wrapped/WrappedInvoker.cpp" #include "../wrapped/WrappedDataModel.cpp" +#include "../wrapped/WrappedActionLanguage.cpp" #include "../wrapped/WrappedExecutableContent.cpp" #include "../wrapped/WrappedIOProcessor.cpp" #include "../wrapped/WrappedInterpreterMonitor.cpp" @@ -268,6 +270,7 @@ BEAUTIFY_NATIVE(uscxml::Event, Event, EventNative); %include "../wrapped/WrappedInvoker.h" %include "../wrapped/WrappedDataModel.h" +%include "../wrapped/WrappedActionLanguage.h" %include "../wrapped/WrappedExecutableContent.h" %include "../wrapped/WrappedIOProcessor.h" %include "../wrapped/WrappedInterpreterMonitor.h" diff --git a/src/bindings/swig/uscxml_beautify.i b/src/bindings/swig/uscxml_beautify.i index 52c8ec5..0c17e2a 100644 --- a/src/bindings/swig/uscxml_beautify.i +++ b/src/bindings/swig/uscxml_beautify.i @@ -1,3 +1,5 @@ +%rename(NativeActionLanguage) ActionLanguage; +%rename(ActionLanguage) WrappedActionLanguage; %rename(NativeDataModel) DataModel; %rename(DataModel) WrappedDataModel; %rename(NativeDataModelExtension) DataModelExtension; diff --git a/src/bindings/swig/uscxml_ignores.i b/src/bindings/swig/uscxml_ignores.i index 4146a35..0679bc0 100644 --- a/src/bindings/swig/uscxml_ignores.i +++ b/src/bindings/swig/uscxml_ignores.i @@ -3,7 +3,6 @@ %ignore uscxml::InterpreterImpl; %ignore uscxml::BlobImpl; %ignore uscxml::StateTransitionMonitor; -%ignore uscxml::ActionLanguage; #if 0 %ignore uscxml::EventHandlerImpl; diff --git a/src/bindings/swig/wrapped/WrappedActionLanguage.cpp b/src/bindings/swig/wrapped/WrappedActionLanguage.cpp new file mode 100644 index 0000000..1876333 --- /dev/null +++ b/src/bindings/swig/wrapped/WrappedActionLanguage.cpp @@ -0,0 +1,33 @@ +/** + * @file + * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#include "WrappedActionLanguage.h" +#include "../../../uscxml/plugins/DataModelImpl.h" + +namespace uscxml { + +WrappedActionLanguage::WrappedActionLanguage() {} +WrappedActionLanguage::~WrappedActionLanguage() {} + +void WrappedActionLanguage::setDataModel(DataModelImpl* dm) { + std::shared_ptr dmPtr(dm); + this->dataModel = DataModel(dmPtr); +} + +} \ No newline at end of file diff --git a/src/bindings/swig/wrapped/WrappedActionLanguage.h b/src/bindings/swig/wrapped/WrappedActionLanguage.h new file mode 100644 index 0000000..f26329e --- /dev/null +++ b/src/bindings/swig/wrapped/WrappedActionLanguage.h @@ -0,0 +1,48 @@ +/** + * @file + * @author 2012-2014 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) + * @copyright Simplified BSD + * + * @cond + * This program is free software: you can redistribute it and/or modify + * it under the terms of the FreeBSD license as published by the FreeBSD + * project. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * You should have received a copy of the FreeBSD license along with this + * program. If not, see . + * @endcond + */ + +#ifndef WRAPPEDACTIONLANGUAGE_H_020AFC96 +#define WRAPPEDACTIONLANGUAGE_H_020AFC96 + +#include +#include +#include +#include +#include + +#include + +#include "../../../uscxml/Interpreter.h" + +namespace uscxml { + +class DataModelImpl; + +class WrappedActionLanguage : public ActionLanguage { +public: + + WrappedActionLanguage(); + virtual ~WrappedActionLanguage(); + + void setDataModel(DataModelImpl* dm); +}; + +} + +#endif /* end of include guard: WRAPPEDACTIONLANGUAGE_H_020AFC96 */ diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h index e7d8a19..f87053f 100644 --- a/src/uscxml/Interpreter.h +++ b/src/uscxml/Interpreter.h @@ -54,9 +54,9 @@ public: MicroStep microStepper; ///< The microstepper instance to use DataModel dataModel; ///< The datamodel to uses ContentExecutor execContent; ///< To process executable content elements - EventQueue internalQueue; ///< The queue where internal events will be enqueued - EventQueue externalQueue; ///< The queue for external events - DelayedEventQueue delayedQueue; ///< The queue for delayed events + EventQueue internalQueue; ///< The queue where internal events will be enqueued + EventQueue externalQueue; ///< The queue for external events + DelayedEventQueue delayedQueue; ///< The queue for delayed events }; /** diff --git a/src/uscxml/plugins/datamodel/c89/C89DataModel.cpp b/src/uscxml/plugins/datamodel/c89/C89DataModel.cpp index f490673..804b71a 100644 --- a/src/uscxml/plugins/datamodel/c89/C89DataModel.cpp +++ b/src/uscxml/plugins/datamodel/c89/C89DataModel.cpp @@ -26,7 +26,6 @@ #include "uscxml/messages/Event.h" #include "uscxml/util/DOM.h" #include -#include namespace uscxml { @@ -35,10 +34,13 @@ C89DataModel::C89DataModel() { std::shared_ptr C89DataModel::create(DataModelCallbacks* callbacks) { std::shared_ptr dm(new C89DataModel()); + PicocInitialise(&dm->_pc, PICOC_STACK_SIZE); + PicocIncludeAllSystemHeaders(&dm->_pc); return dm; } C89DataModel::~C89DataModel() { + PicocCleanup(&_pc); } void C89DataModel::addExtension(DataModelExtension* ext) { diff --git a/src/uscxml/plugins/datamodel/c89/C89DataModel.h b/src/uscxml/plugins/datamodel/c89/C89DataModel.h index c239d76..30116e1 100644 --- a/src/uscxml/plugins/datamodel/c89/C89DataModel.h +++ b/src/uscxml/plugins/datamodel/c89/C89DataModel.h @@ -23,6 +23,13 @@ #include "uscxml/plugins/DataModelImpl.h" #include +#define UNIX_HOST +#define PICOC_STACK_SIZE (128*1024) /* space for the the stack */ + +extern "C" { +#include "picoc.h" +#undef min +} #ifdef BUILD_AS_PLUGINS #include "uscxml/plugins/Plugins.h" @@ -79,7 +86,7 @@ public: virtual std::string andExpressions(std::list); protected: - + Picoc _pc; }; #ifdef BUILD_AS_PLUGINS diff --git a/src/uscxml/plugins/datamodel/c89/C89Parser.cpp b/src/uscxml/plugins/datamodel/c89/C89Parser.cpp deleted file mode 100644 index a42e41c..0000000 --- a/src/uscxml/plugins/datamodel/c89/C89Parser.cpp +++ /dev/null @@ -1,285 +0,0 @@ -/** - * @file - * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -#include "C89Parser.h" -#include "parser/c89.tab.hpp" -#include "uscxml/messages/Event.h" - -#include -#include -#include - -struct yy_buffer_state; -typedef yy_buffer_state *YY_BUFFER_STATE; -extern YY_BUFFER_STATE c89__scan_buffer(char *, size_t, void*); -void c89__delete_buffer(YY_BUFFER_STATE, void*); -YY_BUFFER_STATE c89__scan_string (const char * yystr , void*); - - -extern int c89_lex (C89_STYPE* yylval_param, C89_LTYPE* yylloc_param, void* yyscanner); -int c89_lex_init (void**); -int c89_lex_destroy (void*); - -void c89_error (void* yylloc_param, uscxml::C89Parser* ctx, void* yyscanner, const char* err) { - C89_LTYPE* yylloc = (C89_LTYPE*)yylloc_param; - // mark as pending exception as we cannot throw from constructor and have the destructor called - ERROR_EXECUTION(excEvent, err); - excEvent.data.compound["line"] = uscxml::Data(yylloc->first_line, uscxml::Data::VERBATIM); - excEvent.data.compound["col"] = uscxml::Data(yylloc->first_column, uscxml::Data::VERBATIM); - - std::stringstream ssUnderline; - for (size_t i = 0; i < yylloc->first_column; i++) - ssUnderline << " "; - ssUnderline << "^"; - excEvent.data.compound["sourcemark"] = uscxml::Data(ssUnderline.str(), uscxml::Data::VERBATIM); - - ctx->pendingException = excEvent; -} - -namespace uscxml { - -C89Parser::C89Parser(const std::string& expr) { - init(expr); -} - -C89Parser::C89Parser(const std::string& expr, int nrArgs, ...) { - init(expr); - - if (nrArgs == 0) - return; - - std::stringstream errSS; - std::string seperator; - errSS << "C89 syntax type mismatch: Expected {"; - - va_list ap; - va_start(ap, nrArgs); - for(int i = 1; i <= nrArgs; i++) { - int expectedType = va_arg(ap, int); - if (type == expectedType) - return; - errSS << seperator << typeToDesc(expectedType); - seperator = ", "; - } - errSS << "} but got " << typeToDesc(type); - ERROR_EXECUTION_THROW(errSS.str()); -} - -void C89Parser::init(const std::string& expr) { - ast = NULL; - parseInCompound = 0; - input_length = expr.length() + 2; // plus some zero terminators - input = (char*) calloc(1, input_length); - memcpy(input, expr.c_str(), expr.length()); - - c89_lex_init(&scanner); - // c89_assign_set_extra(ast, &scanner); - buffer = c89__scan_string(input, scanner); - // buffer = c89__scan_buffer(input, input_length, scanner); - c89_parse(this, scanner); - if (pendingException.name.size() > 0) { - // parsing failed in c89_error - destroy(); - pendingException.data.compound["sourceline"] = Data(expr, Data::VERBATIM); - throw pendingException; - } -} - -void C89Parser::destroy() { - if (ast) - delete(ast); - free(input); - c89__delete_buffer((YY_BUFFER_STATE)buffer, scanner); - c89_lex_destroy(scanner); -} - -C89Parser::~C89Parser() { - destroy(); -} - -std::string C89Parser::typeToDesc(int type) { - return ""; -} - -C89ParserNode::~C89ParserNode() { - while(operands.size() > 0) { - delete operands.front(); - operands.pop_front(); - } - if (loc) - free(loc); -} - -C89ParserNode* C89Parser::node(int type, int nrArgs, ...) { - C89ParserNode* newNode = new C89ParserNode(); - - newNode->type = type; - va_list ap; - va_start(ap, nrArgs); - for(int i = 1; i <= nrArgs; i++) { - C89ParserNode* op = va_arg(ap, C89ParserNode*); - assert(op != NULL); - - newNode->operands.push_back(op); - newNode->operands.back()->parent = newNode; - } - - this->ast = newNode; - return newNode; -} - -C89ParserNode* C89Parser::value(int type, void* location, const char* value) { - C89ParserNode* newNode = new C89ParserNode(); - - if (location) { - C89_LTYPE* location_param = (C89_LTYPE*)location; - newNode->loc = (C89ParserNode::Location*)malloc(sizeof(C89ParserNode::Location)); - newNode->loc->firstCol = location_param->first_column; - newNode->loc->firstLine = location_param->first_line; - newNode->loc->lastCol = location_param->last_column; - newNode->loc->lastLine = location_param->last_line; - } - - if (value != NULL) { - newNode->value = value; - } - newNode->type = type; - this->ast = newNode; - return newNode; -} - - -void C89Parser::dump() { - switch (type) { - case C89_EXPR: - std::cout << "C89 Expression" << std::endl; - break; - case C89_DECL: - std::cout << "C89 Declarations" << std::endl; - break; - case C89_STMNT: - std::cout << "C89 Statement" << std::endl; - break; - } - ast->dump(); -} - - -void C89ParserNode::merge(C89ParserNode* node) { - for (std::list::iterator iter = node->operands.begin(); - iter != node->operands.end(); iter++) { - operands.push_back(*iter); - (*iter)->parent = this; - } - node->operands.clear(); -} - -void C89ParserNode::push(C89ParserNode* node) { - node->parent = this; - operands.push_back(node); -} - -void C89ParserNode::dump(int indent) { - std::string padding; - for (size_t i = 0; i < indent; i++) { - padding += " "; - } - std::cout << padding << typeToDesc(type) << ": " << value; - if (loc != NULL) { - std::cout << " (" << loc->firstLine << ":" << loc->firstCol << ")-(" << loc->lastLine << ":" << loc->lastCol << ")"; - } - std::cout << std::endl; - for (std::list::iterator iter = operands.begin(); - iter != operands.end(); iter++) { - (*iter)->dump(indent + 1); - } -} - -std::string C89ParserNode::typeToDesc(int type) { - if (type < 256) { - return std::string((char*)(&type), 1); - } - - switch(type) { - - case IDENTIFIER: return "IDENTIFIER"; - case CONSTANT: return "CONSTANT"; - case STRING_LITERAL: return "STRING_LITERAL"; - case SIZEOF: return "SIZEOF"; - case PTR_OP: return "PTR_OP"; - case INC_OP: return "INC_OP"; - case DEC_OP: return "DEC_OP"; - case LEFT_OP: return "LEFT_OP"; - case RIGHT_OP: return "RIGHT_OP"; - case LE_OP: return "LE_OP"; - case GE_OP: return "GE_OP"; - case EQ_OP: return "EQ_OP"; - case NE_OP: return "NE_OP"; - case AND_OP: return "AND_OP"; - case OR_OP: return "OR_OP"; - case MUL_ASSIGN: return "MUL_ASSIGN"; - case DIV_ASSIGN: return "DIV_ASSIGN"; - case MOD_ASSIGN: return "MOD_ASSIGN"; - case ADD_ASSIGN: return "ADD_ASSIGN"; - case SUB_ASSIGN: return "SUB_ASSIGN"; - case LEFT_ASSIGN: return "LEFT_ASSIGN"; - case RIGHT_ASSIGN: return "RIGHT_ASSIGN"; - case AND_ASSIGN: return "AND_ASSIGN"; - case XOR_ASSIGN: return "XOR_ASSIGN"; - case OR_ASSIGN: return "OR_ASSIGN"; - case TYPE_NAME: return "TYPE_NAME"; - case TYPEDEF: return "TYPEDEF"; - case EXTERN: return "EXTERN"; - case STATIC: return "STATIC"; - case AUTO: return "AUTO"; - case REGISTER: return "REGISTER"; - case CHAR: return "CHAR"; - case SHORT: return "SHORT"; - case INT: return "INT"; - case LONG: return "LONG"; - case SIGNED: return "SIGNED"; - case UNSIGNED: return "UNSIGNED"; - case FLOAT: return "FLOAT"; - case DOUBLE: return "DOUBLE"; - case CONST: return "CONST"; - case VOLATILE: return "VOLATILE"; - case VOID: return "VOID"; - case STRUCT: return "STRUCT"; - case UNION: return "UNION"; - case ENUM: return "ENUM"; - case ELLIPSIS: return "ELLIPSIS"; - case CASE: return "CASE"; - case DEFAULT: return "DEFAULT"; - case IF: return "IF"; - case ELSE: return "ELSE"; - case SWITCH: return "SWITCH"; - case WHILE: return "WHILE"; - case DO: return "DO"; - case FOR: return "FOR"; - case GOTO: return "GOTO"; - case CONTINUE: return "CONTINUE"; - case BREAK: return "BREAK"; - case RETURN: return "RETURN"; - - default: - return std::string("UNK(") + toStr(type) + ")"; - } -} - -} \ No newline at end of file diff --git a/src/uscxml/plugins/datamodel/c89/C89Parser.h b/src/uscxml/plugins/datamodel/c89/C89Parser.h deleted file mode 100644 index d20d319..0000000 --- a/src/uscxml/plugins/datamodel/c89/C89Parser.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * @file - * @author 2016 Stefan Radomski (stefan.radomski@cs.tu-darmstadt.de) - * @copyright Simplified BSD - * - * @cond - * This program is free software: you can redistribute it and/or modify - * it under the terms of the FreeBSD license as published by the FreeBSD - * project. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the FreeBSD license along with this - * program. If not, see . - * @endcond - */ - -// bison -v c89.ypp && flex c89.l - -#ifndef C89PARSER_H_FE8E7C3E -#define C89PARSER_H_FE8E7C3E - - -#include -#include -#include -//#include -#include - -#include "uscxml/messages/Event.h" - -namespace uscxml { - -class C89Parser; - -class C89ParserNode { -public: - struct Location { - int firstLine; - int firstCol; - int lastLine; - int lastCol; - }; - - C89ParserNode() : type(0), parent(NULL), loc(NULL) {} - virtual ~C89ParserNode(); - - void merge(C89ParserNode* node); - void push(C89ParserNode* node); - void dump(int indent = 0); - - static std::string typeToDesc(int type); - - int type; - std::string value; - std::list operands; - C89ParserNode* parent; - Location* loc; -}; - -class C89Parser { -public: - enum Type { - C89_EXPR, - C89_DECL, - C89_STMNT - }; - - static std::string typeToDesc(int type); - - C89Parser() : ast(NULL) {} - C89Parser(const std::string& expr); - C89Parser(const std::string& expr, int nrArgs, ...); - virtual ~C89Parser(); - - virtual C89ParserNode* node(int type, int nrArgs, ...); - virtual C89ParserNode* value(int type, void* location, const char* value); - void dump(); - - int parseInCompound; - - C89ParserNode* ast; - Type type; - - Event pendingException; - operator bool() const { - return ast != NULL; - } - -protected: - - void init(const std::string& expr); - void destroy(); - - void* buffer; - void* scanner; - char* input; - size_t input_length; -}; - -} - -void c89_error (void* yylloc_param, uscxml::C89Parser* ctx, void* yyscanner, const char* err); - -#endif /* end of include guard: C89PARSER_H_FE8E7C3E */ diff --git a/src/uscxml/plugins/datamodel/c89/parser/c89.l b/src/uscxml/plugins/datamodel/c89/parser/c89.l deleted file mode 100644 index 8681565..0000000 --- a/src/uscxml/plugins/datamodel/c89/parser/c89.l +++ /dev/null @@ -1,158 +0,0 @@ -/* see: http://www.phpcompiler.org/articles/reentrantparser.html */ -/* see: http://spinroot.com/spin/Man/operators.html */ - -%option yylineno -%option reentrant -%option bison-bridge -%option prefix="c89_" -%option outfile="c89.lex.yy.cpp" -%option noyywrap -/*%option debug*/ -%option never-interactive nounistd -%option bison-locations - -%{ - -#include "../C89Parser.h" -#include "c89.tab.hpp" -#define YYSTYPE C89_STYPE -#define YYLTYPE C89_LTYPE -#define YY_USER_INIT \ - yycolumn = yylloc->first_line = yylloc->first_column = 0; \ - yylineno = yylloc->last_line = yylloc->last_column = 0; \ - -//int yycolumn = 1; - -#define YY_USER_ACTION \ -{ \ - yylloc->first_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yycolumn + yyleng; \ - yylloc->last_line = yylineno; \ - yycolumn = yycolumn + yyleng; \ -} - -%} - -D [0-9] -L [a-zA-Z_] -H [a-fA-F0-9] -E [Ee][+-]?{D}+ -FS (f|F|l|L) -IS (u|U|l|L)* - -%{ -#include - -int check_type() -{ -/* if (yytext == uint) - return(TYPE_NAME); -*/ - return(IDENTIFIER); -} - -%} - -%% -\/\*([^*]|\*[^/])*\*+\/ /* multiline comments */ -"//".* /* singlelien comments */ -"#".* /* singlelien comments */ - -"auto" { return(AUTO); } -"break" { return(BREAK); } -"case" { return(CASE); } -"char" { return(CHAR); } -"const" { return(CONST); } -"continue" { return(CONTINUE); } -"default" { return(DEFAULT); } -"do" { return(DO); } -"double" { return(DOUBLE); } -"else" { return(ELSE); } -"enum" { return(ENUM); } -"extern" { return(EXTERN); } -"float" { return(FLOAT); } -"for" { return(FOR); } -"goto" { return(GOTO); } -"if" { return(IF); } -"int" { return(INT); } -"long" { return(LONG); } -"register" { return(REGISTER); } -"return" { return(RETURN); } -"short" { return(SHORT); } -"signed" { return(SIGNED); } -"sizeof" { return(SIZEOF); } -"static" { return(STATIC); } -"struct" { return(STRUCT); } -"switch" { return(SWITCH); } -"typedef" { return(TYPEDEF); } -"union" { return(UNION); } -"unsigned" { return(UNSIGNED); } -"void" { return(VOID); } -"volatile" { return(VOLATILE); } -"while" { return(WHILE); } - -{L}({L}|{D})* { yylval->value = strdup(yytext); return(IDENTIFIER); } - -0[xX]{H}+{IS}? { yylval->value = strdup(yytext); return(CONSTANT); } -0{D}+{IS}? { yylval->value = strdup(yytext); return(CONSTANT); } -{D}+{IS}? { yylval->value = strdup(yytext); return(CONSTANT); } -L?'(\\.|[^\\'])+' { yylval->value = strdup(yytext); return(CONSTANT); } - -{D}+{E}{FS}? { yylval->value = strdup(yytext); return(CONSTANT); } -{D}*"."{D}+({E})?{FS}? { yylval->value = strdup(yytext); return(CONSTANT); } -{D}+"."{D}*({E})?{FS}? { yylval->value = strdup(yytext); return(CONSTANT); } - -L?\"(\\.|[^\\"])*\" { yylval->value = strdup(yytext); return(STRING_LITERAL); } - -"..." { return(ELLIPSIS); } -">>=" { return(RIGHT_ASSIGN); } -"<<=" { return(LEFT_ASSIGN); } -"+=" { return(ADD_ASSIGN); } -"-=" { return(SUB_ASSIGN); } -"*=" { return(MUL_ASSIGN); } -"/=" { return(DIV_ASSIGN); } -"%=" { return(MOD_ASSIGN); } -"&=" { return(AND_ASSIGN); } -"^=" { return(XOR_ASSIGN); } -"|=" { return(OR_ASSIGN); } -">>" { return(RIGHT_OP); } -"<<" { return(LEFT_OP); } -"++" { return(INC_OP); } -"--" { return(DEC_OP); } -"->" { return(PTR_OP); } -"&&" { return(AND_OP); } -"||" { return(OR_OP); } -"<=" { return(LE_OP); } -">=" { return(GE_OP); } -"==" { return(EQ_OP); } -"!=" { return(NE_OP); } -";" { return(';'); } -("{"|"<%") { return('{'); } -("}"|"%>") { return('}'); } -"," { return(','); } -":" { return(':'); } -"=" { return('='); } -"(" { return('('); } -")" { return(')'); } -("["|"<:") { return('['); } -("]"|":>") { return(']'); } -"." { return('.'); } -"&" { return('&'); } -"!" { return('!'); } -"~" { return('~'); } -"-" { return('-'); } -"+" { return('+'); } -"*" { return('*'); } -"/" { return('/'); } -"%" { return('%'); } -"<" { return('<'); } -">" { return('>'); } -"^" { return('^'); } -"|" { return('|'); } -"?" { return('?'); } - -[ \t\v\n\f] { } -. { /* ignore bad characters */ } - -%% diff --git a/src/uscxml/plugins/datamodel/c89/parser/c89.lex.yy.cpp b/src/uscxml/plugins/datamodel/c89/parser/c89.lex.yy.cpp deleted file mode 100644 index 58654f0..0000000 --- a/src/uscxml/plugins/datamodel/c89/parser/c89.lex.yy.cpp +++ /dev/null @@ -1,2721 +0,0 @@ -#line 2 "c89.lex.yy.cpp" - -#line 4 "c89.lex.yy.cpp" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 6 -#define YY_FLEX_SUBMINOR_VERSION 0 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#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. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -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; - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! C99 */ - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE c89_restart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k. - * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. - * Ditto for the __ia64__ case accordingly. - */ -#define YY_BUF_SIZE 32768 -#else -#define YY_BUF_SIZE 16384 -#endif /* __ia64__ */ -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires - * access to the local variable yy_act. Since yyless() is a macro, it would break - * existing scanners that call yyless() from OUTSIDE c89_lex. - * One obvious solution it to make yy_act a global. I tried that, and saw - * a 5% performance hit in a non-yylineno scanner, because yy_act is - * normally declared as a register variable-- so it is not worth it. - */ - #define YY_LESS_LINENO(n) \ - do { \ - int yyl;\ - for ( yyl = n; yyl < yyleng; ++yyl )\ - if ( yytext[yyl] == '\n' )\ - --yylineno;\ - }while(0) - #define YY_LINENO_REWIND_TO(dst) \ - do {\ - const char *p;\ - for ( p = yy_cp-1; p >= (dst); --p)\ - if ( *p == '\n' )\ - --yylineno;\ - }while(0) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - yy_size_t yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - 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. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via c89_restart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void c89_restart (FILE *input_file ,yyscan_t yyscanner ); -void c89__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE c89__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void c89__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void c89__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void c89_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void c89_pop_buffer_state (yyscan_t yyscanner ); - -static void c89_ensure_buffer_stack (yyscan_t yyscanner ); -static void c89__load_buffer_state (yyscan_t yyscanner ); -static void c89__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER c89__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE c89__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE c89__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE c89__scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner ); - -void *c89_alloc (yy_size_t ,yyscan_t yyscanner ); -void *c89_realloc (void *,yy_size_t ,yyscan_t yyscanner ); -void c89_free (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer c89__create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - c89_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - c89__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - c89_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - c89__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define c89_wrap(yyscanner) (/*CONSTCOND*/1) -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -#if defined(__GNUC__) && __GNUC__ >= 3 -__attribute__((__noreturn__)) -#endif -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 93 -#define YY_END_OF_BUFFER 94 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[251] = - { 0, - 0, 0, 94, 92, 91, 91, 79, 92, 3, 85, - 78, 92, 73, 74, 83, 82, 70, 81, 77, 84, - 39, 39, 71, 67, 86, 72, 87, 90, 36, 36, - 75, 76, 88, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 68, 89, - 69, 80, 66, 0, 44, 0, 3, 52, 69, 61, - 53, 0, 0, 50, 58, 48, 59, 49, 60, 0, - 42, 0, 2, 51, 43, 38, 0, 39, 0, 39, - 76, 68, 75, 57, 63, 65, 64, 56, 36, 0, - 0, 54, 36, 36, 36, 36, 36, 36, 11, 36, - - 36, 36, 36, 36, 36, 19, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 55, 62, 40, - 45, 0, 42, 0, 0, 2, 42, 0, 43, 38, - 0, 41, 37, 47, 46, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 36, 36, 17, 36, 20, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 36, 0, 42, 0, 1, 0, 42, - 0, 43, 41, 37, 4, 36, 6, 7, 36, 36, - 36, 36, 13, 14, 36, 36, 18, 21, 36, 36, - 36, 36, 36, 36, 36, 36, 36, 36, 36, 33, - - 36, 36, 1, 0, 42, 5, 8, 36, 36, 36, - 36, 16, 36, 36, 24, 36, 36, 36, 36, 36, - 36, 31, 36, 36, 35, 36, 36, 12, 15, 36, - 23, 25, 26, 27, 28, 29, 36, 36, 36, 36, - 10, 36, 30, 36, 36, 9, 22, 32, 34, 0 - } ; - -static yyconst YY_CHAR yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 5, 6, 1, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, - 19, 19, 19, 19, 19, 19, 19, 20, 21, 22, - 23, 24, 25, 1, 26, 26, 26, 26, 27, 28, - 29, 29, 29, 29, 29, 30, 29, 29, 29, 29, - 29, 29, 29, 29, 31, 29, 29, 32, 29, 29, - 33, 34, 35, 36, 29, 1, 37, 38, 39, 40, - - 41, 42, 43, 44, 45, 29, 46, 47, 48, 49, - 50, 51, 29, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst YY_CHAR yy_meta[65] = - { 0, - 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, - 1, 1, 1, 1, 1, 1, 1, 4, 4, 1, - 1, 1, 1, 1, 1, 4, 4, 4, 5, 5, - 5, 5, 1, 1, 1, 1, 4, 4, 4, 4, - 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 1, 1, 1, 1 - } ; - -static yyconst flex_uint16_t yy_base[258] = - { 0, - 0, 0, 395, 396, 396, 396, 371, 60, 0, 43, - 60, 359, 396, 396, 369, 56, 396, 57, 55, 65, - 79, 74, 367, 396, 80, 367, 52, 396, 0, 80, - 396, 396, 366, 333, 335, 75, 58, 69, 67, 336, - 42, 335, 343, 78, 324, 333, 331, 336, 396, 84, - 396, 396, 396, 108, 396, 376, 0, 396, 396, 396, - 396, 115, 127, 396, 396, 396, 396, 396, 396, 362, - 120, 365, 0, 396, 136, 141, 161, 139, 0, 171, - 396, 396, 396, 353, 396, 396, 396, 352, 0, 139, - 340, 396, 319, 331, 318, 333, 320, 326, 312, 313, - - 310, 310, 313, 310, 307, 0, 306, 310, 97, 308, - 85, 104, 312, 305, 25, 86, 310, 396, 396, 396, - 396, 190, 396, 342, 141, 0, 192, 210, 396, 169, - 166, 212, 205, 396, 396, 303, 315, 310, 298, 138, - 312, 310, 306, 298, 304, 307, 0, 293, 0, 299, - 296, 285, 287, 289, 296, 282, 280, 280, 292, 282, - 286, 290, 292, 281, 188, 219, 215, 396, 238, 396, - 195, 244, 396, 234, 0, 281, 0, 0, 272, 280, - 266, 263, 0, 0, 252, 242, 0, 0, 242, 242, - 239, 249, 238, 242, 246, 245, 243, 233, 236, 0, - - 223, 235, 263, 225, 250, 0, 0, 224, 224, 229, - 218, 0, 204, 206, 0, 210, 206, 207, 191, 197, - 180, 0, 168, 170, 0, 149, 143, 0, 0, 154, - 0, 0, 0, 0, 0, 0, 151, 140, 128, 124, - 0, 100, 0, 103, 55, 0, 0, 0, 0, 396, - 297, 302, 307, 309, 314, 319, 82 - } ; - -static yyconst flex_int16_t yy_def[258] = - { 0, - 250, 1, 250, 250, 250, 250, 250, 251, 252, 250, - 250, 253, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 254, 254, - 250, 250, 250, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, 250, 250, - 250, 250, 250, 251, 250, 251, 252, 250, 250, 250, - 250, 253, 253, 250, 250, 250, 250, 250, 250, 250, - 250, 255, 256, 250, 250, 250, 250, 250, 257, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 254, 251, - 253, 250, 254, 254, 254, 254, 254, 254, 254, 254, - - 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 250, 250, 250, - 250, 250, 250, 255, 255, 256, 250, 250, 250, 250, - 250, 250, 257, 250, 250, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 250, 250, 255, 250, 250, 250, - 250, 250, 250, 250, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, - - 254, 254, 255, 250, 250, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, - 254, 254, 254, 254, 254, 254, 254, 254, 254, 0, - 250, 250, 250, 250, 250, 250, 250 - } ; - -static yyconst flex_uint16_t yy_nxt[461] = - { 0, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 29, 29, 29, 30, - 29, 29, 31, 4, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 29, 41, 29, 42, 29, 29, 29, - 29, 43, 44, 45, 46, 47, 48, 29, 29, 29, - 49, 50, 51, 52, 55, 58, 59, 60, 65, 160, - 70, 67, 71, 71, 87, 88, 72, 161, 66, 68, - 69, 73, 61, 106, 90, 133, 82, 74, 91, 75, - 107, 80, 80, 56, 75, 249, 76, 76, 98, 83, - - 77, 84, 85, 78, 78, 77, 118, 99, 78, 78, - 79, 95, 55, 103, 77, 100, 104, 101, 96, 77, - 78, 110, 111, 120, 97, 78, 102, 154, 78, 250, - 162, 112, 163, 78, 113, 62, 79, 71, 71, 151, - 156, 56, 248, 55, 155, 119, 122, 123, 63, 123, - 152, 247, 167, 127, 127, 157, 75, 168, 76, 76, - 122, 123, 128, 129, 246, 129, 123, 77, 78, 78, - 130, 130, 56, 131, 245, 131, 128, 129, 132, 132, - 244, 77, 129, 132, 132, 78, 75, 130, 80, 80, - 179, 180, 243, 78, 242, 130, 241, 77, 130, 130, - - 78, 78, 165, 240, 165, 166, 166, 166, 166, 127, - 127, 77, 172, 172, 239, 130, 238, 78, 169, 170, - 237, 170, 171, 130, 171, 78, 125, 172, 172, 132, - 132, 203, 169, 170, 174, 174, 166, 166, 170, 173, - 236, 173, 205, 205, 235, 234, 123, 233, 123, 232, - 204, 174, 204, 173, 231, 205, 205, 230, 173, 174, - 123, 172, 172, 174, 174, 123, 229, 205, 205, 228, - 227, 129, 226, 129, 125, 225, 224, 170, 223, 170, - 174, 222, 221, 220, 219, 129, 218, 217, 174, 216, - 129, 170, 215, 214, 213, 212, 170, 54, 54, 54, - - 54, 54, 57, 211, 57, 57, 57, 62, 62, 210, - 62, 62, 89, 89, 124, 124, 124, 124, 124, 126, - 209, 126, 126, 126, 208, 207, 206, 202, 201, 200, - 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, - 189, 188, 187, 186, 185, 184, 183, 182, 181, 178, - 177, 176, 175, 125, 164, 159, 158, 153, 150, 149, - 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, - 138, 137, 136, 63, 135, 134, 125, 121, 250, 117, - 116, 115, 114, 109, 108, 105, 94, 93, 92, 86, - 81, 64, 63, 53, 250, 3, 250, 250, 250, 250, - - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250 - } ; - -static yyconst flex_int16_t yy_chk[461] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 8, 10, 10, 11, 16, 115, - 19, 18, 19, 19, 27, 27, 20, 115, 16, 18, - 18, 20, 11, 41, 30, 257, 25, 20, 30, 22, - 41, 22, 22, 8, 21, 245, 21, 21, 37, 25, - - 22, 25, 25, 22, 22, 21, 50, 37, 21, 21, - 21, 36, 54, 39, 22, 38, 39, 38, 36, 21, - 22, 44, 44, 62, 36, 21, 38, 111, 22, 63, - 116, 44, 116, 21, 44, 63, 21, 71, 71, 109, - 112, 54, 244, 90, 111, 50, 71, 71, 62, 71, - 109, 242, 125, 75, 75, 112, 76, 125, 76, 76, - 71, 71, 75, 75, 240, 75, 71, 76, 78, 78, - 76, 76, 90, 77, 239, 77, 75, 75, 77, 77, - 238, 76, 75, 131, 131, 78, 80, 76, 80, 80, - 140, 140, 237, 78, 230, 76, 227, 80, 130, 130, - - 80, 80, 122, 226, 122, 165, 165, 122, 122, 127, - 127, 80, 171, 171, 224, 130, 223, 80, 127, 127, - 221, 127, 128, 130, 128, 80, 167, 128, 128, 132, - 132, 167, 127, 127, 133, 133, 166, 166, 127, 132, - 220, 132, 204, 204, 219, 218, 166, 217, 166, 216, - 169, 133, 169, 132, 214, 169, 169, 213, 132, 133, - 166, 172, 172, 174, 174, 166, 211, 205, 205, 210, - 209, 172, 208, 172, 203, 202, 201, 205, 199, 205, - 174, 198, 197, 196, 195, 172, 194, 193, 174, 192, - 172, 205, 191, 190, 189, 186, 205, 251, 251, 251, - - 251, 251, 252, 185, 252, 252, 252, 253, 253, 182, - 253, 253, 254, 254, 255, 255, 255, 255, 255, 256, - 181, 256, 256, 256, 180, 179, 176, 164, 163, 162, - 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, - 151, 150, 148, 146, 145, 144, 143, 142, 141, 139, - 138, 137, 136, 124, 117, 114, 113, 110, 108, 107, - 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, - 95, 94, 93, 91, 88, 84, 72, 70, 56, 48, - 47, 46, 45, 43, 42, 40, 35, 34, 33, 26, - 23, 15, 12, 7, 3, 250, 250, 250, 250, 250, - - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, - 250, 250, 250, 250, 250, 250, 250, 250, 250, 250 - } ; - -/* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[94] = - { 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, }; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#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 -#line 1 "c89.l" -/* see: http://www.phpcompiler.org/articles/reentrantparser.html */ -/* see: http://spinroot.com/spin/Man/operators.html */ -/*%option debug*/ -#define YY_NO_UNISTD_H 1 -#line 15 "c89.l" - -#include "../C89Parser.h" -#include "c89.tab.hpp" -#define YYSTYPE C89_STYPE -#define YYLTYPE C89_LTYPE -#define YY_USER_INIT \ - yycolumn = yylloc->first_line = yylloc->first_column = 0; \ - yylineno = yylloc->last_line = yylloc->last_column = 0; \ - -//int yycolumn = 1; - -#define YY_USER_ACTION \ -{ \ - yylloc->first_line = yylineno; \ - yylloc->first_column = yycolumn; \ - yylloc->last_column = yycolumn + yyleng; \ - yylloc->last_line = yylineno; \ - yycolumn = yycolumn + yyleng; \ -} - -#line 45 "c89.l" -#include - -int check_type() -{ -/* if (yytext == uint) - return(TYPE_NAME); -*/ - return(IDENTIFIER); -} - -#line 693 "c89.lex.yy.cpp" - -#define INITIAL 0 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - yy_size_t yy_n_chars; - yy_size_t yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int c89_lex_init (yyscan_t* scanner); - -int c89_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int c89_lex_destroy (yyscan_t yyscanner ); - -int c89_get_debug (yyscan_t yyscanner ); - -void c89_set_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE c89_get_extra (yyscan_t yyscanner ); - -void c89_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *c89_get_in (yyscan_t yyscanner ); - -void c89_set_in (FILE * _in_str ,yyscan_t yyscanner ); - -FILE *c89_get_out (yyscan_t yyscanner ); - -void c89_set_out (FILE * _out_str ,yyscan_t yyscanner ); - -yy_size_t c89_get_leng (yyscan_t yyscanner ); - -char *c89_get_text (yyscan_t yyscanner ); - -int c89_get_lineno (yyscan_t yyscanner ); - -void c89_set_lineno (int _line_number ,yyscan_t yyscanner ); - -int c89_get_column (yyscan_t yyscanner ); - -void c89_set_column (int _column_no ,yyscan_t yyscanner ); - -YYSTYPE * c89_get_lval (yyscan_t yyscanner ); - -void c89_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); - - YYLTYPE *c89_get_lloc (yyscan_t yyscanner ); - - void c89_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int c89_wrap (yyscan_t yyscanner ); -#else -extern int c89_wrap (yyscan_t yyscanner ); -#endif -#endif - -#ifndef YY_NO_UNPUT - - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#ifdef __ia64__ -/* On IA-64, the buffer size is 16k, not 8k */ -#define YY_READ_BUF_SIZE 16384 -#else -#define YY_READ_BUF_SIZE 8192 -#endif /* __ia64__ */ -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - size_t n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int c89_lex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); - -#define YY_DECL int c89_lex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK /*LINTED*/break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - yy_state_type yy_current_state; - char *yy_cp, *yy_bp; - int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - c89_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - c89__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - c89__load_buffer_state(yyscanner ); - } - - { -#line 57 "c89.l" - -#line 980 "c89.lex.yy.cpp" - - while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 251 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_current_state != 250 ); - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - - if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) - { - yy_size_t yyl; - for ( yyl = 0; yyl < yyleng; ++yyl ) - if ( yytext[yyl] == '\n' ) - - do{ yylineno++; - yycolumn=0; - }while(0) -; - } - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -/* rule 1 can match eol */ -YY_RULE_SETUP -#line 58 "c89.l" -/* multiline comments */ - YY_BREAK -case 2: -YY_RULE_SETUP -#line 59 "c89.l" -/* singlelien comments */ - YY_BREAK -case 3: -YY_RULE_SETUP -#line 60 "c89.l" -/* singlelien comments */ - YY_BREAK -case 4: -YY_RULE_SETUP -#line 62 "c89.l" -{ return(AUTO); } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 63 "c89.l" -{ return(BREAK); } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 64 "c89.l" -{ return(CASE); } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 65 "c89.l" -{ return(CHAR); } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 66 "c89.l" -{ return(CONST); } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 67 "c89.l" -{ return(CONTINUE); } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 68 "c89.l" -{ return(DEFAULT); } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 69 "c89.l" -{ return(DO); } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 70 "c89.l" -{ return(DOUBLE); } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 71 "c89.l" -{ return(ELSE); } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 72 "c89.l" -{ return(ENUM); } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 73 "c89.l" -{ return(EXTERN); } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 74 "c89.l" -{ return(FLOAT); } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 75 "c89.l" -{ return(FOR); } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 76 "c89.l" -{ return(GOTO); } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 77 "c89.l" -{ return(IF); } - YY_BREAK -case 20: -YY_RULE_SETUP -#line 78 "c89.l" -{ return(INT); } - YY_BREAK -case 21: -YY_RULE_SETUP -#line 79 "c89.l" -{ return(LONG); } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 80 "c89.l" -{ return(REGISTER); } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 81 "c89.l" -{ return(RETURN); } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 82 "c89.l" -{ return(SHORT); } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 83 "c89.l" -{ return(SIGNED); } - YY_BREAK -case 26: -YY_RULE_SETUP -#line 84 "c89.l" -{ return(SIZEOF); } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 85 "c89.l" -{ return(STATIC); } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 86 "c89.l" -{ return(STRUCT); } - YY_BREAK -case 29: -YY_RULE_SETUP -#line 87 "c89.l" -{ return(SWITCH); } - YY_BREAK -case 30: -YY_RULE_SETUP -#line 88 "c89.l" -{ return(TYPEDEF); } - YY_BREAK -case 31: -YY_RULE_SETUP -#line 89 "c89.l" -{ return(UNION); } - YY_BREAK -case 32: -YY_RULE_SETUP -#line 90 "c89.l" -{ return(UNSIGNED); } - YY_BREAK -case 33: -YY_RULE_SETUP -#line 91 "c89.l" -{ return(VOID); } - YY_BREAK -case 34: -YY_RULE_SETUP -#line 92 "c89.l" -{ return(VOLATILE); } - YY_BREAK -case 35: -YY_RULE_SETUP -#line 93 "c89.l" -{ return(WHILE); } - YY_BREAK -case 36: -YY_RULE_SETUP -#line 95 "c89.l" -{ yylval->value = strdup(yytext); return(IDENTIFIER); } - YY_BREAK -case 37: -YY_RULE_SETUP -#line 97 "c89.l" -{ yylval->value = strdup(yytext); return(CONSTANT); } - YY_BREAK -case 38: -YY_RULE_SETUP -#line 98 "c89.l" -{ yylval->value = strdup(yytext); return(CONSTANT); } - YY_BREAK -case 39: -YY_RULE_SETUP -#line 99 "c89.l" -{ yylval->value = strdup(yytext); return(CONSTANT); } - YY_BREAK -case 40: -/* rule 40 can match eol */ -YY_RULE_SETUP -#line 100 "c89.l" -{ yylval->value = strdup(yytext); return(CONSTANT); } - YY_BREAK -case 41: -YY_RULE_SETUP -#line 102 "c89.l" -{ yylval->value = strdup(yytext); return(CONSTANT); } - YY_BREAK -case 42: -YY_RULE_SETUP -#line 103 "c89.l" -{ yylval->value = strdup(yytext); return(CONSTANT); } - YY_BREAK -case 43: -YY_RULE_SETUP -#line 104 "c89.l" -{ yylval->value = strdup(yytext); return(CONSTANT); } - YY_BREAK -case 44: -/* rule 44 can match eol */ -YY_RULE_SETUP -#line 106 "c89.l" -{ yylval->value = strdup(yytext); return(STRING_LITERAL); } - YY_BREAK -case 45: -YY_RULE_SETUP -#line 108 "c89.l" -{ return(ELLIPSIS); } - YY_BREAK -case 46: -YY_RULE_SETUP -#line 109 "c89.l" -{ return(RIGHT_ASSIGN); } - YY_BREAK -case 47: -YY_RULE_SETUP -#line 110 "c89.l" -{ return(LEFT_ASSIGN); } - YY_BREAK -case 48: -YY_RULE_SETUP -#line 111 "c89.l" -{ return(ADD_ASSIGN); } - YY_BREAK -case 49: -YY_RULE_SETUP -#line 112 "c89.l" -{ return(SUB_ASSIGN); } - YY_BREAK -case 50: -YY_RULE_SETUP -#line 113 "c89.l" -{ return(MUL_ASSIGN); } - YY_BREAK -case 51: -YY_RULE_SETUP -#line 114 "c89.l" -{ return(DIV_ASSIGN); } - YY_BREAK -case 52: -YY_RULE_SETUP -#line 115 "c89.l" -{ return(MOD_ASSIGN); } - YY_BREAK -case 53: -YY_RULE_SETUP -#line 116 "c89.l" -{ return(AND_ASSIGN); } - YY_BREAK -case 54: -YY_RULE_SETUP -#line 117 "c89.l" -{ return(XOR_ASSIGN); } - YY_BREAK -case 55: -YY_RULE_SETUP -#line 118 "c89.l" -{ return(OR_ASSIGN); } - YY_BREAK -case 56: -YY_RULE_SETUP -#line 119 "c89.l" -{ return(RIGHT_OP); } - YY_BREAK -case 57: -YY_RULE_SETUP -#line 120 "c89.l" -{ return(LEFT_OP); } - YY_BREAK -case 58: -YY_RULE_SETUP -#line 121 "c89.l" -{ return(INC_OP); } - YY_BREAK -case 59: -YY_RULE_SETUP -#line 122 "c89.l" -{ return(DEC_OP); } - YY_BREAK -case 60: -YY_RULE_SETUP -#line 123 "c89.l" -{ return(PTR_OP); } - YY_BREAK -case 61: -YY_RULE_SETUP -#line 124 "c89.l" -{ return(AND_OP); } - YY_BREAK -case 62: -YY_RULE_SETUP -#line 125 "c89.l" -{ return(OR_OP); } - YY_BREAK -case 63: -YY_RULE_SETUP -#line 126 "c89.l" -{ return(LE_OP); } - YY_BREAK -case 64: -YY_RULE_SETUP -#line 127 "c89.l" -{ return(GE_OP); } - YY_BREAK -case 65: -YY_RULE_SETUP -#line 128 "c89.l" -{ return(EQ_OP); } - YY_BREAK -case 66: -YY_RULE_SETUP -#line 129 "c89.l" -{ return(NE_OP); } - YY_BREAK -case 67: -YY_RULE_SETUP -#line 130 "c89.l" -{ return(';'); } - YY_BREAK -case 68: -YY_RULE_SETUP -#line 131 "c89.l" -{ return('{'); } - YY_BREAK -case 69: -YY_RULE_SETUP -#line 132 "c89.l" -{ return('}'); } - YY_BREAK -case 70: -YY_RULE_SETUP -#line 133 "c89.l" -{ return(','); } - YY_BREAK -case 71: -YY_RULE_SETUP -#line 134 "c89.l" -{ return(':'); } - YY_BREAK -case 72: -YY_RULE_SETUP -#line 135 "c89.l" -{ return('='); } - YY_BREAK -case 73: -YY_RULE_SETUP -#line 136 "c89.l" -{ return('('); } - YY_BREAK -case 74: -YY_RULE_SETUP -#line 137 "c89.l" -{ return(')'); } - YY_BREAK -case 75: -YY_RULE_SETUP -#line 138 "c89.l" -{ return('['); } - YY_BREAK -case 76: -YY_RULE_SETUP -#line 139 "c89.l" -{ return(']'); } - YY_BREAK -case 77: -YY_RULE_SETUP -#line 140 "c89.l" -{ return('.'); } - YY_BREAK -case 78: -YY_RULE_SETUP -#line 141 "c89.l" -{ return('&'); } - YY_BREAK -case 79: -YY_RULE_SETUP -#line 142 "c89.l" -{ return('!'); } - YY_BREAK -case 80: -YY_RULE_SETUP -#line 143 "c89.l" -{ return('~'); } - YY_BREAK -case 81: -YY_RULE_SETUP -#line 144 "c89.l" -{ return('-'); } - YY_BREAK -case 82: -YY_RULE_SETUP -#line 145 "c89.l" -{ return('+'); } - YY_BREAK -case 83: -YY_RULE_SETUP -#line 146 "c89.l" -{ return('*'); } - YY_BREAK -case 84: -YY_RULE_SETUP -#line 147 "c89.l" -{ return('/'); } - YY_BREAK -case 85: -YY_RULE_SETUP -#line 148 "c89.l" -{ return('%'); } - YY_BREAK -case 86: -YY_RULE_SETUP -#line 149 "c89.l" -{ return('<'); } - YY_BREAK -case 87: -YY_RULE_SETUP -#line 150 "c89.l" -{ return('>'); } - YY_BREAK -case 88: -YY_RULE_SETUP -#line 151 "c89.l" -{ return('^'); } - YY_BREAK -case 89: -YY_RULE_SETUP -#line 152 "c89.l" -{ return('|'); } - YY_BREAK -case 90: -YY_RULE_SETUP -#line 153 "c89.l" -{ return('?'); } - YY_BREAK -case 91: -/* rule 91 can match eol */ -YY_RULE_SETUP -#line 155 "c89.l" -{ } - YY_BREAK -case 92: -YY_RULE_SETUP -#line 156 "c89.l" -{ /* ignore bad characters */ } - YY_BREAK -case 93: -YY_RULE_SETUP -#line 158 "c89.l" -ECHO; - YY_BREAK -#line 1514 "c89.lex.yy.cpp" -case YY_STATE_EOF(INITIAL): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * c89_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( c89_wrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of user's declarations */ -} /* end of c89_lex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - char *source = yyg->yytext_ptr; - yy_size_t number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (yy_size_t) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - yy_size_t num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - yy_size_t new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - c89_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - c89_restart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) c89_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - yy_state_type yy_current_state; - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 251 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - char *yy_cp = yyg->yy_c_buf_p; - - YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 251 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 250); - - (void)yyg; - return yy_is_jam ? 0 : yy_current_state; -} - -#ifndef YY_NO_UNPUT - - static void yyunput (int c, char * yy_bp , yyscan_t yyscanner) -{ - char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - yy_size_t number_to_move = yyg->yy_n_chars + 2; - char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - if ( c == '\n' ){ - --yylineno; - } - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} - -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - c89_restart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( c89_wrap(yyscanner ) ) - return EOF; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - if ( c == '\n' ) - - do{ yylineno++; - yycolumn=0; - }while(0) -; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void c89_restart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - c89_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - c89__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - c89__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - c89__load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void c89__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * c89_pop_buffer_state(); - * c89_push_buffer_state(new_buffer); - */ - c89_ensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - c89__load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (c89_wrap()) processing, but the only time this flag - * is looked at is after c89_wrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void c89__load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** 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. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE c89__create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) c89_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in c89__create_buffer()" ); - - b->yy_buf_size = (yy_size_t)size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) c89_alloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in c89__create_buffer()" ); - - b->yy_is_our_buffer = 1; - - c89__init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with c89__create_buffer() - * @param yyscanner The scanner object. - */ - void c89__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - c89_free((void *) b->yy_ch_buf ,yyscanner ); - - c89_free((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a c89_restart() or at EOF. - */ - static void c89__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - c89__flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then c89__init_buffer was _probably_ - * called from c89_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - 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. - * @param yyscanner The scanner object. - */ - void c89__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - c89__load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void c89_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - c89_ensure_buffer_stack(yyscanner); - - /* This block is copied from c89__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from c89__switch_to_buffer. */ - c89__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void c89_pop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - c89__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - c89__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void c89_ensure_buffer_stack (yyscan_t yyscanner) -{ - yy_size_t num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; // After all that talk, this was set to 1 anyways... - yyg->yy_buffer_stack = (struct yy_buffer_state**)c89_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in c89_ensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - yy_size_t grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)c89_realloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in c89_ensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** 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 - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE c89__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) c89_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in c89__scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - c89__switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to c89_lex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * c89__scan_bytes() instead. - */ -YY_BUFFER_STATE c89__scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return c89__scan_bytes(yystr,strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to c89_lex() will - * 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. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE c89__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - yy_size_t i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) c89_alloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in c89__scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = c89__scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in c89__scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE c89_get_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int c89_get_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int c89_get_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *c89_get_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *c89_get_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -yy_size_t c89_get_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *c89_get_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void c89_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param _line_number line number - * @param yyscanner The scanner object. - */ -void c89_set_lineno (int _line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "c89_set_lineno called with no buffer" ); - - yylineno = _line_number; -} - -/** Set the current column. - * @param _column_no column number - * @param yyscanner The scanner object. - */ -void c89_set_column (int _column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - YY_FATAL_ERROR( "c89_set_column called with no buffer" ); - - yycolumn = _column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param _in_str A readable stream. - * @param yyscanner The scanner object. - * @see c89__switch_to_buffer - */ -void c89_set_in (FILE * _in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = _in_str ; -} - -void c89_set_out (FILE * _out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = _out_str ; -} - -int c89_get_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void c89_set_debug (int _bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = _bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -YYSTYPE * c89_get_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void c89_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *c89_get_lloc (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void c89_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* User-visible API */ - -/* c89_lex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int c89_lex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) c89_alloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* c89_lex_init_extra has the same functionality as c89_lex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to c89_alloc in - * the yyextra field. - */ - -int c89_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - c89_set_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) c89_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - c89_set_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from c89_lex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * c89_lex_init() - */ - return 0; -} - -/* c89_lex_destroy is for both reentrant and non-reentrant scanners. */ -int c89_lex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - c89__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - c89_pop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - c89_free(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - c89_free(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * c89_lex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - c89_free ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *c89_alloc (yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - return (void *) malloc( size ); -} - -void *c89_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void c89_free (void * ptr , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - (void)yyg; - free( (char *) ptr ); /* see c89_realloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 158 "c89.l" - - - diff --git a/src/uscxml/plugins/datamodel/c89/parser/c89.output b/src/uscxml/plugins/datamodel/c89/parser/c89.output deleted file mode 100644 index a83648b..0000000 --- a/src/uscxml/plugins/datamodel/c89/parser/c89.output +++ /dev/null @@ -1,6137 +0,0 @@ -State 333 conflicts: 1 shift/reduce - - -Grammar - - 0 $accept: translation_unit $end - - 1 primary_expression: IDENTIFIER - 2 | CONSTANT - 3 | STRING_LITERAL - 4 | '(' expression ')' - - 5 postfix_expression: primary_expression - 6 | postfix_expression '[' expression ']' - 7 | postfix_expression '(' ')' - 8 | postfix_expression '(' argument_expression_list ')' - 9 | postfix_expression '.' IDENTIFIER - 10 | postfix_expression PTR_OP IDENTIFIER - 11 | postfix_expression INC_OP - 12 | postfix_expression DEC_OP - - 13 argument_expression_list: assignment_expression - 14 | argument_expression_list ',' assignment_expression - - 15 unary_expression: postfix_expression - 16 | INC_OP unary_expression - 17 | DEC_OP unary_expression - 18 | unary_operator cast_expression - 19 | SIZEOF unary_expression - 20 | SIZEOF '(' type_name ')' - - 21 unary_operator: '&' - 22 | '*' - 23 | '+' - 24 | '-' - 25 | '~' - 26 | '!' - - 27 cast_expression: unary_expression - 28 | '(' type_name ')' cast_expression - - 29 multiplicative_expression: cast_expression - 30 | multiplicative_expression '*' cast_expression - 31 | multiplicative_expression '/' cast_expression - 32 | multiplicative_expression '%' cast_expression - - 33 additive_expression: multiplicative_expression - 34 | additive_expression '+' multiplicative_expression - 35 | additive_expression '-' multiplicative_expression - - 36 shift_expression: additive_expression - 37 | shift_expression LEFT_OP additive_expression - 38 | shift_expression RIGHT_OP additive_expression - - 39 relational_expression: shift_expression - 40 | relational_expression '<' shift_expression - 41 | relational_expression '>' shift_expression - 42 | relational_expression LE_OP shift_expression - 43 | relational_expression GE_OP shift_expression - - 44 equality_expression: relational_expression - 45 | equality_expression EQ_OP relational_expression - 46 | equality_expression NE_OP relational_expression - - 47 and_expression: equality_expression - 48 | and_expression '&' equality_expression - - 49 exclusive_or_expression: and_expression - 50 | exclusive_or_expression '^' and_expression - - 51 inclusive_or_expression: exclusive_or_expression - 52 | inclusive_or_expression '|' exclusive_or_expression - - 53 logical_and_expression: inclusive_or_expression - 54 | logical_and_expression AND_OP inclusive_or_expression - - 55 logical_or_expression: logical_and_expression - 56 | logical_or_expression OR_OP logical_and_expression - - 57 conditional_expression: logical_or_expression - 58 | logical_or_expression '?' expression ':' conditional_expression - - 59 assignment_expression: conditional_expression - 60 | unary_expression assignment_operator assignment_expression - - 61 assignment_operator: '=' - 62 | MUL_ASSIGN - 63 | DIV_ASSIGN - 64 | MOD_ASSIGN - 65 | ADD_ASSIGN - 66 | SUB_ASSIGN - 67 | LEFT_ASSIGN - 68 | RIGHT_ASSIGN - 69 | AND_ASSIGN - 70 | XOR_ASSIGN - 71 | OR_ASSIGN - - 72 expression: assignment_expression - 73 | expression ',' assignment_expression - - 74 constant_expression: conditional_expression - - 75 declaration: declaration_specifiers ';' - 76 | declaration_specifiers init_declarator_list ';' - - 77 declaration_specifiers: storage_class_specifier - 78 | storage_class_specifier declaration_specifiers - 79 | type_specifier - 80 | type_specifier declaration_specifiers - 81 | type_qualifier - 82 | type_qualifier declaration_specifiers - - 83 init_declarator_list: init_declarator - 84 | init_declarator_list ',' init_declarator - - 85 init_declarator: declarator - 86 | declarator '=' initializer - - 87 storage_class_specifier: TYPEDEF - 88 | EXTERN - 89 | STATIC - 90 | AUTO - 91 | REGISTER - - 92 type_specifier: VOID - 93 | CHAR - 94 | SHORT - 95 | INT - 96 | LONG - 97 | FLOAT - 98 | DOUBLE - 99 | SIGNED - 100 | UNSIGNED - 101 | struct_or_union_specifier - 102 | enum_specifier - 103 | TYPE_NAME - - 104 struct_or_union_specifier: struct_or_union IDENTIFIER '{' struct_declaration_list '}' - 105 | struct_or_union '{' struct_declaration_list '}' - 106 | struct_or_union IDENTIFIER - - 107 struct_or_union: STRUCT - 108 | UNION - - 109 struct_declaration_list: struct_declaration - 110 | struct_declaration_list struct_declaration - - 111 struct_declaration: specifier_qualifier_list struct_declarator_list ';' - - 112 specifier_qualifier_list: type_specifier specifier_qualifier_list - 113 | type_specifier - 114 | type_qualifier specifier_qualifier_list - 115 | type_qualifier - - 116 struct_declarator_list: struct_declarator - 117 | struct_declarator_list ',' struct_declarator - - 118 struct_declarator: declarator - 119 | ':' constant_expression - 120 | declarator ':' constant_expression - - 121 enum_specifier: ENUM '{' enumerator_list '}' - 122 | ENUM IDENTIFIER '{' enumerator_list '}' - 123 | ENUM IDENTIFIER - - 124 enumerator_list: enumerator - 125 | enumerator_list ',' enumerator - - 126 enumerator: IDENTIFIER - 127 | IDENTIFIER '=' constant_expression - - 128 type_qualifier: CONST - 129 | VOLATILE - - 130 declarator: pointer direct_declarator - 131 | direct_declarator - - 132 direct_declarator: IDENTIFIER - 133 | '(' declarator ')' - 134 | direct_declarator '[' constant_expression ']' - 135 | direct_declarator '[' ']' - 136 | direct_declarator '(' parameter_type_list ')' - 137 | direct_declarator '(' identifier_list ')' - 138 | direct_declarator '(' ')' - - 139 pointer: '*' - 140 | '*' type_qualifier_list - 141 | '*' pointer - 142 | '*' type_qualifier_list pointer - - 143 type_qualifier_list: type_qualifier - 144 | type_qualifier_list type_qualifier - - 145 parameter_type_list: parameter_list - 146 | parameter_list ',' ELLIPSIS - - 147 parameter_list: parameter_declaration - 148 | parameter_list ',' parameter_declaration - - 149 parameter_declaration: declaration_specifiers declarator - 150 | declaration_specifiers abstract_declarator - 151 | declaration_specifiers - - 152 identifier_list: IDENTIFIER - 153 | identifier_list ',' IDENTIFIER - - 154 type_name: specifier_qualifier_list - 155 | specifier_qualifier_list abstract_declarator - - 156 abstract_declarator: pointer - 157 | direct_abstract_declarator - 158 | pointer direct_abstract_declarator - - 159 direct_abstract_declarator: '(' abstract_declarator ')' - 160 | '[' ']' - 161 | '[' constant_expression ']' - 162 | direct_abstract_declarator '[' ']' - 163 | direct_abstract_declarator '[' constant_expression ']' - 164 | '(' ')' - 165 | '(' parameter_type_list ')' - 166 | direct_abstract_declarator '(' ')' - 167 | direct_abstract_declarator '(' parameter_type_list ')' - - 168 initializer: assignment_expression - 169 | '{' initializer_list '}' - 170 | '{' initializer_list ',' '}' - - 171 initializer_list: initializer - 172 | initializer_list ',' initializer - - 173 statement: labeled_statement - 174 | compound_statement - 175 | expression_statement - 176 | selection_statement - 177 | iteration_statement - 178 | jump_statement - - 179 labeled_statement: IDENTIFIER ':' statement - 180 | CASE constant_expression ':' statement - 181 | DEFAULT ':' statement - - 182 compound_statement: '{' '}' - 183 | '{' statement_list '}' - 184 | '{' declaration_list '}' - 185 | '{' declaration_list statement_list '}' - - 186 declaration_list: declaration - 187 | declaration_list declaration - - 188 statement_list: statement - 189 | statement_list statement - - 190 expression_statement: ';' - 191 | expression ';' - - 192 selection_statement: IF '(' expression ')' statement - 193 | IF '(' expression ')' statement ELSE statement - 194 | SWITCH '(' expression ')' statement - - 195 iteration_statement: WHILE '(' expression ')' statement - 196 | DO statement WHILE '(' expression ')' ';' - 197 | FOR '(' expression_statement expression_statement ')' statement - 198 | FOR '(' expression_statement expression_statement expression ')' statement - - 199 jump_statement: GOTO IDENTIFIER ';' - 200 | CONTINUE ';' - 201 | BREAK ';' - 202 | RETURN ';' - 203 | RETURN expression ';' - - 204 translation_unit: external_declaration - 205 | translation_unit external_declaration - - 206 external_declaration: function_definition - 207 | declaration - - 208 function_definition: declaration_specifiers declarator declaration_list compound_statement - 209 | declaration_specifiers declarator compound_statement - 210 | declarator declaration_list compound_statement - 211 | declarator compound_statement - - -Terminals, with rules where they appear - -$end (0) 0 -'!' (33) 26 -'%' (37) 32 -'&' (38) 21 48 -'(' (40) 4 7 8 20 28 133 136 137 138 159 164 165 166 167 192 193 194 - 195 196 197 198 -')' (41) 4 7 8 20 28 133 136 137 138 159 164 165 166 167 192 193 194 - 195 196 197 198 -'*' (42) 22 30 139 140 141 142 -'+' (43) 23 34 -',' (44) 14 73 84 117 125 146 148 153 170 172 -'-' (45) 24 35 -'.' (46) 9 -'/' (47) 31 -':' (58) 58 119 120 179 180 181 -';' (59) 75 76 111 190 191 196 199 200 201 202 203 -'<' (60) 40 -'=' (61) 61 86 127 -'>' (62) 41 -'?' (63) 58 -'[' (91) 6 134 135 160 161 162 163 -']' (93) 6 134 135 160 161 162 163 -'^' (94) 50 -'{' (123) 104 105 121 122 169 170 182 183 184 185 -'|' (124) 52 -'}' (125) 104 105 121 122 169 170 182 183 184 185 -'~' (126) 25 -error (256) -IDENTIFIER (258) 1 9 10 104 106 122 123 126 127 132 152 153 179 199 -CONSTANT (259) 2 -STRING_LITERAL (260) 3 -SIZEOF (261) 19 20 -PTR_OP (262) 10 -INC_OP (263) 11 16 -DEC_OP (264) 12 17 -LEFT_OP (265) 37 -RIGHT_OP (266) 38 -LE_OP (267) 42 -GE_OP (268) 43 -EQ_OP (269) 45 -NE_OP (270) 46 -AND_OP (271) 54 -OR_OP (272) 56 -MUL_ASSIGN (273) 62 -DIV_ASSIGN (274) 63 -MOD_ASSIGN (275) 64 -ADD_ASSIGN (276) 65 -SUB_ASSIGN (277) 66 -LEFT_ASSIGN (278) 67 -RIGHT_ASSIGN (279) 68 -AND_ASSIGN (280) 69 -XOR_ASSIGN (281) 70 -OR_ASSIGN (282) 71 -TYPE_NAME (283) 103 -TYPEDEF (284) 87 -EXTERN (285) 88 -STATIC (286) 89 -AUTO (287) 90 -REGISTER (288) 91 -CHAR (289) 93 -SHORT (290) 94 -INT (291) 95 -LONG (292) 96 -SIGNED (293) 99 -UNSIGNED (294) 100 -FLOAT (295) 97 -DOUBLE (296) 98 -CONST (297) 128 -VOLATILE (298) 129 -VOID (299) 92 -STRUCT (300) 107 -UNION (301) 108 -ENUM (302) 121 122 123 -ELLIPSIS (303) 146 -CASE (304) 180 -DEFAULT (305) 181 -IF (306) 192 193 -ELSE (307) 193 -SWITCH (308) 194 -WHILE (309) 195 196 -DO (310) 196 -FOR (311) 197 198 -GOTO (312) 199 -CONTINUE (313) 200 -BREAK (314) 201 -RETURN (315) 202 203 - - -Nonterminals, with rules where they appear - -$accept (85) - on left: 0 -primary_expression (86) - on left: 1 2 3 4, on right: 5 -postfix_expression (87) - on left: 5 6 7 8 9 10 11 12, on right: 6 7 8 9 10 11 12 15 -argument_expression_list (88) - on left: 13 14, on right: 8 14 -unary_expression (89) - on left: 15 16 17 18 19 20, on right: 16 17 19 27 60 -unary_operator (90) - on left: 21 22 23 24 25 26, on right: 18 -cast_expression (91) - on left: 27 28, on right: 18 28 29 30 31 32 -multiplicative_expression (92) - on left: 29 30 31 32, on right: 30 31 32 33 34 35 -additive_expression (93) - on left: 33 34 35, on right: 34 35 36 37 38 -shift_expression (94) - on left: 36 37 38, on right: 37 38 39 40 41 42 43 -relational_expression (95) - on left: 39 40 41 42 43, on right: 40 41 42 43 44 45 46 -equality_expression (96) - on left: 44 45 46, on right: 45 46 47 48 -and_expression (97) - on left: 47 48, on right: 48 49 50 -exclusive_or_expression (98) - on left: 49 50, on right: 50 51 52 -inclusive_or_expression (99) - on left: 51 52, on right: 52 53 54 -logical_and_expression (100) - on left: 53 54, on right: 54 55 56 -logical_or_expression (101) - on left: 55 56, on right: 56 57 58 -conditional_expression (102) - on left: 57 58, on right: 58 59 74 -assignment_expression (103) - on left: 59 60, on right: 13 14 60 72 73 168 -assignment_operator (104) - on left: 61 62 63 64 65 66 67 68 69 70 71, on right: 60 -expression (105) - on left: 72 73, on right: 4 6 58 73 191 192 193 194 195 196 198 - 203 -constant_expression (106) - on left: 74, on right: 119 120 127 134 161 163 180 -declaration (107) - on left: 75 76, on right: 186 187 207 -declaration_specifiers (108) - on left: 77 78 79 80 81 82, on right: 75 76 78 80 82 149 150 151 - 208 209 -init_declarator_list (109) - on left: 83 84, on right: 76 84 -init_declarator (110) - on left: 85 86, on right: 83 84 -storage_class_specifier (111) - on left: 87 88 89 90 91, on right: 77 78 -type_specifier (112) - on left: 92 93 94 95 96 97 98 99 100 101 102 103, on right: 79 - 80 112 113 -struct_or_union_specifier (113) - on left: 104 105 106, on right: 101 -struct_or_union (114) - on left: 107 108, on right: 104 105 106 -struct_declaration_list (115) - on left: 109 110, on right: 104 105 110 -struct_declaration (116) - on left: 111, on right: 109 110 -specifier_qualifier_list (117) - on left: 112 113 114 115, on right: 111 112 114 154 155 -struct_declarator_list (118) - on left: 116 117, on right: 111 117 -struct_declarator (119) - on left: 118 119 120, on right: 116 117 -enum_specifier (120) - on left: 121 122 123, on right: 102 -enumerator_list (121) - on left: 124 125, on right: 121 122 125 -enumerator (122) - on left: 126 127, on right: 124 125 -type_qualifier (123) - on left: 128 129, on right: 81 82 114 115 143 144 -declarator (124) - on left: 130 131, on right: 85 86 118 120 133 149 208 209 210 211 -direct_declarator (125) - on left: 132 133 134 135 136 137 138, on right: 130 131 134 135 - 136 137 138 -pointer (126) - on left: 139 140 141 142, on right: 130 141 142 156 158 -type_qualifier_list (127) - on left: 143 144, on right: 140 142 144 -parameter_type_list (128) - on left: 145 146, on right: 136 165 167 -parameter_list (129) - on left: 147 148, on right: 145 146 148 -parameter_declaration (130) - on left: 149 150 151, on right: 147 148 -identifier_list (131) - on left: 152 153, on right: 137 153 -type_name (132) - on left: 154 155, on right: 20 28 -abstract_declarator (133) - on left: 156 157 158, on right: 150 155 159 -direct_abstract_declarator (134) - on left: 159 160 161 162 163 164 165 166 167, on right: 157 158 - 162 163 166 167 -initializer (135) - on left: 168 169 170, on right: 86 171 172 -initializer_list (136) - on left: 171 172, on right: 169 170 172 -statement (137) - on left: 173 174 175 176 177 178, on right: 179 180 181 188 189 - 192 193 194 195 196 197 198 -labeled_statement (138) - on left: 179 180 181, on right: 173 -compound_statement (139) - on left: 182 183 184 185, on right: 174 208 209 210 211 -declaration_list (140) - on left: 186 187, on right: 184 185 187 208 210 -statement_list (141) - on left: 188 189, on right: 183 185 189 -expression_statement (142) - on left: 190 191, on right: 175 197 198 -selection_statement (143) - on left: 192 193 194, on right: 176 -iteration_statement (144) - on left: 195 196 197 198, on right: 177 -jump_statement (145) - on left: 199 200 201 202 203, on right: 178 -translation_unit (146) - on left: 204 205, on right: 0 205 -external_declaration (147) - on left: 206 207, on right: 204 205 -function_definition (148) - on left: 208 209 210 211, on right: 206 - - -State 0 - - 0 $accept: . translation_unit $end - - IDENTIFIER shift, and go to state 1 - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '(' shift, and go to state 22 - '*' shift, and go to state 23 - - declaration go to state 24 - declaration_specifiers go to state 25 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - declarator go to state 32 - direct_declarator go to state 33 - pointer go to state 34 - translation_unit go to state 35 - external_declaration go to state 36 - function_definition go to state 37 - - -State 1 - - 132 direct_declarator: IDENTIFIER . - - $default reduce using rule 132 (direct_declarator) - - -State 2 - - 103 type_specifier: TYPE_NAME . - - $default reduce using rule 103 (type_specifier) - - -State 3 - - 87 storage_class_specifier: TYPEDEF . - - $default reduce using rule 87 (storage_class_specifier) - - -State 4 - - 88 storage_class_specifier: EXTERN . - - $default reduce using rule 88 (storage_class_specifier) - - -State 5 - - 89 storage_class_specifier: STATIC . - - $default reduce using rule 89 (storage_class_specifier) - - -State 6 - - 90 storage_class_specifier: AUTO . - - $default reduce using rule 90 (storage_class_specifier) - - -State 7 - - 91 storage_class_specifier: REGISTER . - - $default reduce using rule 91 (storage_class_specifier) - - -State 8 - - 93 type_specifier: CHAR . - - $default reduce using rule 93 (type_specifier) - - -State 9 - - 94 type_specifier: SHORT . - - $default reduce using rule 94 (type_specifier) - - -State 10 - - 95 type_specifier: INT . - - $default reduce using rule 95 (type_specifier) - - -State 11 - - 96 type_specifier: LONG . - - $default reduce using rule 96 (type_specifier) - - -State 12 - - 99 type_specifier: SIGNED . - - $default reduce using rule 99 (type_specifier) - - -State 13 - - 100 type_specifier: UNSIGNED . - - $default reduce using rule 100 (type_specifier) - - -State 14 - - 97 type_specifier: FLOAT . - - $default reduce using rule 97 (type_specifier) - - -State 15 - - 98 type_specifier: DOUBLE . - - $default reduce using rule 98 (type_specifier) - - -State 16 - - 128 type_qualifier: CONST . - - $default reduce using rule 128 (type_qualifier) - - -State 17 - - 129 type_qualifier: VOLATILE . - - $default reduce using rule 129 (type_qualifier) - - -State 18 - - 92 type_specifier: VOID . - - $default reduce using rule 92 (type_specifier) - - -State 19 - - 107 struct_or_union: STRUCT . - - $default reduce using rule 107 (struct_or_union) - - -State 20 - - 108 struct_or_union: UNION . - - $default reduce using rule 108 (struct_or_union) - - -State 21 - - 121 enum_specifier: ENUM . '{' enumerator_list '}' - 122 | ENUM . IDENTIFIER '{' enumerator_list '}' - 123 | ENUM . IDENTIFIER - - IDENTIFIER shift, and go to state 38 - '{' shift, and go to state 39 - - -State 22 - - 133 direct_declarator: '(' . declarator ')' - - IDENTIFIER shift, and go to state 1 - '(' shift, and go to state 22 - '*' shift, and go to state 23 - - declarator go to state 40 - direct_declarator go to state 33 - pointer go to state 34 - - -State 23 - - 139 pointer: '*' . - 140 | '*' . type_qualifier_list - 141 | '*' . pointer - 142 | '*' . type_qualifier_list pointer - - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - '*' shift, and go to state 23 - - $default reduce using rule 139 (pointer) - - type_qualifier go to state 41 - pointer go to state 42 - type_qualifier_list go to state 43 - - -State 24 - - 207 external_declaration: declaration . - - $default reduce using rule 207 (external_declaration) - - -State 25 - - 75 declaration: declaration_specifiers . ';' - 76 | declaration_specifiers . init_declarator_list ';' - 208 function_definition: declaration_specifiers . declarator declaration_list compound_statement - 209 | declaration_specifiers . declarator compound_statement - - IDENTIFIER shift, and go to state 1 - '(' shift, and go to state 22 - '*' shift, and go to state 23 - ';' shift, and go to state 44 - - init_declarator_list go to state 45 - init_declarator go to state 46 - declarator go to state 47 - direct_declarator go to state 33 - pointer go to state 34 - - -State 26 - - 77 declaration_specifiers: storage_class_specifier . - 78 | storage_class_specifier . declaration_specifiers - - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - - $default reduce using rule 77 (declaration_specifiers) - - declaration_specifiers go to state 48 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - - -State 27 - - 79 declaration_specifiers: type_specifier . - 80 | type_specifier . declaration_specifiers - - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - - $default reduce using rule 79 (declaration_specifiers) - - declaration_specifiers go to state 49 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - - -State 28 - - 101 type_specifier: struct_or_union_specifier . - - $default reduce using rule 101 (type_specifier) - - -State 29 - - 104 struct_or_union_specifier: struct_or_union . IDENTIFIER '{' struct_declaration_list '}' - 105 | struct_or_union . '{' struct_declaration_list '}' - 106 | struct_or_union . IDENTIFIER - - IDENTIFIER shift, and go to state 50 - '{' shift, and go to state 51 - - -State 30 - - 102 type_specifier: enum_specifier . - - $default reduce using rule 102 (type_specifier) - - -State 31 - - 81 declaration_specifiers: type_qualifier . - 82 | type_qualifier . declaration_specifiers - - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - - $default reduce using rule 81 (declaration_specifiers) - - declaration_specifiers go to state 52 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - - -State 32 - - 210 function_definition: declarator . declaration_list compound_statement - 211 | declarator . compound_statement - - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '{' shift, and go to state 53 - - declaration go to state 54 - declaration_specifiers go to state 55 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - compound_statement go to state 56 - declaration_list go to state 57 - - -State 33 - - 131 declarator: direct_declarator . - 134 direct_declarator: direct_declarator . '[' constant_expression ']' - 135 | direct_declarator . '[' ']' - 136 | direct_declarator . '(' parameter_type_list ')' - 137 | direct_declarator . '(' identifier_list ')' - 138 | direct_declarator . '(' ')' - - '(' shift, and go to state 58 - '[' shift, and go to state 59 - - $default reduce using rule 131 (declarator) - - -State 34 - - 130 declarator: pointer . direct_declarator - - IDENTIFIER shift, and go to state 1 - '(' shift, and go to state 22 - - direct_declarator go to state 60 - - -State 35 - - 0 $accept: translation_unit . $end - 205 translation_unit: translation_unit . external_declaration - - $end shift, and go to state 61 - IDENTIFIER shift, and go to state 1 - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '(' shift, and go to state 22 - '*' shift, and go to state 23 - - declaration go to state 24 - declaration_specifiers go to state 25 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - declarator go to state 32 - direct_declarator go to state 33 - pointer go to state 34 - external_declaration go to state 62 - function_definition go to state 37 - - -State 36 - - 204 translation_unit: external_declaration . - - $default reduce using rule 204 (translation_unit) - - -State 37 - - 206 external_declaration: function_definition . - - $default reduce using rule 206 (external_declaration) - - -State 38 - - 122 enum_specifier: ENUM IDENTIFIER . '{' enumerator_list '}' - 123 | ENUM IDENTIFIER . - - '{' shift, and go to state 63 - - $default reduce using rule 123 (enum_specifier) - - -State 39 - - 121 enum_specifier: ENUM '{' . enumerator_list '}' - - IDENTIFIER shift, and go to state 64 - - enumerator_list go to state 65 - enumerator go to state 66 - - -State 40 - - 133 direct_declarator: '(' declarator . ')' - - ')' shift, and go to state 67 - - -State 41 - - 143 type_qualifier_list: type_qualifier . - - $default reduce using rule 143 (type_qualifier_list) - - -State 42 - - 141 pointer: '*' pointer . - - $default reduce using rule 141 (pointer) - - -State 43 - - 140 pointer: '*' type_qualifier_list . - 142 | '*' type_qualifier_list . pointer - 144 type_qualifier_list: type_qualifier_list . type_qualifier - - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - '*' shift, and go to state 23 - - $default reduce using rule 140 (pointer) - - type_qualifier go to state 68 - pointer go to state 69 - - -State 44 - - 75 declaration: declaration_specifiers ';' . - - $default reduce using rule 75 (declaration) - - -State 45 - - 76 declaration: declaration_specifiers init_declarator_list . ';' - 84 init_declarator_list: init_declarator_list . ',' init_declarator - - ',' shift, and go to state 70 - ';' shift, and go to state 71 - - -State 46 - - 83 init_declarator_list: init_declarator . - - $default reduce using rule 83 (init_declarator_list) - - -State 47 - - 85 init_declarator: declarator . - 86 | declarator . '=' initializer - 208 function_definition: declaration_specifiers declarator . declaration_list compound_statement - 209 | declaration_specifiers declarator . compound_statement - - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '=' shift, and go to state 72 - '{' shift, and go to state 53 - - $default reduce using rule 85 (init_declarator) - - declaration go to state 54 - declaration_specifiers go to state 55 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - compound_statement go to state 73 - declaration_list go to state 74 - - -State 48 - - 78 declaration_specifiers: storage_class_specifier declaration_specifiers . - - $default reduce using rule 78 (declaration_specifiers) - - -State 49 - - 80 declaration_specifiers: type_specifier declaration_specifiers . - - $default reduce using rule 80 (declaration_specifiers) - - -State 50 - - 104 struct_or_union_specifier: struct_or_union IDENTIFIER . '{' struct_declaration_list '}' - 106 | struct_or_union IDENTIFIER . - - '{' shift, and go to state 75 - - $default reduce using rule 106 (struct_or_union_specifier) - - -State 51 - - 105 struct_or_union_specifier: struct_or_union '{' . struct_declaration_list '}' - - TYPE_NAME shift, and go to state 2 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - - type_specifier go to state 76 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - struct_declaration_list go to state 77 - struct_declaration go to state 78 - specifier_qualifier_list go to state 79 - enum_specifier go to state 30 - type_qualifier go to state 80 - - -State 52 - - 82 declaration_specifiers: type_qualifier declaration_specifiers . - - $default reduce using rule 82 (declaration_specifiers) - - -State 53 - - 182 compound_statement: '{' . '}' - 183 | '{' . statement_list '}' - 184 | '{' . declaration_list '}' - 185 | '{' . declaration_list statement_list '}' - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - '}' shift, and go to state 106 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - declaration go to state 54 - declaration_specifiers go to state 55 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - statement go to state 125 - labeled_statement go to state 126 - compound_statement go to state 127 - declaration_list go to state 128 - statement_list go to state 129 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 54 - - 186 declaration_list: declaration . - - $default reduce using rule 186 (declaration_list) - - -State 55 - - 75 declaration: declaration_specifiers . ';' - 76 | declaration_specifiers . init_declarator_list ';' - - IDENTIFIER shift, and go to state 1 - '(' shift, and go to state 22 - '*' shift, and go to state 23 - ';' shift, and go to state 44 - - init_declarator_list go to state 45 - init_declarator go to state 46 - declarator go to state 134 - direct_declarator go to state 33 - pointer go to state 34 - - -State 56 - - 211 function_definition: declarator compound_statement . - - $default reduce using rule 211 (function_definition) - - -State 57 - - 187 declaration_list: declaration_list . declaration - 210 function_definition: declarator declaration_list . compound_statement - - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '{' shift, and go to state 53 - - declaration go to state 135 - declaration_specifiers go to state 55 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - compound_statement go to state 136 - - -State 58 - - 136 direct_declarator: direct_declarator '(' . parameter_type_list ')' - 137 | direct_declarator '(' . identifier_list ')' - 138 | direct_declarator '(' . ')' - - IDENTIFIER shift, and go to state 137 - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - ')' shift, and go to state 138 - - declaration_specifiers go to state 139 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - parameter_type_list go to state 140 - parameter_list go to state 141 - parameter_declaration go to state 142 - identifier_list go to state 143 - - -State 59 - - 134 direct_declarator: direct_declarator '[' . constant_expression ']' - 135 | direct_declarator '[' . ']' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - ']' shift, and go to state 145 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 147 - constant_expression go to state 148 - - -State 60 - - 130 declarator: pointer direct_declarator . - 134 direct_declarator: direct_declarator . '[' constant_expression ']' - 135 | direct_declarator . '[' ']' - 136 | direct_declarator . '(' parameter_type_list ')' - 137 | direct_declarator . '(' identifier_list ')' - 138 | direct_declarator . '(' ')' - - '(' shift, and go to state 58 - '[' shift, and go to state 59 - - $default reduce using rule 130 (declarator) - - -State 61 - - 0 $accept: translation_unit $end . - - $default accept - - -State 62 - - 205 translation_unit: translation_unit external_declaration . - - $default reduce using rule 205 (translation_unit) - - -State 63 - - 122 enum_specifier: ENUM IDENTIFIER '{' . enumerator_list '}' - - IDENTIFIER shift, and go to state 64 - - enumerator_list go to state 149 - enumerator go to state 66 - - -State 64 - - 126 enumerator: IDENTIFIER . - 127 | IDENTIFIER . '=' constant_expression - - '=' shift, and go to state 150 - - $default reduce using rule 126 (enumerator) - - -State 65 - - 121 enum_specifier: ENUM '{' enumerator_list . '}' - 125 enumerator_list: enumerator_list . ',' enumerator - - ',' shift, and go to state 151 - '}' shift, and go to state 152 - - -State 66 - - 124 enumerator_list: enumerator . - - $default reduce using rule 124 (enumerator_list) - - -State 67 - - 133 direct_declarator: '(' declarator ')' . - - $default reduce using rule 133 (direct_declarator) - - -State 68 - - 144 type_qualifier_list: type_qualifier_list type_qualifier . - - $default reduce using rule 144 (type_qualifier_list) - - -State 69 - - 142 pointer: '*' type_qualifier_list pointer . - - $default reduce using rule 142 (pointer) - - -State 70 - - 84 init_declarator_list: init_declarator_list ',' . init_declarator - - IDENTIFIER shift, and go to state 1 - '(' shift, and go to state 22 - '*' shift, and go to state 23 - - init_declarator go to state 153 - declarator go to state 134 - direct_declarator go to state 33 - pointer go to state 34 - - -State 71 - - 76 declaration: declaration_specifiers init_declarator_list ';' . - - $default reduce using rule 76 (declaration) - - -State 72 - - 86 init_declarator: declarator '=' . initializer - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - '{' shift, and go to state 154 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 155 - initializer go to state 156 - - -State 73 - - 209 function_definition: declaration_specifiers declarator compound_statement . - - $default reduce using rule 209 (function_definition) - - -State 74 - - 187 declaration_list: declaration_list . declaration - 208 function_definition: declaration_specifiers declarator declaration_list . compound_statement - - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '{' shift, and go to state 53 - - declaration go to state 135 - declaration_specifiers go to state 55 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - compound_statement go to state 157 - - -State 75 - - 104 struct_or_union_specifier: struct_or_union IDENTIFIER '{' . struct_declaration_list '}' - - TYPE_NAME shift, and go to state 2 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - - type_specifier go to state 76 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - struct_declaration_list go to state 158 - struct_declaration go to state 78 - specifier_qualifier_list go to state 79 - enum_specifier go to state 30 - type_qualifier go to state 80 - - -State 76 - - 112 specifier_qualifier_list: type_specifier . specifier_qualifier_list - 113 | type_specifier . - - TYPE_NAME shift, and go to state 2 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - - $default reduce using rule 113 (specifier_qualifier_list) - - type_specifier go to state 76 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - specifier_qualifier_list go to state 159 - enum_specifier go to state 30 - type_qualifier go to state 80 - - -State 77 - - 105 struct_or_union_specifier: struct_or_union '{' struct_declaration_list . '}' - 110 struct_declaration_list: struct_declaration_list . struct_declaration - - TYPE_NAME shift, and go to state 2 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '}' shift, and go to state 160 - - type_specifier go to state 76 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - struct_declaration go to state 161 - specifier_qualifier_list go to state 79 - enum_specifier go to state 30 - type_qualifier go to state 80 - - -State 78 - - 109 struct_declaration_list: struct_declaration . - - $default reduce using rule 109 (struct_declaration_list) - - -State 79 - - 111 struct_declaration: specifier_qualifier_list . struct_declarator_list ';' - - IDENTIFIER shift, and go to state 1 - '(' shift, and go to state 22 - '*' shift, and go to state 23 - ':' shift, and go to state 162 - - struct_declarator_list go to state 163 - struct_declarator go to state 164 - declarator go to state 165 - direct_declarator go to state 33 - pointer go to state 34 - - -State 80 - - 114 specifier_qualifier_list: type_qualifier . specifier_qualifier_list - 115 | type_qualifier . - - TYPE_NAME shift, and go to state 2 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - - $default reduce using rule 115 (specifier_qualifier_list) - - type_specifier go to state 76 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - specifier_qualifier_list go to state 166 - enum_specifier go to state 30 - type_qualifier go to state 80 - - -State 81 - - 1 primary_expression: IDENTIFIER . - 179 labeled_statement: IDENTIFIER . ':' statement - - ':' shift, and go to state 167 - - $default reduce using rule 1 (primary_expression) - - -State 82 - - 2 primary_expression: CONSTANT . - - $default reduce using rule 2 (primary_expression) - - -State 83 - - 3 primary_expression: STRING_LITERAL . - - $default reduce using rule 3 (primary_expression) - - -State 84 - - 19 unary_expression: SIZEOF . unary_expression - 20 | SIZEOF . '(' type_name ')' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 168 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 169 - unary_operator go to state 110 - - -State 85 - - 16 unary_expression: INC_OP . unary_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 170 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 171 - unary_operator go to state 110 - - -State 86 - - 17 unary_expression: DEC_OP . unary_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 170 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 172 - unary_operator go to state 110 - - -State 87 - - 180 labeled_statement: CASE . constant_expression ':' statement - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 147 - constant_expression go to state 173 - - -State 88 - - 181 labeled_statement: DEFAULT . ':' statement - - ':' shift, and go to state 174 - - -State 89 - - 192 selection_statement: IF . '(' expression ')' statement - 193 | IF . '(' expression ')' statement ELSE statement - - '(' shift, and go to state 175 - - -State 90 - - 194 selection_statement: SWITCH . '(' expression ')' statement - - '(' shift, and go to state 176 - - -State 91 - - 195 iteration_statement: WHILE . '(' expression ')' statement - - '(' shift, and go to state 177 - - -State 92 - - 196 iteration_statement: DO . statement WHILE '(' expression ')' ';' - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 178 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 93 - - 197 iteration_statement: FOR . '(' expression_statement expression_statement ')' statement - 198 | FOR . '(' expression_statement expression_statement expression ')' statement - - '(' shift, and go to state 179 - - -State 94 - - 199 jump_statement: GOTO . IDENTIFIER ';' - - IDENTIFIER shift, and go to state 180 - - -State 95 - - 200 jump_statement: CONTINUE . ';' - - ';' shift, and go to state 181 - - -State 96 - - 201 jump_statement: BREAK . ';' - - ';' shift, and go to state 182 - - -State 97 - - 202 jump_statement: RETURN . ';' - 203 | RETURN . expression ';' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 183 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 184 - - -State 98 - - 4 primary_expression: '(' . expression ')' - 28 cast_expression: '(' . type_name ')' cast_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - TYPE_NAME shift, and go to state 2 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 185 - type_specifier go to state 76 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - specifier_qualifier_list go to state 186 - enum_specifier go to state 30 - type_qualifier go to state 80 - type_name go to state 187 - - -State 99 - - 21 unary_operator: '&' . - - $default reduce using rule 21 (unary_operator) - - -State 100 - - 22 unary_operator: '*' . - - $default reduce using rule 22 (unary_operator) - - -State 101 - - 23 unary_operator: '+' . - - $default reduce using rule 23 (unary_operator) - - -State 102 - - 24 unary_operator: '-' . - - $default reduce using rule 24 (unary_operator) - - -State 103 - - 25 unary_operator: '~' . - - $default reduce using rule 25 (unary_operator) - - -State 104 - - 26 unary_operator: '!' . - - $default reduce using rule 26 (unary_operator) - - -State 105 - - 190 expression_statement: ';' . - - $default reduce using rule 190 (expression_statement) - - -State 106 - - 182 compound_statement: '{' '}' . - - $default reduce using rule 182 (compound_statement) - - -State 107 - - 5 postfix_expression: primary_expression . - - $default reduce using rule 5 (postfix_expression) - - -State 108 - - 6 postfix_expression: postfix_expression . '[' expression ']' - 7 | postfix_expression . '(' ')' - 8 | postfix_expression . '(' argument_expression_list ')' - 9 | postfix_expression . '.' IDENTIFIER - 10 | postfix_expression . PTR_OP IDENTIFIER - 11 | postfix_expression . INC_OP - 12 | postfix_expression . DEC_OP - 15 unary_expression: postfix_expression . - - PTR_OP shift, and go to state 188 - INC_OP shift, and go to state 189 - DEC_OP shift, and go to state 190 - '(' shift, and go to state 191 - '[' shift, and go to state 192 - '.' shift, and go to state 193 - - $default reduce using rule 15 (unary_expression) - - -State 109 - - 27 cast_expression: unary_expression . - 60 assignment_expression: unary_expression . assignment_operator assignment_expression - - MUL_ASSIGN shift, and go to state 194 - DIV_ASSIGN shift, and go to state 195 - MOD_ASSIGN shift, and go to state 196 - ADD_ASSIGN shift, and go to state 197 - SUB_ASSIGN shift, and go to state 198 - LEFT_ASSIGN shift, and go to state 199 - RIGHT_ASSIGN shift, and go to state 200 - AND_ASSIGN shift, and go to state 201 - XOR_ASSIGN shift, and go to state 202 - OR_ASSIGN shift, and go to state 203 - '=' shift, and go to state 204 - - $default reduce using rule 27 (cast_expression) - - assignment_operator go to state 205 - - -State 110 - - 18 unary_expression: unary_operator . cast_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 206 - - -State 111 - - 29 multiplicative_expression: cast_expression . - - $default reduce using rule 29 (multiplicative_expression) - - -State 112 - - 30 multiplicative_expression: multiplicative_expression . '*' cast_expression - 31 | multiplicative_expression . '/' cast_expression - 32 | multiplicative_expression . '%' cast_expression - 33 additive_expression: multiplicative_expression . - - '*' shift, and go to state 207 - '/' shift, and go to state 208 - '%' shift, and go to state 209 - - $default reduce using rule 33 (additive_expression) - - -State 113 - - 34 additive_expression: additive_expression . '+' multiplicative_expression - 35 | additive_expression . '-' multiplicative_expression - 36 shift_expression: additive_expression . - - '+' shift, and go to state 210 - '-' shift, and go to state 211 - - $default reduce using rule 36 (shift_expression) - - -State 114 - - 37 shift_expression: shift_expression . LEFT_OP additive_expression - 38 | shift_expression . RIGHT_OP additive_expression - 39 relational_expression: shift_expression . - - LEFT_OP shift, and go to state 212 - RIGHT_OP shift, and go to state 213 - - $default reduce using rule 39 (relational_expression) - - -State 115 - - 40 relational_expression: relational_expression . '<' shift_expression - 41 | relational_expression . '>' shift_expression - 42 | relational_expression . LE_OP shift_expression - 43 | relational_expression . GE_OP shift_expression - 44 equality_expression: relational_expression . - - LE_OP shift, and go to state 214 - GE_OP shift, and go to state 215 - '<' shift, and go to state 216 - '>' shift, and go to state 217 - - $default reduce using rule 44 (equality_expression) - - -State 116 - - 45 equality_expression: equality_expression . EQ_OP relational_expression - 46 | equality_expression . NE_OP relational_expression - 47 and_expression: equality_expression . - - EQ_OP shift, and go to state 218 - NE_OP shift, and go to state 219 - - $default reduce using rule 47 (and_expression) - - -State 117 - - 48 and_expression: and_expression . '&' equality_expression - 49 exclusive_or_expression: and_expression . - - '&' shift, and go to state 220 - - $default reduce using rule 49 (exclusive_or_expression) - - -State 118 - - 50 exclusive_or_expression: exclusive_or_expression . '^' and_expression - 51 inclusive_or_expression: exclusive_or_expression . - - '^' shift, and go to state 221 - - $default reduce using rule 51 (inclusive_or_expression) - - -State 119 - - 52 inclusive_or_expression: inclusive_or_expression . '|' exclusive_or_expression - 53 logical_and_expression: inclusive_or_expression . - - '|' shift, and go to state 222 - - $default reduce using rule 53 (logical_and_expression) - - -State 120 - - 54 logical_and_expression: logical_and_expression . AND_OP inclusive_or_expression - 55 logical_or_expression: logical_and_expression . - - AND_OP shift, and go to state 223 - - $default reduce using rule 55 (logical_or_expression) - - -State 121 - - 56 logical_or_expression: logical_or_expression . OR_OP logical_and_expression - 57 conditional_expression: logical_or_expression . - 58 | logical_or_expression . '?' expression ':' conditional_expression - - OR_OP shift, and go to state 224 - '?' shift, and go to state 225 - - $default reduce using rule 57 (conditional_expression) - - -State 122 - - 59 assignment_expression: conditional_expression . - - $default reduce using rule 59 (assignment_expression) - - -State 123 - - 72 expression: assignment_expression . - - $default reduce using rule 72 (expression) - - -State 124 - - 73 expression: expression . ',' assignment_expression - 191 expression_statement: expression . ';' - - ',' shift, and go to state 226 - ';' shift, and go to state 227 - - -State 125 - - 188 statement_list: statement . - - $default reduce using rule 188 (statement_list) - - -State 126 - - 173 statement: labeled_statement . - - $default reduce using rule 173 (statement) - - -State 127 - - 174 statement: compound_statement . - - $default reduce using rule 174 (statement) - - -State 128 - - 184 compound_statement: '{' declaration_list . '}' - 185 | '{' declaration_list . statement_list '}' - 187 declaration_list: declaration_list . declaration - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - '}' shift, and go to state 228 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - declaration go to state 135 - declaration_specifiers go to state 55 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - statement go to state 125 - labeled_statement go to state 126 - compound_statement go to state 127 - statement_list go to state 229 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 129 - - 183 compound_statement: '{' statement_list . '}' - 189 statement_list: statement_list . statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - '}' shift, and go to state 230 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 231 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 130 - - 175 statement: expression_statement . - - $default reduce using rule 175 (statement) - - -State 131 - - 176 statement: selection_statement . - - $default reduce using rule 176 (statement) - - -State 132 - - 177 statement: iteration_statement . - - $default reduce using rule 177 (statement) - - -State 133 - - 178 statement: jump_statement . - - $default reduce using rule 178 (statement) - - -State 134 - - 85 init_declarator: declarator . - 86 | declarator . '=' initializer - - '=' shift, and go to state 72 - - $default reduce using rule 85 (init_declarator) - - -State 135 - - 187 declaration_list: declaration_list declaration . - - $default reduce using rule 187 (declaration_list) - - -State 136 - - 210 function_definition: declarator declaration_list compound_statement . - - $default reduce using rule 210 (function_definition) - - -State 137 - - 152 identifier_list: IDENTIFIER . - - $default reduce using rule 152 (identifier_list) - - -State 138 - - 138 direct_declarator: direct_declarator '(' ')' . - - $default reduce using rule 138 (direct_declarator) - - -State 139 - - 149 parameter_declaration: declaration_specifiers . declarator - 150 | declaration_specifiers . abstract_declarator - 151 | declaration_specifiers . - - IDENTIFIER shift, and go to state 1 - '(' shift, and go to state 232 - '[' shift, and go to state 233 - '*' shift, and go to state 23 - - $default reduce using rule 151 (parameter_declaration) - - declarator go to state 234 - direct_declarator go to state 33 - pointer go to state 235 - abstract_declarator go to state 236 - direct_abstract_declarator go to state 237 - - -State 140 - - 136 direct_declarator: direct_declarator '(' parameter_type_list . ')' - - ')' shift, and go to state 238 - - -State 141 - - 145 parameter_type_list: parameter_list . - 146 | parameter_list . ',' ELLIPSIS - 148 parameter_list: parameter_list . ',' parameter_declaration - - ',' shift, and go to state 239 - - $default reduce using rule 145 (parameter_type_list) - - -State 142 - - 147 parameter_list: parameter_declaration . - - $default reduce using rule 147 (parameter_list) - - -State 143 - - 137 direct_declarator: direct_declarator '(' identifier_list . ')' - 153 identifier_list: identifier_list . ',' IDENTIFIER - - ')' shift, and go to state 240 - ',' shift, and go to state 241 - - -State 144 - - 1 primary_expression: IDENTIFIER . - - $default reduce using rule 1 (primary_expression) - - -State 145 - - 135 direct_declarator: direct_declarator '[' ']' . - - $default reduce using rule 135 (direct_declarator) - - -State 146 - - 27 cast_expression: unary_expression . - - $default reduce using rule 27 (cast_expression) - - -State 147 - - 74 constant_expression: conditional_expression . - - $default reduce using rule 74 (constant_expression) - - -State 148 - - 134 direct_declarator: direct_declarator '[' constant_expression . ']' - - ']' shift, and go to state 242 - - -State 149 - - 122 enum_specifier: ENUM IDENTIFIER '{' enumerator_list . '}' - 125 enumerator_list: enumerator_list . ',' enumerator - - ',' shift, and go to state 151 - '}' shift, and go to state 243 - - -State 150 - - 127 enumerator: IDENTIFIER '=' . constant_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 147 - constant_expression go to state 244 - - -State 151 - - 125 enumerator_list: enumerator_list ',' . enumerator - - IDENTIFIER shift, and go to state 64 - - enumerator go to state 245 - - -State 152 - - 121 enum_specifier: ENUM '{' enumerator_list '}' . - - $default reduce using rule 121 (enum_specifier) - - -State 153 - - 84 init_declarator_list: init_declarator_list ',' init_declarator . - - $default reduce using rule 84 (init_declarator_list) - - -State 154 - - 169 initializer: '{' . initializer_list '}' - 170 | '{' . initializer_list ',' '}' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - '{' shift, and go to state 154 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 155 - initializer go to state 246 - initializer_list go to state 247 - - -State 155 - - 168 initializer: assignment_expression . - - $default reduce using rule 168 (initializer) - - -State 156 - - 86 init_declarator: declarator '=' initializer . - - $default reduce using rule 86 (init_declarator) - - -State 157 - - 208 function_definition: declaration_specifiers declarator declaration_list compound_statement . - - $default reduce using rule 208 (function_definition) - - -State 158 - - 104 struct_or_union_specifier: struct_or_union IDENTIFIER '{' struct_declaration_list . '}' - 110 struct_declaration_list: struct_declaration_list . struct_declaration - - TYPE_NAME shift, and go to state 2 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '}' shift, and go to state 248 - - type_specifier go to state 76 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - struct_declaration go to state 161 - specifier_qualifier_list go to state 79 - enum_specifier go to state 30 - type_qualifier go to state 80 - - -State 159 - - 112 specifier_qualifier_list: type_specifier specifier_qualifier_list . - - $default reduce using rule 112 (specifier_qualifier_list) - - -State 160 - - 105 struct_or_union_specifier: struct_or_union '{' struct_declaration_list '}' . - - $default reduce using rule 105 (struct_or_union_specifier) - - -State 161 - - 110 struct_declaration_list: struct_declaration_list struct_declaration . - - $default reduce using rule 110 (struct_declaration_list) - - -State 162 - - 119 struct_declarator: ':' . constant_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 147 - constant_expression go to state 249 - - -State 163 - - 111 struct_declaration: specifier_qualifier_list struct_declarator_list . ';' - 117 struct_declarator_list: struct_declarator_list . ',' struct_declarator - - ',' shift, and go to state 250 - ';' shift, and go to state 251 - - -State 164 - - 116 struct_declarator_list: struct_declarator . - - $default reduce using rule 116 (struct_declarator_list) - - -State 165 - - 118 struct_declarator: declarator . - 120 | declarator . ':' constant_expression - - ':' shift, and go to state 252 - - $default reduce using rule 118 (struct_declarator) - - -State 166 - - 114 specifier_qualifier_list: type_qualifier specifier_qualifier_list . - - $default reduce using rule 114 (specifier_qualifier_list) - - -State 167 - - 179 labeled_statement: IDENTIFIER ':' . statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 253 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 168 - - 4 primary_expression: '(' . expression ')' - 20 unary_expression: SIZEOF '(' . type_name ')' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - TYPE_NAME shift, and go to state 2 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 185 - type_specifier go to state 76 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - specifier_qualifier_list go to state 186 - enum_specifier go to state 30 - type_qualifier go to state 80 - type_name go to state 254 - - -State 169 - - 19 unary_expression: SIZEOF unary_expression . - - $default reduce using rule 19 (unary_expression) - - -State 170 - - 4 primary_expression: '(' . expression ')' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 185 - - -State 171 - - 16 unary_expression: INC_OP unary_expression . - - $default reduce using rule 16 (unary_expression) - - -State 172 - - 17 unary_expression: DEC_OP unary_expression . - - $default reduce using rule 17 (unary_expression) - - -State 173 - - 180 labeled_statement: CASE constant_expression . ':' statement - - ':' shift, and go to state 255 - - -State 174 - - 181 labeled_statement: DEFAULT ':' . statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 256 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 175 - - 192 selection_statement: IF '(' . expression ')' statement - 193 | IF '(' . expression ')' statement ELSE statement - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 257 - - -State 176 - - 194 selection_statement: SWITCH '(' . expression ')' statement - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 258 - - -State 177 - - 195 iteration_statement: WHILE '(' . expression ')' statement - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 259 - - -State 178 - - 196 iteration_statement: DO statement . WHILE '(' expression ')' ';' - - WHILE shift, and go to state 260 - - -State 179 - - 197 iteration_statement: FOR '(' . expression_statement expression_statement ')' statement - 198 | FOR '(' . expression_statement expression_statement expression ')' statement - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - expression_statement go to state 261 - - -State 180 - - 199 jump_statement: GOTO IDENTIFIER . ';' - - ';' shift, and go to state 262 - - -State 181 - - 200 jump_statement: CONTINUE ';' . - - $default reduce using rule 200 (jump_statement) - - -State 182 - - 201 jump_statement: BREAK ';' . - - $default reduce using rule 201 (jump_statement) - - -State 183 - - 202 jump_statement: RETURN ';' . - - $default reduce using rule 202 (jump_statement) - - -State 184 - - 73 expression: expression . ',' assignment_expression - 203 jump_statement: RETURN expression . ';' - - ',' shift, and go to state 226 - ';' shift, and go to state 263 - - -State 185 - - 4 primary_expression: '(' expression . ')' - 73 expression: expression . ',' assignment_expression - - ')' shift, and go to state 264 - ',' shift, and go to state 226 - - -State 186 - - 154 type_name: specifier_qualifier_list . - 155 | specifier_qualifier_list . abstract_declarator - - '(' shift, and go to state 265 - '[' shift, and go to state 233 - '*' shift, and go to state 23 - - $default reduce using rule 154 (type_name) - - pointer go to state 266 - abstract_declarator go to state 267 - direct_abstract_declarator go to state 237 - - -State 187 - - 28 cast_expression: '(' type_name . ')' cast_expression - - ')' shift, and go to state 268 - - -State 188 - - 10 postfix_expression: postfix_expression PTR_OP . IDENTIFIER - - IDENTIFIER shift, and go to state 269 - - -State 189 - - 11 postfix_expression: postfix_expression INC_OP . - - $default reduce using rule 11 (postfix_expression) - - -State 190 - - 12 postfix_expression: postfix_expression DEC_OP . - - $default reduce using rule 12 (postfix_expression) - - -State 191 - - 7 postfix_expression: postfix_expression '(' . ')' - 8 | postfix_expression '(' . argument_expression_list ')' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - ')' shift, and go to state 270 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - argument_expression_list go to state 271 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 272 - - -State 192 - - 6 postfix_expression: postfix_expression '[' . expression ']' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 273 - - -State 193 - - 9 postfix_expression: postfix_expression '.' . IDENTIFIER - - IDENTIFIER shift, and go to state 274 - - -State 194 - - 62 assignment_operator: MUL_ASSIGN . - - $default reduce using rule 62 (assignment_operator) - - -State 195 - - 63 assignment_operator: DIV_ASSIGN . - - $default reduce using rule 63 (assignment_operator) - - -State 196 - - 64 assignment_operator: MOD_ASSIGN . - - $default reduce using rule 64 (assignment_operator) - - -State 197 - - 65 assignment_operator: ADD_ASSIGN . - - $default reduce using rule 65 (assignment_operator) - - -State 198 - - 66 assignment_operator: SUB_ASSIGN . - - $default reduce using rule 66 (assignment_operator) - - -State 199 - - 67 assignment_operator: LEFT_ASSIGN . - - $default reduce using rule 67 (assignment_operator) - - -State 200 - - 68 assignment_operator: RIGHT_ASSIGN . - - $default reduce using rule 68 (assignment_operator) - - -State 201 - - 69 assignment_operator: AND_ASSIGN . - - $default reduce using rule 69 (assignment_operator) - - -State 202 - - 70 assignment_operator: XOR_ASSIGN . - - $default reduce using rule 70 (assignment_operator) - - -State 203 - - 71 assignment_operator: OR_ASSIGN . - - $default reduce using rule 71 (assignment_operator) - - -State 204 - - 61 assignment_operator: '=' . - - $default reduce using rule 61 (assignment_operator) - - -State 205 - - 60 assignment_expression: unary_expression assignment_operator . assignment_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 275 - - -State 206 - - 18 unary_expression: unary_operator cast_expression . - - $default reduce using rule 18 (unary_expression) - - -State 207 - - 30 multiplicative_expression: multiplicative_expression '*' . cast_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 276 - - -State 208 - - 31 multiplicative_expression: multiplicative_expression '/' . cast_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 277 - - -State 209 - - 32 multiplicative_expression: multiplicative_expression '%' . cast_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 278 - - -State 210 - - 34 additive_expression: additive_expression '+' . multiplicative_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 279 - - -State 211 - - 35 additive_expression: additive_expression '-' . multiplicative_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 280 - - -State 212 - - 37 shift_expression: shift_expression LEFT_OP . additive_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 281 - - -State 213 - - 38 shift_expression: shift_expression RIGHT_OP . additive_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 282 - - -State 214 - - 42 relational_expression: relational_expression LE_OP . shift_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 283 - - -State 215 - - 43 relational_expression: relational_expression GE_OP . shift_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 284 - - -State 216 - - 40 relational_expression: relational_expression '<' . shift_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 285 - - -State 217 - - 41 relational_expression: relational_expression '>' . shift_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 286 - - -State 218 - - 45 equality_expression: equality_expression EQ_OP . relational_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 287 - - -State 219 - - 46 equality_expression: equality_expression NE_OP . relational_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 288 - - -State 220 - - 48 and_expression: and_expression '&' . equality_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 289 - - -State 221 - - 50 exclusive_or_expression: exclusive_or_expression '^' . and_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 290 - - -State 222 - - 52 inclusive_or_expression: inclusive_or_expression '|' . exclusive_or_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 291 - - -State 223 - - 54 logical_and_expression: logical_and_expression AND_OP . inclusive_or_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 292 - - -State 224 - - 56 logical_or_expression: logical_or_expression OR_OP . logical_and_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 293 - - -State 225 - - 58 conditional_expression: logical_or_expression '?' . expression ':' conditional_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 294 - - -State 226 - - 73 expression: expression ',' . assignment_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 295 - - -State 227 - - 191 expression_statement: expression ';' . - - $default reduce using rule 191 (expression_statement) - - -State 228 - - 184 compound_statement: '{' declaration_list '}' . - - $default reduce using rule 184 (compound_statement) - - -State 229 - - 185 compound_statement: '{' declaration_list statement_list . '}' - 189 statement_list: statement_list . statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - '}' shift, and go to state 296 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 231 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 230 - - 183 compound_statement: '{' statement_list '}' . - - $default reduce using rule 183 (compound_statement) - - -State 231 - - 189 statement_list: statement_list statement . - - $default reduce using rule 189 (statement_list) - - -State 232 - - 133 direct_declarator: '(' . declarator ')' - 159 direct_abstract_declarator: '(' . abstract_declarator ')' - 164 | '(' . ')' - 165 | '(' . parameter_type_list ')' - - IDENTIFIER shift, and go to state 1 - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '(' shift, and go to state 232 - ')' shift, and go to state 297 - '[' shift, and go to state 233 - '*' shift, and go to state 23 - - declaration_specifiers go to state 139 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - declarator go to state 40 - direct_declarator go to state 33 - pointer go to state 235 - parameter_type_list go to state 298 - parameter_list go to state 141 - parameter_declaration go to state 142 - abstract_declarator go to state 299 - direct_abstract_declarator go to state 237 - - -State 233 - - 160 direct_abstract_declarator: '[' . ']' - 161 | '[' . constant_expression ']' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - ']' shift, and go to state 300 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 147 - constant_expression go to state 301 - - -State 234 - - 149 parameter_declaration: declaration_specifiers declarator . - - $default reduce using rule 149 (parameter_declaration) - - -State 235 - - 130 declarator: pointer . direct_declarator - 156 abstract_declarator: pointer . - 158 | pointer . direct_abstract_declarator - - IDENTIFIER shift, and go to state 1 - '(' shift, and go to state 232 - '[' shift, and go to state 233 - - $default reduce using rule 156 (abstract_declarator) - - direct_declarator go to state 60 - direct_abstract_declarator go to state 302 - - -State 236 - - 150 parameter_declaration: declaration_specifiers abstract_declarator . - - $default reduce using rule 150 (parameter_declaration) - - -State 237 - - 157 abstract_declarator: direct_abstract_declarator . - 162 direct_abstract_declarator: direct_abstract_declarator . '[' ']' - 163 | direct_abstract_declarator . '[' constant_expression ']' - 166 | direct_abstract_declarator . '(' ')' - 167 | direct_abstract_declarator . '(' parameter_type_list ')' - - '(' shift, and go to state 303 - '[' shift, and go to state 304 - - $default reduce using rule 157 (abstract_declarator) - - -State 238 - - 136 direct_declarator: direct_declarator '(' parameter_type_list ')' . - - $default reduce using rule 136 (direct_declarator) - - -State 239 - - 146 parameter_type_list: parameter_list ',' . ELLIPSIS - 148 parameter_list: parameter_list ',' . parameter_declaration - - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - ELLIPSIS shift, and go to state 305 - - declaration_specifiers go to state 139 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - parameter_declaration go to state 306 - - -State 240 - - 137 direct_declarator: direct_declarator '(' identifier_list ')' . - - $default reduce using rule 137 (direct_declarator) - - -State 241 - - 153 identifier_list: identifier_list ',' . IDENTIFIER - - IDENTIFIER shift, and go to state 307 - - -State 242 - - 134 direct_declarator: direct_declarator '[' constant_expression ']' . - - $default reduce using rule 134 (direct_declarator) - - -State 243 - - 122 enum_specifier: ENUM IDENTIFIER '{' enumerator_list '}' . - - $default reduce using rule 122 (enum_specifier) - - -State 244 - - 127 enumerator: IDENTIFIER '=' constant_expression . - - $default reduce using rule 127 (enumerator) - - -State 245 - - 125 enumerator_list: enumerator_list ',' enumerator . - - $default reduce using rule 125 (enumerator_list) - - -State 246 - - 171 initializer_list: initializer . - - $default reduce using rule 171 (initializer_list) - - -State 247 - - 169 initializer: '{' initializer_list . '}' - 170 | '{' initializer_list . ',' '}' - 172 initializer_list: initializer_list . ',' initializer - - ',' shift, and go to state 308 - '}' shift, and go to state 309 - - -State 248 - - 104 struct_or_union_specifier: struct_or_union IDENTIFIER '{' struct_declaration_list '}' . - - $default reduce using rule 104 (struct_or_union_specifier) - - -State 249 - - 119 struct_declarator: ':' constant_expression . - - $default reduce using rule 119 (struct_declarator) - - -State 250 - - 117 struct_declarator_list: struct_declarator_list ',' . struct_declarator - - IDENTIFIER shift, and go to state 1 - '(' shift, and go to state 22 - '*' shift, and go to state 23 - ':' shift, and go to state 162 - - struct_declarator go to state 310 - declarator go to state 165 - direct_declarator go to state 33 - pointer go to state 34 - - -State 251 - - 111 struct_declaration: specifier_qualifier_list struct_declarator_list ';' . - - $default reduce using rule 111 (struct_declaration) - - -State 252 - - 120 struct_declarator: declarator ':' . constant_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 147 - constant_expression go to state 311 - - -State 253 - - 179 labeled_statement: IDENTIFIER ':' statement . - - $default reduce using rule 179 (labeled_statement) - - -State 254 - - 20 unary_expression: SIZEOF '(' type_name . ')' - - ')' shift, and go to state 312 - - -State 255 - - 180 labeled_statement: CASE constant_expression ':' . statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 313 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 256 - - 181 labeled_statement: DEFAULT ':' statement . - - $default reduce using rule 181 (labeled_statement) - - -State 257 - - 73 expression: expression . ',' assignment_expression - 192 selection_statement: IF '(' expression . ')' statement - 193 | IF '(' expression . ')' statement ELSE statement - - ')' shift, and go to state 314 - ',' shift, and go to state 226 - - -State 258 - - 73 expression: expression . ',' assignment_expression - 194 selection_statement: SWITCH '(' expression . ')' statement - - ')' shift, and go to state 315 - ',' shift, and go to state 226 - - -State 259 - - 73 expression: expression . ',' assignment_expression - 195 iteration_statement: WHILE '(' expression . ')' statement - - ')' shift, and go to state 316 - ',' shift, and go to state 226 - - -State 260 - - 196 iteration_statement: DO statement WHILE . '(' expression ')' ';' - - '(' shift, and go to state 317 - - -State 261 - - 197 iteration_statement: FOR '(' expression_statement . expression_statement ')' statement - 198 | FOR '(' expression_statement . expression_statement expression ')' statement - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - expression_statement go to state 318 - - -State 262 - - 199 jump_statement: GOTO IDENTIFIER ';' . - - $default reduce using rule 199 (jump_statement) - - -State 263 - - 203 jump_statement: RETURN expression ';' . - - $default reduce using rule 203 (jump_statement) - - -State 264 - - 4 primary_expression: '(' expression ')' . - - $default reduce using rule 4 (primary_expression) - - -State 265 - - 159 direct_abstract_declarator: '(' . abstract_declarator ')' - 164 | '(' . ')' - 165 | '(' . parameter_type_list ')' - - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - '(' shift, and go to state 265 - ')' shift, and go to state 297 - '[' shift, and go to state 233 - '*' shift, and go to state 23 - - declaration_specifiers go to state 139 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - pointer go to state 266 - parameter_type_list go to state 298 - parameter_list go to state 141 - parameter_declaration go to state 142 - abstract_declarator go to state 299 - direct_abstract_declarator go to state 237 - - -State 266 - - 156 abstract_declarator: pointer . - 158 | pointer . direct_abstract_declarator - - '(' shift, and go to state 265 - '[' shift, and go to state 233 - - $default reduce using rule 156 (abstract_declarator) - - direct_abstract_declarator go to state 302 - - -State 267 - - 155 type_name: specifier_qualifier_list abstract_declarator . - - $default reduce using rule 155 (type_name) - - -State 268 - - 28 cast_expression: '(' type_name ')' . cast_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 319 - - -State 269 - - 10 postfix_expression: postfix_expression PTR_OP IDENTIFIER . - - $default reduce using rule 10 (postfix_expression) - - -State 270 - - 7 postfix_expression: postfix_expression '(' ')' . - - $default reduce using rule 7 (postfix_expression) - - -State 271 - - 8 postfix_expression: postfix_expression '(' argument_expression_list . ')' - 14 argument_expression_list: argument_expression_list . ',' assignment_expression - - ')' shift, and go to state 320 - ',' shift, and go to state 321 - - -State 272 - - 13 argument_expression_list: assignment_expression . - - $default reduce using rule 13 (argument_expression_list) - - -State 273 - - 6 postfix_expression: postfix_expression '[' expression . ']' - 73 expression: expression . ',' assignment_expression - - ']' shift, and go to state 322 - ',' shift, and go to state 226 - - -State 274 - - 9 postfix_expression: postfix_expression '.' IDENTIFIER . - - $default reduce using rule 9 (postfix_expression) - - -State 275 - - 60 assignment_expression: unary_expression assignment_operator assignment_expression . - - $default reduce using rule 60 (assignment_expression) - - -State 276 - - 30 multiplicative_expression: multiplicative_expression '*' cast_expression . - - $default reduce using rule 30 (multiplicative_expression) - - -State 277 - - 31 multiplicative_expression: multiplicative_expression '/' cast_expression . - - $default reduce using rule 31 (multiplicative_expression) - - -State 278 - - 32 multiplicative_expression: multiplicative_expression '%' cast_expression . - - $default reduce using rule 32 (multiplicative_expression) - - -State 279 - - 30 multiplicative_expression: multiplicative_expression . '*' cast_expression - 31 | multiplicative_expression . '/' cast_expression - 32 | multiplicative_expression . '%' cast_expression - 34 additive_expression: additive_expression '+' multiplicative_expression . - - '*' shift, and go to state 207 - '/' shift, and go to state 208 - '%' shift, and go to state 209 - - $default reduce using rule 34 (additive_expression) - - -State 280 - - 30 multiplicative_expression: multiplicative_expression . '*' cast_expression - 31 | multiplicative_expression . '/' cast_expression - 32 | multiplicative_expression . '%' cast_expression - 35 additive_expression: additive_expression '-' multiplicative_expression . - - '*' shift, and go to state 207 - '/' shift, and go to state 208 - '%' shift, and go to state 209 - - $default reduce using rule 35 (additive_expression) - - -State 281 - - 34 additive_expression: additive_expression . '+' multiplicative_expression - 35 | additive_expression . '-' multiplicative_expression - 37 shift_expression: shift_expression LEFT_OP additive_expression . - - '+' shift, and go to state 210 - '-' shift, and go to state 211 - - $default reduce using rule 37 (shift_expression) - - -State 282 - - 34 additive_expression: additive_expression . '+' multiplicative_expression - 35 | additive_expression . '-' multiplicative_expression - 38 shift_expression: shift_expression RIGHT_OP additive_expression . - - '+' shift, and go to state 210 - '-' shift, and go to state 211 - - $default reduce using rule 38 (shift_expression) - - -State 283 - - 37 shift_expression: shift_expression . LEFT_OP additive_expression - 38 | shift_expression . RIGHT_OP additive_expression - 42 relational_expression: relational_expression LE_OP shift_expression . - - LEFT_OP shift, and go to state 212 - RIGHT_OP shift, and go to state 213 - - $default reduce using rule 42 (relational_expression) - - -State 284 - - 37 shift_expression: shift_expression . LEFT_OP additive_expression - 38 | shift_expression . RIGHT_OP additive_expression - 43 relational_expression: relational_expression GE_OP shift_expression . - - LEFT_OP shift, and go to state 212 - RIGHT_OP shift, and go to state 213 - - $default reduce using rule 43 (relational_expression) - - -State 285 - - 37 shift_expression: shift_expression . LEFT_OP additive_expression - 38 | shift_expression . RIGHT_OP additive_expression - 40 relational_expression: relational_expression '<' shift_expression . - - LEFT_OP shift, and go to state 212 - RIGHT_OP shift, and go to state 213 - - $default reduce using rule 40 (relational_expression) - - -State 286 - - 37 shift_expression: shift_expression . LEFT_OP additive_expression - 38 | shift_expression . RIGHT_OP additive_expression - 41 relational_expression: relational_expression '>' shift_expression . - - LEFT_OP shift, and go to state 212 - RIGHT_OP shift, and go to state 213 - - $default reduce using rule 41 (relational_expression) - - -State 287 - - 40 relational_expression: relational_expression . '<' shift_expression - 41 | relational_expression . '>' shift_expression - 42 | relational_expression . LE_OP shift_expression - 43 | relational_expression . GE_OP shift_expression - 45 equality_expression: equality_expression EQ_OP relational_expression . - - LE_OP shift, and go to state 214 - GE_OP shift, and go to state 215 - '<' shift, and go to state 216 - '>' shift, and go to state 217 - - $default reduce using rule 45 (equality_expression) - - -State 288 - - 40 relational_expression: relational_expression . '<' shift_expression - 41 | relational_expression . '>' shift_expression - 42 | relational_expression . LE_OP shift_expression - 43 | relational_expression . GE_OP shift_expression - 46 equality_expression: equality_expression NE_OP relational_expression . - - LE_OP shift, and go to state 214 - GE_OP shift, and go to state 215 - '<' shift, and go to state 216 - '>' shift, and go to state 217 - - $default reduce using rule 46 (equality_expression) - - -State 289 - - 45 equality_expression: equality_expression . EQ_OP relational_expression - 46 | equality_expression . NE_OP relational_expression - 48 and_expression: and_expression '&' equality_expression . - - EQ_OP shift, and go to state 218 - NE_OP shift, and go to state 219 - - $default reduce using rule 48 (and_expression) - - -State 290 - - 48 and_expression: and_expression . '&' equality_expression - 50 exclusive_or_expression: exclusive_or_expression '^' and_expression . - - '&' shift, and go to state 220 - - $default reduce using rule 50 (exclusive_or_expression) - - -State 291 - - 50 exclusive_or_expression: exclusive_or_expression . '^' and_expression - 52 inclusive_or_expression: inclusive_or_expression '|' exclusive_or_expression . - - '^' shift, and go to state 221 - - $default reduce using rule 52 (inclusive_or_expression) - - -State 292 - - 52 inclusive_or_expression: inclusive_or_expression . '|' exclusive_or_expression - 54 logical_and_expression: logical_and_expression AND_OP inclusive_or_expression . - - '|' shift, and go to state 222 - - $default reduce using rule 54 (logical_and_expression) - - -State 293 - - 54 logical_and_expression: logical_and_expression . AND_OP inclusive_or_expression - 56 logical_or_expression: logical_or_expression OR_OP logical_and_expression . - - AND_OP shift, and go to state 223 - - $default reduce using rule 56 (logical_or_expression) - - -State 294 - - 58 conditional_expression: logical_or_expression '?' expression . ':' conditional_expression - 73 expression: expression . ',' assignment_expression - - ',' shift, and go to state 226 - ':' shift, and go to state 323 - - -State 295 - - 73 expression: expression ',' assignment_expression . - - $default reduce using rule 73 (expression) - - -State 296 - - 185 compound_statement: '{' declaration_list statement_list '}' . - - $default reduce using rule 185 (compound_statement) - - -State 297 - - 164 direct_abstract_declarator: '(' ')' . - - $default reduce using rule 164 (direct_abstract_declarator) - - -State 298 - - 165 direct_abstract_declarator: '(' parameter_type_list . ')' - - ')' shift, and go to state 324 - - -State 299 - - 159 direct_abstract_declarator: '(' abstract_declarator . ')' - - ')' shift, and go to state 325 - - -State 300 - - 160 direct_abstract_declarator: '[' ']' . - - $default reduce using rule 160 (direct_abstract_declarator) - - -State 301 - - 161 direct_abstract_declarator: '[' constant_expression . ']' - - ']' shift, and go to state 326 - - -State 302 - - 158 abstract_declarator: pointer direct_abstract_declarator . - 162 direct_abstract_declarator: direct_abstract_declarator . '[' ']' - 163 | direct_abstract_declarator . '[' constant_expression ']' - 166 | direct_abstract_declarator . '(' ')' - 167 | direct_abstract_declarator . '(' parameter_type_list ')' - - '(' shift, and go to state 303 - '[' shift, and go to state 304 - - $default reduce using rule 158 (abstract_declarator) - - -State 303 - - 166 direct_abstract_declarator: direct_abstract_declarator '(' . ')' - 167 | direct_abstract_declarator '(' . parameter_type_list ')' - - TYPE_NAME shift, and go to state 2 - TYPEDEF shift, and go to state 3 - EXTERN shift, and go to state 4 - STATIC shift, and go to state 5 - AUTO shift, and go to state 6 - REGISTER shift, and go to state 7 - CHAR shift, and go to state 8 - SHORT shift, and go to state 9 - INT shift, and go to state 10 - LONG shift, and go to state 11 - SIGNED shift, and go to state 12 - UNSIGNED shift, and go to state 13 - FLOAT shift, and go to state 14 - DOUBLE shift, and go to state 15 - CONST shift, and go to state 16 - VOLATILE shift, and go to state 17 - VOID shift, and go to state 18 - STRUCT shift, and go to state 19 - UNION shift, and go to state 20 - ENUM shift, and go to state 21 - ')' shift, and go to state 327 - - declaration_specifiers go to state 139 - storage_class_specifier go to state 26 - type_specifier go to state 27 - struct_or_union_specifier go to state 28 - struct_or_union go to state 29 - enum_specifier go to state 30 - type_qualifier go to state 31 - parameter_type_list go to state 328 - parameter_list go to state 141 - parameter_declaration go to state 142 - - -State 304 - - 162 direct_abstract_declarator: direct_abstract_declarator '[' . ']' - 163 | direct_abstract_declarator '[' . constant_expression ']' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - ']' shift, and go to state 329 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 147 - constant_expression go to state 330 - - -State 305 - - 146 parameter_type_list: parameter_list ',' ELLIPSIS . - - $default reduce using rule 146 (parameter_type_list) - - -State 306 - - 148 parameter_list: parameter_list ',' parameter_declaration . - - $default reduce using rule 148 (parameter_list) - - -State 307 - - 153 identifier_list: identifier_list ',' IDENTIFIER . - - $default reduce using rule 153 (identifier_list) - - -State 308 - - 170 initializer: '{' initializer_list ',' . '}' - 172 initializer_list: initializer_list ',' . initializer - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - '{' shift, and go to state 154 - '}' shift, and go to state 331 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 155 - initializer go to state 332 - - -State 309 - - 169 initializer: '{' initializer_list '}' . - - $default reduce using rule 169 (initializer) - - -State 310 - - 117 struct_declarator_list: struct_declarator_list ',' struct_declarator . - - $default reduce using rule 117 (struct_declarator_list) - - -State 311 - - 120 struct_declarator: declarator ':' constant_expression . - - $default reduce using rule 120 (struct_declarator) - - -State 312 - - 20 unary_expression: SIZEOF '(' type_name ')' . - - $default reduce using rule 20 (unary_expression) - - -State 313 - - 180 labeled_statement: CASE constant_expression ':' statement . - - $default reduce using rule 180 (labeled_statement) - - -State 314 - - 192 selection_statement: IF '(' expression ')' . statement - 193 | IF '(' expression ')' . statement ELSE statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 333 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 315 - - 194 selection_statement: SWITCH '(' expression ')' . statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 334 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 316 - - 195 iteration_statement: WHILE '(' expression ')' . statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 335 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 317 - - 196 iteration_statement: DO statement WHILE '(' . expression ')' ';' - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 336 - - -State 318 - - 197 iteration_statement: FOR '(' expression_statement expression_statement . ')' statement - 198 | FOR '(' expression_statement expression_statement . expression ')' statement - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - ')' shift, and go to state 337 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 338 - - -State 319 - - 28 cast_expression: '(' type_name ')' cast_expression . - - $default reduce using rule 28 (cast_expression) - - -State 320 - - 8 postfix_expression: postfix_expression '(' argument_expression_list ')' . - - $default reduce using rule 8 (postfix_expression) - - -State 321 - - 14 argument_expression_list: argument_expression_list ',' . assignment_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 339 - - -State 322 - - 6 postfix_expression: postfix_expression '[' expression ']' . - - $default reduce using rule 6 (postfix_expression) - - -State 323 - - 58 conditional_expression: logical_or_expression '?' expression ':' . conditional_expression - - IDENTIFIER shift, and go to state 144 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 146 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 340 - - -State 324 - - 165 direct_abstract_declarator: '(' parameter_type_list ')' . - - $default reduce using rule 165 (direct_abstract_declarator) - - -State 325 - - 159 direct_abstract_declarator: '(' abstract_declarator ')' . - - $default reduce using rule 159 (direct_abstract_declarator) - - -State 326 - - 161 direct_abstract_declarator: '[' constant_expression ']' . - - $default reduce using rule 161 (direct_abstract_declarator) - - -State 327 - - 166 direct_abstract_declarator: direct_abstract_declarator '(' ')' . - - $default reduce using rule 166 (direct_abstract_declarator) - - -State 328 - - 167 direct_abstract_declarator: direct_abstract_declarator '(' parameter_type_list . ')' - - ')' shift, and go to state 341 - - -State 329 - - 162 direct_abstract_declarator: direct_abstract_declarator '[' ']' . - - $default reduce using rule 162 (direct_abstract_declarator) - - -State 330 - - 163 direct_abstract_declarator: direct_abstract_declarator '[' constant_expression . ']' - - ']' shift, and go to state 342 - - -State 331 - - 170 initializer: '{' initializer_list ',' '}' . - - $default reduce using rule 170 (initializer) - - -State 332 - - 172 initializer_list: initializer_list ',' initializer . - - $default reduce using rule 172 (initializer_list) - - -State 333 - - 192 selection_statement: IF '(' expression ')' statement . - 193 | IF '(' expression ')' statement . ELSE statement - - ELSE shift, and go to state 343 - - ELSE [reduce using rule 192 (selection_statement)] - $default reduce using rule 192 (selection_statement) - - -State 334 - - 194 selection_statement: SWITCH '(' expression ')' statement . - - $default reduce using rule 194 (selection_statement) - - -State 335 - - 195 iteration_statement: WHILE '(' expression ')' statement . - - $default reduce using rule 195 (iteration_statement) - - -State 336 - - 73 expression: expression . ',' assignment_expression - 196 iteration_statement: DO statement WHILE '(' expression . ')' ';' - - ')' shift, and go to state 344 - ',' shift, and go to state 226 - - -State 337 - - 197 iteration_statement: FOR '(' expression_statement expression_statement ')' . statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 345 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 338 - - 73 expression: expression . ',' assignment_expression - 198 iteration_statement: FOR '(' expression_statement expression_statement expression . ')' statement - - ')' shift, and go to state 346 - ',' shift, and go to state 226 - - -State 339 - - 14 argument_expression_list: argument_expression_list ',' assignment_expression . - - $default reduce using rule 14 (argument_expression_list) - - -State 340 - - 58 conditional_expression: logical_or_expression '?' expression ':' conditional_expression . - - $default reduce using rule 58 (conditional_expression) - - -State 341 - - 167 direct_abstract_declarator: direct_abstract_declarator '(' parameter_type_list ')' . - - $default reduce using rule 167 (direct_abstract_declarator) - - -State 342 - - 163 direct_abstract_declarator: direct_abstract_declarator '[' constant_expression ']' . - - $default reduce using rule 163 (direct_abstract_declarator) - - -State 343 - - 193 selection_statement: IF '(' expression ')' statement ELSE . statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 347 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 344 - - 196 iteration_statement: DO statement WHILE '(' expression ')' . ';' - - ';' shift, and go to state 348 - - -State 345 - - 197 iteration_statement: FOR '(' expression_statement expression_statement ')' statement . - - $default reduce using rule 197 (iteration_statement) - - -State 346 - - 198 iteration_statement: FOR '(' expression_statement expression_statement expression ')' . statement - - IDENTIFIER shift, and go to state 81 - CONSTANT shift, and go to state 82 - STRING_LITERAL shift, and go to state 83 - SIZEOF shift, and go to state 84 - INC_OP shift, and go to state 85 - DEC_OP shift, and go to state 86 - CASE shift, and go to state 87 - DEFAULT shift, and go to state 88 - IF shift, and go to state 89 - SWITCH shift, and go to state 90 - WHILE shift, and go to state 91 - DO shift, and go to state 92 - FOR shift, and go to state 93 - GOTO shift, and go to state 94 - CONTINUE shift, and go to state 95 - BREAK shift, and go to state 96 - RETURN shift, and go to state 97 - '(' shift, and go to state 98 - '&' shift, and go to state 99 - '*' shift, and go to state 100 - '+' shift, and go to state 101 - '-' shift, and go to state 102 - '~' shift, and go to state 103 - '!' shift, and go to state 104 - ';' shift, and go to state 105 - '{' shift, and go to state 53 - - primary_expression go to state 107 - postfix_expression go to state 108 - unary_expression go to state 109 - unary_operator go to state 110 - cast_expression go to state 111 - multiplicative_expression go to state 112 - additive_expression go to state 113 - shift_expression go to state 114 - relational_expression go to state 115 - equality_expression go to state 116 - and_expression go to state 117 - exclusive_or_expression go to state 118 - inclusive_or_expression go to state 119 - logical_and_expression go to state 120 - logical_or_expression go to state 121 - conditional_expression go to state 122 - assignment_expression go to state 123 - expression go to state 124 - statement go to state 349 - labeled_statement go to state 126 - compound_statement go to state 127 - expression_statement go to state 130 - selection_statement go to state 131 - iteration_statement go to state 132 - jump_statement go to state 133 - - -State 347 - - 193 selection_statement: IF '(' expression ')' statement ELSE statement . - - $default reduce using rule 193 (selection_statement) - - -State 348 - - 196 iteration_statement: DO statement WHILE '(' expression ')' ';' . - - $default reduce using rule 196 (iteration_statement) - - -State 349 - - 198 iteration_statement: FOR '(' expression_statement expression_statement expression ')' statement . - - $default reduce using rule 198 (iteration_statement) diff --git a/src/uscxml/plugins/datamodel/c89/parser/c89.tab.cpp b/src/uscxml/plugins/datamodel/c89/parser/c89.tab.cpp deleted file mode 100644 index be58093..0000000 --- a/src/uscxml/plugins/datamodel/c89/parser/c89.tab.cpp +++ /dev/null @@ -1,3587 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "3.0.4" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Substitute the type names. */ -#define YYSTYPE C89_STYPE -#define YYLTYPE C89_LTYPE -/* Substitute the variable and function names. */ -#define yyparse c89_parse -#define yylex c89_lex -#define yyerror c89_error -#define yydebug c89_debug -#define yynerrs c89_nerrs - - -/* Copy the first part of user declarations. */ -#line 1 "c89.ypp" /* yacc.c:339 */ - -#include "../C89Parser.h" -#include "c89.tab.hpp" -#include -#include - -#define YYMAXDEPTH 20000 // default is 10000 -#define YYDEBUG 1 -#define YYERROR_VERBOSE 1 - -extern int c89_lex (C89_STYPE* yylval_param, C89_LTYPE* yylloc_param, void* yyscanner); - -using namespace uscxml; - -#line 89 "c89.tab.cpp" /* yacc.c:339 */ - -# ifndef YY_NULLPTR -# if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULLPTR nullptr -# else -# define YY_NULLPTR 0 -# endif -# endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* In a future release of Bison, this section will be replaced - by #include "c89.tab.hpp". */ -#ifndef YY_C89_C89_TAB_HPP_INCLUDED -# define YY_C89_C89_TAB_HPP_INCLUDED -/* Debug traces. */ -#ifndef C89_DEBUG -# if defined YYDEBUG -#if YYDEBUG -# define C89_DEBUG 1 -# else -# define C89_DEBUG 0 -# endif -# else /* ! defined YYDEBUG */ -# define C89_DEBUG 1 -# endif /* ! defined YYDEBUG */ -#endif /* ! defined C89_DEBUG */ -#if C89_DEBUG -extern int c89_debug; -#endif - -/* Token type. */ -#ifndef C89_TOKENTYPE -# define C89_TOKENTYPE - enum c89_tokentype - { - IDENTIFIER = 258, - CONSTANT = 259, - STRING_LITERAL = 260, - SIZEOF = 261, - PTR_OP = 262, - INC_OP = 263, - DEC_OP = 264, - LEFT_OP = 265, - RIGHT_OP = 266, - LE_OP = 267, - GE_OP = 268, - EQ_OP = 269, - NE_OP = 270, - AND_OP = 271, - OR_OP = 272, - MUL_ASSIGN = 273, - DIV_ASSIGN = 274, - MOD_ASSIGN = 275, - ADD_ASSIGN = 276, - SUB_ASSIGN = 277, - LEFT_ASSIGN = 278, - RIGHT_ASSIGN = 279, - AND_ASSIGN = 280, - XOR_ASSIGN = 281, - OR_ASSIGN = 282, - TYPE_NAME = 283, - TYPEDEF = 284, - EXTERN = 285, - STATIC = 286, - AUTO = 287, - REGISTER = 288, - CHAR = 289, - SHORT = 290, - INT = 291, - LONG = 292, - SIGNED = 293, - UNSIGNED = 294, - FLOAT = 295, - DOUBLE = 296, - CONST = 297, - VOLATILE = 298, - VOID = 299, - STRUCT = 300, - UNION = 301, - ENUM = 302, - ELLIPSIS = 303, - CASE = 304, - DEFAULT = 305, - IF = 306, - ELSE = 307, - SWITCH = 308, - WHILE = 309, - DO = 310, - FOR = 311, - GOTO = 312, - CONTINUE = 313, - BREAK = 314, - RETURN = 315 - }; -#endif - -/* Value type. */ -#if ! defined C89_STYPE && ! defined C89_STYPE_IS_DECLARED - -union C89_STYPE -{ -#line 26 "c89.ypp" /* yacc.c:355 */ - - uscxml::C89ParserNode* node; - char* value; - -#line 203 "c89.tab.cpp" /* yacc.c:355 */ -}; - -typedef union C89_STYPE C89_STYPE; -# define C89_STYPE_IS_TRIVIAL 1 -# define C89_STYPE_IS_DECLARED 1 -#endif - -/* Location type. */ -#if ! defined C89_LTYPE && ! defined C89_LTYPE_IS_DECLARED -typedef struct C89_LTYPE C89_LTYPE; -struct C89_LTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -}; -# define C89_LTYPE_IS_DECLARED 1 -# define C89_LTYPE_IS_TRIVIAL 1 -#endif - - - -int c89_parse (uscxml::C89Parser* ctx, void * scanner); - -#endif /* !YY_C89_C89_TAB_HPP_INCLUDED */ - -/* Copy the second part of user declarations. */ - -#line 233 "c89.tab.cpp" /* yacc.c:358 */ - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#else -typedef signed char yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -# endif -# endif -# ifndef YY_ -# define YY_(Msgid) Msgid -# endif -#endif - -#ifndef YY_ATTRIBUTE -# if (defined __GNUC__ \ - && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ - || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C -# define YY_ATTRIBUTE(Spec) __attribute__(Spec) -# else -# define YY_ATTRIBUTE(Spec) /* empty */ -# endif -#endif - -#ifndef YY_ATTRIBUTE_PURE -# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) -#endif - -#ifndef YY_ATTRIBUTE_UNUSED -# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) -#endif - -#if !defined _Noreturn \ - && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) -# if defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) -#else -# define YYUSE(E) /* empty */ -#endif - -#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ -/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ - _Pragma ("GCC diagnostic push") \ - _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ - _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ - _Pragma ("GCC diagnostic pop") -#else -# define YY_INITIAL_VALUE(Value) Value -#endif -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -# include /* INFRINGES ON USER NAME SPACE */ - /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's 'empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined C89_LTYPE_IS_TRIVIAL && C89_LTYPE_IS_TRIVIAL \ - && defined C89_STYPE_IS_TRIVIAL && C89_STYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from SRC to DST. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(Dst, Src, Count) \ - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) -# else -# define YYCOPY(Dst, Src, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (Dst)[yyi] = (Src)[yyi]; \ - } \ - while (0) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 61 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1301 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 85 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 64 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 212 -/* YYNSTATES -- Number of states. */ -#define YYNSTATES 350 - -/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned - by yylex, with out-of-bounds checking. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 315 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM - as returned by yylex, without out-of-bounds checking. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 72, 2, 2, 2, 74, 67, 2, - 61, 62, 68, 69, 66, 70, 65, 73, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 80, 82, - 75, 81, 76, 79, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 63, 2, 64, 77, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 83, 78, 84, 71, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60 -}; - -#if C89_DEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 79, 79, 82, 85, 88, 94, 97, 100, 103, - 106, 109, 112, 115, 121, 124, 130, 133, 136, 139, - 142, 145, 151, 152, 153, 154, 155, 156, 160, 161, - 165, 166, 169, 172, 178, 179, 182, 188, 189, 192, - 198, 199, 202, 205, 208, 214, 215, 218, 224, 225, - 231, 232, 238, 239, 245, 246, 252, 253, 259, 260, - 266, 267, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 287, 288, 294, 298, 299, 305, 306, - 309, 310, 313, 314, 320, 321, 327, 328, 334, 335, - 336, 337, 338, 342, 343, 344, 345, 346, 347, 348, - 349, 350, 351, 352, 353, 357, 360, 363, 369, 370, - 374, 375, 381, 387, 390, 391, 394, 398, 399, 405, - 406, 409, 415, 416, 417, 421, 422, 428, 431, 435, - 436, 440, 443, 447, 450, 453, 456, 459, 462, 465, - 471, 472, 473, 474, 478, 479, 486, 487, 491, 492, - 498, 501, 504, 508, 511, 517, 518, 524, 525, 526, - 530, 531, 532, 533, 534, 537, 538, 539, 540, 546, - 547, 550, 556, 557, 563, 564, 565, 566, 567, 568, - 572, 575, 578, 584, 587, 590, 593, 599, 600, 606, - 607, 613, 616, 622, 625, 628, 634, 637, 640, 643, - 649, 650, 651, 652, 653, 657, 658, 662, 663, 667, - 670, 673, 676 -}; -#endif - -#if C89_DEBUG || YYERROR_VERBOSE || 1 -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "IDENTIFIER", "CONSTANT", - "STRING_LITERAL", "SIZEOF", "PTR_OP", "INC_OP", "DEC_OP", "LEFT_OP", - "RIGHT_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", - "MUL_ASSIGN", "DIV_ASSIGN", "MOD_ASSIGN", "ADD_ASSIGN", "SUB_ASSIGN", - "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", - "TYPE_NAME", "TYPEDEF", "EXTERN", "STATIC", "AUTO", "REGISTER", "CHAR", - "SHORT", "INT", "LONG", "SIGNED", "UNSIGNED", "FLOAT", "DOUBLE", "CONST", - "VOLATILE", "VOID", "STRUCT", "UNION", "ENUM", "ELLIPSIS", "CASE", - "DEFAULT", "IF", "ELSE", "SWITCH", "WHILE", "DO", "FOR", "GOTO", - "CONTINUE", "BREAK", "RETURN", "'('", "')'", "'['", "']'", "'.'", "','", - "'&'", "'*'", "'+'", "'-'", "'~'", "'!'", "'/'", "'%'", "'<'", "'>'", - "'^'", "'|'", "'?'", "':'", "'='", "';'", "'{'", "'}'", "$accept", - "primary_expression", "postfix_expression", "argument_expression_list", - "unary_expression", "unary_operator", "cast_expression", - "multiplicative_expression", "additive_expression", "shift_expression", - "relational_expression", "equality_expression", "and_expression", - "exclusive_or_expression", "inclusive_or_expression", - "logical_and_expression", "logical_or_expression", - "conditional_expression", "assignment_expression", "assignment_operator", - "expression", "constant_expression", "declaration", - "declaration_specifiers", "init_declarator_list", "init_declarator", - "storage_class_specifier", "type_specifier", "struct_or_union_specifier", - "struct_or_union", "struct_declaration_list", "struct_declaration", - "specifier_qualifier_list", "struct_declarator_list", - "struct_declarator", "enum_specifier", "enumerator_list", "enumerator", - "type_qualifier", "declarator", "direct_declarator", "pointer", - "type_qualifier_list", "parameter_type_list", "parameter_list", - "parameter_declaration", "identifier_list", "type_name", - "abstract_declarator", "direct_abstract_declarator", "initializer", - "initializer_list", "statement", "labeled_statement", - "compound_statement", "declaration_list", "statement_list", - "expression_statement", "selection_statement", "iteration_statement", - "jump_statement", "translation_unit", "external_declaration", - "function_definition", YY_NULLPTR -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 40, 41, 91, 93, 46, 44, 38, 42, 43, - 45, 126, 33, 47, 37, 60, 62, 94, 124, 63, - 58, 61, 59, 123, 125 -}; -# endif - -#define YYPACT_NINF -223 - -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-223))) - -#define YYTABLE_NINF -1 - -#define yytable_value_is_error(Yytable_value) \ - 0 - - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -static const yytype_int16 yypact[] = -{ - 969, -223, -223, -223, -223, -223, -223, -223, -223, -223, - -223, -223, -223, -223, -223, -223, -223, -223, -223, -223, - -223, 5, 42, 4, -223, 31, 1254, 1254, -223, 11, - -223, 1254, 1101, 88, 26, 879, -223, -223, -60, 51, - 14, -223, -223, 4, -223, 38, -223, 1081, -223, -223, - -10, 1055, -223, 278, -223, 31, -223, 1101, 408, 666, - 88, -223, -223, 51, 69, -23, -223, -223, -223, -223, - 42, -223, 542, -223, 1101, 1055, 1055, 1004, -223, 72, - 1055, -12, -223, -223, 785, 806, 806, 830, 17, 123, - 129, 132, 524, 141, 109, 127, 134, 559, 645, -223, - -223, -223, -223, -223, -223, -223, -223, -223, 192, 274, - 830, -223, 121, 36, 224, 116, 229, 151, 150, 158, - 236, -2, -223, -223, 43, -223, -223, -223, 348, 418, - -223, -223, -223, -223, 164, -223, -223, -223, -223, 18, - 198, 188, -223, 16, -223, -223, -223, -223, 197, -15, - 830, 51, -223, -223, 542, -223, -223, -223, 1024, -223, - -223, -223, 830, 76, -223, 184, -223, 524, 645, -223, - 830, -223, -223, 190, 524, 830, 830, 830, 217, 596, - 191, -223, -223, -223, 114, 49, 85, 212, 273, -223, - -223, 690, 830, 275, -223, -223, -223, -223, -223, -223, - -223, -223, -223, -223, -223, 830, -223, 830, 830, 830, - 830, 830, 830, 830, 830, 830, 830, 830, 830, 830, - 830, 830, 830, 830, 830, 830, 830, -223, -223, 454, - -223, -223, 924, 715, -223, 22, -223, 165, -223, 1233, - -223, 282, -223, -223, -223, -223, -223, 35, -223, -223, - 72, -223, 830, -223, 215, 524, -223, 81, 120, 145, - 227, 596, -223, -223, -223, 1157, 170, -223, 830, -223, - -223, 146, -223, 1, -223, -223, -223, -223, -223, 121, - 121, 36, 36, 224, 224, 224, 224, 116, 116, 229, - 151, 150, 158, 236, -50, -223, -223, -223, 228, 240, - -223, 225, 165, 1198, 736, -223, -223, -223, 488, -223, - -223, -223, -223, -223, 524, 524, 524, 830, 760, -223, - -223, 830, -223, 830, -223, -223, -223, -223, 242, -223, - 241, -223, -223, 239, -223, -223, 148, 524, 155, -223, - -223, -223, -223, 524, 244, -223, 524, -223, -223, -223 -}; - - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 133, 104, 88, 89, 90, 91, 92, 94, 95, - 96, 97, 100, 101, 98, 99, 129, 130, 93, 108, - 109, 0, 0, 140, 208, 0, 78, 80, 102, 0, - 103, 82, 0, 132, 0, 0, 205, 207, 124, 0, - 0, 144, 142, 141, 76, 0, 84, 86, 79, 81, - 107, 0, 83, 0, 187, 0, 212, 0, 0, 0, - 131, 1, 206, 0, 127, 0, 125, 134, 145, 143, - 0, 77, 0, 210, 0, 0, 114, 0, 110, 0, - 116, 2, 3, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, - 23, 24, 25, 26, 27, 191, 183, 6, 16, 28, - 0, 30, 34, 37, 40, 45, 48, 50, 52, 54, - 56, 58, 60, 73, 0, 189, 174, 175, 0, 0, - 176, 177, 178, 179, 86, 188, 211, 153, 139, 152, - 0, 146, 148, 0, 2, 136, 28, 75, 0, 0, - 0, 0, 122, 85, 0, 169, 87, 209, 0, 113, - 106, 111, 0, 0, 117, 119, 115, 0, 0, 20, - 0, 17, 18, 0, 0, 0, 0, 0, 0, 0, - 0, 201, 202, 203, 0, 0, 155, 0, 0, 12, - 13, 0, 0, 0, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 62, 0, 19, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 192, 185, 0, - 184, 190, 0, 0, 150, 157, 151, 158, 137, 0, - 138, 0, 135, 123, 128, 126, 172, 0, 105, 120, - 0, 112, 0, 180, 0, 0, 182, 0, 0, 0, - 0, 0, 200, 204, 5, 0, 157, 156, 0, 11, - 8, 0, 14, 0, 10, 61, 31, 32, 33, 35, - 36, 38, 39, 43, 44, 41, 42, 46, 47, 49, - 51, 53, 55, 57, 0, 74, 186, 165, 0, 0, - 161, 0, 159, 0, 0, 147, 149, 154, 0, 170, - 118, 121, 21, 181, 0, 0, 0, 0, 0, 29, - 9, 0, 7, 0, 166, 160, 162, 167, 0, 163, - 0, 171, 173, 193, 195, 196, 0, 0, 0, 15, - 59, 168, 164, 0, 0, 198, 0, 194, 197, 199 -}; - - /* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -223, -223, -223, -223, -48, -223, -91, 37, 46, 8, - 48, 110, 119, 122, 118, 135, -223, -55, -70, -223, - -38, -54, 6, 0, -223, 272, -223, -27, -223, -223, - 268, -67, -24, -223, 108, -223, 300, 213, 47, -13, - -29, -3, -223, -57, -223, 126, -223, 199, -122, -222, - -151, -223, -74, -223, 156, -25, 238, -172, -223, -223, - -223, -223, 333, -223 -}; - - /* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 107, 108, 271, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 205, - 124, 148, 54, 55, 45, 46, 26, 27, 28, 29, - 77, 78, 79, 163, 164, 30, 65, 66, 31, 32, - 33, 34, 43, 298, 141, 142, 143, 187, 299, 237, - 156, 247, 125, 126, 127, 57, 129, 130, 131, 132, - 133, 35, 36, 37 -}; - - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ -static const yytype_uint16 yytable[] = -{ - 25, 140, 155, 246, 147, 60, 24, 261, 38, 40, - 161, 146, 47, 302, 50, 224, 226, 236, 178, 206, - 42, 1, 74, 63, 76, 1, 48, 49, 128, 1, - 323, 52, 147, 173, 1, 25, 169, 171, 172, 146, - 69, 24, 134, 151, 302, 1, 16, 17, 76, 76, - 76, 151, 159, 76, 64, 231, 166, 134, 139, 184, - 185, 152, 146, 135, 267, 322, 165, 226, 167, 243, - 41, 76, 23, 75, 186, 1, 67, 225, 240, 232, - 135, 233, 241, 232, 155, 233, 23, 22, 39, 318, - 68, 161, 22, 253, 51, 147, 244, 174, 80, 23, - 256, 308, 146, 22, 70, 210, 211, 147, 249, 226, - 23, 264, 180, 44, 146, 226, 276, 277, 278, 309, - 71, 272, 80, 80, 80, 227, 234, 80, 214, 215, - 185, 76, 185, 22, 135, 275, 235, 257, 258, 259, - 23, 76, 250, 314, 186, 80, 265, 226, 233, 58, - 150, 59, 162, 23, 273, 231, 295, 332, 251, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 319, 147, 301, - 226, 313, 315, 266, 175, 146, 226, 294, 56, 207, - 176, 216, 217, 177, 208, 209, 263, 147, 311, 188, - 189, 190, 179, 73, 146, 80, 60, 316, 320, 181, - 344, 226, 321, 136, 226, 80, 182, 346, 220, 40, - 146, 226, 283, 284, 285, 286, 303, 221, 304, 235, - 157, 265, 139, 233, 212, 213, 222, 165, 155, 139, - 333, 334, 335, 218, 219, 72, 328, 279, 280, 147, - 330, 339, 223, 191, 239, 192, 146, 193, 281, 282, - 238, 242, 266, 345, 252, 139, 287, 288, 340, 347, - 255, 260, 349, 262, 268, 146, 269, 312, 274, 336, - 338, 81, 82, 83, 84, 307, 85, 86, 317, 326, - 324, 343, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 325, 139, 341, 342, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 348, 87, 88, 89, - 289, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 290, 292, 153, 158, 291, 99, 100, 101, 102, 103, - 104, 81, 82, 83, 84, 204, 85, 86, 310, 293, - 105, 53, 106, 149, 245, 306, 229, 254, 62, 0, - 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 0, 87, 88, 89, - 0, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 0, 137, 0, 0, 0, 99, 100, 101, 102, 103, - 104, 81, 82, 83, 84, 0, 85, 86, 0, 0, - 105, 53, 228, 0, 0, 0, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 0, 81, 82, 83, - 84, 0, 85, 86, 0, 0, 0, 87, 88, 89, - 138, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 0, 0, 0, 0, 0, 99, 100, 101, 102, 103, - 104, 144, 82, 83, 84, 0, 85, 86, 0, 0, - 105, 53, 230, 87, 88, 89, 0, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 0, 0, 0, 0, - 0, 99, 100, 101, 102, 103, 104, 81, 82, 83, - 84, 0, 85, 86, 0, 0, 105, 53, 296, 0, - 0, 0, 0, 0, 0, 144, 82, 83, 84, 98, - 85, 86, 0, 0, 0, 99, 100, 101, 102, 103, - 104, 0, 144, 82, 83, 84, 0, 85, 86, 0, - 0, 154, 331, 87, 88, 89, 0, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 0, 0, 0, 0, - 0, 99, 100, 101, 102, 103, 104, 0, 0, 144, - 82, 83, 84, 98, 85, 86, 105, 53, 0, 99, - 100, 101, 102, 103, 104, 0, 0, 0, 0, 0, - 98, 0, 0, 0, 0, 154, 99, 100, 101, 102, - 103, 104, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 183, 0, 0, 0, 0, 0, 0, 144, 82, - 83, 84, 0, 85, 86, 0, 0, 98, 0, 0, - 0, 0, 0, 99, 100, 101, 102, 103, 104, 144, - 82, 83, 84, 2, 85, 86, 0, 0, 105, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 144, 82, 83, 84, 0, 85, 86, - 0, 0, 0, 0, 0, 0, 98, 0, 0, 0, - 0, 0, 99, 100, 101, 102, 103, 104, 144, 82, - 83, 84, 0, 85, 86, 0, 0, 98, 0, 0, - 145, 0, 0, 99, 100, 101, 102, 103, 104, 144, - 82, 83, 84, 0, 85, 86, 0, 0, 0, 0, - 0, 98, 270, 0, 0, 0, 0, 99, 100, 101, - 102, 103, 104, 144, 82, 83, 84, 0, 85, 86, - 0, 0, 0, 0, 0, 0, 98, 0, 0, 300, - 0, 0, 99, 100, 101, 102, 103, 104, 144, 82, - 83, 84, 0, 85, 86, 0, 0, 98, 0, 0, - 329, 0, 0, 99, 100, 101, 102, 103, 104, 144, - 82, 83, 84, 0, 85, 86, 0, 0, 0, 0, - 0, 98, 337, 0, 0, 0, 0, 99, 100, 101, - 102, 103, 104, 144, 82, 83, 84, 0, 85, 86, - 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, - 0, 0, 99, 100, 101, 102, 103, 104, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 170, 0, 0, - 0, 0, 0, 99, 100, 101, 102, 103, 104, 61, - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 98, 0, 0, 0, 0, 0, 99, 100, 101, - 102, 103, 104, 0, 0, 0, 0, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 22, 0, 0, 0, 0, 0, 0, 23, 0, 0, - 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 232, 297, 233, 0, 0, - 0, 0, 23, 0, 0, 0, 0, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 22, 0, 2, 0, 0, 0, 0, 23, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 2, 0, 0, 0, 0, 0, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 2, 0, 0, 0, 0, 160, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 0, 0, 0, 0, 0, 248, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 72, 0, 53, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 53, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 265, 297, - 233, 0, 0, 0, 0, 23, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 327, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 305, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21 -}; - -static const yytype_int16 yycheck[] = -{ - 0, 58, 72, 154, 59, 34, 0, 179, 3, 22, - 77, 59, 25, 235, 3, 17, 66, 139, 92, 110, - 23, 3, 47, 83, 51, 3, 26, 27, 53, 3, - 80, 31, 87, 87, 3, 35, 84, 85, 86, 87, - 43, 35, 55, 66, 266, 3, 42, 43, 75, 76, - 77, 66, 76, 80, 3, 129, 80, 70, 58, 97, - 98, 84, 110, 57, 186, 64, 79, 66, 80, 84, - 23, 98, 68, 83, 98, 3, 62, 79, 62, 61, - 74, 63, 66, 61, 154, 63, 68, 61, 83, 261, - 43, 158, 61, 167, 83, 150, 150, 80, 51, 68, - 174, 66, 150, 61, 66, 69, 70, 162, 162, 66, - 68, 62, 3, 82, 162, 66, 207, 208, 209, 84, - 82, 191, 75, 76, 77, 82, 139, 80, 12, 13, - 168, 158, 170, 61, 128, 205, 139, 175, 176, 177, - 68, 168, 66, 62, 168, 98, 61, 66, 63, 61, - 81, 63, 80, 68, 192, 229, 226, 308, 82, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 224, 268, 233, 233, - 66, 255, 62, 186, 61, 233, 66, 225, 32, 68, - 61, 75, 76, 61, 73, 74, 82, 252, 252, 7, - 8, 9, 61, 47, 252, 158, 235, 62, 62, 82, - 62, 66, 66, 57, 66, 168, 82, 62, 67, 232, - 268, 66, 214, 215, 216, 217, 61, 77, 63, 232, - 74, 61, 232, 63, 10, 11, 78, 250, 308, 239, - 314, 315, 316, 14, 15, 81, 303, 210, 211, 304, - 304, 321, 16, 61, 66, 63, 304, 65, 212, 213, - 62, 64, 265, 337, 80, 265, 218, 219, 323, 343, - 80, 54, 346, 82, 62, 323, 3, 62, 3, 317, - 318, 3, 4, 5, 6, 3, 8, 9, 61, 64, - 62, 52, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 62, 303, 62, 64, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 82, 49, 50, 51, - 220, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 221, 223, 70, 75, 222, 67, 68, 69, 70, 71, - 72, 3, 4, 5, 6, 81, 8, 9, 250, 224, - 82, 83, 84, 63, 151, 239, 128, 168, 35, -1, - -1, -1, -1, -1, -1, -1, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, -1, 49, 50, 51, - -1, 53, 54, 55, 56, 57, 58, 59, 60, 61, - -1, 3, -1, -1, -1, 67, 68, 69, 70, 71, - 72, 3, 4, 5, 6, -1, 8, 9, -1, -1, - 82, 83, 84, -1, -1, -1, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, -1, 3, 4, 5, - 6, -1, 8, 9, -1, -1, -1, 49, 50, 51, - 62, 53, 54, 55, 56, 57, 58, 59, 60, 61, - -1, -1, -1, -1, -1, 67, 68, 69, 70, 71, - 72, 3, 4, 5, 6, -1, 8, 9, -1, -1, - 82, 83, 84, 49, 50, 51, -1, 53, 54, 55, - 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, - -1, 67, 68, 69, 70, 71, 72, 3, 4, 5, - 6, -1, 8, 9, -1, -1, 82, 83, 84, -1, - -1, -1, -1, -1, -1, 3, 4, 5, 6, 61, - 8, 9, -1, -1, -1, 67, 68, 69, 70, 71, - 72, -1, 3, 4, 5, 6, -1, 8, 9, -1, - -1, 83, 84, 49, 50, 51, -1, 53, 54, 55, - 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, - -1, 67, 68, 69, 70, 71, 72, -1, -1, 3, - 4, 5, 6, 61, 8, 9, 82, 83, -1, 67, - 68, 69, 70, 71, 72, -1, -1, -1, -1, -1, - 61, -1, -1, -1, -1, 83, 67, 68, 69, 70, - 71, 72, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 82, -1, -1, -1, -1, -1, -1, 3, 4, - 5, 6, -1, 8, 9, -1, -1, 61, -1, -1, - -1, -1, -1, 67, 68, 69, 70, 71, 72, 3, - 4, 5, 6, 28, 8, 9, -1, -1, 82, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 3, 4, 5, 6, -1, 8, 9, - -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, - -1, -1, 67, 68, 69, 70, 71, 72, 3, 4, - 5, 6, -1, 8, 9, -1, -1, 61, -1, -1, - 64, -1, -1, 67, 68, 69, 70, 71, 72, 3, - 4, 5, 6, -1, 8, 9, -1, -1, -1, -1, - -1, 61, 62, -1, -1, -1, -1, 67, 68, 69, - 70, 71, 72, 3, 4, 5, 6, -1, 8, 9, - -1, -1, -1, -1, -1, -1, 61, -1, -1, 64, - -1, -1, 67, 68, 69, 70, 71, 72, 3, 4, - 5, 6, -1, 8, 9, -1, -1, 61, -1, -1, - 64, -1, -1, 67, 68, 69, 70, 71, 72, 3, - 4, 5, 6, -1, 8, 9, -1, -1, -1, -1, - -1, 61, 62, -1, -1, -1, -1, 67, 68, 69, - 70, 71, 72, 3, 4, 5, 6, -1, 8, 9, - -1, -1, -1, -1, -1, -1, 61, -1, -1, -1, - -1, -1, 67, 68, 69, 70, 71, 72, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 61, -1, -1, - -1, -1, -1, 67, 68, 69, 70, 71, 72, 0, - -1, -1, 3, -1, -1, -1, -1, -1, -1, -1, - -1, 61, -1, -1, -1, -1, -1, 67, 68, 69, - 70, 71, 72, -1, -1, -1, -1, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 3, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 61, -1, -1, -1, -1, -1, -1, 68, -1, -1, - -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 3, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 61, 62, 63, -1, -1, - -1, -1, 68, -1, -1, -1, -1, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 61, -1, 28, -1, -1, -1, -1, 68, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 28, -1, -1, -1, -1, -1, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 28, -1, -1, -1, -1, 84, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, -1, -1, -1, -1, -1, 84, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 81, -1, 83, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 83, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 61, 62, - 63, -1, -1, -1, -1, 68, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 62, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47 -}; - - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 3, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 61, 68, 107, 108, 111, 112, 113, 114, - 120, 123, 124, 125, 126, 146, 147, 148, 3, 83, - 124, 123, 126, 127, 82, 109, 110, 124, 108, 108, - 3, 83, 108, 83, 107, 108, 139, 140, 61, 63, - 125, 0, 147, 83, 3, 121, 122, 62, 123, 126, - 66, 82, 81, 139, 140, 83, 112, 115, 116, 117, - 123, 3, 4, 5, 6, 8, 9, 49, 50, 51, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 67, - 68, 69, 70, 71, 72, 82, 84, 86, 87, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 105, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 124, 107, 139, 3, 62, 108, - 128, 129, 130, 131, 3, 64, 89, 102, 106, 121, - 81, 66, 84, 110, 83, 103, 135, 139, 115, 117, - 84, 116, 80, 118, 119, 124, 117, 80, 61, 89, - 61, 89, 89, 106, 80, 61, 61, 61, 137, 61, - 3, 82, 82, 82, 105, 105, 117, 132, 7, 8, - 9, 61, 63, 65, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 81, 104, 91, 68, 73, 74, - 69, 70, 10, 11, 12, 13, 75, 76, 14, 15, - 67, 77, 78, 16, 17, 79, 66, 82, 84, 141, - 84, 137, 61, 63, 124, 126, 133, 134, 62, 66, - 62, 66, 64, 84, 106, 122, 135, 136, 84, 106, - 66, 82, 80, 137, 132, 80, 137, 105, 105, 105, - 54, 142, 82, 82, 62, 61, 126, 133, 62, 3, - 62, 88, 103, 105, 3, 103, 91, 91, 91, 92, - 92, 93, 93, 94, 94, 94, 94, 95, 95, 96, - 97, 98, 99, 100, 105, 103, 84, 62, 128, 133, - 64, 106, 134, 61, 63, 48, 130, 3, 66, 84, - 119, 106, 62, 137, 62, 62, 62, 61, 142, 91, - 62, 66, 64, 80, 62, 62, 64, 62, 128, 64, - 106, 84, 135, 137, 137, 137, 105, 62, 105, 103, - 102, 62, 64, 52, 62, 137, 62, 137, 82, 137 -}; - - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 85, 86, 86, 86, 86, 87, 87, 87, 87, - 87, 87, 87, 87, 88, 88, 89, 89, 89, 89, - 89, 89, 90, 90, 90, 90, 90, 90, 91, 91, - 92, 92, 92, 92, 93, 93, 93, 94, 94, 94, - 95, 95, 95, 95, 95, 96, 96, 96, 97, 97, - 98, 98, 99, 99, 100, 100, 101, 101, 102, 102, - 103, 103, 104, 104, 104, 104, 104, 104, 104, 104, - 104, 104, 104, 105, 105, 106, 107, 107, 108, 108, - 108, 108, 108, 108, 109, 109, 110, 110, 111, 111, - 111, 111, 111, 112, 112, 112, 112, 112, 112, 112, - 112, 112, 112, 112, 112, 113, 113, 113, 114, 114, - 115, 115, 116, 117, 117, 117, 117, 118, 118, 119, - 119, 119, 120, 120, 120, 121, 121, 122, 122, 123, - 123, 124, 124, 125, 125, 125, 125, 125, 125, 125, - 126, 126, 126, 126, 127, 127, 128, 128, 129, 129, - 130, 130, 130, 131, 131, 132, 132, 133, 133, 133, - 134, 134, 134, 134, 134, 134, 134, 134, 134, 135, - 135, 135, 136, 136, 137, 137, 137, 137, 137, 137, - 138, 138, 138, 139, 139, 139, 139, 140, 140, 141, - 141, 142, 142, 143, 143, 143, 144, 144, 144, 144, - 145, 145, 145, 145, 145, 146, 146, 147, 147, 148, - 148, 148, 148 -}; - - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 1, 3, 1, 4, 3, 4, - 3, 3, 2, 2, 1, 3, 1, 2, 2, 2, - 2, 4, 1, 1, 1, 1, 1, 1, 1, 4, - 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, - 1, 3, 3, 3, 3, 1, 3, 3, 1, 3, - 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, - 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 1, 2, 3, 1, 2, - 1, 2, 1, 2, 1, 3, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 5, 4, 2, 1, 1, - 1, 2, 3, 2, 1, 2, 1, 1, 3, 1, - 2, 3, 4, 5, 2, 1, 3, 1, 3, 1, - 1, 2, 1, 1, 3, 4, 3, 4, 4, 3, - 1, 2, 2, 3, 1, 2, 1, 3, 1, 3, - 2, 2, 1, 1, 3, 1, 2, 1, 1, 2, - 3, 2, 3, 3, 4, 2, 3, 3, 4, 1, - 3, 4, 1, 3, 1, 1, 1, 1, 1, 1, - 3, 4, 3, 2, 3, 3, 4, 1, 2, 1, - 2, 1, 2, 5, 7, 5, 5, 7, 6, 7, - 3, 2, 2, 2, 3, 1, 2, 1, 1, 4, - 3, 3, 2 -}; - - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (yylen); \ - yystate = *yyssp; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, ctx, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (0) - -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (N) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (0) -#endif - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) - - -/* Enable debugging if requested. */ -#if C89_DEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined C89_LTYPE_IS_TRIVIAL && C89_LTYPE_IS_TRIVIAL - -/* Print *YYLOCP on YYO. Private, do not rely on its existence. */ - -YY_ATTRIBUTE_UNUSED -static unsigned -yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) -{ - unsigned res = 0; - int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; - if (0 <= yylocp->first_line) - { - res += YYFPRINTF (yyo, "%d", yylocp->first_line); - if (0 <= yylocp->first_column) - res += YYFPRINTF (yyo, ".%d", yylocp->first_column); - } - if (0 <= yylocp->last_line) - { - if (yylocp->first_line < yylocp->last_line) - { - res += YYFPRINTF (yyo, "-%d", yylocp->last_line); - if (0 <= end_col) - res += YYFPRINTF (yyo, ".%d", end_col); - } - else if (0 <= end_col && yylocp->first_column < end_col) - res += YYFPRINTF (yyo, "-%d", end_col); - } - return res; - } - -# define YY_LOCATION_PRINT(File, Loc) \ - yy_location_print_ (File, &(Loc)) - -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, ctx, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - - -/*----------------------------------------. -| Print this symbol's value on YYOUTPUT. | -`----------------------------------------*/ - -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, uscxml::C89Parser* ctx, void * scanner) -{ - FILE *yyo = yyoutput; - YYUSE (yyo); - YYUSE (yylocationp); - YYUSE (ctx); - YYUSE (scanner); - if (!yyvaluep) - return; -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - YYUSE (yytype); -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, uscxml::C89Parser* ctx, void * scanner) -{ - YYFPRINTF (yyoutput, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); - - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, ctx, scanner); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -static void -yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, uscxml::C89Parser* ctx, void * scanner) -{ - unsigned long int yylno = yyrline[yyrule]; - int yynrhs = yyr2[yyrule]; - int yyi; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, - yystos[yyssp[yyi + 1 - yynrhs]], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , ctx, scanner); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyssp, yyvsp, yylsp, Rule, ctx, scanner); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !C89_DEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !C89_DEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -yystrlen (const char *yystr) -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - { - YYSIZE_T yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, uscxml::C89Parser* ctx, void * scanner) -{ - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (ctx); - YYUSE (scanner); - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); - YY_IGNORE_MAYBE_UNINITIALIZED_END -} - - - - -/*----------. -| yyparse. | -`----------*/ - -int -yyparse (uscxml::C89Parser* ctx, void * scanner) -{ -/* The lookahead symbol. */ -int yychar; - - -/* The semantic value of the lookahead symbol. */ -/* Default value used for initialization, for pacifying older GCCs - or non-GCC compilers. */ -YY_INITIAL_VALUE (static YYSTYPE yyval_default;) -YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); - -/* Location data for the lookahead symbol. */ -static YYLTYPE yyloc_default -# if defined C89_LTYPE_IS_TRIVIAL && C89_LTYPE_IS_TRIVIAL - = { 1, 1, 1, 1 } -# endif -; -YYLTYPE yylloc = yyloc_default; - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - 'yyls': related to locations. - - Refer to the stacks through separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yylsp = yyls = yylsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - yylsp[0] = yylloc; - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = yylex (&yylval, &yylloc, scanner); - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - *++yylsp = yylloc; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - '$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: -#line 79 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->value(IDENTIFIER, (void*)&((yylsp[0])), (yyvsp[0].value)); free((yyvsp[0].value)); - } -#line 1888 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 3: -#line 82 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->value(CONSTANT, (void*)&((yylsp[0])), (yyvsp[0].value)); free((yyvsp[0].value)); - } -#line 1896 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 4: -#line 85 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->value(STRING_LITERAL, (void*)&((yylsp[0])), (yyvsp[0].value)); free((yyvsp[0].value)); - } -#line 1904 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 5: -#line 88 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = (yyvsp[-1].node); - } -#line 1912 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 6: -#line 94 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = (yyvsp[0].node); - } -#line 1920 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 7: -#line 97 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-3].node), (yyvsp[-1].node)); - } -#line 1928 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 8: -#line 100 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 1, (yyvsp[-2].node)); - } -#line 1936 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 9: -#line 103 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-3].node), (yyvsp[-1].node)); - } -#line 1944 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 10: -#line 106 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].value)); - } -#line 1952 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 11: -#line 109 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(PTR_OP, 2, (yyvsp[-2].node), (yyvsp[0].value)); - } -#line 1960 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 12: -#line 112 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(INC_OP, 1, (yyvsp[-1].node)); - } -#line 1968 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 13: -#line 115 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(DEC_OP, 1, (yyvsp[-1].node)); - } -#line 1976 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 14: -#line 121 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = (yyvsp[0].node); - } -#line 1984 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 15: -#line 124 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 1992 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 16: -#line 130 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = (yyvsp[0].node); - } -#line 2000 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 17: -#line 133 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(INC_OP, 1, (yyvsp[0].node)); - } -#line 2008 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 18: -#line 136 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(DEC_OP, 1, (yyvsp[0].node)); - } -#line 2016 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 19: -#line 139 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2024 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 20: -#line 142 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(SIZEOF, 1, (yyvsp[0].node)); - } -#line 2032 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 21: -#line 145 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(SIZEOF, 1, (yyvsp[-1].node)); - } -#line 2040 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 22: -#line 151 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 0); } -#line 2046 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 23: -#line 152 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 0); } -#line 2052 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 24: -#line 153 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 0); } -#line 2058 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 25: -#line 154 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 0); } -#line 2064 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 26: -#line 155 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 0); } -#line 2070 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 27: -#line 156 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 0); } -#line 2076 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 28: -#line 160 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2082 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 29: -#line 161 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); } -#line 2088 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 30: -#line 165 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2094 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 31: -#line 166 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2102 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 32: -#line 169 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2110 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 33: -#line 172 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2118 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 34: -#line 178 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2124 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 35: -#line 179 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2132 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 36: -#line 182 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2140 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 37: -#line 188 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2146 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 38: -#line 189 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(LEFT_OP, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2154 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 39: -#line 192 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(RIGHT_OP, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2162 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 40: -#line 198 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2168 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 41: -#line 199 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2176 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 42: -#line 202 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2184 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 43: -#line 205 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(LE_OP, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2192 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 44: -#line 208 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(GE_OP, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2200 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 45: -#line 214 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2206 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 46: -#line 215 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(EQ_OP, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2214 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 47: -#line 218 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(NE_OP, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2222 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 48: -#line 224 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2228 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 49: -#line 225 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2236 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 50: -#line 231 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2242 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 51: -#line 232 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2250 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 52: -#line 238 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2256 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 53: -#line 239 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2264 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 54: -#line 245 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2270 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 55: -#line 246 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(AND_OP, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2278 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 56: -#line 252 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2284 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 57: -#line 253 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(OR_OP, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2292 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 58: -#line 259 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2298 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 59: -#line 260 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 3, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2306 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 60: -#line 266 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2312 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 61: -#line 267 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2320 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 62: -#line 273 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node('=', 0); } -#line 2326 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 63: -#line 274 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(MUL_ASSIGN, 0); } -#line 2332 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 64: -#line 275 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(DIV_ASSIGN, 0); } -#line 2338 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 65: -#line 276 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(MOD_ASSIGN, 0); } -#line 2344 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 66: -#line 277 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(ADD_ASSIGN, 0); } -#line 2350 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 67: -#line 278 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(SUB_ASSIGN, 0); } -#line 2356 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 68: -#line 279 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(LEFT_ASSIGN, 0); } -#line 2362 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 69: -#line 280 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(RIGHT_ASSIGN, 0); } -#line 2368 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 70: -#line 281 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(AND_ASSIGN, 0); } -#line 2374 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 71: -#line 282 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(XOR_ASSIGN, 0); } -#line 2380 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 72: -#line 283 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(OR_ASSIGN, 0); } -#line 2386 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 73: -#line 287 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2392 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 74: -#line 288 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2400 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 75: -#line 294 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2406 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 76: -#line 298 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 2412 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 77: -#line 299 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-2].node), (yyvsp[-1].node)); - } -#line 2420 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 78: -#line 305 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2426 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 79: -#line 306 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2434 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 80: -#line 309 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2440 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 81: -#line 310 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2448 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 82: -#line 313 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2454 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 83: -#line 314 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2462 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 84: -#line 320 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2468 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 85: -#line 321 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2476 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 86: -#line 327 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2482 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 87: -#line 328 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2490 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 88: -#line 334 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(TYPEDEF, 0); } -#line 2496 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 89: -#line 335 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(EXTERN, 0); } -#line 2502 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 90: -#line 336 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(STATIC, 0); } -#line 2508 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 91: -#line 337 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(AUTO, 0); } -#line 2514 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 92: -#line 338 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(REGISTER, 0); } -#line 2520 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 93: -#line 342 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(VOID, 0); } -#line 2526 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 94: -#line 343 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(CHAR, 0); } -#line 2532 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 95: -#line 344 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(SHORT, 0); } -#line 2538 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 96: -#line 345 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(INT, 0); } -#line 2544 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 97: -#line 346 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(LONG, 0); } -#line 2550 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 98: -#line 347 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(FLOAT, 0); } -#line 2556 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 99: -#line 348 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(DOUBLE, 0); } -#line 2562 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 100: -#line 349 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(SIGNED, 0); } -#line 2568 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 101: -#line 350 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(UNSIGNED, 0); } -#line 2574 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 102: -#line 351 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2580 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 103: -#line 352 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2586 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 104: -#line 353 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(TYPE_NAME, 0); } -#line 2592 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 105: -#line 357 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 3, (yyvsp[-4].node), (yyvsp[-3].value), (yyvsp[-1].node)); - } -#line 2600 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 106: -#line 360 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-3].node), (yyvsp[-1].node)); - } -#line 2608 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 107: -#line 363 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 1, (yyvsp[-1].node)); - } -#line 2616 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 108: -#line 369 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(STRUCT, 0); } -#line 2622 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 109: -#line 370 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(STRUCT, 1); } -#line 2628 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 110: -#line 374 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2634 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 111: -#line 375 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2642 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 112: -#line 381 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[-1].node)); - } -#line 2650 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 113: -#line 387 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2658 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 114: -#line 390 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2664 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 115: -#line 391 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2672 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 116: -#line 394 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2678 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 117: -#line 398 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2684 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 118: -#line 399 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2692 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 119: -#line 405 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2698 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 120: -#line 406 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 1, (yyvsp[0].node)); - } -#line 2706 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 121: -#line 409 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2714 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 122: -#line 415 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(ENUM, 1, (yyvsp[-1].node)); } -#line 2720 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 123: -#line 416 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(ENUM, 2, (yyvsp[-3].value), (yyvsp[-1].node)); } -#line 2726 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 124: -#line 417 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(ENUM, 1, (yyvsp[0].value)); } -#line 2732 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 125: -#line 421 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2738 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 126: -#line 422 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2746 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 127: -#line 428 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->value(IDENTIFIER, (void*)&((yylsp[0])), (yyvsp[0].value)); free((yyvsp[0].value)); - } -#line 2754 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 128: -#line 431 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 2, (yyvsp[-2].value), (yyvsp[0].node)); } -#line 2760 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 129: -#line 435 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2766 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 130: -#line 436 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2772 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 131: -#line 440 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2780 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 132: -#line 443 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2786 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 133: -#line 447 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->value(IDENTIFIER, (void*)&((yylsp[0])), (yyvsp[0].value)); free((yyvsp[0].value)); - } -#line 2794 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 134: -#line 450 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 1, (yyvsp[-1].node)); - } -#line 2802 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 135: -#line 453 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-3].node), (yyvsp[-1].node)); - } -#line 2810 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 136: -#line 456 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 1, (yyvsp[-2].node)); - } -#line 2818 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 137: -#line 459 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-3].node), (yyvsp[-1].node)); - } -#line 2826 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 138: -#line 462 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-3].node), (yyvsp[-1].node)); - } -#line 2834 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 139: -#line 465 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 1, (yyvsp[-2].node)); - } -#line 2842 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 140: -#line 471 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 0); } -#line 2848 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 141: -#line 472 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 1, (yyvsp[0].node)); } -#line 2854 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 142: -#line 473 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 1, (yyvsp[0].node)); } -#line 2860 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 143: -#line 474 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); } -#line 2866 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 144: -#line 478 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2872 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 145: -#line 479 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2880 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 146: -#line 486 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2886 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 147: -#line 487 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(ELLIPSIS, 1, (yyvsp[-2].node)); } -#line 2892 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 148: -#line 491 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2898 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 149: -#line 492 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 2906 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 150: -#line 498 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2914 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 151: -#line 501 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2922 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 152: -#line 504 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2928 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 153: -#line 508 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->value(IDENTIFIER, (void*)&((yylsp[0])), (yyvsp[0].value)); free((yyvsp[0].value)); - } -#line 2936 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 154: -#line 511 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-2].node), (yyvsp[0].value)); - } -#line 2944 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 155: -#line 517 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2950 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 156: -#line 518 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 2958 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 157: -#line 524 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2964 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 158: -#line 525 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 2970 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 159: -#line 526 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 2976 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 160: -#line 530 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 2982 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 161: -#line 531 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 0); } -#line 2988 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 162: -#line 532 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[-1].node); } -#line 2994 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 163: -#line 533 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[-2].node); } -#line 3000 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 164: -#line 534 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-3].node), (yyvsp[-1].node)); - } -#line 3008 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 165: -#line 537 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 0); } -#line 3014 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 166: -#line 538 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 1, (yyvsp[-1].node)); } -#line 3020 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 167: -#line 539 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 1, (yyvsp[-2].node)); } -#line 3026 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 168: -#line 540 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-3].node), (yyvsp[-1].node)); - } -#line 3034 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 169: -#line 546 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3040 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 170: -#line 547 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 1, (yyvsp[-1].node)); - } -#line 3048 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 171: -#line 550 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 1, (yyvsp[-2].node)); - } -#line 3056 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 172: -#line 556 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3062 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 173: -#line 557 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 3070 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 174: -#line 563 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3076 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 175: -#line 564 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3082 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 176: -#line 565 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3088 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 177: -#line 566 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3094 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 178: -#line 567 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3100 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 179: -#line 568 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3106 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 180: -#line 572 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(IDENTIFIER, 2, (yyvsp[-2].value), (yyvsp[0].node)); - } -#line 3114 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 181: -#line 575 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(CASE, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 3122 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 182: -#line 578 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(DEFAULT, 1, (yyvsp[0].node)); - } -#line 3130 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 183: -#line 584 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 0); - } -#line 3138 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 184: -#line 587 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 1, (yyvsp[-1].node)); - } -#line 3146 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 185: -#line 590 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 1, (yyvsp[-1].node)); - } -#line 3154 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 186: -#line 593 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-2].node), (yyvsp[-1].node)); - } -#line 3162 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 187: -#line 599 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3168 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 188: -#line 600 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 3176 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 189: -#line 606 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3182 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 190: -#line 607 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(',', 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 3190 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 191: -#line 613 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 0); - } -#line 3198 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 192: -#line 616 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = (yyvsp[-1].node); - } -#line 3206 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 193: -#line 622 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(IF, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 3214 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 194: -#line 625 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(IF, 3, (yyvsp[-4].node), (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 3222 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 195: -#line 628 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(SWITCH, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 3230 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 196: -#line 634 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(WHILE, 2, (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 3238 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 197: -#line 637 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(DO, 2, (yyvsp[-2].node), (yyvsp[-5].node)); - } -#line 3246 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 198: -#line 640 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(FOR, 3, (yyvsp[-3].node), (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 3254 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 199: -#line 643 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(FOR, 4, (yyvsp[-4].node), (yyvsp[-3].node), (yyvsp[-2].node), (yyvsp[0].node)); - } -#line 3262 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 200: -#line 649 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(GOTO, 1, (yyvsp[-1].value)); } -#line 3268 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 201: -#line 650 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(CONTINUE, 0); } -#line 3274 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 202: -#line 651 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(BREAK, 0); } -#line 3280 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 203: -#line 652 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(RETURN, 0); } -#line 3286 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 204: -#line 653 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(RETURN, 1, (yyvsp[-1].node)); } -#line 3292 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 205: -#line 657 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3298 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 206: -#line 658 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); } -#line 3304 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 207: -#line 662 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3310 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 208: -#line 663 "c89.ypp" /* yacc.c:1646 */ - { (yyval.node) = (yyvsp[0].node); } -#line 3316 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 209: -#line 667 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 4, (yyvsp[-3].node), (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 3324 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 210: -#line 670 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 3, (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 3332 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 211: -#line 673 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 3, (yyvsp[-2].node), (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 3340 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - case 212: -#line 676 "c89.ypp" /* yacc.c:1646 */ - { - (yyval.node) = ctx->node(0, 2, (yyvsp[-1].node), (yyvsp[0].node)); - } -#line 3348 "c89.tab.cpp" /* yacc.c:1646 */ - break; - - -#line 3352 "c89.tab.cpp" /* yacc.c:1646 */ - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now 'shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*--------------------------------------. -| yyerrlab -- here on detecting error. | -`--------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (&yylloc, ctx, scanner, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (&yylloc, ctx, scanner, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - yyerror_range[1] = yylloc; - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, ctx, scanner); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule whose action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, ctx, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - *++yyvsp = yylval; - YY_IGNORE_MAYBE_UNINITIALIZED_END - - yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc; - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined yyoverflow || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, ctx, scanner, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, ctx, scanner); - } - /* Do not reclaim the symbols of the rule whose action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, ctx, scanner); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - return yyresult; -} -#line 681 "c89.ypp" /* yacc.c:1906 */ - diff --git a/src/uscxml/plugins/datamodel/c89/parser/c89.tab.hpp b/src/uscxml/plugins/datamodel/c89/parser/c89.tab.hpp deleted file mode 100644 index 01eaea1..0000000 --- a/src/uscxml/plugins/datamodel/c89/parser/c89.tab.hpp +++ /dev/null @@ -1,153 +0,0 @@ -/* A Bison parser, made by GNU Bison 3.0.4. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -#ifndef YY_C89_C89_TAB_HPP_INCLUDED -# define YY_C89_C89_TAB_HPP_INCLUDED -/* Debug traces. */ -#ifndef C89_DEBUG -# if defined YYDEBUG -#if YYDEBUG -# define C89_DEBUG 1 -# else -# define C89_DEBUG 0 -# endif -# else /* ! defined YYDEBUG */ -# define C89_DEBUG 1 -# endif /* ! defined YYDEBUG */ -#endif /* ! defined C89_DEBUG */ -#if C89_DEBUG -extern int c89_debug; -#endif - -/* Token type. */ -#ifndef C89_TOKENTYPE -# define C89_TOKENTYPE - enum c89_tokentype - { - IDENTIFIER = 258, - CONSTANT = 259, - STRING_LITERAL = 260, - SIZEOF = 261, - PTR_OP = 262, - INC_OP = 263, - DEC_OP = 264, - LEFT_OP = 265, - RIGHT_OP = 266, - LE_OP = 267, - GE_OP = 268, - EQ_OP = 269, - NE_OP = 270, - AND_OP = 271, - OR_OP = 272, - MUL_ASSIGN = 273, - DIV_ASSIGN = 274, - MOD_ASSIGN = 275, - ADD_ASSIGN = 276, - SUB_ASSIGN = 277, - LEFT_ASSIGN = 278, - RIGHT_ASSIGN = 279, - AND_ASSIGN = 280, - XOR_ASSIGN = 281, - OR_ASSIGN = 282, - TYPE_NAME = 283, - TYPEDEF = 284, - EXTERN = 285, - STATIC = 286, - AUTO = 287, - REGISTER = 288, - CHAR = 289, - SHORT = 290, - INT = 291, - LONG = 292, - SIGNED = 293, - UNSIGNED = 294, - FLOAT = 295, - DOUBLE = 296, - CONST = 297, - VOLATILE = 298, - VOID = 299, - STRUCT = 300, - UNION = 301, - ENUM = 302, - ELLIPSIS = 303, - CASE = 304, - DEFAULT = 305, - IF = 306, - ELSE = 307, - SWITCH = 308, - WHILE = 309, - DO = 310, - FOR = 311, - GOTO = 312, - CONTINUE = 313, - BREAK = 314, - RETURN = 315 - }; -#endif - -/* Value type. */ -#if ! defined C89_STYPE && ! defined C89_STYPE_IS_DECLARED - -union C89_STYPE -{ -#line 26 "c89.ypp" /* yacc.c:1909 */ - - uscxml::C89ParserNode* node; - char* value; - -#line 128 "c89.tab.hpp" /* yacc.c:1909 */ -}; - -typedef union C89_STYPE C89_STYPE; -# define C89_STYPE_IS_TRIVIAL 1 -# define C89_STYPE_IS_DECLARED 1 -#endif - -/* Location type. */ -#if ! defined C89_LTYPE && ! defined C89_LTYPE_IS_DECLARED -typedef struct C89_LTYPE C89_LTYPE; -struct C89_LTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -}; -# define C89_LTYPE_IS_DECLARED 1 -# define C89_LTYPE_IS_TRIVIAL 1 -#endif - - - -int c89_parse (uscxml::C89Parser* ctx, void * scanner); - -#endif /* !YY_C89_C89_TAB_HPP_INCLUDED */ diff --git a/src/uscxml/plugins/datamodel/c89/parser/c89.ypp b/src/uscxml/plugins/datamodel/c89/parser/c89.ypp deleted file mode 100644 index 8e113c8..0000000 --- a/src/uscxml/plugins/datamodel/c89/parser/c89.ypp +++ /dev/null @@ -1,681 +0,0 @@ -%{ -#include "../C89Parser.h" -#include "c89.tab.hpp" -#include -#include - -#define YYMAXDEPTH 20000 // default is 10000 -#define YYDEBUG 1 -#define YYERROR_VERBOSE 1 - -extern int c89_lex (C89_STYPE* yylval_param, C89_LTYPE* yylloc_param, void* yyscanner); - -using namespace uscxml; -%} - -%pure-parser -%debug -%locations -%file-prefix "c89" -%parse-param { uscxml::C89Parser* ctx } -%lex-param {void * scanner} -%parse-param {void * scanner} -%define api.prefix {c89_} -%defines - -%union { - uscxml::C89ParserNode* node; - char* value; -} - -%error-verbose - -%type primary_expression expression postfix_expression -%type argument_expression_list assignment_expression -%type unary_expression unary_operator cast_expression -%type type_name assignment_operator -%type multiplicative_expression additive_expression shift_expression -%type relational_expression equality_expression and_expression -%type exclusive_or_expression inclusive_or_expression -%type logical_and_expression logical_or_expression conditional_expression -%type specifier_qualifier_list abstract_declarator -%type type_specifier type_qualifier struct_or_union_specifier -%type enum_specifier pointer direct_abstract_declarator -%type struct_or_union enumerator_list enumerator -%type constant_expression type_qualifier_list -%type parameter_type_list parameter_declaration parameter_list -%type declaration_specifiers declarator storage_class_specifier -%type init_declarator_list init_declarator initializer -%type direct_declarator initializer_list identifier_list -%type statement labeled_statement compound_statement expression_statement -%type selection_statement iteration_statement jump_statement -%type statement_list declaration_list declaration -%type translation_unit external_declaration function_definition -%type struct_declarator struct_declaration -%type struct_declarator_list struct_declaration_list - -%type VOID CHAR SHORT INT LONG FLOAT DOUBLE SIGNED UNSIGNED TYPE_NAME -%type CONST VOLATILE - -%type IDENTIFIER CONSTANT STRING_LITERAL - -%token IDENTIFIER CONSTANT STRING_LITERAL SIZEOF -%token PTR_OP INC_OP DEC_OP LEFT_OP RIGHT_OP LE_OP GE_OP EQ_OP NE_OP -%token AND_OP OR_OP MUL_ASSIGN DIV_ASSIGN MOD_ASSIGN ADD_ASSIGN -%token SUB_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN -%token XOR_ASSIGN OR_ASSIGN TYPE_NAME - -%token TYPEDEF EXTERN STATIC AUTO REGISTER -%token CHAR SHORT INT LONG SIGNED UNSIGNED FLOAT DOUBLE CONST VOLATILE VOID -%token STRUCT UNION ENUM ELLIPSIS - -%token CASE DEFAULT IF ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN - -%start translation_unit -%% - - -primary_expression - : IDENTIFIER { - $$ = ctx->value(IDENTIFIER, (void*)&(@1), $1); free($1); - } - | CONSTANT { - $$ = ctx->value(CONSTANT, (void*)&(@1), $1); free($1); - } - | STRING_LITERAL { - $$ = ctx->value(STRING_LITERAL, (void*)&(@1), $1); free($1); - } - | '(' expression ')' { - $$ = $2; - } - ; - -postfix_expression - : primary_expression { - $$ = $1; - } - | postfix_expression '[' expression ']' { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | postfix_expression '(' ')' { - $$ = ctx->node(__LINE__, 1, $1); - } - | postfix_expression '(' argument_expression_list ')' { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | postfix_expression '.' IDENTIFIER { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | postfix_expression PTR_OP IDENTIFIER { - $$ = ctx->node(PTR_OP, 2, $1, $3); - } - | postfix_expression INC_OP { - $$ = ctx->node(INC_OP, 1, $1); - } - | postfix_expression DEC_OP { - $$ = ctx->node(DEC_OP, 1, $1); - } - ; - -argument_expression_list - : assignment_expression { - $$ = $1; - } - | argument_expression_list ',' assignment_expression { - $$ = ctx->node(',', 2, $1, $3); - } - ; - -unary_expression - : postfix_expression { - $$ = $1; - } - | INC_OP unary_expression { - $$ = ctx->node(INC_OP, 1, $2); - } - | DEC_OP unary_expression { - $$ = ctx->node(DEC_OP, 1, $2); - } - | unary_operator cast_expression { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - | SIZEOF unary_expression { - $$ = ctx->node(SIZEOF, 1, $2); - } - | SIZEOF '(' type_name ')' { - $$ = ctx->node(SIZEOF, 1, $3); - } - ; - -unary_operator - : '&' { $$ = ctx->node(__LINE__, 0); } - | '*' { $$ = ctx->node(__LINE__, 0); } - | '+' { $$ = ctx->node(__LINE__, 0); } - | '-' { $$ = ctx->node(__LINE__, 0); } - | '~' { $$ = ctx->node(__LINE__, 0); } - | '!' { $$ = ctx->node(__LINE__, 0); } - ; - -cast_expression - : unary_expression { $$ = $1; } - | '(' type_name ')' cast_expression { $$ = ctx->node(__LINE__, 2, $2, $4); } - ; - -multiplicative_expression - : cast_expression { $$ = $1; } - | multiplicative_expression '*' cast_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | multiplicative_expression '/' cast_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | multiplicative_expression '%' cast_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - ; - -additive_expression - : multiplicative_expression { $$ = $1; } - | additive_expression '+' multiplicative_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | additive_expression '-' multiplicative_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - ; - -shift_expression - : additive_expression { $$ = $1; } - | shift_expression LEFT_OP additive_expression { - $$ = ctx->node(LEFT_OP, 2, $1, $3); - } - | shift_expression RIGHT_OP additive_expression { - $$ = ctx->node(RIGHT_OP, 2, $1, $3); - } - ; - -relational_expression - : shift_expression { $$ = $1; } - | relational_expression '<' shift_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | relational_expression '>' shift_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | relational_expression LE_OP shift_expression { - $$ = ctx->node(LE_OP, 2, $1, $3); - } - | relational_expression GE_OP shift_expression { - $$ = ctx->node(GE_OP, 2, $1, $3); - } - ; - -equality_expression - : relational_expression { $$ = $1; } - | equality_expression EQ_OP relational_expression { - $$ = ctx->node(EQ_OP, 2, $1, $3); - } - | equality_expression NE_OP relational_expression { - $$ = ctx->node(NE_OP, 2, $1, $3); - } - ; - -and_expression - : equality_expression { $$ = $1; } - | and_expression '&' equality_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - ; - -exclusive_or_expression - : and_expression { $$ = $1; } - | exclusive_or_expression '^' and_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - ; - -inclusive_or_expression - : exclusive_or_expression { $$ = $1; } - | inclusive_or_expression '|' exclusive_or_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - ; - -logical_and_expression - : inclusive_or_expression { $$ = $1; } - | logical_and_expression AND_OP inclusive_or_expression { - $$ = ctx->node(AND_OP, 2, $1, $3); - } - ; - -logical_or_expression - : logical_and_expression { $$ = $1; } - | logical_or_expression OR_OP logical_and_expression { - $$ = ctx->node(OR_OP, 2, $1, $3); - } - ; - -conditional_expression - : logical_or_expression { $$ = $1; } - | logical_or_expression '?' expression ':' conditional_expression { - $$ = ctx->node(__LINE__, 3, $1, $3, $5); - } - ; - -assignment_expression - : conditional_expression { $$ = $1; } - | unary_expression assignment_operator assignment_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - ; - -assignment_operator - : '=' { $$ = ctx->node('=', 0); } - | MUL_ASSIGN { $$ = ctx->node(MUL_ASSIGN, 0); } - | DIV_ASSIGN { $$ = ctx->node(DIV_ASSIGN, 0); } - | MOD_ASSIGN { $$ = ctx->node(MOD_ASSIGN, 0); } - | ADD_ASSIGN { $$ = ctx->node(ADD_ASSIGN, 0); } - | SUB_ASSIGN { $$ = ctx->node(SUB_ASSIGN, 0); } - | LEFT_ASSIGN { $$ = ctx->node(LEFT_ASSIGN, 0); } - | RIGHT_ASSIGN { $$ = ctx->node(RIGHT_ASSIGN, 0); } - | AND_ASSIGN { $$ = ctx->node(AND_ASSIGN, 0); } - | XOR_ASSIGN { $$ = ctx->node(XOR_ASSIGN, 0); } - | OR_ASSIGN { $$ = ctx->node(OR_ASSIGN, 0); } - ; - -expression - : assignment_expression { $$ = $1; } - | expression ',' assignment_expression { - $$ = ctx->node(',', 2, $1, $3); - } - ; - -constant_expression - : conditional_expression { $$ = $1; } - ; - -declaration - : declaration_specifiers ';' { $$ = $1; } - | declaration_specifiers init_declarator_list ';' { - $$ = ctx->node(',', 2, $1, $2); - } - ; - -declaration_specifiers - : storage_class_specifier { $$ = $1; } - | storage_class_specifier declaration_specifiers { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - | type_specifier { $$ = $1; } - | type_specifier declaration_specifiers { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - | type_qualifier { $$ = $1; } - | type_qualifier declaration_specifiers { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - ; - -init_declarator_list - : init_declarator { $$ = $1; } - | init_declarator_list ',' init_declarator { - $$ = ctx->node(',', 2, $1, $3); - } - ; - -init_declarator - : declarator { $$ = $1; } - | declarator '=' initializer { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - ; - -storage_class_specifier - : TYPEDEF { $$ = ctx->node(TYPEDEF, 0); } - | EXTERN { $$ = ctx->node(EXTERN, 0); } - | STATIC { $$ = ctx->node(STATIC, 0); } - | AUTO { $$ = ctx->node(AUTO, 0); } - | REGISTER { $$ = ctx->node(REGISTER, 0); } - ; - -type_specifier - : VOID { $$ = ctx->node(VOID, 0); } - | CHAR { $$ = ctx->node(CHAR, 0); } - | SHORT { $$ = ctx->node(SHORT, 0); } - | INT { $$ = ctx->node(INT, 0); } - | LONG { $$ = ctx->node(LONG, 0); } - | FLOAT { $$ = ctx->node(FLOAT, 0); } - | DOUBLE { $$ = ctx->node(DOUBLE, 0); } - | SIGNED { $$ = ctx->node(SIGNED, 0); } - | UNSIGNED { $$ = ctx->node(UNSIGNED, 0); } - | struct_or_union_specifier { $$ = $1; } - | enum_specifier { $$ = $1; } - | TYPE_NAME { $$ = ctx->node(TYPE_NAME, 0); } - ; - -struct_or_union_specifier - : struct_or_union IDENTIFIER '{' struct_declaration_list '}' { - $$ = ctx->node(__LINE__, 3, $1, $2, $4); - } - | struct_or_union '{' struct_declaration_list '}' { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | struct_or_union IDENTIFIER { - $$ = ctx->node(__LINE__, 1, $1); - } - ; - -struct_or_union - : STRUCT { $$ = ctx->node(STRUCT, 0); } - | UNION { $$ = ctx->node(STRUCT, 1); } - ; - -struct_declaration_list - : struct_declaration { $$ = $1; } - | struct_declaration_list struct_declaration { - $$ = ctx->node(',', 2, $1, $2); - } - ; - -struct_declaration - : specifier_qualifier_list struct_declarator_list ';' { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - ; - -specifier_qualifier_list - : type_specifier specifier_qualifier_list { - $$ = ctx->node(',', 2, $1, $2); - } - | type_specifier { $$ = $1; } - | type_qualifier specifier_qualifier_list { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - | type_qualifier { $$ = $1; } - ; - -struct_declarator_list - : struct_declarator { $$ = $1; } - | struct_declarator_list ',' struct_declarator { - $$ = ctx->node(',', 2, $1, $3); - } - ; - -struct_declarator - : declarator { $$ = $1; } - | ':' constant_expression { - $$ = ctx->node(__LINE__, 1, $2); - } - | declarator ':' constant_expression { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - ; - -enum_specifier - : ENUM '{' enumerator_list '}' { $$ = ctx->node(ENUM, 1, $3); } - | ENUM IDENTIFIER '{' enumerator_list '}' { $$ = ctx->node(ENUM, 2, $2, $4); } - | ENUM IDENTIFIER { $$ = ctx->node(ENUM, 1, $2); } - ; - -enumerator_list - : enumerator { $$ = $1; } - | enumerator_list ',' enumerator { - $$ = ctx->node(',', 2, $1, $3); - } - ; - -enumerator - : IDENTIFIER { - $$ = ctx->value(IDENTIFIER, (void*)&(@1), $1); free($1); - } - | IDENTIFIER '=' constant_expression { $$ = ctx->node(__LINE__, 2, $1, $3); } - ; - -type_qualifier - : CONST { $$ = $1; } - | VOLATILE { $$ = $1; } - ; - -declarator - : pointer direct_declarator { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - | direct_declarator { $$ = $1; } - ; - -direct_declarator - : IDENTIFIER { - $$ = ctx->value(IDENTIFIER, (void*)&(@1), $1); free($1); - } - | '(' declarator ')' { - $$ = ctx->node(__LINE__, 1, $2); - } - | direct_declarator '[' constant_expression ']' { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | direct_declarator '[' ']' { - $$ = ctx->node(__LINE__, 1, $1); - } - | direct_declarator '(' parameter_type_list ')' { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | direct_declarator '(' identifier_list ')' { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | direct_declarator '(' ')' { - $$ = ctx->node(__LINE__, 1, $1); - } - ; - -pointer - : '*' { $$ = ctx->node(__LINE__, 0); } - | '*' type_qualifier_list { $$ = ctx->node(__LINE__, 1, $2); } - | '*' pointer { $$ = ctx->node(__LINE__, 1, $2); } - | '*' type_qualifier_list pointer { $$ = ctx->node(__LINE__, 2, $2, $3); } - ; - -type_qualifier_list - : type_qualifier { $$ = $1; } - | type_qualifier_list type_qualifier { - $$ = ctx->node(',', 2, $1, $2); - } - ; - - -parameter_type_list - : parameter_list { $$ = $1; } - | parameter_list ',' ELLIPSIS { $$ = ctx->node(ELLIPSIS, 1, $1); } - ; - -parameter_list - : parameter_declaration { $$ = $1; } - | parameter_list ',' parameter_declaration { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - ; - -parameter_declaration - : declaration_specifiers declarator { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - | declaration_specifiers abstract_declarator { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - | declaration_specifiers { $$ = $1; } - ; - -identifier_list - : IDENTIFIER { - $$ = ctx->value(IDENTIFIER, (void*)&(@1), $1); free($1); - } - | identifier_list ',' IDENTIFIER { - $$ = ctx->node(',', 2, $1, $3); - } - ; - -type_name - : specifier_qualifier_list { $$ = $1; } - | specifier_qualifier_list abstract_declarator { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - ; - -abstract_declarator - : pointer { $$ = $1; } - | direct_abstract_declarator { $$ = $1; } - | pointer direct_abstract_declarator { $$ = $1; } - ; - -direct_abstract_declarator - : '(' abstract_declarator ')' { $$ = $2; } - | '[' ']' { $$ = ctx->node(__LINE__, 0); } - | '[' constant_expression ']' { $$ = $2; } - | direct_abstract_declarator '[' ']' { $$ = $1; } - | direct_abstract_declarator '[' constant_expression ']' { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - | '(' ')' { $$ = ctx->node(__LINE__, 0); } - | '(' parameter_type_list ')' { $$ = ctx->node(__LINE__, 1, $2); } - | direct_abstract_declarator '(' ')' { $$ = ctx->node(__LINE__, 1, $1); } - | direct_abstract_declarator '(' parameter_type_list ')' { - $$ = ctx->node(__LINE__, 2, $1, $3); - } - ; - -initializer - : assignment_expression { $$ = $1; } - | '{' initializer_list '}' { - $$ = ctx->node(__LINE__, 1, $2); - } - | '{' initializer_list ',' '}' { - $$ = ctx->node(__LINE__, 1, $2); - } - ; - -initializer_list - : initializer { $$ = $1; } - | initializer_list ',' initializer { - $$ = ctx->node(',', 2, $1, $3); - } - ; - -statement - : labeled_statement { $$ = $1; } - | compound_statement { $$ = $1; } - | expression_statement { $$ = $1; } - | selection_statement { $$ = $1; } - | iteration_statement { $$ = $1; } - | jump_statement { $$ = $1; } - ; - -labeled_statement - : IDENTIFIER ':' statement { - $$ = ctx->node(IDENTIFIER, 2, $1, $3); - } - | CASE constant_expression ':' statement { - $$ = ctx->node(CASE, 2, $2, $4); - } - | DEFAULT ':' statement { - $$ = ctx->node(DEFAULT, 1, $3); - } - ; - -compound_statement - : '{' '}' { - $$ = ctx->node(__LINE__, 0); - } - | '{' statement_list '}' { - $$ = ctx->node(__LINE__, 1, $2); - } - | '{' declaration_list '}' { - $$ = ctx->node(__LINE__, 1, $2); - } - | '{' declaration_list statement_list '}' { - $$ = ctx->node(__LINE__, 2, $2, $3); - } - ; - -declaration_list - : declaration { $$ = $1; } - | declaration_list declaration { - $$ = ctx->node(',', 2, $1, $2); - } - ; - -statement_list - : statement { $$ = $1; } - | statement_list statement { - $$ = ctx->node(',', 2, $1, $2); - } - ; - -expression_statement - : ';' { - $$ = ctx->node(__LINE__, 0); - } - | expression ';' { - $$ = $1; - } - ; - -selection_statement - : IF '(' expression ')' statement { - $$ = ctx->node(IF, 2, $3, $5); - } - | IF '(' expression ')' statement ELSE statement { - $$ = ctx->node(IF, 3, $3, $5, $7); - } - | SWITCH '(' expression ')' statement { - $$ = ctx->node(SWITCH, 2, $3, $5); - } - ; - -iteration_statement - : WHILE '(' expression ')' statement { - $$ = ctx->node(WHILE, 2, $3, $5); - } - | DO statement WHILE '(' expression ')' ';' { - $$ = ctx->node(DO, 2, $5, $2); - } - | FOR '(' expression_statement expression_statement ')' statement { - $$ = ctx->node(FOR, 3, $3, $4, $6); - } - | FOR '(' expression_statement expression_statement expression ')' statement { - $$ = ctx->node(FOR, 4, $3, $4, $5, $7); - } - ; - -jump_statement - : GOTO IDENTIFIER ';' { $$ = ctx->node(GOTO, 1, $2); } - | CONTINUE ';' { $$ = ctx->node(CONTINUE, 0); } - | BREAK ';' { $$ = ctx->node(BREAK, 0); } - | RETURN ';' { $$ = ctx->node(RETURN, 0); } - | RETURN expression ';' { $$ = ctx->node(RETURN, 1, $2); } - ; - -translation_unit - : external_declaration { $$ = $1; } - | translation_unit external_declaration { $$ = ctx->node(__LINE__, 2, $1, $2); } - ; - -external_declaration - : function_definition { $$ = $1; } - | declaration { $$ = $1; } - ; - -function_definition - : declaration_specifiers declarator declaration_list compound_statement { - $$ = ctx->node(__LINE__, 4, $1, $2, $3, $4); - } - | declaration_specifiers declarator compound_statement { - $$ = ctx->node(__LINE__, 3, $1, $2, $3); - } - | declarator declaration_list compound_statement { - $$ = ctx->node(__LINE__, 3, $1, $2, $3); - } - | declarator compound_statement { - $$ = ctx->node(__LINE__, 2, $1, $2); - } - ; - -%% diff --git a/test/bindings/java/org/uscxml/apache/commons/scxml2/Context.java b/test/bindings/java/org/uscxml/apache/commons/scxml2/Context.java new file mode 100644 index 0000000..a0208c9 --- /dev/null +++ b/test/bindings/java/org/uscxml/apache/commons/scxml2/Context.java @@ -0,0 +1,7 @@ +package org.uscxml.apache.commons.scxml2; + +import org.uscxml.DataModel; + +public class Context { + public DataModel dm = null; +} diff --git a/test/bindings/java/org/uscxml/apache/commons/scxml2/Evaluator.java b/test/bindings/java/org/uscxml/apache/commons/scxml2/Evaluator.java new file mode 100644 index 0000000..5bd5642 --- /dev/null +++ b/test/bindings/java/org/uscxml/apache/commons/scxml2/Evaluator.java @@ -0,0 +1,7 @@ +package org.uscxml.apache.commons.scxml2; + +public abstract class Evaluator { + + public abstract Context newContext(Object object); + +} diff --git a/test/bindings/java/org/uscxml/apache/commons/scxml2/JexlEvaluator.java b/test/bindings/java/org/uscxml/apache/commons/scxml2/JexlEvaluator.java new file mode 100644 index 0000000..e50a259 --- /dev/null +++ b/test/bindings/java/org/uscxml/apache/commons/scxml2/JexlEvaluator.java @@ -0,0 +1,19 @@ +package org.uscxml.apache.commons.scxml2; + +import org.uscxml.Factory; +import org.uscxml.dm.jexl.JEXLDataModel; + +public class JexlEvaluator extends Evaluator { + + public JexlEvaluator() { + + } + + @Override + public Context newContext(Object object) { + // TODO Auto-generated method stub + Context ctx = new Context(); + ctx.dm = new JEXLDataModel(); + return ctx; + } +} diff --git a/test/bindings/java/org/uscxml/apache/commons/scxml2/SCXML.java b/test/bindings/java/org/uscxml/apache/commons/scxml2/SCXML.java new file mode 100644 index 0000000..67e5b1f --- /dev/null +++ b/test/bindings/java/org/uscxml/apache/commons/scxml2/SCXML.java @@ -0,0 +1,8 @@ +package org.uscxml.apache.commons.scxml2; + +import java.net.URL; + +public class SCXML { + public URL url = null; + +} diff --git a/test/bindings/java/org/uscxml/apache/commons/scxml2/SCXMLExecutor.java b/test/bindings/java/org/uscxml/apache/commons/scxml2/SCXMLExecutor.java new file mode 100644 index 0000000..704e897 --- /dev/null +++ b/test/bindings/java/org/uscxml/apache/commons/scxml2/SCXMLExecutor.java @@ -0,0 +1,49 @@ +package org.uscxml.apache.commons.scxml2; + +import java.net.URL; + +import org.uscxml.ActionLanguage; +import org.uscxml.Factory; +import org.uscxml.Interpreter; +import org.uscxml.InterpreterException; +import org.uscxml.InterpreterState; +import org.uscxml.helper.TestMonitor; + +public class SCXMLExecutor { + + public Interpreter interpreter = null; + public URL sourceURL = null; + public ActionLanguage al = new ActionLanguage(); + + public SCXMLExecutor(Evaluator evaluator, Object object, SimpleErrorReporter simpleErrorReporter) { + // TODO Auto-generated constructor stub + } + + public void setStateMachine(SCXML scxml) { + sourceURL = scxml.url; + } + + public void setRootContext(Context rootContext) { + al.setDataModel(rootContext.dm); + } + + public void go() { + try { + interpreter = Interpreter.fromURL(sourceURL.toString()); + interpreter.setActionLanguage(al); + + TestMonitor tm = new TestMonitor(); + interpreter.addMonitor(tm); + + InterpreterState state = InterpreterState.USCXML_UNDEF; + while(state != InterpreterState.USCXML_FINISHED) { + interpreter.step(); + } + + } catch (InterpreterException e) { + e.printStackTrace(); + } + + } + +} diff --git a/test/bindings/java/org/uscxml/apache/commons/scxml2/SCXMLReader.java b/test/bindings/java/org/uscxml/apache/commons/scxml2/SCXMLReader.java new file mode 100644 index 0000000..45c2a54 --- /dev/null +++ b/test/bindings/java/org/uscxml/apache/commons/scxml2/SCXMLReader.java @@ -0,0 +1,13 @@ +package org.uscxml.apache.commons.scxml2; + +import java.net.URL; + +public class SCXMLReader { + + public static SCXML read(URL scxml) { + SCXML foo = new SCXML(); + foo.url = scxml; + return foo; + } + +} diff --git a/test/bindings/java/org/uscxml/apache/commons/scxml2/SimpleErrorReporter.java b/test/bindings/java/org/uscxml/apache/commons/scxml2/SimpleErrorReporter.java new file mode 100644 index 0000000..06187f8 --- /dev/null +++ b/test/bindings/java/org/uscxml/apache/commons/scxml2/SimpleErrorReporter.java @@ -0,0 +1,5 @@ +package org.uscxml.apache.commons.scxml2; + +public class SimpleErrorReporter { + +} diff --git a/test/bindings/java/org/uscxml/dm/jexl/JEXLDataModel.java b/test/bindings/java/org/uscxml/dm/jexl/JEXLDataModel.java index 33da96c..5564d63 100644 --- a/test/bindings/java/org/uscxml/dm/jexl/JEXLDataModel.java +++ b/test/bindings/java/org/uscxml/dm/jexl/JEXLDataModel.java @@ -72,7 +72,12 @@ public class JEXLDataModel extends DataModel { @Override public Data evalAsData(String content) { - return new Data(); + JexlExpression expr = jexl.createExpression(content); + System.out.println(); + Data d = new Data(); + d.setAtom(expr.getParsedText()); + d.setType(Data.Type.VERBATIM); + return d; } @Override diff --git a/test/bindings/java/org/uscxml/examples/ApacheCommonsAPI.java b/test/bindings/java/org/uscxml/examples/ApacheCommonsAPI.java new file mode 100644 index 0000000..4cf3de4 --- /dev/null +++ b/test/bindings/java/org/uscxml/examples/ApacheCommonsAPI.java @@ -0,0 +1,45 @@ +package org.uscxml.examples; + +import java.net.URL; + +//import org.uscxml.apache.commons.scxml2.*; +import org.apache.commons.scxml2.*; +import org.apache.commons.scxml2.env.SimpleErrorReporter; +import org.apache.commons.scxml2.env.jexl.JexlEvaluator; +import org.apache.commons.scxml2.io.SCXMLReader; +import org.apache.commons.scxml2.model.SCXML; + +public class ApacheCommonsAPI { + + // SCXML model source URL + private static final URL SCXML = ApacheCommonsAPI.class.getResource("hello-world.xml"); + + public static void main(String [] args) throws Exception { + String uSCXMLLibPath = "/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava.jnilib"; + if (System.getenv().containsKey("USCXML_JAVA_LIB")) { + uSCXMLLibPath = System.getenv("USCXML_JAVA_LIB"); + } + + System.load(uSCXMLLibPath); + + + // evaluator instance which is used by SCXML engine to evaluate expressions in SCXML + Evaluator evaluator = new JexlEvaluator(); + // engine to execute the scxml instance + SCXMLExecutor executor = new SCXMLExecutor(evaluator, null, new SimpleErrorReporter()); + + // parse SCXML URL into SCXML model + SCXML scxml = SCXMLReader.read(SCXML); + // set state machine (scxml instance) to execute + executor.setStateMachine(scxml); + + // create root context storing variables and being used by evaluator + Context rootContext = evaluator.newContext(null); + // set the root context for the engine + executor.setRootContext(rootContext); + + // initiate the execution of the state machine + executor.go(); + } + +} diff --git a/test/bindings/java/org/uscxml/examples/hello-world.xml b/test/bindings/java/org/uscxml/examples/hello-world.xml new file mode 100644 index 0000000..3ac168c --- /dev/null +++ b/test/bindings/java/org/uscxml/examples/hello-world.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + \ No newline at end of file -- cgit v0.12