summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/datamodel
diff options
context:
space:
mode:
authorStefan Radomski <sradomski@mintwerk.de>2016-01-10 02:40:12 (GMT)
committerStefan Radomski <sradomski@mintwerk.de>2016-01-10 02:40:12 (GMT)
commit613cf9fb6fe4b24bc7852d5a31953f6ff419e43c (patch)
tree8459365c5a6a00503063b0bf1d516fce5ea4d891 /src/uscxml/plugins/datamodel
parentc699a4057a65a9a09f78310d8e12588f2dc072cd (diff)
downloaduscxml-613cf9fb6fe4b24bc7852d5a31953f6ff419e43c.zip
uscxml-613cf9fb6fe4b24bc7852d5a31953f6ff419e43c.tar.gz
uscxml-613cf9fb6fe4b24bc7852d5a31953f6ff419e43c.tar.bz2
Beautified code
Diffstat (limited to 'src/uscxml/plugins/datamodel')
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp24
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h6
-rw-r--r--src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp12
-rw-r--r--src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp6
-rw-r--r--src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp34
-rw-r--r--src/uscxml/plugins/datamodel/promela/PromelaParser.cpp4
-rw-r--r--src/uscxml/plugins/datamodel/promela/PromelaParser.h4
-rw-r--r--src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp1921
-rw-r--r--src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp2965
9 files changed, 2512 insertions, 2464 deletions
diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp
index 40b6cc2..fd4da3c 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.cpp
@@ -89,10 +89,10 @@ JSCDataModel::~JSCDataModel() {
void JSCDataModel::addExtension(DataModelExtension* ext) {
if (_extensions.find(ext) != _extensions.end())
return;
-
+
ext->dm = this;
_extensions.insert(ext);
-
+
JSObjectRef currScope = JSContextGetGlobalObject(_ctx);
std::list<std::string> locPath = InterpreterImpl::tokenize(ext->provides(), '.');
std::list<std::string>::iterator locIter = locPath.begin();
@@ -108,7 +108,7 @@ void JSCDataModel::addExtension(DataModelExtension* ext) {
JSValueRef newScope = JSObjectGetProperty(_ctx, currScope, pathCompJS, NULL);
JSStringRelease(pathCompJS);
-
+
if (JSValueIsObject(_ctx, newScope)) {
currScope = JSValueToObject(_ctx, newScope, NULL);
} else {
@@ -129,10 +129,10 @@ void JSCDataModel::addExtension(DataModelExtension* ext) {
JSValueRef JSCDataModel::jsExtension(JSContextRef ctx, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) {
DataModelExtension* extension = (DataModelExtension*)JSObjectGetPrivate(function);
-
+
JSStringRef memberRef;
std::string memberName;
-
+
if (argumentCount > 0 && JSValueIsString(ctx, arguments[0])) {
memberRef = JSValueToStringCopy(ctx, arguments[0], exception);
size_t maxSize = JSStringGetMaximumUTF8CStringSize(memberRef);
@@ -192,16 +192,16 @@ JSClassDefinition JSCDataModel::jsInvokersClassDef = { 0, 0, "invokers", 0, 0, 0
boost::shared_ptr<DataModelImpl> JSCDataModel::create(InterpreterInfo* interpreter) {
boost::shared_ptr<JSCDataModel> dm = boost::shared_ptr<JSCDataModel>(new JSCDataModel());
-
+
dm->_ctx = JSGlobalContextCreate(NULL);
dm->_interpreter = interpreter;
- dm->_dom = new JSCDOM();
- dm->_dom->xpath = new XPath<std::string>();
- dm->_dom->xpath->setNamespaceContext(*interpreter->getNameSpaceInfo().getNSContext());
- dm->_dom->storage = new Storage(URL::getResourceDir() + PATH_SEPERATOR + interpreter->getName() + ".storage");
- dm->_dom->nsInfo = new NameSpaceInfo(interpreter->getNameSpaceInfo());
-
+ dm->_dom = new JSCDOM();
+ dm->_dom->xpath = new XPath<std::string>();
+ dm->_dom->xpath->setNamespaceContext(*interpreter->getNameSpaceInfo().getNSContext());
+ dm->_dom->storage = new Storage(URL::getResourceDir() + PATH_SEPERATOR + interpreter->getName() + ".storage");
+ dm->_dom->nsInfo = new NameSpaceInfo(interpreter->getNameSpaceInfo());
+
// introduce global functions as objects for private data
JSClassRef jsInClassRef = JSClassCreate(&jsInClassDef);
JSObjectRef jsIn = JSObjectMake(dm->_ctx, jsInClassRef, dm.get());
diff --git a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h
index 9bc39d6..2a2b1cc 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h
+++ b/src/uscxml/plugins/datamodel/ecmascript/JavaScriptCore/JSCDataModel.h
@@ -105,7 +105,7 @@ protected:
static bool jsInvokerHasProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName);
static JSValueRef jsInvokerGetProp(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);
static void jsInvokerListProps(JSContextRef ctx, JSObjectRef object, JSPropertyNameAccumulatorRef propertyNames);
-
+
JSValueRef getNodeAsValue(const Arabica::DOM::Node<std::string>& node);
JSValueRef getDataAsValue(const Data& data);
Data getValueAsData(const JSValueRef value);
@@ -117,10 +117,10 @@ protected:
std::string _name;
std::set<DataModelExtension*> _extensions;
-
+
Event _event;
JSGlobalContextRef _ctx;
-
+
};
#ifdef BUILD_AS_PLUGINS
diff --git a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
index 99df4a7..3004b91 100644
--- a/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
+++ b/src/uscxml/plugins/datamodel/ecmascript/v8/V8DataModel.cpp
@@ -93,7 +93,7 @@ V8DataModel::~V8DataModel() {
void V8DataModel::addExtension(DataModelExtension* ext) {
if (_extensions.find(ext) != _extensions.end())
return;
-
+
ext->dm = this;
_extensions.insert(ext);
@@ -107,13 +107,13 @@ void V8DataModel::addExtension(DataModelExtension* ext) {
while(true) {
std::string pathComp = *locIter;
v8::Local<v8::String> pathCompJS = v8::String::New(locIter->c_str());
-
+
if (++locIter != locPath.end()) {
// just another intermediate step
if (!currScope->Has(pathCompJS)) {
currScope->Set(pathCompJS, v8::Object::New());
}
-
+
v8::Local<v8::Value> newScope = currScope->Get(pathCompJS);
if (newScope->IsObject()) {
currScope = newScope->ToObject();
@@ -133,19 +133,19 @@ v8::Handle<v8::Value> V8DataModel::jsExtension(const v8::Arguments& args) {
v8::Local<v8::String> memberJS;
std::string memberName;
-
+
if (args.Length() > 0 && args[0]->IsString()) {
memberJS = args[0]->ToString();
memberName = *v8::String::AsciiValue(memberJS);
}
-
+
if (args.Length() > 1) {
// setter
Data data = ((V8DataModel*)(extension->dm))->getValueAsData(args[1]);
extension->setValueOf(memberName, data);
return v8::Undefined();
}
-
+
if (args.Length() == 1) {
// getter
return ((V8DataModel*)(extension->dm))->getDataAsValue(extension->getValueOf(memberName));
diff --git a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
index 09b5e15..fc41901 100644
--- a/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/prolog/swi/SWIDataModel.cpp
@@ -689,9 +689,9 @@ bool SWIDataModel::evalAsBool(const Arabica::DOM::Element<std::string>& node, co
}
PlQuery query(compound.name(), termv);
return query.next_solution() > 0;
- }
- RETHROW_PLEX_AS_EVENT
- catch(...) {
+ }
+ RETHROW_PLEX_AS_EVENT
+ catch(...) {
return false;
}
}
diff --git a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp
index 6e82b55..cd6bef3 100644
--- a/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp
+++ b/src/uscxml/plugins/datamodel/promela/PromelaDataModel.cpp
@@ -310,7 +310,7 @@ void PromelaDataModel::assign(const Element<std::string>& assignElem,
if (value.length() == 0)
return;
-
+
Data json = Data::fromJSON(value);
if (!json.empty()) {
// simply assign from json to key
@@ -371,7 +371,7 @@ void PromelaDataModel::evaluateDecl(void* ast) {
std::list<PromelaParserNode*>::iterator opIterAsgn = (*nameIter)->operands.begin();
PromelaParserNode* name = *opIterAsgn++;
PromelaParserNode* expr = *opIterAsgn++;
-
+
try {
variable.compound["value"] = evaluateExpr(expr);
} catch(uscxml::Event e) {
@@ -562,7 +562,7 @@ void PromelaDataModel::evaluateStmnt(void* ast) {
}
}
-
+
void PromelaDataModel::setVariable(void* ast, const Data& value) {
PromelaParserNode* node = (PromelaParserNode*)ast;
@@ -602,7 +602,7 @@ void PromelaDataModel::setVariable(void* ast, const Data& value) {
if (_variables[node->value].hasKey("size")) {
if (value.compound.size() > 0 || value.atom.size() > 0)
ERROR_EXECUTION_THROW("Variable " + node->value + " is an array");
-
+
if (strTo<size_t>(_variables[node->value].compound["size"].atom) < value.array.size())
ERROR_EXECUTION_THROW("Array assigned to " + node->value + " is too large");
}
@@ -620,28 +620,29 @@ void PromelaDataModel::setVariable(void* ast, const Data& value) {
}
// std::cout << Data::toJSON(_variables) << std::endl;;
-
+
Data* var = &_variables[name->value].compound["value"];
var->compound["type"] = Data("compound", Data::VERBATIM);
var->compound["vis"] = Data("", Data::VERBATIM);
-
+
while(opIter != node->operands.end()) {
- name = *opIter; opIter++;
+ name = *opIter;
+ opIter++;
var = &(var->compound[name->value]);
}
*var = value;
-
+
break;
}
default:
- node->dump();
- ERROR_EXECUTION_THROW("No support for " + PromelaParserNode::typeToDesc(node->type) + " variables implemented");
+ node->dump();
+ ERROR_EXECUTION_THROW("No support for " + PromelaParserNode::typeToDesc(node->type) + " variables implemented");
break;
}
// std::cout << Data::toJSON(_variables) << std::endl;
}
-
+
Data PromelaDataModel::getVariable(void* ast) {
PromelaParserNode* node = (PromelaParserNode*)ast;
// node->dump();
@@ -767,11 +768,11 @@ void PromelaDataModel::init(const Element<std::string>& dataElem,
arrSize = type.substr(bracketPos, type.length() - bracketPos);
type = type.substr(0, bracketPos);
}
-
+
std::string expr = type + " " + identifier + arrSize;
PromelaParser parser(expr, 1, PromelaParser::PROMELA_DECL);
evaluateDecl(parser.ast);
-
+
}
assign(dataElem, node, content);
}
@@ -789,9 +790,10 @@ bool PromelaDataModel::isDeclared(const std::string& expr) {
// JSON declaration
std::list<PromelaParserNode*>::iterator opIter = parser.ast->operands.begin();
Data* var = &_variables;
-
+
while(opIter != parser.ast->operands.end()) {
- std::string name = (*opIter)->value; opIter++;
+ std::string name = (*opIter)->value;
+ opIter++;
if (var->compound.find(name) != var->compound.end()) {
var = &(var->compound.at(name));
} else if (var->compound.find("value") != var->compound.end() && var->compound.at("value").compound.find(name) != var->compound.at("value").compound.end()) {
@@ -801,7 +803,7 @@ bool PromelaDataModel::isDeclared(const std::string& expr) {
}
}
return true;
-
+
}
return _variables.compound.find(expr) != _variables.compound.end();
diff --git a/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp b/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp
index 74cb791..c07fca2 100644
--- a/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp
+++ b/src/uscxml/plugins/datamodel/promela/PromelaParser.cpp
@@ -136,7 +136,7 @@ PromelaParserNode::~PromelaParserNode() {
PromelaParserNode* PromelaParser::node(int type, int nrArgs, ...) {
PromelaParserNode* newNode = new PromelaParserNode();
-
+
newNode->type = type;
va_list ap;
va_start(ap, nrArgs);
@@ -164,7 +164,7 @@ PromelaParserNode* PromelaParser::value(int type, void* location, const char* va
return newNode;
}
-
+
void PromelaParser::dump() {
switch (type) {
case PROMELA_EXPR:
diff --git a/src/uscxml/plugins/datamodel/promela/PromelaParser.h b/src/uscxml/plugins/datamodel/promela/PromelaParser.h
index d1683b9..d79a2d0 100644
--- a/src/uscxml/plugins/datamodel/promela/PromelaParser.h
+++ b/src/uscxml/plugins/datamodel/promela/PromelaParser.h
@@ -40,7 +40,7 @@ public:
int lastLine;
int lastCol;
};
-
+
PromelaParserNode() : type(0), parent(NULL), loc(NULL) {}
virtual ~PromelaParserNode();
@@ -85,7 +85,7 @@ public:
operator bool() const {
return ast != NULL;
}
-
+
protected:
void init(const std::string& expr);
diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp b/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
index 2cd66f2..50e9776 100644
--- a/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
+++ b/src/uscxml/plugins/datamodel/promela/parser/promela.lex.yy.cpp
@@ -26,7 +26,7 @@
/* %endif */
/* %if-c-only */
-
+
/* %endif */
/* %if-c-only */
@@ -58,7 +58,7 @@
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types.
+ * if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
@@ -76,7 +76,7 @@ typedef uint64_t flex_uint64_t;
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t;
+typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
@@ -230,21 +230,21 @@ typedef size_t yy_size_t;
#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 promela_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) \
+/* 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 promela_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 { \
yy_size_t yyl;\
for ( yyl = n; yyl < yyleng; ++yyl )\
if ( yytext[yyl] == '\n' )\
--yylineno;\
}while(0)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -263,14 +263,13 @@ typedef size_t yy_size_t;
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
-struct yy_buffer_state
- {
-/* %if-c-only */
+struct yy_buffer_state {
+ /* %if-c-only */
FILE *yy_input_file;
-/* %endif */
+ /* %endif */
-/* %if-c++-only */
-/* %endif */
+ /* %if-c++-only */
+ /* %endif */
char *yy_ch_buf; /* input buffer */
char *yy_buf_pos; /* current position in input buffer */
@@ -304,9 +303,9 @@ struct yy_buffer_state
*/
int yy_at_bol;
- int yy_bs_lineno; /**< The line count. */
- int yy_bs_column; /**< The column count. */
-
+ 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.
*/
@@ -328,7 +327,7 @@ struct yy_buffer_state
*/
#define YY_BUFFER_EOF_PENDING 2
- };
+};
#endif /* !YY_STRUCT_YY_BUFFER_STATE */
/* %if-c-only Standard (non-C++) definition */
@@ -451,179 +450,179 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
#define YY_END_OF_BUFFER 47
/* This struct is not used in this scanner,
but its presence is necessary. */
-struct yy_trans_info
- {
+struct yy_trans_info {
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
- };
-static yyconst flex_int16_t yy_accept[126] =
- { 0,
- 0, 0, 47, 45, 44, 44, 8, 45, 14, 25,
- 45, 33, 34, 12, 15, 31, 16, 30, 13, 42,
- 32, 21, 39, 22, 43, 43, 35, 36, 26, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 37,
- 27, 38, 9, 44, 23, 0, 40, 0, 28, 0,
- 41, 0, 10, 11, 0, 42, 17, 19, 24, 20,
- 18, 43, 0, 0, 43, 43, 43, 43, 43, 43,
- 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
- 29, 0, 41, 0, 0, 0, 43, 43, 2, 43,
- 43, 43, 3, 43, 43, 43, 43, 43, 43, 43,
-
- 43, 0, 1, 43, 43, 43, 43, 43, 4, 43,
- 43, 43, 1, 43, 43, 43, 43, 43, 7, 5,
- 43, 43, 6, 43, 0
- } ;
-
-static yyconst flex_int32_t yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 4, 5, 1, 1, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 17, 17,
- 17, 17, 17, 17, 17, 17, 17, 1, 18, 19,
- 20, 21, 1, 1, 22, 22, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 23, 22, 22, 22, 22,
- 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
- 24, 25, 26, 27, 22, 1, 28, 29, 22, 30,
-
- 31, 32, 33, 34, 35, 22, 36, 37, 38, 39,
- 40, 41, 22, 42, 43, 44, 45, 22, 22, 22,
- 46, 22, 47, 48, 49, 50, 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 flex_int32_t yy_meta[51] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
- 1, 2, 2, 1, 1, 1, 1, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 1, 1, 1
- } ;
-
-static yyconst flex_int16_t yy_base[131] =
- { 0,
- 0, 0, 172, 173, 49, 51, 151, 50, 173, 163,
- 48, 173, 173, 173, 157, 173, 154, 173, 156, 149,
- 173, 38, 145, 39, 0, 56, 173, 173, 173, 20,
- 31, 136, 124, 131, 117, 118, 34, 30, 120, 173,
- 110, 173, 173, 77, 173, 57, 173, 154, 173, 59,
- 173, 66, 173, 173, 145, 138, 173, 173, 173, 173,
- 173, 0, 76, 75, 111, 109, 108, 111, 106, 112,
- 104, 108, 100, 110, 104, 108, 100, 96, 99, 96,
- 173, 77, 78, 84, 127, 77, 106, 96, 0, 98,
- 103, 90, 0, 91, 92, 88, 88, 93, 96, 95,
-
- 90, 78, 173, 82, 92, 91, 77, 76, 0, 80,
- 88, 75, 96, 62, 73, 71, 68, 59, 0, 0,
- 65, 65, 0, 65, 173, 109, 111, 88, 113, 115
- } ;
-
-static yyconst flex_int16_t yy_def[131] =
- { 0,
- 125, 1, 125, 125, 125, 125, 125, 126, 125, 125,
- 127, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 128, 128, 125, 125, 125, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 125,
- 125, 125, 125, 125, 125, 126, 125, 126, 125, 127,
- 125, 129, 125, 125, 130, 125, 125, 125, 125, 125,
- 125, 128, 126, 127, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
- 125, 127, 127, 129, 130, 130, 128, 128, 128, 128,
- 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
-
- 128, 130, 125, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 130, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 128, 128, 0, 125, 125, 125, 125, 125
- } ;
-
-static yyconst flex_int16_t yy_nxt[224] =
- { 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, 4, 28, 29, 30, 31, 25,
- 25, 32, 25, 25, 33, 25, 34, 35, 25, 25,
- 36, 25, 37, 38, 39, 25, 40, 41, 42, 43,
- 44, 44, 44, 44, 47, 51, 57, 58, 60, 61,
- 63, 47, 65, 64, 66, 67, 51, 75, 50, 76,
- 68, 78, 52, 83, 48, 79, 69, 77, 44, 44,
- 47, 48, 51, 52, 51, 51, 50, 102, 86, 62,
- 84, 83, 103, 113, 89, 124, 123, 122, 121, 52,
-
- 48, 52, 52, 89, 120, 119, 86, 118, 84, 46,
- 46, 50, 50, 82, 82, 85, 85, 117, 116, 89,
- 115, 89, 109, 114, 112, 111, 109, 110, 109, 108,
- 107, 106, 105, 89, 89, 89, 104, 86, 101, 100,
- 99, 98, 97, 96, 95, 94, 93, 89, 92, 91,
- 90, 89, 88, 87, 56, 86, 125, 81, 80, 74,
- 73, 72, 71, 70, 59, 56, 55, 54, 53, 49,
- 45, 125, 3, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
-
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125
- } ;
-
-static yyconst flex_int16_t yy_chk[224] =
- { 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,
- 5, 5, 6, 6, 8, 11, 22, 22, 24, 24,
- 26, 46, 30, 26, 30, 31, 50, 37, 52, 37,
- 31, 38, 11, 52, 8, 38, 31, 37, 44, 44,
- 63, 46, 64, 50, 82, 83, 84, 86, 102, 128,
- 52, 84, 86, 102, 124, 122, 121, 118, 117, 64,
-
- 63, 82, 83, 116, 115, 114, 113, 112, 84, 126,
- 126, 127, 127, 129, 129, 130, 130, 111, 110, 108,
- 107, 106, 105, 104, 101, 100, 99, 98, 97, 96,
- 95, 94, 92, 91, 90, 88, 87, 85, 80, 79,
- 78, 77, 76, 75, 74, 73, 72, 71, 70, 69,
- 68, 67, 66, 65, 56, 55, 48, 41, 39, 36,
- 35, 34, 33, 32, 23, 20, 19, 17, 15, 10,
- 7, 3, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
-
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
- 125, 125, 125
- } ;
+};
+static yyconst flex_int16_t yy_accept[126] = {
+ 0,
+ 0, 0, 47, 45, 44, 44, 8, 45, 14, 25,
+ 45, 33, 34, 12, 15, 31, 16, 30, 13, 42,
+ 32, 21, 39, 22, 43, 43, 35, 36, 26, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 37,
+ 27, 38, 9, 44, 23, 0, 40, 0, 28, 0,
+ 41, 0, 10, 11, 0, 42, 17, 19, 24, 20,
+ 18, 43, 0, 0, 43, 43, 43, 43, 43, 43,
+ 43, 43, 43, 43, 43, 43, 43, 43, 43, 43,
+ 29, 0, 41, 0, 0, 0, 43, 43, 2, 43,
+ 43, 43, 3, 43, 43, 43, 43, 43, 43, 43,
+
+ 43, 0, 1, 43, 43, 43, 43, 43, 4, 43,
+ 43, 43, 1, 43, 43, 43, 43, 43, 7, 5,
+ 43, 43, 6, 43, 0
+} ;
+
+static yyconst flex_int32_t yy_ec[256] = {
+ 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 4, 5, 1, 1, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 17, 17,
+ 17, 17, 17, 17, 17, 17, 17, 1, 18, 19,
+ 20, 21, 1, 1, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 23, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 24, 25, 26, 27, 22, 1, 28, 29, 22, 30,
+
+ 31, 32, 33, 34, 35, 22, 36, 37, 38, 39,
+ 40, 41, 22, 42, 43, 44, 45, 22, 22, 22,
+ 46, 22, 47, 48, 49, 50, 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 flex_int32_t yy_meta[51] = {
+ 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 2, 1, 1, 1,
+ 1, 2, 2, 1, 1, 1, 1, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 1, 1, 1
+} ;
+
+static yyconst flex_int16_t yy_base[131] = {
+ 0,
+ 0, 0, 172, 173, 49, 51, 151, 50, 173, 163,
+ 48, 173, 173, 173, 157, 173, 154, 173, 156, 149,
+ 173, 38, 145, 39, 0, 56, 173, 173, 173, 20,
+ 31, 136, 124, 131, 117, 118, 34, 30, 120, 173,
+ 110, 173, 173, 77, 173, 57, 173, 154, 173, 59,
+ 173, 66, 173, 173, 145, 138, 173, 173, 173, 173,
+ 173, 0, 76, 75, 111, 109, 108, 111, 106, 112,
+ 104, 108, 100, 110, 104, 108, 100, 96, 99, 96,
+ 173, 77, 78, 84, 127, 77, 106, 96, 0, 98,
+ 103, 90, 0, 91, 92, 88, 88, 93, 96, 95,
+
+ 90, 78, 173, 82, 92, 91, 77, 76, 0, 80,
+ 88, 75, 96, 62, 73, 71, 68, 59, 0, 0,
+ 65, 65, 0, 65, 173, 109, 111, 88, 113, 115
+} ;
+
+static yyconst flex_int16_t yy_def[131] = {
+ 0,
+ 125, 1, 125, 125, 125, 125, 125, 126, 125, 125,
+ 127, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 128, 128, 125, 125, 125, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 125,
+ 125, 125, 125, 125, 125, 126, 125, 126, 125, 127,
+ 125, 129, 125, 125, 130, 125, 125, 125, 125, 125,
+ 125, 128, 126, 127, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+ 125, 127, 127, 129, 130, 130, 128, 128, 128, 128,
+ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
+
+ 128, 130, 125, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 130, 128, 128, 128, 128, 128, 128, 128,
+ 128, 128, 128, 128, 0, 125, 125, 125, 125, 125
+} ;
+
+static yyconst flex_int16_t yy_nxt[224] = {
+ 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, 4, 28, 29, 30, 31, 25,
+ 25, 32, 25, 25, 33, 25, 34, 35, 25, 25,
+ 36, 25, 37, 38, 39, 25, 40, 41, 42, 43,
+ 44, 44, 44, 44, 47, 51, 57, 58, 60, 61,
+ 63, 47, 65, 64, 66, 67, 51, 75, 50, 76,
+ 68, 78, 52, 83, 48, 79, 69, 77, 44, 44,
+ 47, 48, 51, 52, 51, 51, 50, 102, 86, 62,
+ 84, 83, 103, 113, 89, 124, 123, 122, 121, 52,
+
+ 48, 52, 52, 89, 120, 119, 86, 118, 84, 46,
+ 46, 50, 50, 82, 82, 85, 85, 117, 116, 89,
+ 115, 89, 109, 114, 112, 111, 109, 110, 109, 108,
+ 107, 106, 105, 89, 89, 89, 104, 86, 101, 100,
+ 99, 98, 97, 96, 95, 94, 93, 89, 92, 91,
+ 90, 89, 88, 87, 56, 86, 125, 81, 80, 74,
+ 73, 72, 71, 70, 59, 56, 55, 54, 53, 49,
+ 45, 125, 3, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125
+} ;
+
+static yyconst flex_int16_t yy_chk[224] = {
+ 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,
+ 5, 5, 6, 6, 8, 11, 22, 22, 24, 24,
+ 26, 46, 30, 26, 30, 31, 50, 37, 52, 37,
+ 31, 38, 11, 52, 8, 38, 31, 37, 44, 44,
+ 63, 46, 64, 50, 82, 83, 84, 86, 102, 128,
+ 52, 84, 86, 102, 124, 122, 121, 118, 117, 64,
+
+ 63, 82, 83, 116, 115, 114, 113, 112, 84, 126,
+ 126, 127, 127, 129, 129, 130, 130, 111, 110, 108,
+ 107, 106, 105, 104, 101, 100, 99, 98, 97, 96,
+ 95, 94, 92, 91, 90, 88, 87, 85, 80, 79,
+ 78, 77, 76, 75, 74, 73, 72, 71, 70, 69,
+ 68, 67, 66, 65, 56, 55, 48, 41, 39, 36,
+ 35, 34, 33, 32, 23, 20, 19, 17, 15, 10,
+ 7, 3, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125, 125, 125, 125, 125, 125, 125, 125,
+ 125, 125, 125
+} ;
/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[47] =
- { 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, 1, 0, 0, 1, 0, 0, };
-
-static yyconst flex_int16_t yy_rule_linenum[46] =
- { 0,
- 44, 46, 51, 52, 53, 54, 55, 57, 58, 59,
- 60, 62, 63, 64, 66, 67, 69, 70, 72, 73,
- 74, 75, 77, 78, 80, 81, 82, 85, 86, 88,
- 89, 90, 92, 93, 95, 96, 98, 99, 101, 103,
- 106, 111, 112, 114, 117
- } ;
+static yyconst flex_int32_t yy_rule_can_match_eol[47] = {
+ 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, 1, 0, 0, 1, 0, 0,
+};
+
+static yyconst flex_int16_t yy_rule_linenum[46] = {
+ 0,
+ 44, 46, 51, 52, 53, 54, 55, 57, 58, 59,
+ 60, 62, 63, 64, 66, 67, 69, 70, 72, 73,
+ 74, 75, 77, 78, 80, 81, 82, 85, 86, 88,
+ 89, 90, 92, 93, 95, 96, 98, 99, 101, 103,
+ 106, 111, 112, 114, 117
+} ;
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -637,7 +636,7 @@ static yyconst flex_int16_t yy_rule_linenum[46] =
/* see: http://spinroot.com/spin/Man/operators.html */
#define YY_NO_UNISTD_H 1
#line 16 "promela.l"
-
+
#include "../PromelaParser.h"
#include "promela.tab.hpp"
#define YYSTYPE PROMELA_STYPE
@@ -645,7 +644,7 @@ static yyconst flex_int16_t yy_rule_linenum[46] =
#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 \
@@ -681,42 +680,41 @@ static yyconst flex_int16_t yy_rule_linenum[46] =
/* %if-reentrant */
/* 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 */
+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 */
/* %if-c-only */
@@ -726,12 +724,12 @@ static int yy_init_globals (yyscan_t yyscanner );
/* %if-reentrant */
- /* 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
-
+/* 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 promela_lex_init (yyscan_t* scanner);
int promela_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner);
@@ -775,10 +773,10 @@ YYSTYPE * promela_get_lval (yyscan_t yyscanner );
void promela_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
- YYLTYPE *promela_get_lloc (yyscan_t yyscanner );
-
- void promela_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
-
+YYLTYPE *promela_get_lloc (yyscan_t yyscanner );
+
+void promela_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner );
+
/* %endif */
/* Macros after this point can all be overridden by user definitions in
@@ -795,8 +793,8 @@ extern int promela_wrap (yyscan_t yyscanner );
/* %not-for-header */
- static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
-
+static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner);
+
/* %ok-for-header */
/* %endif */
@@ -926,7 +924,7 @@ static int input (yyscan_t yyscanner );
/* %if-c-only Standard (non-C++) definition */
extern int promela_lex \
- (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
+(YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner);
#define YY_DECL int promela_lex \
(YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner)
@@ -955,25 +953,23 @@ extern int promela_lex \
/** The main scanner function which does all the work.
*/
-YY_DECL
-{
+YY_DECL {
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-/* %% [7.0] user's declarations go here */
+ /* %% [7.0] user's declarations go here */
#line 42 "promela.l"
#line 970 "promela.lex.yy.cpp"
- yylval = yylval_param;
+ yylval = yylval_param;
- yylloc = yylloc_param;
+ yylloc = yylloc_param;
- if ( !yyg->yy_init )
- {
+ if ( !yyg->yy_init ) {
yyg->yy_init = 1;
#ifdef YY_USER_INIT
@@ -984,31 +980,30 @@ YY_DECL
yyg->yy_start = 1; /* first start state */
if ( ! yyin )
-/* %if-c-only */
+ /* %if-c-only */
yyin = stdin;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+ /* %endif */
+ /* %if-c++-only */
+ /* %endif */
if ( ! yyout )
-/* %if-c-only */
+ /* %if-c-only */
yyout = stdout;
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+ /* %endif */
+ /* %if-c++-only */
+ /* %endif */
if ( ! YY_CURRENT_BUFFER ) {
promela_ensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
promela__load_buffer_state(yyscanner );
- }
+ }
- while ( 1 ) /* loops until end-of-file is reached */
- {
-/* %% [8.0] yymore()-related code goes here */
+ while ( 1 ) { /* loops until end-of-file is reached */
+ /* %% [8.0] yymore()-related code goes here */
yy_cp = yyg->yy_c_buf_p;
/* Support of yytext. */
@@ -1019,55 +1014,50 @@ YY_DECL
*/
yy_bp = yy_cp;
-/* %% [9.0] code to set up and find next match goes here */
+ /* %% [9.0] code to set up and find next match goes here */
yy_current_state = yyg->yy_start;
yy_match:
- do
- {
+ do {
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- if ( yy_accept[yy_current_state] )
- {
+ 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 )
- {
+ }
+ 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 >= 126 )
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 != 125 );
+ } while ( yy_current_state != 125 );
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
yy_find_action:
-/* %% [10.0] code to find the action number goes here */
+ /* %% [10.0] code to find the action number goes here */
yy_act = yy_accept[yy_current_state];
YY_DO_BEFORE_ACTION;
-/* %% [11.0] code for yylineno update goes here */
+ /* %% [11.0] code for yylineno update goes here */
- if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
- {
+ 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 {
+ yylineno++;
+ yycolumn=0;
+ } while(0)
+ ;
+ }
do_action: /* This label is used only to access EOF actions. */
-/* %% [12.0] debug code goes here */
- if ( yy_flex_debug )
- {
+ /* %% [12.0] debug code goes here */
+ if ( yy_flex_debug ) {
if ( yy_act == 0 )
fprintf( stderr, "--scanner backing up\n" );
else if ( yy_act < 46 )
@@ -1080,391 +1070,384 @@ do_action: /* This label is used only to access EOF actions. */
fprintf( stderr, "--(end of buffer or a NUL)\n" );
else
fprintf( stderr, "--EOF (start condition %d)\n", YY_START );
- }
+ }
- switch ( yy_act )
- { /* beginning of action switch */
-/* %% [13.0] actions go here */
- case 0: /* must back up */
+ switch ( yy_act ) {
+ /* beginning of action switch */
+ /* %% [13.0] actions go here */
+ 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
+ case 1:
+ /* rule 1 can match eol */
+ YY_RULE_SETUP
#line 44 "promela.l"
-/* multiline comments */
- YY_BREAK
-case 2:
-YY_RULE_SETUP
+ /* multiline comments */
+ YY_BREAK
+ case 2:
+ YY_RULE_SETUP
#line 46 "promela.l"
-{
- yylval->value = strdup(yytext);
- return PML_TYPE;
-}
- YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 51 "promela.l"
-{ return PML_LEN; }
- YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 52 "promela.l"
-{ yylval->value = strdup(yytext); return PML_CONST; }
- YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 53 "promela.l"
-{ return PML_PRINT; }
- YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 54 "promela.l"
-{ return PML_TYPEDEF; }
- YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 55 "promela.l"
-{ return PML_ASSERT; }
- YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 57 "promela.l"
-{ return PML_NEG; }
- YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 58 "promela.l"
-{ return PML_COMPL; }
- YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 59 "promela.l"
-{ return PML_INCR; }
- YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 60 "promela.l"
-{ return PML_DECR; }
- YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 62 "promela.l"
-{ return PML_TIMES; }
- YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 63 "promela.l"
-{ return PML_DIVIDE; }
- YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 64 "promela.l"
-{ return PML_MODULO; }
- YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 66 "promela.l"
-{ return PML_PLUS; }
- YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 67 "promela.l"
-{ return PML_MINUS; }
- YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 69 "promela.l"
-{ return PML_LSHIFT; }
- YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 70 "promela.l"
-{ return PML_RSHIFT; }
- YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 72 "promela.l"
-{ return PML_LE; }
- YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 73 "promela.l"
-{ return PML_GE; }
- YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 74 "promela.l"
-{ return PML_LT; }
- YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 75 "promela.l"
-{ return PML_GT; }
- YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 77 "promela.l"
-{ return PML_NE; }
- YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 78 "promela.l"
-{ return PML_EQ; }
- YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 80 "promela.l"
-{ return PML_BITAND; }
- YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 81 "promela.l"
-{ return PML_BITXOR; }
- YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 82 "promela.l"
-{ return PML_BITOR; }
- YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 85 "promela.l"
-{ return PML_AND; }
- YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 86 "promela.l"
-{ return PML_OR; }
- YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 88 "promela.l"
-{ return PML_DOT; }
- YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 89 "promela.l"
-{ return PML_COMMA; }
- YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 90 "promela.l"
-{ return PML_SEMI; }
- YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 92 "promela.l"
-{ return '('; }
- YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 93 "promela.l"
-{ return ')'; }
- YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 95 "promela.l"
-{ return '['; }
- YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 96 "promela.l"
-{ return ']'; }
- YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 98 "promela.l"
-{ return '{'; }
- YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 99 "promela.l"
-{ return '}'; }
- YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 101 "promela.l"
-{ return PML_ASGN; }
- YY_BREAK
-case 40:
-/* rule 40 can match eol */
-YY_RULE_SETUP
-#line 103 "promela.l"
-{ yylval->value = strdup(yytext); return(PML_STRING); }
- YY_BREAK
-case 41:
-/* rule 41 can match eol */
-YY_RULE_SETUP
+ {
+ yylval->value = strdup(yytext);
+ return PML_TYPE;
+ }
+ YY_BREAK
+ case 3:
+ YY_RULE_SETUP
+#line 51 "promela.l"
+ { return PML_LEN; }
+ YY_BREAK
+ case 4:
+ YY_RULE_SETUP
+#line 52 "promela.l"
+ { yylval->value = strdup(yytext); return PML_CONST; }
+ YY_BREAK
+ case 5:
+ YY_RULE_SETUP
+#line 53 "promela.l"
+ { return PML_PRINT; }
+ YY_BREAK
+ case 6:
+ YY_RULE_SETUP
+#line 54 "promela.l"
+ { return PML_TYPEDEF; }
+ YY_BREAK
+ case 7:
+ YY_RULE_SETUP
+#line 55 "promela.l"
+ { return PML_ASSERT; }
+ YY_BREAK
+ case 8:
+ YY_RULE_SETUP
+#line 57 "promela.l"
+ { return PML_NEG; }
+ YY_BREAK
+ case 9:
+ YY_RULE_SETUP
+#line 58 "promela.l"
+ { return PML_COMPL; }
+ YY_BREAK
+ case 10:
+ YY_RULE_SETUP
+#line 59 "promela.l"
+ { return PML_INCR; }
+ YY_BREAK
+ case 11:
+ YY_RULE_SETUP
+#line 60 "promela.l"
+ { return PML_DECR; }
+ YY_BREAK
+ case 12:
+ YY_RULE_SETUP
+#line 62 "promela.l"
+ { return PML_TIMES; }
+ YY_BREAK
+ case 13:
+ YY_RULE_SETUP
+#line 63 "promela.l"
+ { return PML_DIVIDE; }
+ YY_BREAK
+ case 14:
+ YY_RULE_SETUP
+#line 64 "promela.l"
+ { return PML_MODULO; }
+ YY_BREAK
+ case 15:
+ YY_RULE_SETUP
+#line 66 "promela.l"
+ { return PML_PLUS; }
+ YY_BREAK
+ case 16:
+ YY_RULE_SETUP
+#line 67 "promela.l"
+ { return PML_MINUS; }
+ YY_BREAK
+ case 17:
+ YY_RULE_SETUP
+#line 69 "promela.l"
+ { return PML_LSHIFT; }
+ YY_BREAK
+ case 18:
+ YY_RULE_SETUP
+#line 70 "promela.l"
+ { return PML_RSHIFT; }
+ YY_BREAK
+ case 19:
+ YY_RULE_SETUP
+#line 72 "promela.l"
+ { return PML_LE; }
+ YY_BREAK
+ case 20:
+ YY_RULE_SETUP
+#line 73 "promela.l"
+ { return PML_GE; }
+ YY_BREAK
+ case 21:
+ YY_RULE_SETUP
+#line 74 "promela.l"
+ { return PML_LT; }
+ YY_BREAK
+ case 22:
+ YY_RULE_SETUP
+#line 75 "promela.l"
+ { return PML_GT; }
+ YY_BREAK
+ case 23:
+ YY_RULE_SETUP
+#line 77 "promela.l"
+ { return PML_NE; }
+ YY_BREAK
+ case 24:
+ YY_RULE_SETUP
+#line 78 "promela.l"
+ { return PML_EQ; }
+ YY_BREAK
+ case 25:
+ YY_RULE_SETUP
+#line 80 "promela.l"
+ { return PML_BITAND; }
+ YY_BREAK
+ case 26:
+ YY_RULE_SETUP
+#line 81 "promela.l"
+ { return PML_BITXOR; }
+ YY_BREAK
+ case 27:
+ YY_RULE_SETUP
+#line 82 "promela.l"
+ { return PML_BITOR; }
+ YY_BREAK
+ case 28:
+ YY_RULE_SETUP
+#line 85 "promela.l"
+ { return PML_AND; }
+ YY_BREAK
+ case 29:
+ YY_RULE_SETUP
+#line 86 "promela.l"
+ { return PML_OR; }
+ YY_BREAK
+ case 30:
+ YY_RULE_SETUP
+#line 88 "promela.l"
+ { return PML_DOT; }
+ YY_BREAK
+ case 31:
+ YY_RULE_SETUP
+#line 89 "promela.l"
+ { return PML_COMMA; }
+ YY_BREAK
+ case 32:
+ YY_RULE_SETUP
+#line 90 "promela.l"
+ { return PML_SEMI; }
+ YY_BREAK
+ case 33:
+ YY_RULE_SETUP
+#line 92 "promela.l"
+ { return '('; }
+ YY_BREAK
+ case 34:
+ YY_RULE_SETUP
+#line 93 "promela.l"
+ { return ')'; }
+ YY_BREAK
+ case 35:
+ YY_RULE_SETUP
+#line 95 "promela.l"
+ { return '['; }
+ YY_BREAK
+ case 36:
+ YY_RULE_SETUP
+#line 96 "promela.l"
+ { return ']'; }
+ YY_BREAK
+ case 37:
+ YY_RULE_SETUP
+#line 98 "promela.l"
+ { return '{'; }
+ YY_BREAK
+ case 38:
+ YY_RULE_SETUP
+#line 99 "promela.l"
+ { return '}'; }
+ YY_BREAK
+ case 39:
+ YY_RULE_SETUP
+#line 101 "promela.l"
+ { return PML_ASGN; }
+ YY_BREAK
+ case 40:
+ /* rule 40 can match eol */
+ YY_RULE_SETUP
+#line 103 "promela.l"
+ { yylval->value = strdup(yytext); return(PML_STRING); }
+ YY_BREAK
+ case 41:
+ /* rule 41 can match eol */
+ YY_RULE_SETUP
#line 106 "promela.l"
-{
- /* Non PROMELA extension for single quoted string literals */
- yylval->value = strdup(yytext); return(PML_STRING);
-}
- YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 111 "promela.l"
-{ yylval->value = strdup(yytext); return PML_CONST; }
- YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 112 "promela.l"
-{ yylval->value = strdup(yytext); return PML_NAME; }
- YY_BREAK
-case 44:
-/* rule 44 can match eol */
-YY_RULE_SETUP
+ {
+ /* Non PROMELA extension for single quoted string literals */
+ yylval->value = strdup(yytext);
+ return(PML_STRING);
+ }
+ YY_BREAK
+ case 42:
+ YY_RULE_SETUP
+#line 111 "promela.l"
+ { yylval->value = strdup(yytext); return PML_CONST; }
+ YY_BREAK
+ case 43:
+ YY_RULE_SETUP
+#line 112 "promela.l"
+ { yylval->value = strdup(yytext); return PML_NAME; }
+ YY_BREAK
+ case 44:
+ /* rule 44 can match eol */
+ YY_RULE_SETUP
#line 114 "promela.l"
-/* eat up whitespace */
- YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 117 "promela.l"
-{ /*printf( "Unrecognized character: %s\n", yytext ); */ }
- YY_BREAK
-case 46:
-YY_RULE_SETUP
+ /* eat up whitespace */
+ YY_BREAK
+ case 45:
+ YY_RULE_SETUP
+#line 117 "promela.l"
+ { /*printf( "Unrecognized character: %s\n", yytext ); */ }
+ YY_BREAK
+ case 46:
+ YY_RULE_SETUP
#line 118 "promela.l"
-ECHO;
- YY_BREAK
+ ECHO;
+ YY_BREAK
#line 1336 "promela.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;
+ case YY_STATE_EOF(INITIAL):
+ yyterminate();
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yyg->yy_hold_char;
- YY_RESTORE_YY_MORE_OFFSET
+ 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;
- 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
- * promela_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;
+ /* 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
+ * promela_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;
+ /* 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;
+ yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text;
- yy_current_state = yy_get_previous_state( yyscanner );
+ 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).
- */
+ /* 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_next_state = yy_try_NUL_trans( yy_current_state , yyscanner);
- yy_bp = yyg->yytext_ptr + YY_MORE_ADJ;
+ 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;
+ if ( yy_next_state ) {
+ /* Consume the NUL. */
+ yy_cp = ++yyg->yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
}
- else
- {
-/* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
- yy_cp = yyg->yy_last_accepting_cpos;
- yy_current_state = yyg->yy_last_accepting_state;
- goto yy_find_action;
+ else {
+ /* %% [14.0] code to do back-up for compressed tables and set up yy_cp goes here */
+ 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 ( promela_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 switch ( yy_get_next_buffer( yyscanner ) ) {
+ case EOB_ACT_END_OF_FILE: {
+ yyg->yy_did_buffer_switch_on_eof = 0;
+
+ if ( promela_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;
+ else {
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
}
- break;
+ break;
}
- case EOB_ACT_CONTINUE_SCAN:
- yyg->yy_c_buf_p =
- yyg->yytext_ptr + yy_amount_of_matched_text;
+ 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_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;
+ 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];
+ 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_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;
+ 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 */
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
} /* end of promela_lex */
/* %ok-for-header */
@@ -1488,7 +1471,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
register char *source = yyg->yytext_ptr;
register int number_to_move, i;
@@ -1496,26 +1479,24 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
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" );
+ "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 )
- {
+ 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
- {
+ else {
/* We matched some text prior to the EOB, first
* process it.
*/
return EOB_ACT_LAST_MATCH;
- }
}
+ }
/* Try to read more data. */
@@ -1531,22 +1512,20 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
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;
+ 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. */
+ 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;
int yy_c_buf_p_offset =
- (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
+ (int) (yyg->yy_c_buf_p - b->yy_ch_buf);
- if ( b->yy_is_our_buffer )
- {
+ if ( b->yy_is_our_buffer ) {
yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
@@ -1555,49 +1534,45 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
b->yy_buf_size *= 2;
b->yy_ch_buf = (char *)
- /* Include room in for 2 EOB chars. */
- promela_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner );
- }
- else
+ /* Include room in for 2 EOB chars. */
+ promela_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" );
+ "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;
+ 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 );
+ 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 )
- {
+ if ( yyg->yy_n_chars == 0 ) {
+ if ( number_to_move == YY_MORE_ADJ ) {
ret_val = EOB_ACT_END_OF_FILE;
promela_restart(yyin ,yyscanner);
- }
+ }
- else
- {
+ else {
ret_val = EOB_ACT_LAST_MATCH;
YY_CURRENT_BUFFER_LVALUE->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
+ YY_BUFFER_EOF_PENDING;
}
+ }
else
ret_val = EOB_ACT_CONTINUE_SCAN;
@@ -1624,35 +1599,32 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %if-c-only */
/* %not-for-header */
- static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
+static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
register yy_state_type yy_current_state;
register char *yy_cp;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-/* %% [15.0] code to get the start state into yy_current_state goes here */
+ /* %% [15.0] code to get the start state into yy_current_state goes here */
yy_current_state = yyg->yy_start;
- for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
- {
-/* %% [16.0] code to find the next state goes here */
+ for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) {
+ /* %% [16.0] code to find the next state goes here */
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- if ( yy_accept[yy_current_state] )
- {
+ 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 )
- {
+ }
+ 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 >= 126 )
yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
}
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ }
return yy_current_state;
}
@@ -1663,28 +1635,26 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* next_state = yy_try_NUL_trans( current_state );
*/
/* %if-c-only */
- static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
+static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
register int yy_is_jam;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
-/* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
+ /* %% [17.0] code to find the next state, and perhaps do backing up, goes here */
register char *yy_cp = yyg->yy_c_buf_p;
register YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
+ 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 )
- {
+ }
+ 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 >= 126 )
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 == 125);
@@ -1693,27 +1663,27 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %if-c-only */
- static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
+static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
register char *yy_cp;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_cp = yyg->yy_c_buf_p;
+ 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 */
+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) {
+ /* need to shift things up to make room */
/* +2 for EOB chars. */
register yy_size_t number_to_move = yyg->yy_n_chars + 2;
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
- YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
register char *source =
- &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
*--dest = *--source;
@@ -1721,19 +1691,19 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
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;
+ 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;
-/* %% [18.0] update yylineno here */
+ /* %% [18.0] update yylineno here */
- if ( c == '\n' ){
- --yylineno;
- }
+ if ( c == '\n' ) {
+ --yylineno;
+ }
yyg->yytext_ptr = yy_bp;
yyg->yy_hold_char = *yy_cp;
@@ -1746,9 +1716,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %if-c-only */
#ifndef YY_NO_INPUT
#ifdef __cplusplus
- static int yyinput (yyscan_t yyscanner)
+static int yyinput (yyscan_t yyscanner)
#else
- static int input (yyscan_t yyscanner)
+static int input (yyscan_t yyscanner)
#endif
/* %endif */
@@ -1756,12 +1726,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* %endif */
{
int c;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ 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 )
- {
+ 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.
@@ -1770,61 +1739,60 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
/* This was really a NUL. */
*yyg->yy_c_buf_p = '\0';
- else
- { /* need more input */
+ 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. */
- promela_restart(yyin ,yyscanner);
-
- /*FALLTHROUGH*/
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( promela_wrap(yyscanner ) )
- return 0;
-
- if ( ! yyg->yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
+ 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. */
+ promela_restart(yyin ,yyscanner);
+
+ /*FALLTHROUGH*/
+
+ case EOB_ACT_END_OF_FILE: {
+ if ( promela_wrap(yyscanner ) )
+ return 0;
+
+ if ( ! yyg->yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
#ifdef __cplusplus
- return yyinput(yyscanner);
+ return yyinput(yyscanner);
#else
- return input(yyscanner);
+ return input(yyscanner);
#endif
- }
+ }
- case EOB_ACT_CONTINUE_SCAN:
- yyg->yy_c_buf_p = yyg->yytext_ptr + offset;
- break;
- }
+ 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;
-/* %% [19.0] update BOL and yylineno */
+ /* %% [19.0] update BOL and yylineno */
if ( c == '\n' )
-
- do{ yylineno++;
- yycolumn=0;
- }while(0)
-;
+
+ do {
+ yylineno++;
+ yycolumn=0;
+ } while(0)
+ ;
return c;
}
@@ -1838,17 +1806,17 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* @note This function does not reset the start condition to @c INITIAL .
*/
/* %if-c-only */
- void promela_restart (FILE * input_file , yyscan_t yyscanner)
+void promela_restart (FILE * input_file , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- if ( ! YY_CURRENT_BUFFER ){
- promela_ensure_buffer_stack (yyscanner);
+ if ( ! YY_CURRENT_BUFFER ) {
+ promela_ensure_buffer_stack (yyscanner);
YY_CURRENT_BUFFER_LVALUE =
- promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ promela__create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
}
promela__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
@@ -1860,29 +1828,28 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
* @param yyscanner The scanner object.
*/
/* %if-c-only */
- void promela__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
+void promela__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
/* TODO. We should be able to replace this entire function body
* with
* promela_pop_buffer_state();
* promela_push_buffer_state(new_buffer);
- */
+ */
promela_ensure_buffer_stack (yyscanner);
if ( YY_CURRENT_BUFFER == new_buffer )
return;
- if ( YY_CURRENT_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;
- }
+ }
YY_CURRENT_BUFFER_LVALUE = new_buffer;
promela__load_buffer_state(yyscanner );
@@ -1901,7 +1868,7 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_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;
@@ -1915,13 +1882,13 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
* @return the allocated buffer state.
*/
/* %if-c-only */
- YY_BUFFER_STATE promela__create_buffer (FILE * file, int size , yyscan_t yyscanner)
+YY_BUFFER_STATE promela__create_buffer (FILE * file, int size , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) promela_alloc(sizeof( struct yy_buffer_state ) ,yyscanner );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in promela__create_buffer()" );
@@ -1947,12 +1914,12 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
* @param yyscanner The scanner object.
*/
/* %if-c-only */
- void promela__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+void promela__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
return;
@@ -1978,36 +1945,36 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
* such as during a promela_restart() or at EOF.
*/
/* %if-c-only */
- static void promela__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
+static void promela__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
int oerrno = errno;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
promela__flush_buffer(b ,yyscanner);
b->yy_input_file = file;
b->yy_fill_buffer = 1;
- /* If b is the current buffer, then promela__init_buffer was _probably_
- * called from promela_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;
- }
+ /* If b is the current buffer, then promela__init_buffer was _probably_
+ * called from promela_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;
+ }
-/* %if-c-only */
+ /* %if-c-only */
- b->yy_is_interactive = 0;
-
-/* %endif */
-/* %if-c++-only */
-/* %endif */
+ b->yy_is_interactive = 0;
+
+ /* %endif */
+ /* %if-c++-only */
+ /* %endif */
errno = oerrno;
}
@@ -2016,12 +1983,12 @@ static void promela__load_buffer_state (yyscan_t yyscanner)
* @param yyscanner The scanner object.
*/
/* %if-c-only */
- void promela__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
+void promela__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner)
/* %endif */
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( ! b )
return;
@@ -2056,20 +2023,19 @@ void promela_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (new_buffer == NULL)
return;
promela_ensure_buffer_stack(yyscanner);
/* This block is copied from promela__switch_to_buffer. */
- if ( YY_CURRENT_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)
@@ -2093,7 +2059,7 @@ void promela_pop_buffer_state (yyscan_t yyscanner)
/* %if-c++-only */
/* %endif */
{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if (!YY_CURRENT_BUFFER)
return;
@@ -2120,38 +2086,38 @@ static void promela_ensure_buffer_stack (yyscan_t yyscanner)
/* %endif */
{
yy_size_t num_to_alloc;
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ 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;
yyg->yy_buffer_stack = (struct yy_buffer_state**)promela_alloc
- (num_to_alloc * sizeof(struct yy_buffer_state*)
- , yyscanner);
+ (num_to_alloc * sizeof(struct yy_buffer_state*)
+ , yyscanner);
if ( ! yyg->yy_buffer_stack )
YY_FATAL_ERROR( "out of dynamic memory in promela_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){
+ if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1) {
/* Increase the buffer to prepare for a possible push. */
int grow_size = 8 /* arbitrary grow size */;
num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
yyg->yy_buffer_stack = (struct yy_buffer_state**)promela_realloc
- (yyg->yy_buffer_stack,
- num_to_alloc * sizeof(struct yy_buffer_state*)
- , yyscanner);
+ (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 promela_ensure_buffer_stack()" );
@@ -2167,15 +2133,14 @@ static void promela_ensure_buffer_stack (yyscan_t yyscanner)
* @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.
+ * @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner)
-{
+YY_BUFFER_STATE promela__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 )
+ 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;
@@ -2208,9 +2173,8 @@ YY_BUFFER_STATE promela__scan_buffer (char * base, yy_size_t size , yyscan_t y
* @note If you want to scan bytes that may contain NUL values, then use
* promela__scan_bytes() instead.
*/
-YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner)
-{
-
+YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner) {
+
return promela__scan_bytes(yystr,strlen(yystr) ,yyscanner);
}
/* %endif */
@@ -2223,12 +2187,11 @@ YY_BUFFER_STATE promela__scan_string (yyconst char * yystr , yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE promela__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner)
-{
+YY_BUFFER_STATE promela__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) {
YY_BUFFER_STATE b;
char *buf;
yy_size_t n, i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) promela_alloc(n ,yyscanner );
@@ -2258,9 +2221,8 @@ YY_BUFFER_STATE promela__scan_bytes (yyconst char * yybytes, yy_size_t _yybyte
#endif
/* %if-c-only */
-static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
-{
- (void) fprintf( stderr, "%s\n", msg );
+static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) {
+ (void) fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
/* %endif */
@@ -2292,10 +2254,9 @@ static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner)
/** Get the user-defined data for this scanner.
* @param yyscanner The scanner object.
*/
-YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyextra;
+YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yyextra;
}
/* %endif */
@@ -2303,64 +2264,58 @@ YY_EXTRA_TYPE promela_get_extra (yyscan_t yyscanner)
/** Get the current line number.
* @param yyscanner The scanner object.
*/
-int promela_get_lineno (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if (! YY_CURRENT_BUFFER)
- return 0;
-
- return yylineno;
+int promela_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 promela_get_column (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
-
- if (! YY_CURRENT_BUFFER)
- return 0;
-
- return yycolumn;
+int promela_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 *promela_get_in (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyin;
+FILE *promela_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 *promela_get_out (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyout;
+FILE *promela_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 promela_get_leng (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yyleng;
+yy_size_t promela_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 *promela_get_text (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yytext;
+char *promela_get_text (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yytext;
}
/* %if-reentrant */
@@ -2369,10 +2324,9 @@ char *promela_get_text (yyscan_t yyscanner)
* @param user_defined The data to be associated with this scanner.
* @param yyscanner The scanner object.
*/
-void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyextra = user_defined ;
+void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyextra = user_defined ;
}
/* %endif */
@@ -2381,30 +2335,28 @@ void promela_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner)
* @param line_number
* @param yyscanner The scanner object.
*/
-void promela_set_lineno (int line_number , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+void promela_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( "promela_set_lineno called with no buffer" , yyscanner);
-
- yylineno = line_number;
+ /* lineno is only valid if an input buffer exists. */
+ if (! YY_CURRENT_BUFFER )
+ yy_fatal_error( "promela_set_lineno called with no buffer" , yyscanner);
+
+ yylineno = line_number;
}
/** Set the current column.
* @param line_number
* @param yyscanner The scanner object.
*/
-void promela_set_column (int column_no , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+void promela_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( "promela_set_column called with no buffer" , yyscanner);
-
- yycolumn = column_no;
+ /* column is only valid if an input buffer exists. */
+ if (! YY_CURRENT_BUFFER )
+ yy_fatal_error( "promela_set_column called with no buffer" , yyscanner);
+
+ yycolumn = column_no;
}
/** Set the input stream. This does not discard the current
@@ -2413,28 +2365,24 @@ void promela_set_column (int column_no , yyscan_t yyscanner)
* @param yyscanner The scanner object.
* @see promela__switch_to_buffer
*/
-void promela_set_in (FILE * in_str , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyin = in_str ;
+void promela_set_in (FILE * in_str , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyin = in_str ;
}
-void promela_set_out (FILE * out_str , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yyout = out_str ;
+void promela_set_out (FILE * out_str , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yyout = out_str ;
}
-int promela_get_debug (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yy_flex_debug;
+int promela_get_debug (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yy_flex_debug;
}
-void promela_set_debug (int bdebug , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yy_flex_debug = bdebug ;
+void promela_set_debug (int bdebug , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yy_flex_debug = bdebug ;
}
/* %endif */
@@ -2444,30 +2392,26 @@ void promela_set_debug (int bdebug , yyscan_t yyscanner)
/* %if-bison-bridge */
-YYSTYPE * promela_get_lval (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yylval;
+YYSTYPE * promela_get_lval (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yylval;
}
-void promela_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yylval = yylval_param;
+void promela_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yylval = yylval_param;
}
-YYLTYPE *promela_get_lloc (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- return yylloc;
+YYLTYPE *promela_get_lloc (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ return yylloc;
}
-
-void promela_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- yylloc = yylloc_param;
+
+void promela_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+ yylloc = yylloc_param;
}
-
+
/* %endif */
/* User-visible API */
@@ -2480,22 +2424,22 @@ void promela_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner)
int promela_lex_init(yyscan_t* ptr_yy_globals)
{
- if (ptr_yy_globals == NULL){
- errno = EINVAL;
- return 1;
- }
+ if (ptr_yy_globals == NULL) {
+ errno = EINVAL;
+ return 1;
+ }
- *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), NULL );
+ *ptr_yy_globals = (yyscan_t) promela_alloc ( sizeof( struct yyguts_t ), NULL );
- if (*ptr_yy_globals == NULL){
- errno = ENOMEM;
- return 1;
- }
+ 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));
+ /* 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 );
+ return yy_init_globals ( *ptr_yy_globals );
}
/* promela_lex_init_extra has the same functionality as promela_lex_init, but follows the
@@ -2509,76 +2453,74 @@ int promela_lex_init(yyscan_t* ptr_yy_globals)
int promela_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
{
- struct yyguts_t dummy_yyguts;
-
- promela_set_extra (yy_user_defined, &dummy_yyguts);
-
- if (ptr_yy_globals == NULL){
- errno = EINVAL;
- return 1;
- }
-
- *ptr_yy_globals = (yyscan_t) promela_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));
-
- promela_set_extra (yy_user_defined, *ptr_yy_globals);
-
- return yy_init_globals ( *ptr_yy_globals );
+ struct yyguts_t dummy_yyguts;
+
+ promela_set_extra (yy_user_defined, &dummy_yyguts);
+
+ if (ptr_yy_globals == NULL) {
+ errno = EINVAL;
+ return 1;
+ }
+
+ *ptr_yy_globals = (yyscan_t) promela_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));
+
+ promela_set_extra (yy_user_defined, *ptr_yy_globals);
+
+ return yy_init_globals ( *ptr_yy_globals );
}
/* %endif if-c-only */
/* %if-c-only */
-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 promela_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 */
+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 promela_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;
+ yyin = stdin;
+ yyout = stdout;
#else
- yyin = (FILE *) 0;
- yyout = (FILE *) 0;
+ yyin = (FILE *) 0;
+ yyout = (FILE *) 0;
#endif
- /* For future reference: Set errno on error, since we are called by
- * promela_lex_init()
- */
- return 0;
+ /* For future reference: Set errno on error, since we are called by
+ * promela_lex_init()
+ */
+ return 0;
}
/* %endif */
/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
/* promela_lex_destroy is for both reentrant and non-reentrant scanners. */
-int promela_lex_destroy (yyscan_t yyscanner)
-{
- struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+int promela_lex_destroy (yyscan_t yyscanner) {
+ struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- /* Pop the buffer stack, destroying each element. */
- while(YY_CURRENT_BUFFER){
+ /* Pop the buffer stack, destroying each element. */
+ while(YY_CURRENT_BUFFER) {
promela__delete_buffer(YY_CURRENT_BUFFER ,yyscanner );
YY_CURRENT_BUFFER_LVALUE = NULL;
promela_pop_buffer_state(yyscanner);
@@ -2588,20 +2530,20 @@ int promela_lex_destroy (yyscan_t yyscanner)
promela_free(yyg->yy_buffer_stack ,yyscanner);
yyg->yy_buffer_stack = NULL;
- /* Destroy the start condition stack. */
- promela_free(yyg->yy_start_stack ,yyscanner );
- yyg->yy_start_stack = NULL;
+ /* Destroy the start condition stack. */
+ promela_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
- * promela_lex() is called, initialization will occur. */
- yy_init_globals( yyscanner);
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * promela_lex() is called, initialization will occur. */
+ yy_init_globals( yyscanner);
-/* %if-reentrant */
- /* Destroy the main struct (reentrant only). */
- promela_free ( yyscanner , yyscanner );
- yyscanner = NULL;
-/* %endif */
- return 0;
+ /* %if-reentrant */
+ /* Destroy the main struct (reentrant only). */
+ promela_free ( yyscanner , yyscanner );
+ yyscanner = NULL;
+ /* %endif */
+ return 0;
}
/* %endif */
@@ -2610,8 +2552,7 @@ int promela_lex_destroy (yyscan_t yyscanner)
*/
#ifndef yytext_ptr
-static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
-{
+static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) {
register int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
@@ -2619,8 +2560,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#endif
#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
-{
+static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) {
register int n;
for ( n = 0; s[n]; ++n )
;
@@ -2629,13 +2569,11 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
}
#endif
-void *promela_alloc (yy_size_t size , yyscan_t yyscanner)
-{
+void *promela_alloc (yy_size_t size , yyscan_t yyscanner) {
return (void *) malloc( size );
}
-void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
-{
+void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) {
/* 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
@@ -2646,8 +2584,7 @@ void *promela_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner)
return (void *) realloc( (char *) ptr, size );
}
-void promela_free (void * ptr , yyscan_t yyscanner)
-{
+void promela_free (void * ptr , yyscan_t yyscanner) {
free( (char *) ptr ); /* see promela_realloc() for (char *) cast */
}
diff --git a/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp b/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp
index 9d957e7..05ca549 100644
--- a/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp
+++ b/src/uscxml/plugins/datamodel/promela/parser/promela.tab.cpp
@@ -1,19 +1,19 @@
/* A Bison parser, made by GNU Bison 2.7.12-4996. */
/* Bison implementation for Yacc-like parsers in C
-
+
Copyright (C) 1984, 1989-1990, 2000-2013 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 <http://www.gnu.org/licenses/>. */
@@ -26,7 +26,7 @@
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. */
@@ -130,97 +130,96 @@ extern int promela_debug;
/* Tokens. */
#ifndef PROMELA_TOKENTYPE
# define PROMELA_TOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum promela_tokentype {
- PML_VAR_ARRAY = 258,
- PML_VARLIST = 259,
- PML_DECL = 260,
- PML_DECLLIST = 261,
- PML_STMNT = 262,
- PML_COLON = 263,
- PML_EXPR = 264,
- PML_NAMELIST = 265,
- PML_ASSERT = 266,
- PML_PRINT = 267,
- PML_PRINTM = 268,
- PML_LEN = 269,
- PML_STRING = 270,
- PML_TYPEDEF = 271,
- PML_MTYPE = 272,
- PML_INLINE = 273,
- PML_RETURN = 274,
- PML_LABEL = 275,
- PML_OF = 276,
- PML_GOTO = 277,
- PML_BREAK = 278,
- PML_ELSE = 279,
- PML_SEMI = 280,
- PML_ARROW = 281,
- PML_IF = 282,
- PML_FI = 283,
- PML_DO = 284,
- PML_OD = 285,
- PML_FOR = 286,
- PML_SELECT = 287,
- PML_IN = 288,
- PML_SEP = 289,
- PML_DOTDOT = 290,
- PML_HIDDEN = 291,
- PML_SHOW = 292,
- PML_ISLOCAL = 293,
- PML_CONST = 294,
- PML_TYPE = 295,
- PML_XU = 296,
- PML_NAME = 297,
- PML_UNAME = 298,
- PML_PNAME = 299,
- PML_INAME = 300,
- PML_CLAIM = 301,
- PML_TRACE = 302,
- PML_INIT = 303,
- PML_LTL = 304,
- PML_COMMA = 305,
- PML_ASGN = 306,
- PML_AND = 307,
- PML_OR = 308,
- PML_BITAND = 309,
- PML_BITXOR = 310,
- PML_BITOR = 311,
- PML_NE = 312,
- PML_EQ = 313,
- PML_LE = 314,
- PML_GE = 315,
- PML_LT = 316,
- PML_GT = 317,
- PML_RSHIFT = 318,
- PML_LSHIFT = 319,
- PML_MINUS = 320,
- PML_PLUS = 321,
- PML_MODULO = 322,
- PML_DIVIDE = 323,
- PML_TIMES = 324,
- PML_DECR = 325,
- PML_INCR = 326,
- PML_COMPL = 327,
- PML_NEG = 328,
- PML_CMPND = 329,
- PML_DOT = 330
- };
+/* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+enum promela_tokentype {
+ PML_VAR_ARRAY = 258,
+ PML_VARLIST = 259,
+ PML_DECL = 260,
+ PML_DECLLIST = 261,
+ PML_STMNT = 262,
+ PML_COLON = 263,
+ PML_EXPR = 264,
+ PML_NAMELIST = 265,
+ PML_ASSERT = 266,
+ PML_PRINT = 267,
+ PML_PRINTM = 268,
+ PML_LEN = 269,
+ PML_STRING = 270,
+ PML_TYPEDEF = 271,
+ PML_MTYPE = 272,
+ PML_INLINE = 273,
+ PML_RETURN = 274,
+ PML_LABEL = 275,
+ PML_OF = 276,
+ PML_GOTO = 277,
+ PML_BREAK = 278,
+ PML_ELSE = 279,
+ PML_SEMI = 280,
+ PML_ARROW = 281,
+ PML_IF = 282,
+ PML_FI = 283,
+ PML_DO = 284,
+ PML_OD = 285,
+ PML_FOR = 286,
+ PML_SELECT = 287,
+ PML_IN = 288,
+ PML_SEP = 289,
+ PML_DOTDOT = 290,
+ PML_HIDDEN = 291,
+ PML_SHOW = 292,
+ PML_ISLOCAL = 293,
+ PML_CONST = 294,
+ PML_TYPE = 295,
+ PML_XU = 296,
+ PML_NAME = 297,
+ PML_UNAME = 298,
+ PML_PNAME = 299,
+ PML_INAME = 300,
+ PML_CLAIM = 301,
+ PML_TRACE = 302,
+ PML_INIT = 303,
+ PML_LTL = 304,
+ PML_COMMA = 305,
+ PML_ASGN = 306,
+ PML_AND = 307,
+ PML_OR = 308,
+ PML_BITAND = 309,
+ PML_BITXOR = 310,
+ PML_BITOR = 311,
+ PML_NE = 312,
+ PML_EQ = 313,
+ PML_LE = 314,
+ PML_GE = 315,
+ PML_LT = 316,
+ PML_GT = 317,
+ PML_RSHIFT = 318,
+ PML_LSHIFT = 319,
+ PML_MINUS = 320,
+ PML_PLUS = 321,
+ PML_MODULO = 322,
+ PML_DIVIDE = 323,
+ PML_TIMES = 324,
+ PML_DECR = 325,
+ PML_INCR = 326,
+ PML_COMPL = 327,
+ PML_NEG = 328,
+ PML_CMPND = 329,
+ PML_DOT = 330
+};
#endif
#if ! defined PROMELA_STYPE && ! defined PROMELA_STYPE_IS_DECLARED
-typedef union PROMELA_STYPE
-{
-/* Line 387 of yacc.c */
+typedef union PROMELA_STYPE {
+ /* Line 387 of yacc.c */
#line 39 "promela.ypp"
- uscxml::PromelaParserNode* node;
+ uscxml::PromelaParserNode* node;
char* value;
-/* Line 387 of yacc.c */
+ /* Line 387 of yacc.c */
#line 225 "promela.tab.cpp"
} PROMELA_STYPE;
# define PROMELA_STYPE_IS_TRIVIAL 1
@@ -229,12 +228,11 @@ typedef union PROMELA_STYPE
#endif
#if ! defined PROMELA_LTYPE && ! defined PROMELA_LTYPE_IS_DECLARED
-typedef struct PROMELA_LTYPE
-{
- int first_line;
- int first_column;
- int last_line;
- int last_column;
+typedef struct PROMELA_LTYPE {
+ int first_line;
+ int first_column;
+ int last_line;
+ int last_column;
} PROMELA_LTYPE;
# define promela_ltype PROMELA_LTYPE /* obsolescent; will be withdrawn */
# define PROMELA_LTYPE_IS_DECLARED 1
@@ -349,10 +347,10 @@ YYID (int yyi)
#else
static int
YYID (yyi)
- int yyi;
+int yyi;
#endif
{
- return yyi;
+ return yyi;
}
#endif
@@ -376,7 +374,7 @@ YYID (yyi)
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
+/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
@@ -386,13 +384,13 @@ YYID (yyi)
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
+/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (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. */
+/* 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
@@ -433,11 +431,10 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
&& defined PROMELA_STYPE_IS_TRIVIAL && PROMELA_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;
+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. */
@@ -511,273 +508,260 @@ union yyalloc
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-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, 2, 2, 2, 2, 2, 2, 2,
- 11, 12, 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, 13, 2, 14, 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, 15, 2, 16, 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, 2, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 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,
- 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
- 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
- 81
+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, 2, 2, 2, 2, 2, 2, 2,
+ 11, 12, 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, 13, 2, 14, 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, 15, 2, 16, 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, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 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,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+ 81
};
#if PROMELA_DEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
-static const yytype_uint16 yyprhs[] =
-{
- 0, 0, 3, 5, 7, 9, 11, 13, 18, 21,
- 22, 25, 29, 33, 37, 41, 45, 49, 53, 57,
- 61, 65, 69, 73, 77, 81, 85, 89, 93, 97,
- 101, 104, 107, 112, 114, 116, 118, 119, 121, 123,
- 125, 129, 133, 140, 143, 149, 151, 154, 158, 160,
- 164, 166, 170, 172, 176, 181, 183, 186, 190, 194,
- 198, 202, 206, 210, 212, 215, 218, 220, 223, 227,
- 229, 233, 236, 239, 245, 250, 255, 258, 260, 261,
- 264, 266
+static const yytype_uint16 yyprhs[] = {
+ 0, 0, 3, 5, 7, 9, 11, 13, 18, 21,
+ 22, 25, 29, 33, 37, 41, 45, 49, 53, 57,
+ 61, 65, 69, 73, 77, 81, 85, 89, 93, 97,
+ 101, 104, 107, 112, 114, 116, 118, 119, 121, 123,
+ 125, 129, 133, 140, 143, 149, 151, 154, 158, 160,
+ 164, 166, 170, 172, 176, 181, 183, 186, 190, 194,
+ 198, 202, 206, 210, 212, 215, 218, 220, 223, 227,
+ 229, 233, 236, 239, 245, 250, 255, 258, 260, 261,
+ 264, 266
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 83, 0, -1, 92, -1, 88, -1, 98, -1, 86,
- -1, 48, -1, 48, 13, 88, 14, -1, 85, 87,
- -1, -1, 81, 86, -1, 11, 88, 12, -1, 88,
- 72, 88, -1, 88, 71, 88, -1, 88, 75, 88,
- -1, 88, 74, 88, -1, 88, 73, 88, -1, 88,
- 60, 88, -1, 88, 61, 88, -1, 88, 62, 88,
- -1, 88, 68, 88, -1, 88, 67, 88, -1, 88,
- 66, 88, -1, 88, 65, 88, -1, 88, 64, 88,
- -1, 88, 63, 88, -1, 88, 58, 88, -1, 88,
- 59, 88, -1, 88, 70, 88, -1, 88, 69, 88,
- -1, 79, 88, -1, 71, 88, -1, 20, 11, 84,
- 12, -1, 84, -1, 45, -1, 21, -1, -1, 42,
- -1, 43, -1, 44, -1, 89, 46, 93, -1, 89,
- 49, 93, -1, 89, 46, 57, 15, 97, 16, -1,
- 89, 91, -1, 22, 48, 15, 92, 16, -1, 90,
- -1, 90, 31, -1, 90, 31, 92, -1, 94, -1,
- 94, 56, 93, -1, 95, -1, 95, 57, 88, -1,
- 48, -1, 48, 8, 45, -1, 48, 13, 96, 14,
- -1, 45, -1, 71, 96, -1, 11, 96, 12, -1,
- 96, 72, 96, -1, 96, 71, 96, -1, 96, 75,
- 96, -1, 96, 74, 96, -1, 96, 73, 96, -1,
- 48, -1, 97, 48, -1, 97, 56, -1, 99, -1,
- 99, 31, -1, 99, 31, 98, -1, 100, -1, 84,
- 57, 88, -1, 84, 77, -1, 84, 76, -1, 18,
- 11, 21, 101, 12, -1, 18, 11, 84, 12, -1,
- 18, 11, 45, 12, -1, 17, 88, -1, 88, -1,
- -1, 56, 102, -1, 88, -1, 88, 56, 102, -1
+static const yytype_int8 yyrhs[] = {
+ 83, 0, -1, 92, -1, 88, -1, 98, -1, 86,
+ -1, 48, -1, 48, 13, 88, 14, -1, 85, 87,
+ -1, -1, 81, 86, -1, 11, 88, 12, -1, 88,
+ 72, 88, -1, 88, 71, 88, -1, 88, 75, 88,
+ -1, 88, 74, 88, -1, 88, 73, 88, -1, 88,
+ 60, 88, -1, 88, 61, 88, -1, 88, 62, 88,
+ -1, 88, 68, 88, -1, 88, 67, 88, -1, 88,
+ 66, 88, -1, 88, 65, 88, -1, 88, 64, 88,
+ -1, 88, 63, 88, -1, 88, 58, 88, -1, 88,
+ 59, 88, -1, 88, 70, 88, -1, 88, 69, 88,
+ -1, 79, 88, -1, 71, 88, -1, 20, 11, 84,
+ 12, -1, 84, -1, 45, -1, 21, -1, -1, 42,
+ -1, 43, -1, 44, -1, 89, 46, 93, -1, 89,
+ 49, 93, -1, 89, 46, 57, 15, 97, 16, -1,
+ 89, 91, -1, 22, 48, 15, 92, 16, -1, 90,
+ -1, 90, 31, -1, 90, 31, 92, -1, 94, -1,
+ 94, 56, 93, -1, 95, -1, 95, 57, 88, -1,
+ 48, -1, 48, 8, 45, -1, 48, 13, 96, 14,
+ -1, 45, -1, 71, 96, -1, 11, 96, 12, -1,
+ 96, 72, 96, -1, 96, 71, 96, -1, 96, 75,
+ 96, -1, 96, 74, 96, -1, 96, 73, 96, -1,
+ 48, -1, 97, 48, -1, 97, 56, -1, 99, -1,
+ 99, 31, -1, 99, 31, 98, -1, 100, -1, 84,
+ 57, 88, -1, 84, 77, -1, 84, 76, -1, 18,
+ 11, 21, 101, 12, -1, 18, 11, 84, 12, -1,
+ 18, 11, 45, 12, -1, 17, 88, -1, 88, -1,
+ -1, 56, 102, -1, 88, -1, 88, 56, 102, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint8 yyrline[] =
-{
- 0, 85, 85, 89, 93, 99, 102, 103, 106, 121,
- 122, 132, 133, 134, 135, 136, 137, 138, 139, 140,
- 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
- 151, 152, 154, 155, 156, 157, 163, 164, 165, 166,
- 169, 170, 171, 172, 175, 178, 179, 180, 190, 191,
- 194, 195, 198, 199, 200, 203, 204, 205, 206, 207,
- 208, 209, 210, 213, 214, 223, 226, 227, 228, 231,
- 234, 235, 236, 237, 238, 239, 240, 241, 244, 245,
- 248, 249
+static const yytype_uint8 yyrline[] = {
+ 0, 85, 85, 89, 93, 99, 102, 103, 106, 121,
+ 122, 132, 133, 134, 135, 136, 137, 138, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 149, 150,
+ 151, 152, 154, 155, 156, 157, 163, 164, 165, 166,
+ 169, 170, 171, 172, 175, 178, 179, 180, 190, 191,
+ 194, 195, 198, 199, 200, 203, 204, 205, 206, 207,
+ 208, 209, 210, 213, 214, 223, 226, 227, 228, 231,
+ 234, 235, 236, 237, 238, 239, 240, 241, 244, 245,
+ 248, 249
};
#endif
#if PROMELA_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", "PML_VAR_ARRAY", "PML_VARLIST",
- "PML_DECL", "PML_DECLLIST", "PML_STMNT", "PML_COLON", "PML_EXPR",
- "PML_NAMELIST", "'('", "')'", "'['", "']'", "'{'", "'}'", "PML_ASSERT",
- "PML_PRINT", "PML_PRINTM", "PML_LEN", "PML_STRING", "PML_TYPEDEF",
- "PML_MTYPE", "PML_INLINE", "PML_RETURN", "PML_LABEL", "PML_OF",
- "PML_GOTO", "PML_BREAK", "PML_ELSE", "PML_SEMI", "PML_ARROW", "PML_IF",
- "PML_FI", "PML_DO", "PML_OD", "PML_FOR", "PML_SELECT", "PML_IN",
- "PML_SEP", "PML_DOTDOT", "PML_HIDDEN", "PML_SHOW", "PML_ISLOCAL",
- "PML_CONST", "PML_TYPE", "PML_XU", "PML_NAME", "PML_UNAME", "PML_PNAME",
- "PML_INAME", "PML_CLAIM", "PML_TRACE", "PML_INIT", "PML_LTL",
- "PML_COMMA", "PML_ASGN", "PML_AND", "PML_OR", "PML_BITAND", "PML_BITXOR",
- "PML_BITOR", "PML_NE", "PML_EQ", "PML_LE", "PML_GE", "PML_LT", "PML_GT",
- "PML_RSHIFT", "PML_LSHIFT", "PML_MINUS", "PML_PLUS", "PML_MODULO",
- "PML_DIVIDE", "PML_TIMES", "PML_DECR", "PML_INCR", "PML_COMPL",
- "PML_NEG", "PML_CMPND", "PML_DOT", "$accept", "program", "varref",
- "pfld", "cmpnd", "sfld", "expr", "vis", "one_decl", "utype", "decl_lst",
- "var_list", "ivar", "vardcl", "const_expr", "nlst", "stmnt_lst", "stmnt",
- "Stmnt", "prargs", "arg", YY_NULL
+static const char *const yytname[] = {
+ "$end", "error", "$undefined", "PML_VAR_ARRAY", "PML_VARLIST",
+ "PML_DECL", "PML_DECLLIST", "PML_STMNT", "PML_COLON", "PML_EXPR",
+ "PML_NAMELIST", "'('", "')'", "'['", "']'", "'{'", "'}'", "PML_ASSERT",
+ "PML_PRINT", "PML_PRINTM", "PML_LEN", "PML_STRING", "PML_TYPEDEF",
+ "PML_MTYPE", "PML_INLINE", "PML_RETURN", "PML_LABEL", "PML_OF",
+ "PML_GOTO", "PML_BREAK", "PML_ELSE", "PML_SEMI", "PML_ARROW", "PML_IF",
+ "PML_FI", "PML_DO", "PML_OD", "PML_FOR", "PML_SELECT", "PML_IN",
+ "PML_SEP", "PML_DOTDOT", "PML_HIDDEN", "PML_SHOW", "PML_ISLOCAL",
+ "PML_CONST", "PML_TYPE", "PML_XU", "PML_NAME", "PML_UNAME", "PML_PNAME",
+ "PML_INAME", "PML_CLAIM", "PML_TRACE", "PML_INIT", "PML_LTL",
+ "PML_COMMA", "PML_ASGN", "PML_AND", "PML_OR", "PML_BITAND", "PML_BITXOR",
+ "PML_BITOR", "PML_NE", "PML_EQ", "PML_LE", "PML_GE", "PML_LT", "PML_GT",
+ "PML_RSHIFT", "PML_LSHIFT", "PML_MINUS", "PML_PLUS", "PML_MODULO",
+ "PML_DIVIDE", "PML_TIMES", "PML_DECR", "PML_INCR", "PML_COMPL",
+ "PML_NEG", "PML_CMPND", "PML_DOT", "$accept", "program", "varref",
+ "pfld", "cmpnd", "sfld", "expr", "vis", "one_decl", "utype", "decl_lst",
+ "var_list", "ivar", "vardcl", "const_expr", "nlst", "stmnt_lst", "stmnt",
+ "Stmnt", "prargs", "arg", YY_NULL
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 40, 41, 91, 93, 123, 125, 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, 316, 317, 318,
- 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
- 329, 330
+static const yytype_uint16 yytoknum[] = {
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 40, 41, 91, 93, 123, 125, 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, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 82, 83, 83, 83, 84, 85, 85, 86, 87,
- 87, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 89, 89, 89, 89,
- 90, 90, 90, 90, 91, 92, 92, 92, 93, 93,
- 94, 94, 95, 95, 95, 96, 96, 96, 96, 96,
- 96, 96, 96, 97, 97, 97, 98, 98, 98, 99,
- 100, 100, 100, 100, 100, 100, 100, 100, 101, 101,
- 102, 102
+static const yytype_uint8 yyr1[] = {
+ 0, 82, 83, 83, 83, 84, 85, 85, 86, 87,
+ 87, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 89, 89, 89, 89,
+ 90, 90, 90, 90, 91, 92, 92, 92, 93, 93,
+ 94, 94, 95, 95, 95, 96, 96, 96, 96, 96,
+ 96, 96, 96, 97, 97, 97, 98, 98, 98, 99,
+ 100, 100, 100, 100, 100, 100, 100, 100, 101, 101,
+ 102, 102
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 1, 1, 1, 1, 1, 4, 2, 0,
- 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 4, 1, 1, 1, 0, 1, 1, 1,
- 3, 3, 6, 2, 5, 1, 2, 3, 1, 3,
- 1, 3, 1, 3, 4, 1, 2, 3, 3, 3,
- 3, 3, 3, 1, 2, 2, 1, 2, 3, 1,
- 3, 2, 2, 5, 4, 4, 2, 1, 0, 2,
- 1, 3
+static const yytype_uint8 yyr2[] = {
+ 0, 2, 1, 1, 1, 1, 1, 4, 2, 0,
+ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 2, 2, 4, 1, 1, 1, 0, 1, 1, 1,
+ 3, 3, 6, 2, 5, 1, 2, 3, 1, 3,
+ 1, 3, 1, 3, 4, 1, 2, 3, 3, 3,
+ 3, 3, 3, 1, 2, 2, 1, 2, 3, 1,
+ 3, 2, 2, 5, 4, 4, 2, 1, 0, 2,
+ 1, 3
};
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
Performed when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 36, 0, 0, 0, 0, 35, 37, 38, 39, 34,
- 6, 0, 0, 0, 33, 9, 5, 3, 0, 45,
- 2, 4, 66, 69, 33, 0, 76, 0, 0, 0,
- 31, 30, 1, 0, 72, 71, 0, 8, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
- 36, 67, 11, 78, 0, 0, 0, 0, 70, 10,
- 26, 27, 17, 18, 19, 25, 24, 23, 22, 21,
- 20, 29, 28, 13, 12, 16, 15, 14, 0, 52,
- 0, 40, 48, 50, 41, 47, 77, 68, 0, 0,
- 75, 74, 32, 7, 36, 0, 0, 0, 0, 0,
- 80, 79, 73, 0, 53, 0, 55, 0, 0, 63,
- 0, 49, 51, 0, 44, 0, 56, 54, 0, 0,
- 0, 0, 0, 42, 64, 65, 81, 57, 59, 58,
- 62, 61, 60
+static const yytype_uint8 yydefact[] = {
+ 36, 0, 0, 0, 0, 35, 37, 38, 39, 34,
+ 6, 0, 0, 0, 33, 9, 5, 3, 0, 45,
+ 2, 4, 66, 69, 33, 0, 76, 0, 0, 0,
+ 31, 30, 1, 0, 72, 71, 0, 8, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 43,
+ 36, 67, 11, 78, 0, 0, 0, 0, 70, 10,
+ 26, 27, 17, 18, 19, 25, 24, 23, 22, 21,
+ 20, 29, 28, 13, 12, 16, 15, 14, 0, 52,
+ 0, 40, 48, 50, 41, 47, 77, 68, 0, 0,
+ 75, 74, 32, 7, 36, 0, 0, 0, 0, 0,
+ 80, 79, 73, 0, 53, 0, 55, 0, 0, 63,
+ 0, 49, 51, 0, 44, 0, 56, 54, 0, 0,
+ 0, 0, 0, 42, 64, 65, 81, 57, 59, 58,
+ 62, 61, 60
};
/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- -1, 13, 24, 15, 16, 37, 110, 18, 19, 59,
- 20, 91, 92, 93, 118, 120, 21, 22, 23, 99,
- 111
+static const yytype_int8 yydefgoto[] = {
+ -1, 13, 24, 15, 16, 37, 110, 18, 19, 59,
+ 20, 91, 92, 93, 118, 120, 21, 22, 23, 99,
+ 111
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -112
-static const yytype_int16 yypact[] =
-{
- 14, 53, 53, 3, 13, -112, -112, -112, -112, -112,
- 15, 53, 53, 26, 34, -51, -112, 138, 81, 5,
- -112, -112, 58, -112, -112, 75, 160, 169, 42, 53,
- -66, -112, -112, 53, -112, -112, 42, -112, 53, 53,
- 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
- 53, 53, 53, 53, 53, 53, 44, -35, 51, -112,
- 72, 49, -112, 46, 88, 96, 100, 93, 160, -112,
- 176, 176, 189, 189, 189, 200, 200, 207, 207, 207,
- 207, 120, 120, -66, -66, -112, -112, -112, 98, -3,
- 102, -112, 63, 74, -112, -112, 160, -112, 53, 113,
- -112, -112, -112, -112, 62, 126, -8, 167, 51, 53,
- 114, -112, -112, 267, -112, -8, -112, -8, 9, -112,
- 70, -112, 160, 53, -112, 4, 48, -112, -8, -8,
- -8, -8, -8, -112, -112, -112, -112, -112, 48, 48,
- -112, -112, -112
+static const yytype_int16 yypact[] = {
+ 14, 53, 53, 3, 13, -112, -112, -112, -112, -112,
+ 15, 53, 53, 26, 34, -51, -112, 138, 81, 5,
+ -112, -112, 58, -112, -112, 75, 160, 169, 42, 53,
+ -66, -112, -112, 53, -112, -112, 42, -112, 53, 53,
+ 53, 53, 53, 53, 53, 53, 53, 53, 53, 53,
+ 53, 53, 53, 53, 53, 53, 44, -35, 51, -112,
+ 72, 49, -112, 46, 88, 96, 100, 93, 160, -112,
+ 176, 176, 189, 189, 189, 200, 200, 207, 207, 207,
+ 207, 120, 120, -66, -66, -112, -112, -112, 98, -3,
+ 102, -112, 63, 74, -112, -112, 160, -112, 53, 113,
+ -112, -112, -112, -112, 62, 126, -8, 167, 51, 53,
+ 114, -112, -112, 267, -112, -8, -112, -8, 9, -112,
+ 70, -112, 160, 53, -112, 4, 48, -112, -8, -8,
+ -8, -8, -8, -112, -112, -112, -112, -112, 48, 48,
+ -112, -112, -112
};
/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int16 yypgoto[] =
-{
- -112, -112, 68, -112, 180, -112, 0, -112, -112, -112,
- -33, -43, -112, -112, -111, -112, 223, -112, -112, -112,
- 162
+static const yytype_int16 yypgoto[] = {
+ -112, -112, 68, -112, 180, -112, 0, -112, -112, -112,
+ -33, -43, -112, -112, -111, -112, 223, -112, -112, -112,
+ 162
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -78
-static const yytype_int16 yytable[] =
-{
- 17, 25, 26, 115, 125, 105, 126, 53, 54, 55,
- 106, 30, 31, 89, 27, 94, 137, 138, 139, 140,
- 141, 142, 90, 127, 28, 1, 32, 95, 29, 67,
- 36, 2, 3, 68, 4, 5, 60, 116, 70, 71,
- 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
- 82, 83, 84, 85, 86, 87, 6, 7, 8, 9,
- 1, 96, 10, 117, 1, 121, 2, 3, 14, 4,
- 5, 113, -46, 4, 5, 128, 129, 130, 131, 132,
- 128, 129, 130, 131, 132, 11, 133, 62, -46, 61,
- 10, 33, 88, 12, 9, 65, 66, 10, 9, 89,
- 100, 10, 98, 56, 6, 7, 8, 103, 101, 122,
- 34, 35, 102, 104, 6, 7, 8, 107, 134, 108,
- 11, 130, 131, 132, 11, 112, 135, 57, 12, 14,
- 58, 109, 12, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
- 55, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, 49, 50, 51, 52, 53, 54, 55, -77,
- 123, 114, 38, 39, 40, 41, 42, 43, 44, 45,
- 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
- 63, 51, 52, 53, 54, 55, 38, 39, 40, 41,
- 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
- 52, 53, 54, 55, 64, 119, 69, 10, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 40, 41, 42, 43,
- 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
- 54, 55, 43, 44, 45, 46, 47, 48, 49, 50,
- 51, 52, 53, 54, 55, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 49, 50, 51, 52,
- 53, 54, 55, 124, 97, 136
+static const yytype_int16 yytable[] = {
+ 17, 25, 26, 115, 125, 105, 126, 53, 54, 55,
+ 106, 30, 31, 89, 27, 94, 137, 138, 139, 140,
+ 141, 142, 90, 127, 28, 1, 32, 95, 29, 67,
+ 36, 2, 3, 68, 4, 5, 60, 116, 70, 71,
+ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
+ 82, 83, 84, 85, 86, 87, 6, 7, 8, 9,
+ 1, 96, 10, 117, 1, 121, 2, 3, 14, 4,
+ 5, 113, -46, 4, 5, 128, 129, 130, 131, 132,
+ 128, 129, 130, 131, 132, 11, 133, 62, -46, 61,
+ 10, 33, 88, 12, 9, 65, 66, 10, 9, 89,
+ 100, 10, 98, 56, 6, 7, 8, 103, 101, 122,
+ 34, 35, 102, 104, 6, 7, 8, 107, 134, 108,
+ 11, 130, 131, 132, 11, 112, 135, 57, 12, 14,
+ 58, 109, 12, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+ 47, 48, 49, 50, 51, 52, 53, 54, 55, -77,
+ 123, 114, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
+ 63, 51, 52, 53, 54, 55, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 64, 119, 69, 10, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 49, 50, 51, 52,
+ 53, 54, 55, 124, 97, 136
};
#define yypact_value_is_default(Yystate) \
@@ -786,58 +770,56 @@ static const yytype_int16 yytable[] =
#define yytable_value_is_error(Yytable_value) \
YYID (0)
-static const yytype_uint8 yycheck[] =
-{
- 0, 1, 2, 11, 115, 8, 117, 73, 74, 75,
- 13, 11, 12, 48, 11, 58, 12, 128, 129, 130,
- 131, 132, 57, 14, 11, 11, 0, 60, 13, 29,
- 81, 17, 18, 33, 20, 21, 31, 45, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
- 50, 51, 52, 53, 54, 55, 42, 43, 44, 45,
- 11, 61, 48, 71, 11, 108, 17, 18, 0, 20,
- 21, 104, 0, 20, 21, 71, 72, 73, 74, 75,
- 71, 72, 73, 74, 75, 71, 16, 12, 16, 31,
- 48, 57, 48, 79, 45, 27, 28, 48, 45, 48,
- 12, 48, 56, 22, 42, 43, 44, 14, 12, 109,
- 76, 77, 12, 15, 42, 43, 44, 15, 48, 56,
- 71, 73, 74, 75, 71, 12, 56, 46, 79, 61,
- 49, 57, 79, 58, 59, 60, 61, 62, 63, 64,
- 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
- 75, 58, 59, 60, 61, 62, 63, 64, 65, 66,
- 67, 68, 69, 70, 71, 72, 73, 74, 75, 31,
- 56, 45, 58, 59, 60, 61, 62, 63, 64, 65,
- 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
- 21, 71, 72, 73, 74, 75, 58, 59, 60, 61,
- 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
- 72, 73, 74, 75, 45, 48, 36, 48, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 60, 61, 62, 63,
- 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
- 74, 75, 63, 64, 65, 66, 67, 68, 69, 70,
- 71, 72, 73, 74, 75, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 69, 70, 71, 72,
- 73, 74, 75, 16, 61, 123
+static const yytype_uint8 yycheck[] = {
+ 0, 1, 2, 11, 115, 8, 117, 73, 74, 75,
+ 13, 11, 12, 48, 11, 58, 12, 128, 129, 130,
+ 131, 132, 57, 14, 11, 11, 0, 60, 13, 29,
+ 81, 17, 18, 33, 20, 21, 31, 45, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 42, 43, 44, 45,
+ 11, 61, 48, 71, 11, 108, 17, 18, 0, 20,
+ 21, 104, 0, 20, 21, 71, 72, 73, 74, 75,
+ 71, 72, 73, 74, 75, 71, 16, 12, 16, 31,
+ 48, 57, 48, 79, 45, 27, 28, 48, 45, 48,
+ 12, 48, 56, 22, 42, 43, 44, 14, 12, 109,
+ 76, 77, 12, 15, 42, 43, 44, 15, 48, 56,
+ 71, 73, 74, 75, 71, 12, 56, 46, 79, 61,
+ 49, 57, 79, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 75, 58, 59, 60, 61, 62, 63, 64, 65, 66,
+ 67, 68, 69, 70, 71, 72, 73, 74, 75, 31,
+ 56, 45, 58, 59, 60, 61, 62, 63, 64, 65,
+ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
+ 21, 71, 72, 73, 74, 75, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 45, 48, 36, 48, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 75, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 75, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 69, 70, 71, 72,
+ 73, 74, 75, 16, 61, 123
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
-{
- 0, 11, 17, 18, 20, 21, 42, 43, 44, 45,
- 48, 71, 79, 83, 84, 85, 86, 88, 89, 90,
- 92, 98, 99, 100, 84, 88, 88, 11, 11, 13,
- 88, 88, 0, 57, 76, 77, 81, 87, 58, 59,
- 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
- 70, 71, 72, 73, 74, 75, 22, 46, 49, 91,
- 31, 31, 12, 21, 45, 84, 84, 88, 88, 86,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 48, 48,
- 57, 93, 94, 95, 93, 92, 88, 98, 56, 101,
- 12, 12, 12, 14, 15, 8, 13, 15, 56, 57,
- 88, 102, 12, 92, 45, 11, 45, 71, 96, 48,
- 97, 93, 88, 56, 16, 96, 96, 14, 71, 72,
- 73, 74, 75, 16, 48, 56, 102, 12, 96, 96,
- 96, 96, 96
+static const yytype_uint8 yystos[] = {
+ 0, 11, 17, 18, 20, 21, 42, 43, 44, 45,
+ 48, 71, 79, 83, 84, 85, 86, 88, 89, 90,
+ 92, 98, 99, 100, 84, 88, 88, 11, 11, 13,
+ 88, 88, 0, 57, 76, 77, 81, 87, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 75, 22, 46, 49, 91,
+ 31, 31, 12, 21, 45, 84, 84, 88, 88, 86,
+ 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
+ 88, 88, 88, 88, 88, 88, 88, 88, 48, 48,
+ 57, 93, 94, 95, 93, 92, 88, 98, 56, 101,
+ 12, 12, 12, 14, 15, 8, 13, 15, 56, 57,
+ 88, 102, 12, 92, 45, 11, 45, 71, 96, 48,
+ 97, 93, 88, 56, 16, 96, 96, 14, 71, 72,
+ 73, 74, 75, 16, 48, 56, 102, 12, 96, 96,
+ 96, 96, 96
};
#define yyerrok (yyerrstatus = 0)
@@ -859,10 +841,10 @@ static const yytype_uint8 yystos[] =
#define YYFAIL goto yyerrlab
#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
+/* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -933,31 +915,27 @@ yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
#else
static unsigned
yy_location_print_ (yyo, yylocp)
- FILE *yyo;
- YYLTYPE const * const yylocp;
+FILE *yyo;
+YYLTYPE const * const yylocp;
#endif
{
- unsigned res = 0;
- int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
- if (0 <= yylocp->first_line)
- {
- res += fprintf (yyo, "%d", yylocp->first_line);
- if (0 <= yylocp->first_column)
- res += fprintf (yyo, ".%d", yylocp->first_column);
- }
- if (0 <= yylocp->last_line)
- {
- if (yylocp->first_line < yylocp->last_line)
- {
- res += fprintf (yyo, "-%d", yylocp->last_line);
- if (0 <= end_col)
- res += fprintf (yyo, ".%d", end_col);
- }
- else if (0 <= end_col && yylocp->first_column < end_col)
- res += fprintf (yyo, "-%d", end_col);
- }
- return res;
- }
+ unsigned res = 0;
+ int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
+ if (0 <= yylocp->first_line) {
+ res += fprintf (yyo, "%d", yylocp->first_line);
+ if (0 <= yylocp->first_column)
+ res += fprintf (yyo, ".%d", yylocp->first_column);
+ }
+ if (0 <= yylocp->last_line) {
+ if (yylocp->first_line < yylocp->last_line) {
+ res += fprintf (yyo, "-%d", yylocp->last_line);
+ if (0 <= end_col)
+ res += fprintf (yyo, ".%d", end_col);
+ } else if (0 <= end_col && yylocp->first_column < end_col)
+ res += fprintf (yyo, "-%d", end_col);
+ }
+ return res;
+}
# define YY_LOCATION_PRINT(File, Loc) \
yy_location_print_ (File, &(Loc))
@@ -1013,28 +991,28 @@ yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvalue
#else
static void
yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, ctx, scanner)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- YYLTYPE const * const yylocationp;
- uscxml::PromelaParser* ctx;
- void * scanner;
+FILE *yyoutput;
+int yytype;
+YYSTYPE const * const yyvaluep;
+YYLTYPE const * const yylocationp;
+uscxml::PromelaParser* ctx;
+void * scanner;
#endif
{
- FILE *yyo = yyoutput;
- YYUSE (yyo);
- if (!yyvaluep)
- return;
- YYUSE (yylocationp);
- YYUSE (ctx);
- YYUSE (scanner);
+ FILE *yyo = yyoutput;
+ YYUSE (yyo);
+ if (!yyvaluep)
+ return;
+ YYUSE (yylocationp);
+ YYUSE (ctx);
+ YYUSE (scanner);
# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
- YYUSE (yyoutput);
+ YYUSE (yyoutput);
# endif
- YYUSE (yytype);
+ YYUSE (yytype);
}
@@ -1049,23 +1027,23 @@ yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYL
#else
static void
yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, ctx, scanner)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
- YYLTYPE const * const yylocationp;
- uscxml::PromelaParser* ctx;
- void * scanner;
+FILE *yyoutput;
+int yytype;
+YYSTYPE const * const yyvaluep;
+YYLTYPE const * const yylocationp;
+uscxml::PromelaParser* ctx;
+void * scanner;
#endif
{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- YY_LOCATION_PRINT (yyoutput, *yylocationp);
- YYFPRINTF (yyoutput, ": ");
- yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, ctx, scanner);
- YYFPRINTF (yyoutput, ")");
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ YY_LOCATION_PRINT (yyoutput, *yylocationp);
+ YYFPRINTF (yyoutput, ": ");
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, ctx, scanner);
+ YYFPRINTF (yyoutput, ")");
}
/*------------------------------------------------------------------.
@@ -1080,17 +1058,16 @@ yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
+yytype_int16 *yybottom;
+yytype_int16 *yytop;
#endif
{
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++) {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
}
# define YY_STACK_PRINT(Bottom, Top) \
@@ -1111,27 +1088,26 @@ yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, uscxml::PromelaPars
#else
static void
yy_reduce_print (yyvsp, yylsp, yyrule, ctx, scanner)
- YYSTYPE *yyvsp;
- YYLTYPE *yylsp;
- int yyrule;
- uscxml::PromelaParser* ctx;
- void * scanner;
+YYSTYPE *yyvsp;
+YYLTYPE *yylsp;
+int yyrule;
+uscxml::PromelaParser* ctx;
+void * scanner;
#endif
{
- int yynrhs = yyr2[yyrule];
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- 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, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- , &(yylsp[(yyi + 1) - (yynrhs)]) , ctx, scanner);
- YYFPRINTF (stderr, "\n");
- }
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ 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, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ , &(yylsp[(yyi + 1) - (yynrhs)]) , ctx, scanner);
+ YYFPRINTF (stderr, "\n");
+ }
}
# define YY_REDUCE_PRINT(Rule) \
@@ -1182,13 +1158,13 @@ yystrlen (const char *yystr)
#else
static YYSIZE_T
yystrlen (yystr)
- const char *yystr;
+const char *yystr;
#endif
{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
}
# endif
# endif
@@ -1206,17 +1182,17 @@ yystpcpy (char *yydest, const char *yysrc)
#else
static char *
yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
+char *yydest;
+const char *yysrc;
#endif
{
- char *yyd = yydest;
- const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
- while ((*yyd++ = *yys++) != '\0')
- continue;
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
- return yyd - 1;
+ return yyd - 1;
}
# endif
# endif
@@ -1230,42 +1206,40 @@ yystpcpy (yydest, yysrc)
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;
+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
@@ -1279,133 +1253,123 @@ yytnamerr (char *yyres, const char *yystr)
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_NULL, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULL;
- /* 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:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- - 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_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
- }
-
- switch (yycount)
- {
+ yytype_int16 *yyssp, int yytoken) {
+ YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
+ YYSIZE_T yysize = yysize0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ /* Internationalized format string. */
+ const char *yyformat = YY_NULL;
+ /* 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:
+ - Assume YYFAIL is not used. It's too flawed to consider. See
+ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
+ for details. YYERROR is fine as it does not invoke this
+ function.
+ - 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_NULL, 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"));
+ 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;
+ }
+
+ {
+ 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 */
@@ -1421,24 +1385,24 @@ yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocatio
#else
static void
yydestruct (yymsg, yytype, yyvaluep, yylocationp, ctx, scanner)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
- YYLTYPE *yylocationp;
- uscxml::PromelaParser* ctx;
- void * scanner;
+const char *yymsg;
+int yytype;
+YYSTYPE *yyvaluep;
+YYLTYPE *yylocationp;
+uscxml::PromelaParser* ctx;
+void * scanner;
#endif
{
- YYUSE (yyvaluep);
- YYUSE (yylocationp);
- YYUSE (ctx);
- YYUSE (scanner);
+ YYUSE (yyvaluep);
+ YYUSE (yylocationp);
+ YYUSE (ctx);
+ YYUSE (scanner);
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
- YYUSE (yytype);
+ YYUSE (yytype);
}
@@ -1456,7 +1420,7 @@ yyparse (void *YYPARSE_PARAM)
#else
int
yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
+void *YYPARSE_PARAM;
#endif
#else /* ! YYPARSE_PARAM */
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -1466,17 +1430,17 @@ yyparse (uscxml::PromelaParser* ctx, void * scanner)
#else
int
yyparse (ctx, scanner)
- uscxml::PromelaParser* ctx;
- void * scanner;
+uscxml::PromelaParser* ctx;
+void * scanner;
#endif
#endif
{
-/* The lookahead symbol. */
-int yychar;
+ /* The lookahead symbol. */
+ int yychar;
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */
+ /* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
@@ -1484,16 +1448,16 @@ int yychar;
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
-/* Default value used for initialization, for pacifying older GCCs
- or non-GCC compilers. */
-static YYSTYPE yyval_default;
+ /* Default value used for initialization, for pacifying older GCCs
+ or non-GCC compilers. */
+ static YYSTYPE yyval_default;
# define YY_INITIAL_VALUE(Value) = Value
#endif
-static YYLTYPE yyloc_default
+ static YYLTYPE yyloc_default
# if defined PROMELA_LTYPE_IS_TRIVIAL && PROMELA_LTYPE_IS_TRIVIAL
- = { 1, 1, 1, 1 }
+ = { 1, 1, 1, 1 }
# endif
-;
+ ;
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
@@ -1502,1020 +1466,1165 @@ static YYLTYPE yyloc_default
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
+ /* The semantic value of the lookahead symbol. */
+ YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
-/* Location data for the lookahead symbol. */
-YYLTYPE yylloc = yyloc_default;
+ /* Location data for the lookahead symbol. */
+ YYLTYPE yylloc = yyloc_default;
- /* Number of syntax errors so far. */
- int yynerrs;
+ /* Number of syntax errors so far. */
+ int yynerrs;
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
+ 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.
+ /* 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. */
+ 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 state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls;
- YYLTYPE *yylsp;
+ /* The location stack. */
+ YYLTYPE yylsa[YYINITDEPTH];
+ YYLTYPE *yyls;
+ YYLTYPE *yylsp;
- /* The locations where the error started and ended. */
- YYLTYPE yyerror_range[3];
+ /* The locations where the error started and ended. */
+ YYLTYPE yyerror_range[3];
- YYSIZE_T yystacksize;
+ 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;
+ 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;
+ /* 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;
+ /* 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;
+ yyssp = yyss = yyssa;
+ yyvsp = yyvs = yyvsa;
+ yylsp = yyls = yylsa;
+ yystacksize = YYINITDEPTH;
- YYDPRINTF ((stderr, "Starting parse\n"));
+ YYDPRINTF ((stderr, "Starting parse\n"));
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
- yylsp[0] = yylloc;
- goto yysetstate;
+ 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++;
+ /*------------------------------------------------------------.
+ | 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;
+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;
+ 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;
- }
+ {
+ /* 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;
+ 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);
+ /* 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);
- }
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
# endif
#endif /* no yyoverflow */
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
- yylsp = yyls + yysize - 1;
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+ yylsp = yyls + yysize - 1;
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- if (yystate == YYFINAL)
- YYACCEPT;
+ if (yystate == YYFINAL)
+ YYACCEPT;
- goto yybackup;
+ goto yybackup;
-/*-----------.
-| 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;
- }
-
- 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. |
-`-----------------------------------------------------------*/
+ /* 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;
+ }
+
+ 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;
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
+ /*-----------------------------.
+ | 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 1787 of yacc.c */
+ /* 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 1787 of yacc.c */
#line 85 "promela.ypp"
- {
- ctx->ast = (yyvsp[(1) - (1)].node);
- ctx->type = PromelaParser::PROMELA_DECL;
- }
- break;
-
- case 3:
-/* Line 1787 of yacc.c */
+ {
+ ctx->ast = (yyvsp[(1) - (1)].node);
+ ctx->type = PromelaParser::PROMELA_DECL;
+ }
+ break;
+
+ case 3:
+ /* Line 1787 of yacc.c */
#line 89 "promela.ypp"
- {
- ctx->ast = (yyvsp[(1) - (1)].node);
- ctx->type = PromelaParser::PROMELA_EXPR;
- }
- break;
-
- case 4:
-/* Line 1787 of yacc.c */
+ {
+ ctx->ast = (yyvsp[(1) - (1)].node);
+ ctx->type = PromelaParser::PROMELA_EXPR;
+ }
+ break;
+
+ case 4:
+ /* Line 1787 of yacc.c */
#line 93 "promela.ypp"
- {
- ctx->ast = (yyvsp[(1) - (1)].node);
- ctx->type = PromelaParser::PROMELA_STMNT;
- }
- break;
-
- case 5:
-/* Line 1787 of yacc.c */
+ {
+ ctx->ast = (yyvsp[(1) - (1)].node);
+ ctx->type = PromelaParser::PROMELA_STMNT;
+ }
+ break;
+
+ case 5:
+ /* Line 1787 of yacc.c */
#line 99 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (1)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (1)].node);
+ }
+ break;
- case 6:
-/* Line 1787 of yacc.c */
+ case 6:
+ /* Line 1787 of yacc.c */
#line 102 "promela.ypp"
- { (yyval.node) = ctx->value(PML_NAME, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); }
- break;
+ {
+ (yyval.node) = ctx->value(PML_NAME, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value));
+ free((yyvsp[(1) - (1)].value));
+ }
+ break;
- case 7:
-/* Line 1787 of yacc.c */
+ case 7:
+ /* Line 1787 of yacc.c */
#line 103 "promela.ypp"
- { (yyval.node) = ctx->node(PML_VAR_ARRAY, 2, ctx->value(PML_NAME, (void*)&((yylsp[(1) - (4)])), (yyvsp[(1) - (4)].value)), (yyvsp[(3) - (4)].node)); free((yyvsp[(1) - (4)].value)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_VAR_ARRAY, 2, ctx->value(PML_NAME, (void*)&((yylsp[(1) - (4)])), (yyvsp[(1) - (4)].value)), (yyvsp[(3) - (4)].node));
+ free((yyvsp[(1) - (4)].value));
+ }
+ break;
- case 8:
-/* Line 1787 of yacc.c */
+ case 8:
+ /* Line 1787 of yacc.c */
#line 107 "promela.ypp"
- {
- if ((yyvsp[(2) - (2)].node) != NULL) {
- if ((yyvsp[(2) - (2)].node)->type == PML_CMPND) {
- (yyval.node) = ctx->node(PML_CMPND, 1, (yyvsp[(1) - (2)].node));
- (yyval.node)->merge((yyvsp[(2) - (2)].node)); delete (yyvsp[(2) - (2)].node);
- } else {
- (yyval.node) = ctx->node(PML_CMPND, 2, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
- }
- } else {
- (yyval.node) = (yyvsp[(1) - (2)].node);
- }
+ {
+ if ((yyvsp[(2) - (2)].node) != NULL) {
+ if ((yyvsp[(2) - (2)].node)->type == PML_CMPND) {
+ (yyval.node) = ctx->node(PML_CMPND, 1, (yyvsp[(1) - (2)].node));
+ (yyval.node)->merge((yyvsp[(2) - (2)].node));
+ delete (yyvsp[(2) - (2)].node);
+ } else {
+ (yyval.node) = ctx->node(PML_CMPND, 2, (yyvsp[(1) - (2)].node), (yyvsp[(2) - (2)].node));
}
- break;
+ } else {
+ (yyval.node) = (yyvsp[(1) - (2)].node);
+ }
+ }
+ break;
- case 9:
-/* Line 1787 of yacc.c */
+ case 9:
+ /* Line 1787 of yacc.c */
#line 121 "promela.ypp"
- { (yyval.node) = NULL; }
- break;
+ {
+ (yyval.node) = NULL;
+ }
+ break;
- case 10:
-/* Line 1787 of yacc.c */
+ case 10:
+ /* Line 1787 of yacc.c */
#line 122 "promela.ypp"
- { (yyval.node) = (yyvsp[(2) - (2)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(2) - (2)].node);
+ }
+ break;
- case 11:
-/* Line 1787 of yacc.c */
+ case 11:
+ /* Line 1787 of yacc.c */
#line 132 "promela.ypp"
- { (yyval.node) = (yyvsp[(2) - (3)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(2) - (3)].node);
+ }
+ break;
- case 12:
-/* Line 1787 of yacc.c */
+ case 12:
+ /* Line 1787 of yacc.c */
#line 133 "promela.ypp"
- { (yyval.node) = ctx->node(PML_PLUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_PLUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 13:
-/* Line 1787 of yacc.c */
+ case 13:
+ /* Line 1787 of yacc.c */
#line 134 "promela.ypp"
- { (yyval.node) = ctx->node(PML_MINUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_MINUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 14:
-/* Line 1787 of yacc.c */
+ case 14:
+ /* Line 1787 of yacc.c */
#line 135 "promela.ypp"
- { (yyval.node) = ctx->node(PML_TIMES, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_TIMES, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 15:
-/* Line 1787 of yacc.c */
+ case 15:
+ /* Line 1787 of yacc.c */
#line 136 "promela.ypp"
- { (yyval.node) = ctx->node(PML_DIVIDE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_DIVIDE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 16:
-/* Line 1787 of yacc.c */
+ case 16:
+ /* Line 1787 of yacc.c */
#line 137 "promela.ypp"
- { (yyval.node) = ctx->node(PML_MODULO, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_MODULO, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 17:
-/* Line 1787 of yacc.c */
+ case 17:
+ /* Line 1787 of yacc.c */
#line 138 "promela.ypp"
- { (yyval.node) = ctx->node(PML_BITAND, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_BITAND, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 18:
-/* Line 1787 of yacc.c */
+ case 18:
+ /* Line 1787 of yacc.c */
#line 139 "promela.ypp"
- { (yyval.node) = ctx->node(PML_BITXOR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_BITXOR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 19:
-/* Line 1787 of yacc.c */
+ case 19:
+ /* Line 1787 of yacc.c */
#line 140 "promela.ypp"
- { (yyval.node) = ctx->node(PML_BITOR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_BITOR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 20:
-/* Line 1787 of yacc.c */
+ case 20:
+ /* Line 1787 of yacc.c */
#line 141 "promela.ypp"
- { (yyval.node) = ctx->node(PML_GT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_GT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 21:
-/* Line 1787 of yacc.c */
+ case 21:
+ /* Line 1787 of yacc.c */
#line 142 "promela.ypp"
- { (yyval.node) = ctx->node(PML_LT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_LT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 22:
-/* Line 1787 of yacc.c */
+ case 22:
+ /* Line 1787 of yacc.c */
#line 143 "promela.ypp"
- { (yyval.node) = ctx->node(PML_GE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_GE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 23:
-/* Line 1787 of yacc.c */
+ case 23:
+ /* Line 1787 of yacc.c */
#line 144 "promela.ypp"
- { (yyval.node) = ctx->node(PML_LE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_LE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 24:
-/* Line 1787 of yacc.c */
+ case 24:
+ /* Line 1787 of yacc.c */
#line 145 "promela.ypp"
- { (yyval.node) = ctx->node(PML_EQ, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_EQ, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 25:
-/* Line 1787 of yacc.c */
+ case 25:
+ /* Line 1787 of yacc.c */
#line 146 "promela.ypp"
- { (yyval.node) = ctx->node(PML_NE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_NE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 26:
-/* Line 1787 of yacc.c */
+ case 26:
+ /* Line 1787 of yacc.c */
#line 147 "promela.ypp"
- { (yyval.node) = ctx->node(PML_AND, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_AND, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 27:
-/* Line 1787 of yacc.c */
+ case 27:
+ /* Line 1787 of yacc.c */
#line 148 "promela.ypp"
- { (yyval.node) = ctx->node(PML_OR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_OR, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 28:
-/* Line 1787 of yacc.c */
+ case 28:
+ /* Line 1787 of yacc.c */
#line 149 "promela.ypp"
- { (yyval.node) = ctx->node(PML_LSHIFT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_LSHIFT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 29:
-/* Line 1787 of yacc.c */
+ case 29:
+ /* Line 1787 of yacc.c */
#line 150 "promela.ypp"
- { (yyval.node) = ctx->node(PML_RSHIFT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_RSHIFT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 30:
-/* Line 1787 of yacc.c */
+ case 30:
+ /* Line 1787 of yacc.c */
#line 151 "promela.ypp"
- { (yyval.node) = ctx->node(PML_NEG, 1, (yyvsp[(2) - (2)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_NEG, 1, (yyvsp[(2) - (2)].node));
+ }
+ break;
- case 31:
-/* Line 1787 of yacc.c */
+ case 31:
+ /* Line 1787 of yacc.c */
#line 152 "promela.ypp"
- { (yyval.node) = ctx->node(PML_MINUS, 1, (yyvsp[(2) - (2)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_MINUS, 1, (yyvsp[(2) - (2)].node));
+ }
+ break;
- case 32:
-/* Line 1787 of yacc.c */
+ case 32:
+ /* Line 1787 of yacc.c */
#line 154 "promela.ypp"
- { (yyval.node) = ctx->node(PML_LEN, 1, (yyvsp[(3) - (4)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_LEN, 1, (yyvsp[(3) - (4)].node));
+ }
+ break;
- case 33:
-/* Line 1787 of yacc.c */
+ case 33:
+ /* Line 1787 of yacc.c */
#line 155 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (1)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (1)].node);
+ }
+ break;
- case 34:
-/* Line 1787 of yacc.c */
+ case 34:
+ /* Line 1787 of yacc.c */
#line 156 "promela.ypp"
- { (yyval.node) = ctx->value(PML_CONST, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); }
- break;
+ {
+ (yyval.node) = ctx->value(PML_CONST, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value));
+ free((yyvsp[(1) - (1)].value));
+ }
+ break;
- case 35:
-/* Line 1787 of yacc.c */
+ case 35:
+ /* Line 1787 of yacc.c */
#line 157 "promela.ypp"
- {
- /* Non standard promela for string literals */
- (yyval.node) = ctx->value(PML_STRING, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); }
- break;
+ {
+ /* Non standard promela for string literals */
+ (yyval.node) = ctx->value(PML_STRING, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value));
+ free((yyvsp[(1) - (1)].value));
+ }
+ break;
- case 36:
-/* Line 1787 of yacc.c */
+ case 36:
+ /* Line 1787 of yacc.c */
#line 163 "promela.ypp"
- { (yyval.node) = ctx->node(PML_SHOW, 0); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_SHOW, 0);
+ }
+ break;
- case 37:
-/* Line 1787 of yacc.c */
+ case 37:
+ /* Line 1787 of yacc.c */
#line 164 "promela.ypp"
- { (yyval.node) = ctx->node(PML_HIDDEN, 0); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_HIDDEN, 0);
+ }
+ break;
- case 38:
-/* Line 1787 of yacc.c */
+ case 38:
+ /* Line 1787 of yacc.c */
#line 165 "promela.ypp"
- { (yyval.node) = ctx->node(PML_SHOW, 0); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_SHOW, 0);
+ }
+ break;
- case 39:
-/* Line 1787 of yacc.c */
+ case 39:
+ /* Line 1787 of yacc.c */
#line 166 "promela.ypp"
- { (yyval.node) = ctx->node(PML_ISLOCAL, 0); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_ISLOCAL, 0);
+ }
+ break;
- case 40:
-/* Line 1787 of yacc.c */
+ case 40:
+ /* Line 1787 of yacc.c */
#line 169 "promela.ypp"
- { (yyval.node) = ctx->node(PML_DECL, 3, (yyvsp[(1) - (3)].node), ctx->value(PML_TYPE, (void*)&((yylsp[(2) - (3)])), (yyvsp[(2) - (3)].value)), (yyvsp[(3) - (3)].node)); free((yyvsp[(2) - (3)].value)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_DECL, 3, (yyvsp[(1) - (3)].node), ctx->value(PML_TYPE, (void*)&((yylsp[(2) - (3)])), (yyvsp[(2) - (3)].value)), (yyvsp[(3) - (3)].node));
+ free((yyvsp[(2) - (3)].value));
+ }
+ break;
- case 41:
-/* Line 1787 of yacc.c */
+ case 41:
+ /* Line 1787 of yacc.c */
#line 170 "promela.ypp"
- { (yyval.node) = ctx->node(PML_UNAME, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_UNAME, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 42:
-/* Line 1787 of yacc.c */
+ case 42:
+ /* Line 1787 of yacc.c */
#line 171 "promela.ypp"
- { (yyval.node) = ctx->node(PML_DECL, 3, (yyvsp[(1) - (6)].node), ctx->value(PML_TYPE, (void*)&((yylsp[(2) - (6)])), (yyvsp[(2) - (6)].value)), (yyvsp[(5) - (6)].node)); free((yyvsp[(2) - (6)].value)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_DECL, 3, (yyvsp[(1) - (6)].node), ctx->value(PML_TYPE, (void*)&((yylsp[(2) - (6)])), (yyvsp[(2) - (6)].value)), (yyvsp[(5) - (6)].node));
+ free((yyvsp[(2) - (6)].value));
+ }
+ break;
- case 43:
-/* Line 1787 of yacc.c */
+ case 43:
+ /* Line 1787 of yacc.c */
#line 172 "promela.ypp"
- { (yyval.node) = (yyvsp[(2) - (2)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(2) - (2)].node);
+ }
+ break;
- case 44:
-/* Line 1787 of yacc.c */
+ case 44:
+ /* Line 1787 of yacc.c */
#line 175 "promela.ypp"
- { (yyval.node) = ctx->node(PML_TYPEDEF, 2, ctx->value(PML_NAME, (void*)&((yylsp[(2) - (5)])), (yyvsp[(2) - (5)].value)), (yyvsp[(4) - (5)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_TYPEDEF, 2, ctx->value(PML_NAME, (void*)&((yylsp[(2) - (5)])), (yyvsp[(2) - (5)].value)), (yyvsp[(4) - (5)].node));
+ }
+ break;
- case 45:
-/* Line 1787 of yacc.c */
+ case 45:
+ /* Line 1787 of yacc.c */
#line 178 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (1)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (1)].node);
+ }
+ break;
- case 46:
-/* Line 1787 of yacc.c */
+ case 46:
+ /* Line 1787 of yacc.c */
#line 179 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (2)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (2)].node);
+ }
+ break;
- case 47:
-/* Line 1787 of yacc.c */
+ case 47:
+ /* Line 1787 of yacc.c */
#line 180 "promela.ypp"
- {
- (yyval.node) = ctx->node(PML_DECLLIST, 1, (yyvsp[(1) - (3)].node));
- if((yyvsp[(3) - (3)].node)->type == PML_DECLLIST) {
- (yyval.node)->merge((yyvsp[(3) - (3)].node)); delete (yyvsp[(3) - (3)].node);
- } else {
- (yyval.node)->push((yyvsp[(3) - (3)].node));
- }
- }
- break;
-
- case 48:
-/* Line 1787 of yacc.c */
+ {
+ (yyval.node) = ctx->node(PML_DECLLIST, 1, (yyvsp[(1) - (3)].node));
+ if((yyvsp[(3) - (3)].node)->type == PML_DECLLIST) {
+ (yyval.node)->merge((yyvsp[(3) - (3)].node));
+ delete (yyvsp[(3) - (3)].node);
+ } else {
+ (yyval.node)->push((yyvsp[(3) - (3)].node));
+ }
+ }
+ break;
+
+ case 48:
+ /* Line 1787 of yacc.c */
#line 190 "promela.ypp"
- { (yyval.node) = ctx->node(PML_VARLIST, 1, (yyvsp[(1) - (1)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_VARLIST, 1, (yyvsp[(1) - (1)].node));
+ }
+ break;
- case 49:
-/* Line 1787 of yacc.c */
+ case 49:
+ /* Line 1787 of yacc.c */
#line 191 "promela.ypp"
- { (yyval.node) = ctx->node(PML_VARLIST, 1, (yyvsp[(1) - (3)].node)); (yyval.node)->merge((yyvsp[(3) - (3)].node)); delete (yyvsp[(3) - (3)].node); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_VARLIST, 1, (yyvsp[(1) - (3)].node));
+ (yyval.node)->merge((yyvsp[(3) - (3)].node));
+ delete (yyvsp[(3) - (3)].node);
+ }
+ break;
- case 50:
-/* Line 1787 of yacc.c */
+ case 50:
+ /* Line 1787 of yacc.c */
#line 194 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (1)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (1)].node);
+ }
+ break;
- case 51:
-/* Line 1787 of yacc.c */
+ case 51:
+ /* Line 1787 of yacc.c */
#line 195 "promela.ypp"
- { (yyval.node) = ctx->node(PML_ASGN, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_ASGN, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 52:
-/* Line 1787 of yacc.c */
+ case 52:
+ /* Line 1787 of yacc.c */
#line 198 "promela.ypp"
- { (yyval.node) = ctx->value(PML_NAME, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); }
- break;
+ {
+ (yyval.node) = ctx->value(PML_NAME, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value));
+ free((yyvsp[(1) - (1)].value));
+ }
+ break;
- case 53:
-/* Line 1787 of yacc.c */
+ case 53:
+ /* Line 1787 of yacc.c */
#line 199 "promela.ypp"
- { (yyval.node) = ctx->node(PML_COLON, 2, ctx->value(PML_NAME, (void*)&((yylsp[(1) - (3)])), (yyvsp[(1) - (3)].value)), ctx->value(PML_CONST, (void*)&((yylsp[(3) - (3)])), (yyvsp[(3) - (3)].value))); free((yyvsp[(1) - (3)].value)); free((yyvsp[(3) - (3)].value)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_COLON, 2, ctx->value(PML_NAME, (void*)&((yylsp[(1) - (3)])), (yyvsp[(1) - (3)].value)), ctx->value(PML_CONST, (void*)&((yylsp[(3) - (3)])), (yyvsp[(3) - (3)].value)));
+ free((yyvsp[(1) - (3)].value));
+ free((yyvsp[(3) - (3)].value));
+ }
+ break;
- case 54:
-/* Line 1787 of yacc.c */
+ case 54:
+ /* Line 1787 of yacc.c */
#line 200 "promela.ypp"
- { (yyval.node) = ctx->node(PML_VAR_ARRAY, 2, ctx->value(PML_NAME, (void*)&((yylsp[(1) - (4)])), (yyvsp[(1) - (4)].value)), (yyvsp[(3) - (4)].node)); free((yyvsp[(1) - (4)].value)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_VAR_ARRAY, 2, ctx->value(PML_NAME, (void*)&((yylsp[(1) - (4)])), (yyvsp[(1) - (4)].value)), (yyvsp[(3) - (4)].node));
+ free((yyvsp[(1) - (4)].value));
+ }
+ break;
- case 55:
-/* Line 1787 of yacc.c */
+ case 55:
+ /* Line 1787 of yacc.c */
#line 203 "promela.ypp"
- { (yyval.node) = ctx->value(PML_CONST, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); }
- break;
+ {
+ (yyval.node) = ctx->value(PML_CONST, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value));
+ free((yyvsp[(1) - (1)].value));
+ }
+ break;
- case 56:
-/* Line 1787 of yacc.c */
+ case 56:
+ /* Line 1787 of yacc.c */
#line 204 "promela.ypp"
- { (yyval.node) = ctx->node(PML_MINUS, 1, (yyvsp[(2) - (2)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_MINUS, 1, (yyvsp[(2) - (2)].node));
+ }
+ break;
- case 57:
-/* Line 1787 of yacc.c */
+ case 57:
+ /* Line 1787 of yacc.c */
#line 205 "promela.ypp"
- { (yyval.node) = (yyvsp[(2) - (3)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(2) - (3)].node);
+ }
+ break;
- case 58:
-/* Line 1787 of yacc.c */
+ case 58:
+ /* Line 1787 of yacc.c */
#line 206 "promela.ypp"
- { (yyval.node) = ctx->node(PML_PLUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_PLUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 59:
-/* Line 1787 of yacc.c */
+ case 59:
+ /* Line 1787 of yacc.c */
#line 207 "promela.ypp"
- { (yyval.node) = ctx->node(PML_MINUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_MINUS, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 60:
-/* Line 1787 of yacc.c */
+ case 60:
+ /* Line 1787 of yacc.c */
#line 208 "promela.ypp"
- { (yyval.node) = ctx->node(PML_TIMES, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_TIMES, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 61:
-/* Line 1787 of yacc.c */
+ case 61:
+ /* Line 1787 of yacc.c */
#line 209 "promela.ypp"
- { (yyval.node) = ctx->node(PML_DIVIDE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_DIVIDE, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 62:
-/* Line 1787 of yacc.c */
+ case 62:
+ /* Line 1787 of yacc.c */
#line 210 "promela.ypp"
- { (yyval.node) = ctx->node(PML_MODULO, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_MODULO, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 63:
-/* Line 1787 of yacc.c */
+ case 63:
+ /* Line 1787 of yacc.c */
#line 213 "promela.ypp"
- { (yyval.node) = ctx->value(PML_NAME, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value)); free((yyvsp[(1) - (1)].value)); }
- break;
+ {
+ (yyval.node) = ctx->value(PML_NAME, (void*)&((yylsp[(1) - (1)])), (yyvsp[(1) - (1)].value));
+ free((yyvsp[(1) - (1)].value));
+ }
+ break;
- case 64:
-/* Line 1787 of yacc.c */
+ case 64:
+ /* Line 1787 of yacc.c */
#line 214 "promela.ypp"
- {
- if ((yyvsp[(1) - (2)].node)->type == PML_NAME) {
- (yyval.node) = ctx->node(PML_NAMELIST, 1, (yyvsp[(1) - (2)].node));
- (yyval.node)->push(ctx->value(PML_NAME, (void*)&((yylsp[(2) - (2)])), (yyvsp[(2) - (2)].value)));
- } else {
- (yyvsp[(1) - (2)].node)->push(ctx->value(PML_NAME, (void*)&((yylsp[(2) - (2)])), (yyvsp[(2) - (2)].value)));
- }
- free((yyvsp[(2) - (2)].value));
- }
- break;
-
- case 65:
-/* Line 1787 of yacc.c */
+ {
+ if ((yyvsp[(1) - (2)].node)->type == PML_NAME) {
+ (yyval.node) = ctx->node(PML_NAMELIST, 1, (yyvsp[(1) - (2)].node));
+ (yyval.node)->push(ctx->value(PML_NAME, (void*)&((yylsp[(2) - (2)])), (yyvsp[(2) - (2)].value)));
+ } else {
+ (yyvsp[(1) - (2)].node)->push(ctx->value(PML_NAME, (void*)&((yylsp[(2) - (2)])), (yyvsp[(2) - (2)].value)));
+ }
+ free((yyvsp[(2) - (2)].value));
+ }
+ break;
+
+ case 65:
+ /* Line 1787 of yacc.c */
#line 223 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (2)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (2)].node);
+ }
+ break;
- case 66:
-/* Line 1787 of yacc.c */
+ case 66:
+ /* Line 1787 of yacc.c */
#line 226 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (1)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (1)].node);
+ }
+ break;
- case 67:
-/* Line 1787 of yacc.c */
+ case 67:
+ /* Line 1787 of yacc.c */
#line 227 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (2)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (2)].node);
+ }
+ break;
- case 68:
-/* Line 1787 of yacc.c */
+ case 68:
+ /* Line 1787 of yacc.c */
#line 228 "promela.ypp"
- { (yyval.node) = ctx->node(PML_STMNT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_STMNT, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 69:
-/* Line 1787 of yacc.c */
+ case 69:
+ /* Line 1787 of yacc.c */
#line 231 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (1)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (1)].node);
+ }
+ break;
- case 70:
-/* Line 1787 of yacc.c */
+ case 70:
+ /* Line 1787 of yacc.c */
#line 234 "promela.ypp"
- { (yyval.node) = ctx->node(PML_ASGN, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_ASGN, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
- case 71:
-/* Line 1787 of yacc.c */
+ case 71:
+ /* Line 1787 of yacc.c */
#line 235 "promela.ypp"
- { (yyval.node) = ctx->node(PML_INCR, 1, (yyvsp[(1) - (2)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_INCR, 1, (yyvsp[(1) - (2)].node));
+ }
+ break;
- case 72:
-/* Line 1787 of yacc.c */
+ case 72:
+ /* Line 1787 of yacc.c */
#line 236 "promela.ypp"
- { (yyval.node) = ctx->node(PML_DECR, 1, (yyvsp[(1) - (2)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_DECR, 1, (yyvsp[(1) - (2)].node));
+ }
+ break;
- case 73:
-/* Line 1787 of yacc.c */
+ case 73:
+ /* Line 1787 of yacc.c */
#line 237 "promela.ypp"
- { (yyval.node) = ctx->node(PML_PRINT, 2, ctx->value(PML_STRING, (void*)&((yylsp[(3) - (5)])), (yyvsp[(3) - (5)].value)), (yyvsp[(4) - (5)].node)); free((yyvsp[(3) - (5)].value)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_PRINT, 2, ctx->value(PML_STRING, (void*)&((yylsp[(3) - (5)])), (yyvsp[(3) - (5)].value)), (yyvsp[(4) - (5)].node));
+ free((yyvsp[(3) - (5)].value));
+ }
+ break;
- case 74:
-/* Line 1787 of yacc.c */
+ case 74:
+ /* Line 1787 of yacc.c */
#line 238 "promela.ypp"
- { (yyval.node) = ctx->node(PML_PRINT, 1, (yyvsp[(3) - (4)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_PRINT, 1, (yyvsp[(3) - (4)].node));
+ }
+ break;
- case 75:
-/* Line 1787 of yacc.c */
+ case 75:
+ /* Line 1787 of yacc.c */
#line 239 "promela.ypp"
- { (yyval.node) = ctx->node(PML_PRINT, 1, ctx->value(PML_CONST, (void*)&((yylsp[(3) - (4)])), (yyvsp[(3) - (4)].value))); free((yyvsp[(3) - (4)].value)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_PRINT, 1, ctx->value(PML_CONST, (void*)&((yylsp[(3) - (4)])), (yyvsp[(3) - (4)].value)));
+ free((yyvsp[(3) - (4)].value));
+ }
+ break;
- case 76:
-/* Line 1787 of yacc.c */
+ case 76:
+ /* Line 1787 of yacc.c */
#line 240 "promela.ypp"
- { (yyval.node) = ctx->node(PML_ASSERT, 1, (yyvsp[(2) - (2)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(PML_ASSERT, 1, (yyvsp[(2) - (2)].node));
+ }
+ break;
- case 77:
-/* Line 1787 of yacc.c */
+ case 77:
+ /* Line 1787 of yacc.c */
#line 241 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (1)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (1)].node);
+ }
+ break;
- case 78:
-/* Line 1787 of yacc.c */
+ case 78:
+ /* Line 1787 of yacc.c */
#line 244 "promela.ypp"
- { (yyval.node) = ctx->value(0, NULL, ""); }
- break;
+ {
+ (yyval.node) = ctx->value(0, NULL, "");
+ }
+ break;
- case 79:
-/* Line 1787 of yacc.c */
+ case 79:
+ /* Line 1787 of yacc.c */
#line 245 "promela.ypp"
- { (yyval.node) = (yyvsp[(2) - (2)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(2) - (2)].node);
+ }
+ break;
- case 80:
-/* Line 1787 of yacc.c */
+ case 80:
+ /* Line 1787 of yacc.c */
#line 248 "promela.ypp"
- { (yyval.node) = (yyvsp[(1) - (1)].node); }
- break;
+ {
+ (yyval.node) = (yyvsp[(1) - (1)].node);
+ }
+ break;
- case 81:
-/* Line 1787 of yacc.c */
+ case 81:
+ /* Line 1787 of yacc.c */
#line 249 "promela.ypp"
- { (yyval.node) = ctx->node(0, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
- break;
+ {
+ (yyval.node) = ctx->node(0, 2, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
+ }
+ break;
-/* Line 1787 of yacc.c */
+ /* Line 1787 of yacc.c */
#line 2285 "promela.tab.cpp"
- 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 |
-`------------------------------------*/
+ 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;
+ /* 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"));
+ 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;
- }
+ {
+ 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;
+
+ 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;
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
+ /*---------------------------------------------------.
+ | 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 which 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. |
-`-------------------------------------------------------------*/
+ /* 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 which 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;
- }
+ 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);
}
- /* 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
+ 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;
+ 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);
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
- yystate = yyn;
- goto yynewstate;
+ yystate = yyn;
+ goto yynewstate;
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
+ /*-------------------------------------.
+ | yyacceptlab -- YYACCEPT comes here. |
+ `-------------------------------------*/
yyacceptlab:
- yyresult = 0;
- goto yyreturn;
+ yyresult = 0;
+ goto yyreturn;
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
+ /*-----------------------------------.
+ | yyabortlab -- YYABORT comes here. |
+ `-----------------------------------*/
yyabortlab:
- yyresult = 1;
- goto yyreturn;
+ yyresult = 1;
+ goto yyreturn;
#if !defined yyoverflow || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
+ /*-------------------------------------------------.
+ | yyexhaustedlab -- memory exhaustion comes here. |
+ `-------------------------------------------------*/
yyexhaustedlab:
- yyerror (&yylloc, ctx, scanner, YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
+ 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 which 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);
- }
+ 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 which 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);
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
#endif
#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
}