[anjuta/cxxparser] symbol-db: Added new branch cxxparser.
- From: Massimo Cora' <mcora src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjuta/cxxparser] symbol-db: Added new branch cxxparser.
- Date: Sat, 25 Jul 2009 17:34:21 +0000 (UTC)
commit 6014063b0ae51ec0d4d1b06ecf85ba9fe43cb1ba
Author: Massimo Corà <mcora src gnome org>
Date: Sat Jul 25 19:32:58 2009 +0200
symbol-db: Added new branch cxxparser.
This branch is created to have a support for heavy development in new c++ parser.
Much code is untidy, uncommented, and prone to crash.
Please don't use this branch if you don't know what your're doing
nor report bugs before the merge into master.
configure.in | 2 +
plugins/symbol-db/Makefile.am | 2 +-
plugins/symbol-db/cxxparser/Makefile.am | 66 +
plugins/symbol-db/cxxparser/compile_cmd_line | 1 +
plugins/symbol-db/cxxparser/cpp-flex-tokenizer.cpp | 107 +
plugins/symbol-db/cxxparser/cpp-flex-tokenizer.h | 83 +
plugins/symbol-db/cxxparser/crazy-test.cpp | 27 +
plugins/symbol-db/cxxparser/engine-parser-priv.h | 114 +
plugins/symbol-db/cxxparser/engine-parser.cpp | 735 ++++++
plugins/symbol-db/cxxparser/engine-parser.h | 48 +
plugins/symbol-db/cxxparser/expression-lexer.cpp | 2647 +++++++++++++++++++
plugins/symbol-db/cxxparser/expression-parser.cpp | 953 +++++++
plugins/symbol-db/cxxparser/expression-parser.h | 35 +
plugins/symbol-db/cxxparser/expression-result.cpp | 64 +
plugins/symbol-db/cxxparser/expression-result.h | 47 +
plugins/symbol-db/cxxparser/flex-lexer-klass-tab.h | 134 +
plugins/symbol-db/cxxparser/flex-lexer-klass.cpp | 2583 ++++++++++++++++++
plugins/symbol-db/cxxparser/flex-lexer-klass.h | 244 ++
plugins/symbol-db/cxxparser/flex-lexer-plain-tab.h | 111 +
plugins/symbol-db/cxxparser/flex-lexer-plain.cpp | 2759 ++++++++++++++++++++
plugins/symbol-db/cxxparser/function-parser.cpp | 1014 +++++++
plugins/symbol-db/cxxparser/function-result.cpp | 64 +
plugins/symbol-db/cxxparser/function-result.h | 54 +
plugins/symbol-db/cxxparser/main.c | 160 ++
.../cxxparser/sample-db/test-simple-struct.c | 11 +
plugins/symbol-db/cxxparser/sample-db/test.h | 102 +
plugins/symbol-db/cxxparser/scope-parser.cpp | 1277 +++++++++
plugins/symbol-db/cxxparser/scope-parser.h | 34 +
plugins/symbol-db/cxxparser/variable-parser.cpp | 1111 ++++++++
plugins/symbol-db/cxxparser/variable-parser.h | 34 +
plugins/symbol-db/cxxparser/variable-result.cpp | 87 +
plugins/symbol-db/cxxparser/variable-result.h | 42 +
32 files changed, 14751 insertions(+), 1 deletions(-)
---
diff --git a/configure.in b/configure.in
index f793efc..350af92 100644
--- a/configure.in
+++ b/configure.in
@@ -72,6 +72,7 @@ GNOME_DOC_INIT
AC_PROG_CC
AC_PROG_CPP
AC_LANG_C
+AC_PROG_CXX
GNOME_COMPILE_WARNINGS(maximum)
AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS"
@@ -755,6 +756,7 @@ plugins/symbol-db/benchmark/Makefile
plugins/symbol-db/images/Makefile
plugins/symbol-db/Makefile
plugins/symbol-db/anjuta-tags/Makefile
+plugins/symbol-db/cxxparser/Makefile
plugins/cvs-plugin/Makefile
plugins/project-wizard/Makefile
plugins/macro/Makefile
diff --git a/plugins/symbol-db/Makefile.am b/plugins/symbol-db/Makefile.am
index 37611fc..5e938a1 100644
--- a/plugins/symbol-db/Makefile.am
+++ b/plugins/symbol-db/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = images benchmark anjuta-tags
+SUBDIRS = images benchmark anjuta-tags cxxparser
symbol_db_datadir = $(anjuta_data_dir)
symbol_db_data_DATA = tables.sql tables-from-1-to-228.sql
diff --git a/plugins/symbol-db/cxxparser/Makefile.am b/plugins/symbol-db/cxxparser/Makefile.am
new file mode 100644
index 0000000..bd1df9a
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/Makefile.am
@@ -0,0 +1,66 @@
+## Process this file with automake to produce Makefile.in
+
+## Created by Anjuta
+
+AM_CPPFLAGS = \
+ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
+ $(WARN_CFLAGS) \
+ $(DEPRECATED_FLAGS) \
+ $(LIBANJUTA_CFLAGS) \
+ $(PLUGIN_SYMBOL_DB_CFLAGS) \
+ -lc \
+ -DDEBUG
+
+AM_CFLAGS =\
+ -Wall\
+ -g
+
+noinst_PROGRAMS = anjuta-cxxparser
+
+anjuta_cxxparser_SOURCES = \
+ main.c \
+ ../readtags.c \
+ ../readtags.h \
+ ../symbol-db-engine-core.c \
+ ../symbol-db-engine-queries.c \
+ ../symbol-db-engine-iterator.c \
+ ../symbol-db-engine-utils.c \
+ ../symbol-db-engine-iterator-node.c \
+ ../symbol-db-engine-iterator-node.h \
+ expression-lexer.cpp \
+ expression-parser.cpp \
+ expression-result.cpp \
+ expression-result.h \
+ flex-lexer-klass.cpp \
+ flex-lexer-klass.h \
+ flex-lexer-klass-tab.h \
+ flex-lexer-plain.cpp \
+ flex-lexer-plain-tab.h \
+ variable-parser.cpp \
+ variable-result.cpp \
+ variable-result.h \
+ scope-parser.cpp \
+ function-result.cpp \
+ function-result.h \
+ function-parser.cpp \
+ cpp-flex-tokenizer.cpp \
+ cpp-flex-tokenizer.h \
+ expression-parser.h \
+ engine-parser.cpp \
+ engine-parser-priv.h \
+ engine-parser.h \
+ scope-parser.h \
+ variable-parser.h \
+ ../libgda-extra/gda-data-model-concat.h \
+ ../libgda-extra/gda-data-model-concat.c \
+ ../symbol-db-engine-iterator.h \
+ ../symbol-db-engine-queries.h \
+ ../symbol-db-engine.h \
+ ../symbol-db-engine-utils.h
+
+anjuta_cxxparser_LDFLAGS = $(ANJUTA_PLUGIN_LDFLAGS)
+
+anjuta_cxxparser_LDADD = $(LIBANJUTA_LIBS) \
+ $(PLUGIN_SYMBOL_DB_LIBS)
+
diff --git a/plugins/symbol-db/cxxparser/compile_cmd_line b/plugins/symbol-db/cxxparser/compile_cmd_line
new file mode 100644
index 0000000..b0718ad
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/compile_cmd_line
@@ -0,0 +1 @@
+rm sample-db/*.db; make && ./anjuta-cxxparser
diff --git a/plugins/symbol-db/cxxparser/cpp-flex-tokenizer.cpp b/plugins/symbol-db/cxxparser/cpp-flex-tokenizer.cpp
new file mode 100644
index 0000000..2d44528
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/cpp-flex-tokenizer.cpp
@@ -0,0 +1,107 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//
+// copyright : (C) 2008 by Eran Ifrah
+// file name : cpp_scanner.cpp
+//
+// -------------------------------------------------------------------------
+// A
+// _____ _ _ _ _
+// / __ \ | | | | (_) |
+// | / \/ ___ __| | ___| | _| |_ ___
+// | | / _ \ / _ |/ _ \ | | | __/ _ )
+// | \__/\ (_) | (_| | __/ |___| | || __/
+// \____/\___/ \__,_|\___\_____/_|\__\___|
+//
+// F i l e
+//
+// 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 2 of the License, or
+// (at your option) any later version.
+//
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
+#include "cpp-flex-tokenizer.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+CppScanner::CppScanner()
+: m_curr(0)
+{
+ m_data = NULL;
+ m_pcurr = NULL;
+ m_keepComments = 0;
+ m_returnWhite = 0;
+ m_comment = "";
+}
+
+CppScanner::~CppScanner(void)
+{
+ delete m_data;
+}
+
+int CppScanner::LexerInput(char *buf, int max_size)
+{
+ if( !m_data )
+ return 0;
+
+ memset(buf, 0, max_size);
+ char *pendData = m_data + strlen(m_data);
+ int n = (max_size < (pendData - m_pcurr)) ? max_size : (pendData - m_pcurr);
+ if(n > 0)
+ {
+ memcpy(buf, m_pcurr, n);
+ m_pcurr += n;
+ }
+ return n;
+}
+
+void CppScanner::SetText(const char* data)
+{
+ // release previous buffer
+ Reset();
+
+ m_data = new char[strlen(data)+1];
+ strcpy(m_data, data);
+ m_pcurr = m_data;
+}
+
+void CppScanner::Reset()
+{
+ if(m_data)
+ {
+ delete [] m_data;
+ m_data = NULL;
+ m_pcurr = NULL;
+ m_curr = 0;
+ }
+
+ // Notify lex to restart its buffer
+ yy_flush_buffer(yy_current_buffer);
+ m_comment = "";
+ yylineno = 1;
+}
diff --git a/plugins/symbol-db/cxxparser/cpp-flex-tokenizer.h b/plugins/symbol-db/cxxparser/cpp-flex-tokenizer.h
new file mode 100644
index 0000000..e40aa9c
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/cpp-flex-tokenizer.h
@@ -0,0 +1,83 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//
+// copyright : (C) 2008 by Eran Ifrah
+// file name : cpp_scanner.h
+//
+// -------------------------------------------------------------------------
+// A
+// _____ _ _ _ _
+// / __ \ | | | | (_) |
+// | / \/ ___ __| | ___| | _| |_ ___
+// | | / _ \ / _ |/ _ \ | | | __/ _ )
+// | \__/\ (_) | (_| | __/ |___| | || __/
+// \____/\___/ \__,_|\___\_____/_|\__\___|
+//
+// F i l e
+//
+// 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 2 of the License, or
+// (at your option) any later version.
+//
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+#ifndef CODELITE_CPPSCANNER_H
+#define CODELITE_CPPSCANNER_H
+
+#include "flex-lexer-klass.h"
+
+class CppScanner : public flex::yyFlexLexer
+{
+public:
+ CppScanner();
+ ~CppScanner(void);
+
+ /// Override the LexerInput function
+ int LexerInput(char *buf, int max_size);
+ void SetText(const char* data);
+ void Reset();
+
+
+ /// Note about comment and line number:
+ /// If the last text consumed is a comment, the line number
+ /// returned is the line number of the last line of the comment
+ /// incase the comment spans over number of lines
+ /// (i.e. /* ... */ comment style)
+
+ // FIXME: move all the implementations into the .cpp file.
+ // FIXME: keeo coherent.
+ const int& LineNo() const { return yylineno; }
+ inline void ClearComment() { m_comment = ""; }
+ inline const char* GetComment() const { return m_comment.c_str (); }
+ inline void KeepComment(const int& keep) { m_keepComments = keep; }
+ inline void ReturnWhite(const int& rw) { m_returnWhite = rw; }
+
+private:
+ char *m_data;
+ char *m_pcurr;
+ int m_total;
+ int m_curr;
+};
+
+#endif // CODELITE_CPPSCANNER_H
diff --git a/plugins/symbol-db/cxxparser/crazy-test.cpp b/plugins/symbol-db/cxxparser/crazy-test.cpp
new file mode 100644
index 0000000..8453b89
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/crazy-test.cpp
@@ -0,0 +1,27 @@
+
+
+
+typedef struct A_t {
+ char *a;
+} A;
+
+
+typedef struct B_t {
+ int b;
+} B;
+
+typedef struct C_t {
+ void * c;
+} C;
+
+
+int main ()
+{
+ C* foo;
+
+ int f = ((B*)(foo))->b;
+
+ char *buf = ((A*)((B*)(foo)))->a;
+
+ return 0;
+}
diff --git a/plugins/symbol-db/cxxparser/engine-parser-priv.h b/plugins/symbol-db/cxxparser/engine-parser-priv.h
new file mode 100644
index 0000000..b57b863
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/engine-parser-priv.h
@@ -0,0 +1,114 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it>
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#ifndef _ENGINE_PARSER_PRIV_H_
+#define _ENGINE_PARSER_PRIV_H_
+
+#include <string>
+#include <vector>
+
+//#include <libanjuta/interfaces/ianjuta-symbol-manager.h>
+extern "C" {
+#include "../symbol-db-engine.h"
+}
+#include "expression-result.h"
+#include "cpp-flex-tokenizer.h"
+
+using namespace std;
+
+
+class EngineParser
+{
+public:
+
+ static EngineParser* getInstance ();
+
+ void DEBUG_printTokens (const string& text);
+
+ // setter for the IAnjutaSymbolManager.
+ void setSymbolManager (SymbolDBEngine *manager);
+
+ // getter for the IAnjutaSymbolManager.
+ SymbolDBEngine * getSymbolManager ();
+
+ /**
+ * Evaluate a C++ expression. for example, the following expression: '((Notebook*)book)->'
+ * will be processed into typeName=Notebook, and typeScope=<global> (assuming Notebook is not
+ * placed within any namespace)
+ * \param stmt c++ expression
+ * \param text text where this expression was found
+ * \param fn filename context
+ * \param lineno current line number
+ * \param typeName [output]
+ * \param typeScope [output]
+ * \param oper [output] return the operator used (::, ., ->)
+ * \param scopeTemplateInitList [output] return the scope tempalte intialization (e.g. "std::auto_ptr<wxString> str;" -> <wxString>
+ * \return true on success, false otherwise. The output fields are only to be checked with the return
+ * valus is 'true'
+ */
+ bool processExpression(const string& stmt, const string& above_text,
+ const string& full_file_path, unsigned long linenum, string &out_type_name,
+ string &out_type_scope, string &out_oper,
+ string &out_scope_template_init_list);
+
+
+ void testParseExpression (const string &in);
+
+ // ?!? unuseful, remove it sometime
+ string OptimizeScope(const string& srcString);
+ string GetScopeName(const string &in, std::vector<string> *additionlNS);
+
+ void trim (string& str);
+
+protected:
+
+ EngineParser ();
+
+ /**
+ * parse an expression and return the result. this functions uses
+ * the sqlite database as its symbol table
+ * \param in input string expression
+ * \return ExpressionResult, if it fails to parse it, check result.m_name.empty() for success
+ */
+ ExpressionResult parseExpression(const string &in);
+private:
+ /**
+ * Return the next token and the delimiter found, the source string is taken from the
+ * m_tokenScanner member of this class
+ * \param token next token
+ * \param delim delimiter found
+ * \return true if token was found false otherwise
+ */
+ bool nextToken (string &out_token, string &out_delimiter);
+
+
+ /*
+ * D A T A
+ */
+ CppScanner *_tokenizer;
+ static EngineParser *s_engine;
+ SymbolDBEngine *_dbe;
+};
+
+
+/* singleton */
+EngineParser *EngineParser::s_engine = NULL;
+
+
+#endif // _ENGINE_PARSER_PRIV_H_
diff --git a/plugins/symbol-db/cxxparser/engine-parser.cpp b/plugins/symbol-db/cxxparser/engine-parser.cpp
new file mode 100644
index 0000000..704daf0
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/engine-parser.cpp
@@ -0,0 +1,735 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it>
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#include "engine-parser-priv.h"
+#include "engine-parser.h"
+#include "flex-lexer-klass-tab.h"
+#include "expression-parser.h"
+#include "scope-parser.h"
+#include "variable-parser.h"
+
+#include <string>
+#include <vector>
+#include <libanjuta/interfaces/ianjuta-symbol-manager.h>
+
+using namespace std;
+
+// Singleton
+EngineParser*
+EngineParser::getInstance ()
+{
+ if (s_engine == NULL)
+ {
+ s_engine = new EngineParser ();
+ }
+
+ return s_engine;
+}
+
+EngineParser::EngineParser ()
+{
+ _tokenizer = new CppScanner ();
+ _dbe = NULL;
+}
+
+bool
+EngineParser::nextToken (string &out_token, string &out_delimiter)
+{
+ int type(0);
+ int depth(0);
+ while ( (type = _tokenizer->yylex()) != 0 )
+ {
+ switch (type)
+ {
+ case CLCL:
+ case '.':
+ case lexARROW:
+ if (depth == 0)
+ {
+ out_delimiter = _tokenizer->YYText();
+ return true;
+ } else
+ {
+ out_token.append (" ").append (_tokenizer->YYText());
+ }
+ break;
+
+ case '<':
+ case '[':
+ case '(':
+ case '{':
+ depth++;
+ out_token.append (" ").append (_tokenizer->YYText());
+ break;
+
+ case '>':
+ case ']':
+ case ')':
+ case '}':
+ depth--;
+ out_token.append (" ").append (_tokenizer->YYText());
+ break;
+
+ default:
+ out_token.append (" ").append (_tokenizer->YYText());
+ break;
+ }
+ }
+ return false;
+}
+
+void
+EngineParser::DEBUG_printTokens (const string& text)
+{
+ // FIXME
+ _tokenizer->SetText (text.c_str ());
+
+ string op;
+ string token;
+ int i = 0;
+ while (nextToken(token, op))
+ {
+ printf ("tok %d %s [op %s]\n", i, token.c_str (), op.c_str ());
+ //ExpressionResult result = parse_expression(token);
+ //result.Print ();
+ i++;
+ token.clear ();
+ }
+ printf ("tok final %s\n", token.c_str ());
+
+
+ // try to do a symbol search
+
+}
+
+ExpressionResult
+EngineParser::parseExpression(const string &in)
+{
+ return parse_expression (in.c_str ());
+}
+
+void
+EngineParser::testParseExpression (const string &str)
+{
+ _tokenizer->SetText(str.c_str ());
+
+ string word;
+ string op;
+ ExpressionResult result;
+
+ while (nextToken (word, op)) {
+
+ cout << "--------\ngot word " << word << " op " << op << endl;
+ // fill up ExpressionResult
+ result = parseExpression (word);
+
+ result.Print ();
+
+ word.clear ();
+ }
+
+// ExpressionResult res = parseExpression (str);
+
+// res.Print ();
+}
+
+void
+EngineParser::setSymbolManager (SymbolDBEngine *manager)
+{
+ _dbe = manager;
+}
+
+SymbolDBEngine *
+EngineParser::getSymbolManager ()
+{
+ return _dbe;
+}
+
+void
+EngineParser::trim (string& str)
+{
+ string trim_str = "{};\r\n\t\v ";
+ string::size_type pos = str.find_last_not_of(trim_str);
+ if(pos != string::npos)
+ {
+ str.erase(pos + 1);
+ pos = str.find_first_not_of(trim_str);
+ if(pos != string::npos)
+ str.erase(0, pos);
+ }
+ else
+ str.erase(str.begin(), str.end());
+}
+
+bool
+EngineParser::processExpression(const string& stmt, const string& above_text,
+ const string& full_file_path, unsigned long linenum,
+ string &out_type_name, string &out_type_scope, string &out_oper,
+ string &out_scope_template_init_list)
+{
+ bool evaluation_succeed = false;
+ _tokenizer->SetText(stmt.c_str ());
+
+ string word;
+ string op;
+ string scope_name;
+ ExpressionResult result;
+
+ while (nextToken (word, op))
+ {
+ trim (word);
+
+ cout << "--------\ngot word ->" << word << "<- op " << op << endl;
+ out_oper = op;
+
+
+
+ // fill up ExpressionResult
+ result = parseExpression (word);
+
+ //parsing failed?
+ if (result.m_name.empty()) {
+ cout << "Failed to parse " << word << " from " << stmt << endl;
+ evaluation_succeed = false;
+ break;
+ }
+
+ result.Print ();
+
+ // no tokens before this, what we need to do now, is find the TagEntry
+ // that corresponds to the result
+ if (result.m_isaType)
+ {
+ //--------------------------------------------
+ // Handle type (usually when casting is found)
+ //--------------------------------------------
+
+ if (result.m_isPtr && op == ".")
+ {
+ cout << "Did you mean to use '->' instead of '.' ?" << endl;
+ evaluation_succeed = false;
+ break;
+ }
+
+ if (!result.m_isPtr && op == "->")
+ {
+ cout << "Can not use '->' operator on a non pointer object" << endl;
+ evaluation_succeed = false;
+ break;
+ }
+
+ out_type_scope = result.m_scope.empty() ? "<global>" : result.m_scope.c_str();
+ out_type_name = result.m_name.c_str();
+ }
+ else if (result.m_isThis)
+ {
+ //-----------------------------------------
+ // special handle for 'this' keyword
+ //-----------------------------------------
+ out_type_scope = result.m_scope.empty() ? "<global>" : result.m_scope.c_str();
+ if (scope_name == "<global>")
+ {
+ cout << "'this' can not be used in the global scope" << endl;
+ evaluation_succeed = false;
+ break;
+ }
+
+ if (op == "::")
+ {
+ cout << "'this' can not be used with operator ::" << endl;
+ evaluation_succeed = false;
+ break;
+ }
+
+ if (result.m_isPtr && op == ".")
+ {
+ cout << "Did you mean to use '->' instead of '.' ?" << endl;
+ evaluation_succeed = false;
+ break;
+ }
+
+ if (!result.m_isPtr && op == "->")
+ {
+ cout << "Can not use '->' operator on a non pointer object" << endl;
+ evaluation_succeed = false;
+ break;
+ }
+ out_type_name = scope_name;
+ }
+
+ else
+ {
+ //-------------------------------------------
+ // found an identifier (can be a local variable, a global one etc)
+ //--------------------------------------------
+
+ cout << "found an identifier or local variable..." << endl;
+
+ /* TODO */
+ // get the scope iterator
+ SymbolDBEngineIterator *iter = symbol_db_engine_get_scope_chain_by_file_line (_dbe,
+ full_file_path.c_str (), linenum, SYMINFO_SIMPLE);
+
+ // it's a global one if it's NULL or if it has just only one element
+ if (iter == NULL || symbol_db_engine_iterator_get_n_items (iter) <= 1)
+ {
+ cout << "...we've a global scope" << endl;
+ }
+ else
+ {
+ // DEBUG PRINT
+ do
+ {
+ SymbolDBEngineIteratorNode *node =
+ SYMBOL_DB_ENGINE_ITERATOR_NODE (iter);
+ cout << "got scope name: " <<
+ symbol_db_engine_iterator_node_get_symbol_name (node) << endl;
+ } while (symbol_db_engine_iterator_move_next (iter) == TRUE);
+ }
+
+
+ /* TODO */
+ /* optimize scope'll clear the scopes leaving the local variables */
+ string optimized_scope = OptimizeScope(above_text);
+
+ cout << "here it is the optimized scope " << optimized_scope << endl;
+
+ VariableList li;
+ std::map<std::string, std::string> ignoreTokens;
+ get_variables(optimized_scope, li, ignoreTokens, false);
+
+ cout << "variables found are..." << endl;
+ for (VariableList::iterator iter = li.begin(); iter != li.end(); iter++) {
+ Variable var = (*iter);
+ var.Print ();
+
+ if (word == var.m_name) {
+ cout << "wh0a! we found the variable type to parse... it's ->" <<
+ var.m_type << "<-" << endl;
+
+ SymbolDBEngineIterator *iter =
+ symbol_db_engine_find_symbol_by_name_pattern_filtered (
+ _dbe, var.m_type.c_str (), TRUE, NULL, TRUE, -1, NULL, -1 ,
+ -1, SYMINFO_SIMPLE);
+
+ if (iter != NULL) {
+ SymbolDBEngineIteratorNode *node =
+ SYMBOL_DB_ENGINE_ITERATOR_NODE (iter);
+ cout << "SymbolDBEngine: Searched var got name: " <<
+ symbol_db_engine_iterator_node_get_symbol_name (node) << endl;
+
+ // print the scope members
+ SymbolDBEngineIterator * children =
+ symbol_db_engine_get_scope_members_by_symbol_id (_dbe,
+ symbol_db_engine_iterator_node_get_symbol_id (node),
+ -1,
+ -1,
+ SYMINFO_SIMPLE);
+ if (children != NULL)
+ {
+ cout << "scope children are: " << endl;
+ do {
+ SymbolDBEngineIteratorNode *child =
+ SYMBOL_DB_ENGINE_ITERATOR_NODE (children);
+ cout << "SymbolDBEngine: Searched var got name: " <<
+ symbol_db_engine_iterator_node_get_symbol_name (child) << endl;
+ }while (symbol_db_engine_iterator_move_next (children) == TRUE);
+ }
+ }
+ break;
+ }
+ }
+
+ /* TODO */
+ /* get the derivation list of the typename */
+ }
+#if 0
+/*
+ wxString scopeToSearch(scopeName);
+ if (parentTypeScope.IsEmpty() == false && parentTypeScope != wxT("<global>")) {
+ scopeToSearch = parentTypeScope + wxT("::") + parentTypeName;
+ } else if ((parentTypeScope.IsEmpty()|| parentTypeScope == wxT("<global>")) && !parentTypeName.IsEmpty()) {
+ scopeToSearch = parentTypeName;
+ }
+
+ //--------------------------------------------------------------------------------------------
+ //keep the scope that we searched so far. The accumumlated scope
+ //are used for types, for scenarios like:
+ //void Box::GetWidth()
+ // {
+ // Rectangle::
+ //
+ //trying to process the above code, will yield searching Rectangle inside Box scope, since we are
+ //inside Box's GetWidth() function.
+ //the correct behavior shuold be searching for Rectangle in the global scope.
+ //to correct this, we do special handling for Qualifier followed by coloon:colon operator (::)
+ if (accumulatedScope.IsEmpty() == false) {
+ if (accumulatedScope == wxT("<global>")) {
+ accumulatedScope = scopeToSearch;
+ } else {
+ accumulatedScope << wxT("::");
+ accumulatedScope << scopeToSearch;
+ }
+ } else {
+ accumulatedScope << wxT("<global>");
+ }
+
+ wxString originalScopeName(scopeToSearch);
+ if (op == wxT("::")) {
+ //if the operator was something like 'Qualifier::', it is safe to assume
+ //that the secope to be searched is the full expression
+ scopeToSearch = accumulatedScope;
+ }
+*/
+ // get the derivation list of the typename
+ bool res(false);
+ wxString _name(_U(result.m_name.c_str()));
+ PERF_BLOCK("TypeFromName") {
+ for (int i=0; i<2; i++) {
+ res = TypeFromName( _name,
+ visibleScope,
+ lastFuncSig,
+ scopeToSearch,
+ additionalScopes,
+ parentTypeName.IsEmpty(),
+ typeName, //output
+ typeScope); //output
+
+ if (!res && originalScopeName.IsEmpty() == false) {
+ // the scopeToSearch was modified earlier with the accumulated scope
+ // restore the search scope and try again
+ scopeToSearch = originalScopeName;
+ continue;
+ }
+ break;
+ }
+ }
+
+ if (!res) {
+ evaluationSucceeded = false;
+ break;
+ }
+
+ // do typedef subsitute
+ wxString tmp_name(typeName);
+ while (OnTypedef(typeName, typeScope, templateInitList, scopeName, scopeTemplateInitList)) {
+ if (tmp_name == typeName) {
+ //same type? break
+ break;
+ }
+ tmp_name = typeName;
+ }
+
+ //do template subsitute
+ if (OnTemplates(typeName, typeScope, parent)) {
+ //do typedef subsitute
+ wxString tmp_name(typeName);
+ while (OnTypedef(typeName, typeScope, templateInitList, scopeName, scopeTemplateInitList)) {
+ if (tmp_name == typeName) {
+ //same type? break
+ break;
+ }
+ tmp_name = typeName;
+ }
+ }
+
+ // try match any overloading operator to the typeName
+ wxString origTypeName(typeName);
+
+ // keep the typeScope in variable origTypeScope since it might be modified by
+ // the OnArrowOperatorOverloading() method, but we might need it again in case
+ // -> operator overloading is found
+ wxString origTypeScope(typeScope);
+ if ( op == wxT("->") && OnArrowOperatorOverloading(typeName, typeScope) ) {
+
+ // there is an operator overloading for ->
+ // do the whole typedef/template subsitute again
+ wxString tmp_name(typeName);
+ while (OnTypedef(typeName, typeScope, templateInitList, scopeName, scopeTemplateInitList)) {
+ if (tmp_name == typeName) {
+ //same type? break
+ break;
+ }
+ tmp_name = typeName;
+ }
+
+ // When template is found, replace the typeName with the temporary type name
+ // usually it will replace 'T' with the parent type, such as
+ // 'Singleton'
+ if (templateInitList.IsEmpty() == false) {
+ m_parentVar.m_isTemplate = true;
+ m_parentVar.m_templateDecl = _C(templateInitList);
+ m_parentVar.m_type = _C(origTypeName);
+ m_parentVar.m_typeScope = _C(origTypeScope); // we use the original type scope
+ }
+
+ // do template subsitute
+ if (OnTemplates(typeName, typeScope, m_parentVar)) {
+ //do typedef subsitute
+ wxString tmp_name(typeName);
+ while (OnTypedef(typeName, typeScope, templateInitList, scopeName, scopeTemplateInitList)) {
+ if (tmp_name == typeName) {
+ //same type? break
+ break;
+ }
+ tmp_name = typeName;
+ }
+ }
+ }
+ }
+
+ parent = m_parentVar;
+
+ //Keep the information about this token for next iteration
+ if (!parent.m_isTemplate && result.m_isTemplate) {
+
+ parent.m_isTemplate = true;
+ parent.m_templateDecl = result.m_templateInitList;
+ parent.m_type = _C(typeName);
+ parent.m_typeScope = _C(typeScope);
+
+ } else if (templateInitList.IsEmpty() == false) {
+
+ parent.m_isTemplate = true;
+ parent.m_templateDecl = _C(templateInitList);
+ parent.m_type = _C(typeName);
+ parent.m_typeScope = _C(typeScope);
+ }
+
+ parentTypeName = typeName;
+ parentTypeScope = typeScope;
+
+#endif
+ word.clear ();
+ }
+
+ return true;
+}
+
+
+/// Return the visible scope until pchStopWord is encountered
+string
+EngineParser::OptimizeScope(const string& srcString)
+{
+ string wxcurrScope;
+ std::vector<std::string> scope_stack;
+ std::string currScope;
+
+ int type;
+
+ // Initialize the scanner with the string to search
+ const char * scannerText = srcString.c_str ();
+ _tokenizer->SetText (scannerText);
+ bool changedLine = false;
+ bool prepLine = false;
+ int curline = 0;
+ while (true) {
+ type = _tokenizer->yylex();
+
+
+ // Eof ?
+ if (type == 0) {
+ if (!currScope.empty())
+ scope_stack.push_back(currScope);
+ break;
+ }
+
+ // eat up all tokens until next line
+ if ( prepLine && _tokenizer->lineno() == curline) {
+ currScope += " ";
+ currScope += _tokenizer->YYText();
+ continue;
+ }
+
+ prepLine = false;
+
+ // Get the current line number, it will help us detect preprocessor lines
+ changedLine = (_tokenizer->lineno() > curline);
+ if (changedLine) {
+ currScope += "\n";
+ }
+
+ curline = _tokenizer->lineno();
+ switch (type) {
+ case (int)'(':
+ currScope += "\n";
+ scope_stack.push_back(currScope);
+ currScope = "(\n";
+ break;
+ case (int)'{':
+ currScope += "\n";
+ scope_stack.push_back(currScope);
+ currScope = "{\n";
+ break;
+ case (int)')':
+ // Discard the current scope since it is completed
+ if ( !scope_stack.empty() ) {
+ currScope = scope_stack.back();
+ scope_stack.pop_back();
+ currScope += "()";
+ } else
+ currScope.clear();
+ break;
+ case (int)'}':
+ // Discard the current scope since it is completed
+ if ( !scope_stack.empty() ) {
+ currScope = scope_stack.back();
+ scope_stack.pop_back();
+ currScope += "\n{}\n";
+ } else {
+ currScope.clear();
+ }
+ break;
+ case (int)'#':
+ if (changedLine) {
+ // We are at the start of a new line
+ // consume everything until new line is found or end of text
+ currScope += " ";
+ currScope += _tokenizer->YYText();
+ prepLine = true;
+ break;
+ }
+ default:
+ currScope += " ";
+ currScope += _tokenizer->YYText();
+ break;
+ }
+ }
+
+ _tokenizer->Reset();
+
+ if (scope_stack.empty())
+ return srcString;
+
+ currScope.clear();
+ size_t i = 0;
+ for (; i < scope_stack.size(); i++)
+ currScope += scope_stack.at(i);
+
+ // if the current scope is not empty, terminate it with ';' and return
+ if ( currScope.empty() == false ) {
+ currScope += ";";
+ return currScope.c_str();
+ }
+
+ return srcString;
+}
+
+
+string
+EngineParser::GetScopeName(const string &in, std::vector<string> *additionlNS)
+{
+ std::string lastFunc, lastFuncSig;
+ std::vector<std::string> moreNS;
+// FunctionList fooList;
+
+ const char *buf = in.c_str ();
+
+// TagsManager *mgr = GetTagsManager();
+ //std::map<std::string, std::string> ignoreTokens = mgr->GetCtagsOptions().GetPreprocessorAsMap();
+
+ std::map<std::string, std::string> foo_map;
+
+ std::string scope_name = get_scope_name(buf, moreNS, foo_map);
+ string scope = scope_name;
+ if (scope.empty()) {
+ scope = "<global>";
+ }
+ if (additionlNS) {
+ for (size_t i=0; i<moreNS.size(); i++) {
+ additionlNS->push_back(moreNS.at(i).c_str());
+ }
+ }
+ return scope;
+}
+
+
+
+/************ C FUNCTIONS ************/
+
+void
+engine_parser_init (SymbolDBEngine* manager)
+{
+ EngineParser::getInstance ()->setSymbolManager (manager);
+}
+//*/
+
+void
+engine_parser_test_print_tokens (const char *str)
+{
+ EngineParser::getInstance ()->DEBUG_printTokens (str);
+}
+
+void
+engine_parser_parse_expression (const char*str)
+{
+ EngineParser::getInstance ()->testParseExpression (str);
+}
+
+void
+engine_parser_test_optimize_scope (const char*str)
+{
+ string res = EngineParser::getInstance ()->OptimizeScope (str);
+ cout << "OptimizeScope: " << res << endl;
+
+ res = EngineParser::getInstance ()->GetScopeName (str, NULL);
+ cout << "GetScopeName: " << res << endl;
+
+}
+
+void
+engine_parser_get_local_variables (const char *str)
+{
+ string res = EngineParser::getInstance ()->OptimizeScope (str);
+
+ VariableList li;
+ std::map<std::string, std::string> ignoreTokens;
+
+ get_variables (res, li, ignoreTokens, true);
+
+ for (VariableList::iterator iter = li.begin(); iter != li.end(); iter++) {
+ Variable var = *iter;
+ var.Print();
+ }
+
+ // printf("total time: %d\n", end-start);
+ printf("matches found: %d\n", li.size());
+}
+
+
+void
+engine_parser_process_expression (const char *stmt, const char * above_text,
+ const char * full_file_path, unsigned long linenum)
+{
+ string out_type_name;
+ string out_type_scope;
+ string out_oper;
+ string out_scope_template_init_list;
+
+ EngineParser::getInstance ()->processExpression (stmt, above_text,
+ full_file_path, linenum, out_type_name,
+ out_type_scope, out_oper, out_scope_template_init_list);
+
+/*
+ cout << "process expression result: " << endl << "out_type_name " << out_type_name << endl <<
+ "out_type_scope " << out_type_scope << endl << "out_oper " << out_oper << endl <<
+ "out_scope_template_init_list " << out_scope_template_init_list << endl;
+*/
+}
diff --git a/plugins/symbol-db/cxxparser/engine-parser.h b/plugins/symbol-db/cxxparser/engine-parser.h
new file mode 100644
index 0000000..ee3ac77
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/engine-parser.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it>
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#ifndef _ENGINE_MANAGER_H_
+#define _ENGINE_MANAGER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//#include <libanjuta/interfaces/ianjuta-symbol-manager.h>
+
+// FIXME: actually a dbe instance is passed. Change here when integrating with Anjuta.
+void engine_parser_init (SymbolDBEngine* manager);
+
+void engine_parser_test_print_tokens (const char *str);
+
+void engine_parser_parse_expression (const char*str);
+
+void engine_parser_process_expression (const char *stmt, const char * above_text,
+ const char * full_file_path, unsigned long linenum);
+
+void engine_parser_test_optimize_scope (const char*str);
+
+void engine_parser_get_local_variables (const char *buf);
+//*/
+#ifdef __cplusplus
+} // extern "C"
+#endif
+//*/
+
+#endif // _ENGINE_PARSER_H_
diff --git a/plugins/symbol-db/cxxparser/expression-lexer.cpp b/plugins/symbol-db/cxxparser/expression-lexer.cpp
new file mode 100644
index 0000000..e56b842
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/expression-lexer.cpp
@@ -0,0 +1,2647 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#define yy_create_buffer cl_expr__create_buffer
+#define yy_delete_buffer cl_expr__delete_buffer
+#define yy_scan_buffer cl_expr__scan_buffer
+#define yy_scan_string cl_expr__scan_string
+#define yy_scan_bytes cl_expr__scan_bytes
+#define yy_flex_debug cl_expr__flex_debug
+#define yy_init_buffer cl_expr__init_buffer
+#define yy_flush_buffer cl_expr__flush_buffer
+#define yy_load_buffer_state cl_expr__load_buffer_state
+#define yy_switch_to_buffer cl_expr__switch_to_buffer
+#define yyin cl_expr_in
+#define yyleng cl_expr_leng
+#define yylex cl_expr_lex
+#define yyout cl_expr_out
+#define yyrestart cl_expr_restart
+#define yytext cl_expr_text
+#define yylineno cl_expr_lineno
+#define yywrap cl_expr_wrap
+
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384*10
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ *yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+ };
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define YY_USES_REJECT
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern int yylineno;
+int yylineno = 1;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 141
+#define YY_END_OF_BUFFER 142
+static yyconst short int yy_acclist[595] =
+ { 0,
+ 142, 128, 141, 3, 128, 141, 5, 141, 4, 128,
+ 141, 92, 128, 141, 128, 141, 94, 128, 141, 87,
+ 128, 141, 128, 141, 78, 128, 141, 79, 128, 141,
+ 88, 128, 141, 89, 128, 141, 80, 128, 141, 90,
+ 128, 141, 86, 128, 141, 93, 128, 141, 73, 128,
+ 141, 72, 128, 141, 100, 128, 141, 101, 128, 141,
+ 95, 128, 141, 102, 128, 141, 96, 128, 141, 99,
+ 128, 141, 71, 128, 141, 71, 128, 141, 84, 128,
+ 141, 85, 128, 141, 97, 128, 141, 71, 128, 141,
+ 71, 128, 141, 71, 128, 141, 71, 128, 141, 71,
+
+ 128, 141, 71, 128, 141, 71, 128, 141, 71, 128,
+ 141, 71, 128, 141, 71, 128, 141, 71, 128, 141,
+ 71, 128, 141, 71, 128, 141, 71, 128, 141, 71,
+ 128, 141, 71, 128, 141, 71, 128, 141, 71, 128,
+ 141, 82, 128, 141, 98, 128, 141, 83, 128, 141,
+ 91, 128, 141, 81, 128, 141, 136, 141, 129, 141,
+ 134, 136, 141, 130, 136, 141, 134, 136, 141, 135,
+ 141, 132, 141, 133, 135, 141, 138, 141, 137, 141,
+ 140, 141, 141, 140, 141, 3, 5, 4, 114, 77,
+ 119, 115, 124, 117, 107, 120, 108, 121, 105, 103,
+
+ 75, 1, 2, 118, 75, 73, 73, 73, 72, 72,
+ 72, 104, 109, 111, 113, 112, 110, 71, 125, 71,
+ 71, 71, 71, 71, 71, 71, 15, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 26, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 126, 116, 134, 134, 133, 139, 76, 106, 127,
+ 75, 75, 73, 74, 72, 122, 123, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 24, 71, 71, 71, 71,
+
+ 71, 71, 71, 30, 71, 71, 71, 71, 54, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 134, 75, 74,
+ 74, 6, 71, 71, 8, 71, 71, 9, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 17, 71, 18,
+ 71, 71, 20, 71, 71, 71, 71, 71, 25, 71,
+ 71, 71, 71, 71, 31, 71, 32, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 60, 71, 71, 71, 71,
+
+ 71, 71, 71, 71, 46, 71, 71, 71, 134, 74,
+ 7, 71, 70, 71, 49, 71, 10, 71, 71, 71,
+ 71, 71, 71, 71, 19, 71, 21, 71, 71, 23,
+ 71, 71, 27, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 36, 71, 71,
+ 71, 71, 71, 71, 71, 69, 71, 71, 71, 43,
+ 71, 44, 71, 71, 68, 71, 71, 71, 48, 71,
+ 134, 71, 71, 71, 13, 71, 51, 71, 16, 71,
+ 71, 22, 71, 52, 71, 28, 71, 71, 53, 71,
+ 71, 71, 71, 33, 71, 71, 71, 59, 71, 71,
+
+ 71, 35, 71, 37, 71, 38, 71, 39, 71, 40,
+ 71, 41, 71, 71, 71, 71, 71, 71, 71, 131,
+ 134, 71, 71, 12, 71, 14, 71, 71, 29, 71,
+ 71, 71, 71, 58, 71, 71, 71, 71, 71, 71,
+ 42, 71, 71, 71, 61, 71, 71, 71, 11, 71,
+ 71, 71, 55, 71, 56, 71, 71, 34, 71, 71,
+ 71, 62, 71, 63, 71, 45, 71, 47, 71, 71,
+ 71, 50, 71, 57, 71, 71, 71, 66, 71, 71,
+ 71, 71, 71, 71, 65, 71, 64, 71, 71, 71,
+ 71, 71, 67, 71
+
+ } ;
+
+static yyconst short int yy_accept[449] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 4, 7, 9, 12, 15, 17, 20, 23,
+ 25, 28, 31, 34, 37, 40, 43, 46, 49, 52,
+ 55, 58, 61, 64, 67, 70, 73, 76, 79, 82,
+ 85, 88, 91, 94, 97, 100, 103, 106, 109, 112,
+ 115, 118, 121, 124, 127, 130, 133, 136, 139, 142,
+ 145, 148, 151, 154, 157, 159, 161, 164, 167, 170,
+ 172, 174, 177, 179, 181, 183, 184, 186, 187, 188,
+ 188, 189, 190, 190, 191, 191, 192, 193, 194, 194,
+ 194, 195, 196, 197, 198, 199, 200, 201, 201, 202,
+
+ 203, 204, 205, 206, 207, 207, 207, 208, 209, 209,
+ 210, 211, 212, 213, 214, 215, 216, 217, 218, 219,
+ 219, 219, 220, 221, 222, 223, 224, 225, 226, 227,
+ 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
+ 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
+ 250, 251, 252, 253, 254, 255, 256, 257, 258, 259,
+ 260, 261, 262, 263, 264, 265, 266, 267, 268, 268,
+ 268, 269, 269, 269, 270, 271, 271, 272, 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, 298, 299, 300, 301, 302, 303, 304,
+ 306, 307, 308, 309, 311, 312, 313, 314, 315, 316,
+ 317, 318, 319, 320, 321, 322, 323, 324, 325, 326,
+ 327, 328, 329, 330, 331, 332, 333, 334, 335, 336,
+ 337, 338, 339, 339, 339, 339, 339, 339, 340, 341,
+ 342, 344, 345, 347, 348, 350, 351, 352, 353, 354,
+ 355, 356, 357, 358, 360, 362, 363, 365, 366, 367,
+ 368, 369, 371, 372, 373, 374, 375, 377, 379, 380,
+ 381, 382, 383, 384, 385, 386, 387, 388, 389, 390,
+ 391, 392, 393, 394, 395, 396, 398, 399, 400, 401,
+
+ 402, 403, 404, 405, 407, 408, 409, 410, 410, 410,
+ 410, 410, 411, 413, 415, 417, 419, 420, 421, 422,
+ 423, 424, 425, 427, 429, 430, 432, 433, 435, 436,
+ 437, 438, 439, 440, 441, 442, 443, 444, 445, 446,
+ 447, 448, 450, 451, 452, 453, 454, 455, 456, 458,
+ 459, 460, 462, 464, 465, 467, 468, 469, 471, 472,
+ 473, 474, 475, 477, 479, 481, 482, 484, 486, 488,
+ 489, 491, 492, 493, 494, 496, 497, 498, 500, 501,
+ 502, 504, 506, 508, 510, 512, 514, 515, 516, 517,
+ 518, 519, 520, 522, 523, 524, 526, 528, 529, 531,
+
+ 532, 533, 534, 536, 537, 538, 539, 540, 541, 543,
+ 544, 545, 547, 548, 549, 551, 552, 553, 555, 557,
+ 558, 560, 561, 562, 564, 566, 568, 570, 571, 572,
+ 574, 576, 577, 578, 580, 581, 582, 583, 584, 585,
+ 587, 589, 590, 591, 592, 593, 595, 595
+ } ;
+
+static yyconst int yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 4, 5, 6, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 7, 8, 9, 10, 1, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 23,
+ 23, 23, 23, 23, 23, 24, 24, 25, 26, 27,
+ 28, 29, 30, 1, 31, 31, 31, 31, 32, 33,
+ 34, 34, 34, 34, 34, 35, 34, 34, 34, 34,
+ 34, 34, 34, 34, 36, 34, 34, 37, 34, 34,
+ 38, 39, 40, 41, 42, 1, 43, 44, 45, 46,
+
+ 47, 48, 49, 50, 51, 34, 52, 53, 54, 55,
+ 56, 57, 34, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 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 int yy_meta[71] =
+ { 0,
+ 1, 1, 2, 1, 1, 1, 1, 1, 3, 1,
+ 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 5, 6, 1, 1, 1, 1, 1, 3,
+ 6, 6, 6, 7, 7, 7, 7, 1, 3, 1,
+ 1, 7, 5, 5, 6, 6, 6, 5, 7, 7,
+ 7, 7, 7, 7, 8, 7, 7, 8, 7, 8,
+ 7, 8, 7, 8, 7, 7, 1, 1, 1, 1
+ } ;
+
+static yyconst short int yy_base[460] =
+ { 0,
+ 0, 793, 70, 0, 140, 0, 799, 798, 208, 209,
+ 800, 804, 211, 804, 224, 771, 210, 770, 208, 758,
+ 804, 804, 768, 204, 804, 214, 224, 229, 238, 231,
+ 770, 804, 195, 766, 206, 804, 0, 228, 804, 804,
+ 765, 731, 733, 226, 212, 240, 230, 734, 216, 238,
+ 209, 239, 229, 742, 255, 260, 253, 258, 738, 804,
+ 252, 804, 804, 804, 804, 804, 0, 804, 740, 804,
+ 804, 0, 804, 804, 804, 804, 765, 324, 804, 330,
+ 336, 804, 272, 804, 294, 804, 804, 804, 226, 299,
+ 804, 804, 804, 804, 804, 769, 804, 764, 322, 804,
+
+ 804, 804, 329, 361, 366, 349, 236, 312, 0, 380,
+ 287, 314, 804, 755, 804, 804, 804, 754, 0, 341,
+ 742, 804, 720, 732, 300, 735, 734, 721, 271, 714,
+ 719, 328, 345, 715, 712, 715, 712, 718, 708, 346,
+ 364, 712, 711, 711, 701, 716, 715, 367, 717, 370,
+ 704, 329, 362, 708, 704, 374, 700, 348, 705, 697,
+ 375, 703, 804, 804, 0, 705, 0, 804, 420, 0,
+ 804, 422, 0, 804, 804, 429, 804, 414, 432, 804,
+ 422, 804, 804, 804, 696, 708, 703, 704, 690, 688,
+ 380, 417, 699, 701, 701, 695, 695, 690, 686, 683,
+
+ 691, 694, 0, 689, 679, 687, 687, 679, 680, 0,
+ 683, 680, 681, 0, 669, 668, 676, 662, 663, 669,
+ 670, 665, 658, 660, 662, 669, 655, 653, 653, 655,
+ 652, 654, 662, 661, 651, 655, 650, 644, 657, 659,
+ 648, 649, 440, 477, 451, 513, 447, 454, 411, 321,
+ 0, 647, 0, 648, 0, 638, 636, 644, 633, 638,
+ 632, 638, 636, 0, 0, 641, 0, 630, 629, 626,
+ 630, 0, 636, 636, 621, 626, 0, 0, 621, 636,
+ 625, 623, 633, 628, 623, 614, 612, 613, 610, 622,
+ 612, 616, 621, 620, 611, 0, 600, 436, 614, 606,
+
+ 611, 610, 597, 0, 597, 609, 600, 457, 0, 475,
+ 0, 804, 0, 0, 0, 612, 598, 599, 604, 603,
+ 602, 597, 0, 0, 592, 0, 600, 0, 597, 598,
+ 596, 585, 581, 584, 596, 578, 592, 591, 575, 587,
+ 578, 0, 586, 583, 585, 569, 578, 584, 0, 579,
+ 582, 0, 0, 569, 0, 573, 564, 0, 563, 564,
+ 528, 527, 533, 0, 0, 510, 0, 0, 0, 507,
+ 0, 510, 495, 507, 0, 502, 488, 0, 500, 485,
+ 0, 0, 0, 500, 0, 0, 481, 492, 485, 491,
+ 481, 480, 0, 489, 484, 0, 0, 488, 0, 484,
+
+ 470, 481, 0, 472, 460, 460, 470, 466, 0, 465,
+ 465, 0, 459, 446, 0, 459, 456, 0, 0, 452,
+ 0, 439, 452, 0, 0, 0, 0, 434, 450, 0,
+ 0, 445, 425, 0, 422, 390, 374, 371, 369, 0,
+ 0, 268, 260, 241, 178, 0, 804, 561, 569, 577,
+ 585, 589, 593, 597, 603, 609, 613, 615, 617
+ } ;
+
+static yyconst short int yy_def[460] =
+ { 0,
+ 447, 1, 447, 3, 447, 5, 448, 448, 449, 449,
+ 447, 447, 447, 447, 447, 447, 450, 447, 447, 451,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 452, 452, 447, 447,
+ 447, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 447,
+ 447, 447, 447, 447, 447, 447, 453, 447, 453, 447,
+ 447, 454, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 450, 447, 455, 447, 447, 447, 451, 456,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+
+ 447, 447, 447, 447, 447, 447, 447, 447, 457, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 452, 450,
+ 451, 447, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 447, 447, 453, 453, 454, 447, 450, 458,
+ 447, 451, 459, 447, 447, 447, 447, 447, 447, 447,
+ 457, 447, 447, 447, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 453, 450, 450, 451, 451, 447, 447, 447, 447,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+
+ 452, 452, 452, 452, 452, 452, 453, 450, 244, 451,
+ 246, 447, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 453, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 453, 452, 452, 452, 452, 452, 452, 452,
+
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 452, 452, 452, 452,
+ 452, 452, 452, 452, 452, 452, 0, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447
+ } ;
+
+static yyconst short int yy_nxt[875] =
+ { 0,
+ 12, 13, 14, 15, 15, 15, 13, 16, 17, 12,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 30, 31, 32, 33, 34, 35, 36,
+ 37, 37, 37, 37, 38, 37, 37, 39, 12, 40,
+ 41, 37, 42, 43, 44, 45, 46, 47, 48, 37,
+ 49, 37, 50, 37, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 37, 37, 37, 60, 61, 62, 63,
+ 65, 65, 66, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+
+ 67, 67, 67, 67, 67, 67, 67, 65, 68, 65,
+ 65, 67, 67, 67, 67, 69, 67, 67, 67, 67,
+ 67, 67, 67, 67, 67, 67, 67, 67, 67, 67,
+ 67, 67, 67, 67, 67, 67, 65, 65, 65, 65,
+ 70, 70, 71, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 72, 72, 72, 72, 72, 72, 72, 70, 70, 70,
+ 70, 72, 72, 72, 72, 72, 72, 72, 72, 72,
+ 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
+
+ 72, 72, 72, 72, 72, 72, 70, 70, 70, 70,
+ 76, 76, 78, 79, 80, 80, 80, 78, 84, 87,
+ 92, 114, 115, 77, 77, 80, 79, 81, 81, 81,
+ 80, 93, 94, 117, 118, 88, 120, 446, 171, 97,
+ 121, 95, 96, 98, 100, 99, 99, 99, 85, 101,
+ 103, 144, 110, 110, 110, 145, 102, 103, 129, 104,
+ 104, 105, 106, 140, 90, 111, 112, 130, 125, 106,
+ 141, 180, 107, 108, 109, 126, 131, 106, 127, 163,
+ 84, 128, 136, 111, 106, 137, 148, 138, 142, 149,
+ 107, 112, 132, 143, 133, 146, 180, 134, 108, 445,
+
+ 147, 109, 444, 135, 151, 152, 155, 158, 160, 156,
+ 85, 159, 443, 161, 153, 169, 169, 154, 192, 164,
+ 172, 172, 182, 193, 157, 78, 79, 80, 80, 80,
+ 78, 80, 79, 80, 80, 80, 80, 80, 79, 81,
+ 81, 81, 80, 99, 99, 99, 180, 182, 182, 84,
+ 99, 99, 99, 176, 177, 312, 177, 170, 187, 188,
+ 176, 177, 173, 177, 180, 178, 182, 178, 176, 177,
+ 179, 179, 179, 312, 177, 176, 177, 225, 196, 85,
+ 103, 177, 104, 104, 105, 103, 197, 105, 105, 105,
+ 198, 206, 106, 234, 226, 107, 108, 106, 235, 103,
+
+ 207, 110, 110, 110, 227, 199, 236, 106, 208, 217,
+ 442, 106, 106, 107, 111, 112, 209, 218, 221, 228,
+ 222, 108, 219, 210, 231, 239, 106, 240, 84, 223,
+ 441, 232, 111, 440, 171, 179, 179, 179, 257, 258,
+ 112, 243, 243, 245, 245, 247, 312, 247, 84, 439,
+ 248, 248, 248, 179, 179, 179, 249, 250, 85, 259,
+ 90, 308, 308, 171, 177, 84, 177, 260, 248, 248,
+ 248, 312, 310, 310, 249, 248, 248, 248, 85, 177,
+ 438, 350, 250, 437, 177, 84, 177, 171, 177, 90,
+ 351, 436, 435, 434, 433, 85, 432, 431, 309, 309,
+
+ 309, 177, 430, 429, 428, 427, 177, 309, 309, 309,
+ 426, 425, 424, 90, 423, 85, 422, 421, 420, 309,
+ 309, 309, 309, 309, 309, 171, 419, 418, 417, 416,
+ 415, 414, 413, 412, 311, 311, 311, 411, 410, 409,
+ 408, 407, 406, 311, 311, 311, 405, 404, 403, 402,
+ 401, 90, 400, 399, 398, 311, 311, 311, 311, 311,
+ 311, 73, 73, 73, 73, 73, 73, 73, 73, 75,
+ 75, 75, 75, 75, 75, 75, 75, 83, 397, 83,
+ 83, 83, 83, 83, 83, 89, 396, 89, 395, 89,
+ 89, 89, 89, 119, 119, 119, 119, 165, 165, 165,
+
+ 165, 167, 167, 167, 167, 83, 83, 83, 394, 393,
+ 83, 89, 89, 89, 392, 391, 89, 181, 181, 244,
+ 244, 246, 246, 390, 389, 388, 387, 386, 385, 384,
+ 383, 382, 381, 380, 379, 378, 377, 376, 375, 374,
+ 373, 372, 371, 370, 369, 368, 367, 366, 365, 364,
+ 363, 362, 361, 360, 359, 358, 357, 356, 355, 354,
+ 353, 352, 349, 348, 347, 346, 345, 344, 343, 342,
+ 341, 340, 339, 338, 337, 336, 335, 334, 333, 332,
+ 331, 330, 329, 328, 327, 326, 325, 324, 323, 322,
+ 321, 320, 319, 318, 317, 316, 315, 314, 313, 307,
+
+ 306, 305, 304, 303, 302, 301, 300, 299, 298, 297,
+ 296, 295, 294, 293, 292, 291, 290, 289, 288, 287,
+ 286, 285, 284, 283, 282, 281, 280, 279, 278, 277,
+ 276, 275, 274, 273, 272, 271, 270, 269, 268, 267,
+ 266, 265, 264, 263, 262, 261, 256, 255, 254, 253,
+ 252, 251, 242, 241, 238, 237, 233, 230, 229, 224,
+ 220, 216, 215, 214, 213, 212, 211, 205, 204, 203,
+ 202, 201, 200, 195, 194, 191, 190, 189, 186, 185,
+ 90, 184, 183, 175, 174, 168, 166, 162, 150, 139,
+ 124, 123, 122, 116, 113, 91, 90, 86, 82, 447,
+
+ 74, 74, 64, 11, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447
+ } ;
+
+static yyconst short int yy_chk[875] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 9, 10, 13, 13, 13, 13, 13, 13, 17, 19,
+ 24, 33, 33, 9, 10, 15, 15, 15, 15, 15,
+ 15, 24, 26, 35, 35, 19, 38, 445, 89, 27,
+ 38, 26, 26, 27, 28, 27, 27, 27, 17, 28,
+ 30, 51, 30, 30, 30, 51, 28, 29, 45, 29,
+ 29, 29, 30, 49, 89, 30, 30, 45, 44, 29,
+ 49, 107, 29, 29, 29, 44, 45, 30, 44, 61,
+ 83, 44, 47, 30, 29, 47, 53, 47, 50, 53,
+ 29, 30, 46, 50, 46, 52, 107, 46, 29, 444,
+
+ 52, 29, 443, 46, 55, 55, 56, 57, 58, 56,
+ 83, 57, 442, 58, 55, 85, 85, 55, 129, 61,
+ 90, 90, 111, 129, 56, 78, 78, 78, 78, 78,
+ 78, 80, 80, 80, 80, 80, 80, 81, 81, 81,
+ 81, 81, 81, 99, 99, 99, 108, 111, 112, 120,
+ 103, 103, 103, 99, 99, 250, 99, 85, 125, 125,
+ 103, 103, 90, 103, 108, 106, 112, 106, 99, 99,
+ 106, 106, 106, 250, 99, 103, 103, 152, 132, 120,
+ 104, 103, 104, 104, 104, 105, 132, 105, 105, 105,
+ 133, 140, 104, 158, 152, 104, 104, 105, 158, 110,
+
+ 140, 110, 110, 110, 153, 133, 158, 104, 141, 148,
+ 439, 110, 105, 104, 110, 110, 141, 148, 150, 153,
+ 150, 104, 148, 141, 156, 161, 110, 161, 169, 150,
+ 438, 156, 110, 437, 172, 178, 178, 178, 191, 191,
+ 110, 169, 169, 172, 172, 176, 249, 176, 243, 436,
+ 176, 176, 176, 179, 179, 179, 181, 181, 169, 192,
+ 172, 243, 243, 245, 179, 308, 179, 192, 247, 247,
+ 247, 249, 245, 245, 181, 248, 248, 248, 243, 179,
+ 435, 298, 181, 433, 179, 244, 248, 310, 248, 245,
+ 298, 432, 429, 428, 423, 308, 422, 420, 244, 244,
+
+ 244, 248, 417, 416, 414, 413, 248, 244, 244, 244,
+ 411, 410, 408, 310, 407, 244, 406, 405, 404, 244,
+ 244, 244, 244, 244, 244, 246, 402, 401, 400, 398,
+ 395, 394, 392, 391, 246, 246, 246, 390, 389, 388,
+ 387, 384, 380, 246, 246, 246, 379, 377, 376, 374,
+ 373, 246, 372, 370, 366, 246, 246, 246, 246, 246,
+ 246, 448, 448, 448, 448, 448, 448, 448, 448, 449,
+ 449, 449, 449, 449, 449, 449, 449, 450, 363, 450,
+ 450, 450, 450, 450, 450, 451, 362, 451, 361, 451,
+ 451, 451, 451, 452, 452, 452, 452, 453, 453, 453,
+
+ 453, 454, 454, 454, 454, 455, 455, 455, 360, 359,
+ 455, 456, 456, 456, 357, 356, 456, 457, 457, 458,
+ 458, 459, 459, 354, 351, 350, 348, 347, 346, 345,
+ 344, 343, 341, 340, 339, 338, 337, 336, 335, 334,
+ 333, 332, 331, 330, 329, 327, 325, 322, 321, 320,
+ 319, 318, 317, 316, 307, 306, 305, 303, 302, 301,
+ 300, 299, 297, 295, 294, 293, 292, 291, 290, 289,
+ 288, 287, 286, 285, 284, 283, 282, 281, 280, 279,
+ 276, 275, 274, 273, 271, 270, 269, 268, 266, 263,
+ 262, 261, 260, 259, 258, 257, 256, 254, 252, 242,
+
+ 241, 240, 239, 238, 237, 236, 235, 234, 233, 232,
+ 231, 230, 229, 228, 227, 226, 225, 224, 223, 222,
+ 221, 220, 219, 218, 217, 216, 215, 213, 212, 211,
+ 209, 208, 207, 206, 205, 204, 202, 201, 200, 199,
+ 198, 197, 196, 195, 194, 193, 190, 189, 188, 187,
+ 186, 185, 166, 162, 160, 159, 157, 155, 154, 151,
+ 149, 147, 146, 145, 144, 143, 142, 139, 138, 137,
+ 136, 135, 134, 131, 130, 128, 127, 126, 124, 123,
+ 121, 118, 114, 98, 96, 77, 69, 59, 54, 48,
+ 43, 42, 41, 34, 31, 23, 20, 18, 16, 11,
+
+ 8, 7, 2, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447, 447, 447, 447, 447, 447, 447,
+ 447, 447, 447, 447
+ } ;
+
+static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
+static char *yy_full_match;
+static int yy_lp;
+#define REJECT \
+{ \
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
+yy_cp = yy_full_match; /* restore poss. backed-over text */ \
+++yy_lp; \
+goto find_rule; \
+}
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#define INITIAL 0
+/* Included code before lex code */
+/*************** Includes and Defines *****************************/
+
+
+#include <map>
+#include "flex-lexer-plain-tab.h" // YACC generated definitions based on C++ grammar
+#include <errno.h>
+
+#define YYSTYPE std::string
+
+#include <string>
+#include <stdlib.h>
+//#include <string.h>
+#include <vector>
+
+extern std::string cl_expr_lval;
+extern std::string cl_var_lval;
+
+bool setExprLexerInput(const std::string &in);
+void cl_expr_lex_clean();
+
+bool exprIsaTYPE(char *string);
+bool exprIsaMACRO(char *string);
+static bool defineFound = false;
+
+/* Prototypes */
+#define WHITE_RETURN(x) /* do nothing */
+
+#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */
+#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */
+#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */
+#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN()
+
+#define IDENTIFIER_RETURN(){\
+ if(exprIsaTYPE(yytext)){\
+ RETURN_VAL(LE_TYPEDEFname);\
+ }else if(exprIsaMACRO(yytext)){\
+ RETURN_VAL(LE_MACRO);\
+ }else{ RETURN_VAL(LE_IDENTIFIER);}\
+ }
+
+
+#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */
+#define NAMED_PPOP_RETURN(x) RETURN_VAL(x)
+#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */
+#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */
+
+#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */
+#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */
+#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */
+#define RETURN_VAL(x) {\
+ cl_expr_lval = yytext;\
+ return(x);}
+#define PREPR 1
+
+#define WRAP_PREP 2
+
+#define CPP_COMMENT 3
+
+#define C_COMMENT 4
+
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ if ( yyleng > 0 ) \
+ yy_current_buffer->yy_at_bol = \
+ (yytext[yyleng - 1] == '\n'); \
+ YY_USER_ACTION
+
+YY_DECL
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
+
+
+
+ if ( yy_init )
+ {
+ yy_init = 0;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_load_buffer_state();
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yy_start;
+ yy_current_state += YY_AT_BOL();
+ yy_state_ptr = yy_state_buf;
+ *yy_state_ptr++ = yy_current_state;
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 448 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *yy_state_ptr++ = yy_current_state;
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 804 );
+
+yy_find_action:
+ yy_current_state = *--yy_state_ptr;
+ yy_lp = yy_accept[yy_current_state];
+find_rule: /* we branch to this label when backing up */
+ for ( ; ; ) /* until we find what rule we matched */
+ {
+ if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
+ {
+ yy_act = yy_acclist[yy_lp];
+ {
+ yy_full_match = yy_cp;
+ break;
+ }
+ }
+ --yy_cp;
+ yy_current_state = *--yy_state_ptr;
+ yy_lp = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+ if ( yy_act != YY_END_OF_BUFFER )
+ {
+ int yyl;
+ for ( yyl = 0; yyl < yyleng; ++yyl )
+ if ( yytext[yyl] == '\n' )
+ ++yylineno;
+ }
+
+do_action: /* This label is used only to access EOF actions. */
+
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+case 1:
+YY_RULE_SETUP
+{
+ BEGIN C_COMMENT;
+ }
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+{
+ BEGIN CPP_COMMENT;
+ }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+{
+ WHITE_RETURN(' ');
+ }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+{
+ WHITE_RETURN(' ');
+ }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+{
+ WHITE_RETURN('\n');
+ }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_AUTO);}
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_BREAK);}
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_CASE);}
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_CHAR);}
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_CONST);}
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_CONTINUE);}
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_DEFAULT);}
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_DEFINE);}
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_OPDEFINED);}
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_DO);}
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_DOUBLE);}
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_ELIF);}
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+{PPPA_KEYWORD_RETURN(LE_ELSE);}
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_ENDIF);}
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_ENUM);}
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_ERROR);}
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_EXTERN);}
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_FLOAT);}
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_FOR);}
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_GOTO);}
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+{PPPA_KEYWORD_RETURN(LE_IF);}
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_IFDEF);}
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_IFNDEF);}
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_INCLUDE); }
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_INT);}
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_LINE);}
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_LONG);}
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_PRAGMA);}
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_REGISTER);}
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_RETURN);}
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_SHORT);}
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_SIGNED);}
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_SIZEOF);}
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_STATIC);}
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_STRUCT);}
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_SWITCH);}
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_TYPEDEF);}
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_UNDEF);}
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_UNION);}
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_UNSIGNED);}
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_VOID);}
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_VOLATILE);}
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_WHILE);}
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_CLASS);}
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_NAMESPACE);}
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_DELETE);}
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_FRIEND);}
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_INLINE);}
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_NEW);}
+ YY_BREAK
+case 55:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_OPERATOR);}
+ YY_BREAK
+case 56:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_OVERLOAD);}
+ YY_BREAK
+case 57:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_PROTECTED);}
+ YY_BREAK
+case 58:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_PRIVATE);}
+ YY_BREAK
+case 59:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_PUBLIC);}
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_THIS);}
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_VIRTUAL);}
+ YY_BREAK
+case 62:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_TEMPLATE);}
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_TYPENAME);}
+ YY_BREAK
+case 64:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_DYNAMIC_CAST);}
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_STATIC_CAST);}
+ YY_BREAK
+case 66:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_CONST_CAST);}
+ YY_BREAK
+case 67:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_REINTERPRET_CAST);}
+ YY_BREAK
+case 68:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_USING);}
+ YY_BREAK
+case 69:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_THROW);}
+ YY_BREAK
+case 70:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_CATCH);}
+ YY_BREAK
+case 71:
+YY_RULE_SETUP
+{IDENTIFIER_RETURN();}
+ YY_BREAK
+case 72:
+YY_RULE_SETUP
+{NUMERICAL_RETURN(LE_INTEGERconstant);}
+ YY_BREAK
+case 73:
+YY_RULE_SETUP
+{NUMERICAL_RETURN(LE_OCTALconstant);}
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+{NUMERICAL_RETURN(LE_HEXconstant);}
+ YY_BREAK
+case 75:
+YY_RULE_SETUP
+{NUMERICAL_RETURN(LE_FLOATINGconstant);}
+ YY_BREAK
+case 76:
+YY_RULE_SETUP
+{
+ NUMERICAL_RETURN(LE_CHARACTERconstant);
+ }
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+{
+ LITERAL_RETURN(LE_STRINGliteral);}
+ YY_BREAK
+case 78:
+YY_RULE_SETUP
+{PPOP_RETURN(LE_LP);}
+ YY_BREAK
+case 79:
+YY_RULE_SETUP
+{PPOP_RETURN(LE_RP);}
+ YY_BREAK
+case 80:
+YY_RULE_SETUP
+{PPOP_RETURN(LE_COMMA);}
+ YY_BREAK
+case 81:
+YY_RULE_SETUP
+{BEGIN PREPR;}
+ YY_BREAK
+case 82:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_LC);}
+ YY_BREAK
+case 83:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_RC);}
+ YY_BREAK
+case 84:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_LB);}
+ YY_BREAK
+case 85:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_RB);}
+ YY_BREAK
+case 86:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_DOT);}
+ YY_BREAK
+case 87:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_AND);}
+ YY_BREAK
+case 88:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_STAR);}
+ YY_BREAK
+case 89:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_PLUS);}
+ YY_BREAK
+case 90:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_MINUS);}
+ YY_BREAK
+case 91:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_NEGATE);}
+ YY_BREAK
+case 92:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_NOT);}
+ YY_BREAK
+case 93:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_DIV);}
+ YY_BREAK
+case 94:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_MOD);}
+ YY_BREAK
+case 95:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_LT);}
+ YY_BREAK
+case 96:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_GT);}
+ YY_BREAK
+case 97:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_XOR);}
+ YY_BREAK
+case 98:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_PIPE);}
+ YY_BREAK
+case 99:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_QUESTION);}
+ YY_BREAK
+case 100:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_COLON);}
+ YY_BREAK
+case 101:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_SEMICOLON);}
+ YY_BREAK
+case 102:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_ASSIGN);}
+ YY_BREAK
+case 103:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_DOTstar);}
+ YY_BREAK
+case 104:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_CLCL);}
+ YY_BREAK
+case 105:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ARROW);}
+ YY_BREAK
+case 106:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ARROWstar);}
+ YY_BREAK
+case 107:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ICR);}
+ YY_BREAK
+case 108:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_DECR);}
+ YY_BREAK
+case 109:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_LS);}
+ YY_BREAK
+case 110:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_RS);}
+ YY_BREAK
+case 111:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_LE);}
+ YY_BREAK
+case 112:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_GE);}
+ YY_BREAK
+case 113:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_EQ);}
+ YY_BREAK
+case 114:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_NE);}
+ YY_BREAK
+case 115:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ANDAND);}
+ YY_BREAK
+case 116:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_OROR);}
+ YY_BREAK
+case 117:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_MULTassign);}
+ YY_BREAK
+case 118:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_DIVassign);}
+ YY_BREAK
+case 119:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_MODassign);}
+ YY_BREAK
+case 120:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_PLUSassign);}
+ YY_BREAK
+case 121:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_MINUSassign);}
+ YY_BREAK
+case 122:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_LSassign);}
+ YY_BREAK
+case 123:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_RSassign);}
+ YY_BREAK
+case 124:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ANDassign);}
+ YY_BREAK
+case 125:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ERassign);}
+ YY_BREAK
+case 126:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ORassign);}
+ YY_BREAK
+case 127:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ELLIPSIS);}
+ YY_BREAK
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(PREPR):
+case YY_STATE_EOF(WRAP_PREP):
+case YY_STATE_EOF(CPP_COMMENT):
+case YY_STATE_EOF(C_COMMENT):
+{
+ //reset lexer
+ yyterminate();
+ }
+ YY_BREAK
+case 128:
+YY_RULE_SETUP
+{return yytext[0];}
+ YY_BREAK
+case 129:
+YY_RULE_SETUP
+{
+ defineFound = false;
+ BEGIN INITIAL;
+ }
+ YY_BREAK
+case 130:
+YY_RULE_SETUP
+{
+ BEGIN WRAP_PREP;
+ }
+ YY_BREAK
+case 131:
+YY_RULE_SETUP
+{
+ defineFound = true;
+ }
+ YY_BREAK
+case 132:
+YY_RULE_SETUP
+{
+ BEGIN PREPR;
+ }
+ YY_BREAK
+case 133:
+YY_RULE_SETUP
+{
+ if(defineFound)
+ {
+ defineFound = false;
+ }
+ }
+ YY_BREAK
+case 134:
+YY_RULE_SETUP
+{
+ if(defineFound)
+ {
+ defineFound = false;
+ }
+ }
+ YY_BREAK
+case 135:
+YY_RULE_SETUP
+{}
+ YY_BREAK
+case 136:
+YY_RULE_SETUP
+{}
+ YY_BREAK
+case 137:
+YY_RULE_SETUP
+{BEGIN INITIAL;}
+ YY_BREAK
+case 138:
+YY_RULE_SETUP
+{}
+ YY_BREAK
+case 139:
+YY_RULE_SETUP
+{BEGIN INITIAL;}
+ YY_BREAK
+case 140:
+YY_RULE_SETUP
+{}
+ YY_BREAK
+case 141:
+YY_RULE_SETUP
+ECHO;
+ YY_BREAK
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( yy_current_buffer->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
+ * yylex(). 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.
+ */
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->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 ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ /* 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 );
+
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yy_did_buffer_switch_on_eof = 0;
+
+ if ( yywrap() )
+ {
+ /* 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.
+ */
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = yy_current_buffer;
+
+ int yy_c_buf_p_offset =
+ (int) (yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
+ }
+ 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" );
+
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = yy_current_buffer->yy_buf_size -
+ number_to_move - 1;
+#endif
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
+
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ if ( yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ yy_current_buffer->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+ return ret_val;
+ }
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = yy_start;
+ yy_current_state += YY_AT_BOL();
+ yy_state_ptr = yy_state_buf;
+ *yy_state_ptr++ = yy_current_state;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ 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 >= 448 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *yy_state_ptr++ = yy_current_state;
+ }
+
+ return yy_current_state;
+ }
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
+ register int yy_is_jam;
+
+ register YY_CHAR yy_c = 1;
+ 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 >= 448 )
+ 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 == 447);
+ if ( ! yy_is_jam )
+ *yy_state_ptr++ = yy_current_state;
+
+ return yy_is_jam ? 0 : yy_current_state;
+ }
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
+
+ /* undo effects of setting up yytext */
+ *yy_cp = yy_hold_char;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
+ register char *source =
+ &yy_current_buffer->yy_ch_buf[number_to_move];
+
+ while ( source > yy_current_buffer->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+ if ( c == '\n' )
+ --yylineno;
+
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+ {
+ int c;
+
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ /* This was really a NUL. */
+ *yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
+
+ switch ( yy_get_next_buffer() )
+ {
+ 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. */
+ yyrestart( yyin );
+
+ /* fall through */
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap() )
+ return EOF;
+
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p = yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
+ yy_current_buffer->yy_at_bol = (c == '\n');
+ if ( yy_current_buffer->yy_at_bol )
+ ++yylineno;
+
+ return c;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
+ return;
+
+ if ( yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yy_did_buffer_switch_on_eof = 1;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
+ if ( ! b )
+ return;
+
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yy_flex_free( (void *) b->yy_ch_buf );
+
+ yy_flex_free( (void *) b );
+ }
+
+
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
+ }
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = len + 2;
+ buf = (char *) yy_flex_alloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < len; ++i )
+ buf[i] = bytes[i];
+
+ buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
+
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
+
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
+
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
+
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+ BEGIN(new_state);
+ }
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+ }
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
+ return (void *) malloc( size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
+
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
+#endif
+
+
+bool exprIsaTYPE(char *string)
+{
+ return false;
+}
+
+bool exprIsaMACRO(char *string)
+{
+ return false;
+}
+
+void cl_expr_lex_clean()
+{
+ yy_flush_buffer(YY_CURRENT_BUFFER);
+ yy_delete_buffer(YY_CURRENT_BUFFER);
+ cl_expr_lineno = 1;
+}
+
+/*******************************************************************/
+bool setExprLexerInput(const std::string &in)
+{
+ BEGIN INITIAL;
+ yy_scan_string(in.c_str());
+
+ //update the working file name
+ return true;
+}
+
+int yywrap()
+{
+ return 1;
+}
diff --git a/plugins/symbol-db/cxxparser/expression-parser.cpp b/plugins/symbol-db/cxxparser/expression-parser.cpp
new file mode 100644
index 0000000..49cac84
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/expression-parser.cpp
@@ -0,0 +1,953 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#ifndef lint
+static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
+#endif
+#define YYBYACC 1
+#define YYMAJOR 1
+#define YYMINOR 9
+#define yyclearin (yychar=(-1))
+#define yyerrok (yyerrflag=0)
+#define YYRECOVERING (yyerrflag!=0)
+#define yyparse cl_expr_parse
+#define yylex cl_expr_lex
+#define yyerror cl_expr_error
+#define yychar cl_expr_char
+#define yyval cl_expr_val
+#define yylval cl_expr_lval
+#define yydebug cl_expr_debug
+#define yynerrs cl_expr_nerrs
+#define yyerrflag cl_expr_errflag
+#define yyss cl_expr_ss
+#define yyssp cl_expr_ssp
+#define yyvs cl_expr_vs
+#define yyvsp cl_expr_vsp
+#define yylhs cl_expr_lhs
+#define yylen cl_expr_len
+#define yydefred cl_expr_defred
+#define yydgoto cl_expr_dgoto
+#define yysindex cl_expr_sindex
+#define yyrindex cl_expr_rindex
+#define yygindex cl_expr_gindex
+#define yytable cl_expr_table
+#define yycheck cl_expr_check
+#define yyname cl_expr_name
+#define yyrule cl_expr_rule
+#define YYPREFIX "cl_expr_"
+
+/* Copyright Eran Ifrah(c)*/
+/*************** Includes and Defines *****************************/
+#include <string>
+#include <vector>
+#include <stdio.h>
+#include <map>
+#include "expression-result.h"
+
+#define YYSTYPE std::string
+#define YYDEBUG 0 /* get the pretty debugging code to compile*/
+
+void cl_expr_error(char *string);
+
+static ExpressionResult result;
+
+/*---------------------------------------------*/
+/* externs defined in the lexer*/
+/*---------------------------------------------*/
+extern char *cl_expr_text;
+extern int cl_expr_lex();
+extern int cl_expr_parse();
+extern int cl_expr_lineno;
+extern std::vector<std::string> currentScope;
+extern bool setExprLexerInput(const std::string &in);
+extern void cl_expr_lex_clean();
+
+/*************** Standard ytab.c continues here *********************/
+#define LE_AUTO 257
+#define LE_DOUBLE 258
+#define LE_INT 259
+#define LE_STRUCT 260
+#define LE_BREAK 261
+#define LE_ELSE 262
+#define LE_LONG 263
+#define LE_SWITCH 264
+#define LE_CASE 265
+#define LE_ENUM 266
+#define LE_REGISTER 267
+#define LE_TYPEDEF 268
+#define LE_CHAR 269
+#define LE_EXTERN 270
+#define LE_RETURN 271
+#define LE_UNION 272
+#define LE_CONST 273
+#define LE_FLOAT 274
+#define LE_SHORT 275
+#define LE_UNSIGNED 276
+#define LE_CONTINUE 277
+#define LE_FOR 278
+#define LE_SIGNED 279
+#define LE_VOID 280
+#define LE_DEFAULT 281
+#define LE_GOTO 282
+#define LE_SIZEOF 283
+#define LE_VOLATILE 284
+#define LE_DO 285
+#define LE_IF 286
+#define LE_STATIC 287
+#define LE_WHILE 288
+#define LE_NEW 289
+#define LE_DELETE 290
+#define LE_THIS 291
+#define LE_OPERATOR 292
+#define LE_CLASS 293
+#define LE_PUBLIC 294
+#define LE_PROTECTED 295
+#define LE_PRIVATE 296
+#define LE_VIRTUAL 297
+#define LE_FRIEND 298
+#define LE_INLINE 299
+#define LE_OVERLOAD 300
+#define LE_TEMPLATE 301
+#define LE_TYPENAME 302
+#define LE_THROW 303
+#define LE_CATCH 304
+#define LE_IDENTIFIER 305
+#define LE_STRINGliteral 306
+#define LE_FLOATINGconstant 307
+#define LE_INTEGERconstant 308
+#define LE_CHARACTERconstant 309
+#define LE_OCTALconstant 310
+#define LE_HEXconstant 311
+#define LE_POUNDPOUND 312
+#define LE_CComment 313
+#define LE_CPPComment 314
+#define LE_NAMESPACE 315
+#define LE_USING 316
+#define LE_TYPEDEFname 317
+#define LE_ARROW 318
+#define LE_ICR 319
+#define LE_DECR 320
+#define LE_LS 321
+#define LE_RS 322
+#define LE_LE 323
+#define LE_GE 324
+#define LE_EQ 325
+#define LE_NE 326
+#define LE_ANDAND 327
+#define LE_OROR 328
+#define LE_ELLIPSIS 329
+#define LE_CLCL 330
+#define LE_DOTstar 331
+#define LE_ARROWstar 332
+#define LE_MULTassign 333
+#define LE_DIVassign 334
+#define LE_MODassign 335
+#define LE_PLUSassign 336
+#define LE_MINUSassign 337
+#define LE_LSassign 338
+#define LE_RSassign 339
+#define LE_ANDassign 340
+#define LE_ERassign 341
+#define LE_ORassign 342
+#define LE_MACRO 343
+#define LE_DYNAMIC_CAST 344
+#define LE_STATIC_CAST 345
+#define LE_CONST_CAST 346
+#define LE_REINTERPRET_CAST 347
+#define YYERRCODE 256
+short cl_expr_lhs[] = { -1,
+ 0, 0, 3, 1, 1, 4, 4, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 6, 6, 6, 7,
+ 7, 7, 2, 2, 2, 2, 2, 2, 2, 13,
+ 14, 14, 15, 15, 11, 11, 11, 11, 17, 17,
+ 18, 18, 9, 10, 10, 10, 12, 12, 8, 8,
+ 19, 16, 16,
+};
+short cl_expr_len[] = { 2,
+ 0, 2, 0, 2, 1, 0, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 1, 3, 4,
+ 4, 7, 6, 2, 3, 3, 6, 5, 8, 2,
+ 0, 3, 0, 1, 1, 1, 1, 1, 0, 1,
+ 0, 2, 2, 0, 1, 1, 6, 3, 0, 2,
+ 2, 0, 1,
+};
+short cl_expr_defred[] = { 1,
+ 0, 5, 2, 0, 45, 46, 4, 0, 24, 35,
+ 36, 37, 38, 0, 0, 0, 0, 49, 0, 0,
+ 25, 0, 26, 0, 0, 50, 49, 0, 0, 41,
+ 53, 30, 51, 0, 0, 0, 41, 0, 48, 0,
+ 0, 7, 49, 0, 18, 34, 28, 0, 0, 0,
+ 42, 40, 43, 27, 0, 0, 32, 23, 0, 41,
+ 13, 8, 11, 9, 12, 10, 15, 14, 16, 0,
+ 41, 19, 29, 47, 0, 20, 21, 0, 41, 22,
+};
+short cl_expr_dgoto[] = { 1,
+ 3, 7, 4, 43, 71, 44, 45, 19, 39, 8,
+ 17, 20, 23, 35, 47, 32, 53, 40, 26,
+};
+short cl_expr_sindex[] = { 0,
+ -240, 0, 0, 15, 0, 0, 0, -17, 0, 0,
+ 0, 0, 0, -5, -247, -287, -23, 0, -251, 21,
+ 0, -35, 0, -91, 17, 0, 0, 34, -58, 0,
+ 0, 0, 0, -195, 42, 22, 0, -195, 0, -11,
+ -226, 0, 0, -24, 0, 0, 0, 43, -226, -22,
+ 0, 0, 0, 0, -178, -195, 0, 0, 49, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, -57,
+ 0, 0, 0, 0, -195, 0, 0, 8, 0, 0,
+};
+short cl_expr_rindex[] = { 0,
+ -25, 0, 0, -21, 0, 0, 0, -213, 0, 0,
+ 0, 0, 0, -213, 0, 0, 0, 0, 0, 0,
+ 0, 1, 0, 5, 9, 0, 0, 0, -12, 0,
+ 0, 0, 0, -38, 13, 0, 0, -38, 0, -34,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, -170, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, -30,
+ 0, 0, 0, 0, -38, 0, 0, 0, 0, 0,
+};
+short cl_expr_gindex[] = { 0,
+ 0, 0, 0, 0, 0, -27, 38, -4, 16, 0,
+ 0, 39, 20, 0, 0, 0, 0, 0, 0,
+};
+#define YYTABLESIZE 360
+short cl_expr_table[] = { 31,
+ 52, 38, 75, 16, 52, 17, 39, 41, 31, 39,
+ 50, 41, 33, 41, 3, 2, 3, 24, 44, 56,
+ 44, 56, 14, 17, 15, 41, 52, 39, 41, 41,
+ 51, 41, 3, 3, 18, 25, 27, 57, 55, 60,
+ 52, 52, 52, 21, 52, 41, 52, 78, 31, 41,
+ 31, 56, 49, 29, 33, 31, 28, 22, 52, 52,
+ 54, 30, 52, 52, 52, 36, 31, 31, 59, 79,
+ 33, 33, 6, 5, 37, 74, 34, 42, 22, 61,
+ 62, 46, 58, 48, 63, 76, 77, 6, 6, 73,
+ 64, 49, 6, 72, 80, 65, 66, 67, 6, 0,
+ 68, 69, 0, 6, 6, 6, 0, 0, 6, 6,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 70, 0, 0, 0,
+ 0, 0, 0, 0, 6, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 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, 6,
+ 6, 0, 0, 0, 6, 0, 0, 0, 0, 0,
+ 6, 0, 0, 0, 0, 6, 6, 6, 33, 0,
+ 6, 6, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 52, 0, 0, 0,
+ 52, 0, 0, 0, 31, 3, 6, 0, 33, 44,
+ 39, 33, 33, 9, 0, 0, 0, 0, 0, 3,
+ 0, 0, 0, 44, 0, 0, 0, 0, 0, 0,
+ 0, 52, 0, 0, 0, 52, 0, 0, 0, 31,
+ 0, 0, 0, 33, 0, 52, 0, 0, 0, 52,
+ 0, 0, 0, 31, 0, 0, 0, 33, 3, 3,
+ 3, 3, 44, 44, 44, 44, 10, 11, 12, 13,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 52, 52, 52, 52, 52, 52,
+ 52, 52, 31, 31, 31, 31, 33, 33, 33, 33,
+};
+short cl_expr_check[] = { 91,
+ 0, 60, 60, 8, 0, 44, 41, 38, 0, 44,
+ 38, 42, 0, 44, 40, 256, 42, 305, 40, 44,
+ 42, 44, 40, 62, 42, 38, 38, 62, 41, 42,
+ 42, 62, 58, 59, 40, 16, 60, 62, 43, 62,
+ 40, 41, 42, 291, 40, 30, 42, 75, 40, 62,
+ 42, 44, 37, 305, 42, 91, 18, 305, 58, 59,
+ 41, 41, 58, 59, 60, 27, 58, 59, 49, 62,
+ 58, 59, 58, 59, 41, 60, 60, 273, 305, 258,
+ 259, 40, 40, 62, 263, 70, 71, 258, 259, 41,
+ 269, 305, 263, 56, 79, 274, 275, 276, 269, -1,
+ 279, 280, -1, 274, 275, 276, -1, -1, 279, 280,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 305, -1, -1, -1,
+ -1, -1, -1, -1, 305, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 258,
+ 259, -1, -1, -1, 263, -1, -1, -1, -1, -1,
+ 269, -1, -1, -1, -1, 274, 275, 276, 330, -1,
+ 279, 280, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 256, -1, -1, -1,
+ 256, -1, -1, -1, 256, 291, 305, -1, 256, 291,
+ 305, 330, 330, 291, -1, -1, -1, -1, -1, 305,
+ -1, -1, -1, 305, -1, -1, -1, -1, -1, -1,
+ -1, 291, -1, -1, -1, 291, -1, -1, -1, 291,
+ -1, -1, -1, 291, -1, 305, -1, -1, -1, 305,
+ -1, -1, -1, 305, -1, -1, -1, 305, 344, 345,
+ 346, 347, 344, 345, 346, 347, 344, 345, 346, 347,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 344, 345, 346, 347, 344, 345,
+ 346, 347, 344, 345, 346, 347, 344, 345, 346, 347,
+};
+#define YYFINAL 1
+#ifndef YYDEBUG
+#define YYDEBUG 1
+#endif
+#define YYMAXTOKEN 347
+#if YYDEBUG
+char *cl_expr_name[] = {
+"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,"'&'",0,"'('","')'","'*'",0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,"':'","';'",
+"'<'",0,"'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'['",0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,"LE_AUTO","LE_DOUBLE","LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE","LE_LONG",
+"LE_SWITCH","LE_CASE","LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR",
+"LE_EXTERN","LE_RETURN","LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT",
+"LE_UNSIGNED","LE_CONTINUE","LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT",
+"LE_GOTO","LE_SIZEOF","LE_VOLATILE","LE_DO","LE_IF","LE_STATIC","LE_WHILE",
+"LE_NEW","LE_DELETE","LE_THIS","LE_OPERATOR","LE_CLASS","LE_PUBLIC",
+"LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL","LE_FRIEND","LE_INLINE","LE_OVERLOAD",
+"LE_TEMPLATE","LE_TYPENAME","LE_THROW","LE_CATCH","LE_IDENTIFIER",
+"LE_STRINGliteral","LE_FLOATINGconstant","LE_INTEGERconstant",
+"LE_CHARACTERconstant","LE_OCTALconstant","LE_HEXconstant","LE_POUNDPOUND",
+"LE_CComment","LE_CPPComment","LE_NAMESPACE","LE_USING","LE_TYPEDEFname",
+"LE_ARROW","LE_ICR","LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE","LE_EQ","LE_NE",
+"LE_ANDAND","LE_OROR","LE_ELLIPSIS","LE_CLCL","LE_DOTstar","LE_ARROWstar",
+"LE_MULTassign","LE_DIVassign","LE_MODassign","LE_PLUSassign","LE_MINUSassign",
+"LE_LSassign","LE_RSassign","LE_ANDassign","LE_ERassign","LE_ORassign",
+"LE_MACRO","LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST",
+"LE_REINTERPRET_CAST",
+};
+char *cl_expr_rule[] = {
+"$accept : translation_unit",
+"translation_unit :",
+"translation_unit : translation_unit primary_expr",
+"$$1 :",
+"primary_expr : $$1 simple_expr",
+"primary_expr : error",
+"const_spec :",
+"const_spec : LE_CONST",
+"basic_type_name : LE_INT",
+"basic_type_name : LE_CHAR",
+"basic_type_name : LE_SHORT",
+"basic_type_name : LE_LONG",
+"basic_type_name : LE_FLOAT",
+"basic_type_name : LE_DOUBLE",
+"basic_type_name : LE_SIGNED",
+"basic_type_name : LE_UNSIGNED",
+"basic_type_name : LE_VOID",
+"parameter_list :",
+"parameter_list : template_parameter",
+"parameter_list : parameter_list ',' template_parameter",
+"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp",
+"template_parameter : const_spec nested_scope_specifier basic_type_name special_star_amp",
+"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>' special_star_amp",
+"simple_expr : stmnt_starter special_cast '<' cast_type '>' '('",
+"simple_expr : stmnt_starter LE_THIS",
+"simple_expr : stmnt_starter '*' LE_THIS",
+"simple_expr : stmnt_starter '*' identifier_name",
+"simple_expr : stmnt_starter '(' cast_type ')' special_star_amp identifier_name",
+"simple_expr : stmnt_starter nested_scope_specifier identifier_name optional_template_init_list optinal_postifx",
+"simple_expr : stmnt_starter '(' '(' cast_type ')' special_star_amp identifier_name ')'",
+"identifier_name : LE_IDENTIFIER array_brackets",
+"optional_template_init_list :",
+"optional_template_init_list : '<' parameter_list '>'",
+"optinal_postifx :",
+"optinal_postifx : '('",
+"special_cast : LE_DYNAMIC_CAST",
+"special_cast : LE_STATIC_CAST",
+"special_cast : LE_CONST_CAST",
+"special_cast : LE_REINTERPRET_CAST",
+"amp_item :",
+"amp_item : '&'",
+"star_list :",
+"star_list : star_list '*'",
+"special_star_amp : star_list amp_item",
+"stmnt_starter :",
+"stmnt_starter : ';'",
+"stmnt_starter : ':'",
+"cast_type : nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>' special_star_amp",
+"cast_type : nested_scope_specifier LE_IDENTIFIER special_star_amp",
+"nested_scope_specifier :",
+"nested_scope_specifier : nested_scope_specifier scope_specifier",
+"scope_specifier : LE_IDENTIFIER LE_CLCL",
+"array_brackets :",
+"array_brackets : '['",
+};
+#endif
+#ifndef YYSTYPE
+typedef int YYSTYPE;
+#endif
+#ifdef YYSTACKSIZE
+#undef YYMAXDEPTH
+#define YYMAXDEPTH YYSTACKSIZE
+#else
+#ifdef YYMAXDEPTH
+#define YYSTACKSIZE YYMAXDEPTH
+#else
+#define YYSTACKSIZE 500
+#define YYMAXDEPTH 500
+#endif
+#endif
+int yydebug;
+int yynerrs;
+int yyerrflag;
+int yychar;
+short *yyssp;
+YYSTYPE *yyvsp;
+YYSTYPE yyval;
+YYSTYPE yylval;
+short yyss[YYSTACKSIZE];
+YYSTYPE yyvs[YYSTACKSIZE];
+#define yystacksize YYSTACKSIZE
+void yyerror(char *s) {}
+
+void expr_consumBracketsContent(char openBrace)
+{
+ char closeBrace;
+
+ switch(openBrace) {
+ case '(': closeBrace = ')'; break;
+ case '[': closeBrace = ']'; break;
+ case '<': closeBrace = '>'; break;
+ case '{': closeBrace = '}'; break;
+ default:
+ openBrace = '(';
+ closeBrace = ')';
+ break;
+ }
+
+ int depth = 1;
+ while(depth > 0)
+ {
+ int ch = cl_expr_lex();
+ if(ch == 0){
+ break;
+ }
+
+ if(ch == closeBrace)
+ {
+ depth--;
+ continue;
+ }
+ else if(ch == openBrace)
+ {
+ depth ++ ;
+ continue;
+ }
+ }
+}
+
+void expr_FuncArgList()
+{
+ int depth = 1;
+ while(depth > 0)
+ {
+ int ch = cl_expr_lex();
+ //printf("ch=%d\n", ch);
+ //fflush(stdout);
+ if(ch ==0){
+ break;
+ }
+
+ if(ch == ')')
+ {
+ depth--;
+ continue;
+ }
+ else if(ch == '(')
+ {
+ depth ++ ;
+ continue;
+ }
+ }
+}
+
+void expr_consumeTemplateDecl()
+{
+ int depth = 1;
+ while(depth > 0)
+ {
+ int ch = cl_expr_lex();
+ //printf("ch=%d\n", ch);
+ fflush(stdout);
+ if(ch ==0){
+ break;
+ }
+
+ if(ch == '>')
+ {
+ depth--;
+ continue;
+ }
+ else if(ch == '<')
+ {
+ depth ++ ;
+ continue;
+ }
+ }
+}
+
+void expr_syncParser(){
+ //dont do anything, a hook to allow us to implement some
+ //nice error recovery if needed
+}
+
+// return the scope name at the end of the input string
+ExpressionResult &parse_expression(const std::string &in)
+{
+ result.Reset();
+ //provide the lexer with new input
+ if( !setExprLexerInput(in) ){
+ return result;
+ }
+
+ //printf("parsing...\n");
+ cl_expr_parse();
+ //do the lexer cleanup
+ cl_expr_lex_clean();
+
+ return result;
+}
+#define YYABORT goto yyabort
+#define YYREJECT goto yyabort
+#define YYACCEPT goto yyaccept
+#define YYERROR goto yyerrlab
+int
+yyparse()
+{
+ register int yym, yyn, yystate;
+#if YYDEBUG
+ register char *yys;
+
+ extern char *getenv(const char *name);
+
+ if (yys = getenv("YYDEBUG"))
+ {
+ yyn = *yys;
+ if (yyn >= '0' && yyn <= '9')
+ yydebug = yyn - '0';
+ }
+
+#endif
+
+ yynerrs = 0;
+ yyerrflag = 0;
+ yychar = (-1);
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+ *yyssp = yystate = 0;
+
+yyloop:
+ if (yyn = yydefred[yystate]) goto yyreduce;
+ if (yychar < 0)
+ {
+ if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ }
+ if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, shifting to state %d\n",
+ YYPREFIX, yystate, yytable[yyn]);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ yychar = (-1);
+ if (yyerrflag > 0) --yyerrflag;
+ goto yyloop;
+ }
+ if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ {
+ yyn = yytable[yyn];
+ goto yyreduce;
+ }
+ if (yyerrflag) goto yyinrecovery;
+#ifdef lint
+ goto yynewerror;
+#endif
+yynewerror:
+ yyerror("syntax error");
+#ifdef lint
+ goto yyerrlab;
+#endif
+yyerrlab:
+ ++yynerrs;
+yyinrecovery:
+ if (yyerrflag < 3)
+ {
+ yyerrflag = 3;
+ for (;;)
+ {
+ if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, error recovery shifting\
+ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ goto yyloop;
+ }
+ else
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: error recovery discarding state %d\n",
+ YYPREFIX, *yyssp);
+#endif
+ if (yyssp <= yyss) goto yyabort;
+ --yyssp;
+ --yyvsp;
+ }
+ }
+ }
+ else
+ {
+ if (yychar == 0) goto yyabort;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ yychar = (-1);
+ goto yyloop;
+ }
+yyreduce:
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, reducing by rule %d (%s)\n",
+ YYPREFIX, yystate, yyn, yyrule[yyn]);
+#endif
+ yym = yylen[yyn];
+ yyval = yyvsp[1-yym];
+ switch (yyn)
+ {
+case 3:
+{result.Reset();}
+break;
+case 5:
+{
+ yyclearin; /*clear lookahead token*/
+ yyerrok;
+ /*fprintf(stderr, "CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_expr_text, cl_expr_lineno);*/
+ /*fflush(stderr);*/
+ expr_syncParser();
+ }
+break;
+case 6:
+{yyval = ""; }
+break;
+case 7:
+{ yyval = yyvsp[0]; }
+break;
+case 8:
+{ yyval = yyvsp[0]; }
+break;
+case 9:
+{ yyval = yyvsp[0]; }
+break;
+case 10:
+{ yyval = yyvsp[0]; }
+break;
+case 11:
+{ yyval = yyvsp[0]; }
+break;
+case 12:
+{ yyval = yyvsp[0]; }
+break;
+case 13:
+{ yyval = yyvsp[0]; }
+break;
+case 14:
+{ yyval = yyvsp[0]; }
+break;
+case 15:
+{ yyval = yyvsp[0]; }
+break;
+case 16:
+{ yyval = yyvsp[0]; }
+break;
+case 17:
+{yyval = "";}
+break;
+case 18:
+{yyval = yyvsp[0];}
+break;
+case 19:
+{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];}
+break;
+case 20:
+{yyval = yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] +yyvsp[0];}
+break;
+case 21:
+{yyval = yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] +yyvsp[0];}
+break;
+case 22:
+{yyval = yyvsp[-6] + " " + yyvsp[-5] + " " + yyvsp[-4] +yyvsp[-3] + yyvsp[-2] + yyvsp[-1];}
+break;
+case 23:
+{
+ expr_FuncArgList();
+ yyval = yyvsp[-2];
+ result.m_isaType = true;
+ result.m_name = yyvsp[-2];
+ result.m_isFunc = false;
+ printf("Rule 1\n");
+ }
+break;
+case 24:
+{
+ yyval = yyvsp[0];
+ result.m_isaType = false;
+ result.m_name = yyval;
+ result.m_isFunc = false;
+ result.m_isThis = true;
+ result.m_isPtr = true;
+ printf("Rule 2\n");
+ }
+break;
+case 25:
+{
+ yyval = yyvsp[0];
+ result.m_isaType = false;
+ result.m_name = yyval;
+ result.m_isFunc = false;
+ result.m_isThis = true;
+ printf("Rule 3\n");
+ }
+break;
+case 26:
+{
+ yyval = yyvsp[0];
+ result.m_isaType = false;
+ result.m_name = yyval;
+ result.m_isFunc = false;
+ result.m_isThis = false;
+ result.m_isPtr = false;
+ printf("Rule 4\n");
+ }
+break;
+case 27:
+{
+ yyval = yyvsp[-3];
+ result.m_isaType = true;
+ result.m_name = yyval;
+ result.m_isFunc = false;
+ result.m_isThis = false;
+ printf("Rule 5\n");
+ }
+break;
+case 28:
+{
+ result.m_isaType = false;
+ result.m_name = yyvsp[-2];
+ result.m_isThis = false;
+ yyvsp[-3].erase(yyvsp[-3].find_last_not_of(":")+1);
+ result.m_scope = yyvsp[-3];
+ result.m_isTemplate = yyvsp[-1].empty() ? false : true;
+ result.m_templateInitList = yyvsp[-1];
+ printf("Rule 6\n");
+ }
+break;
+case 29:
+{
+ yyval = yyvsp[-4];
+ result.m_isaType = true;
+ result.m_name = yyval;
+ result.m_isFunc = false;
+ result.m_isThis = false;
+ printf("Rule 7\n");
+ }
+break;
+case 30:
+{yyval = yyvsp[-1];}
+break;
+case 31:
+{yyval = "";}
+break;
+case 32:
+{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];}
+break;
+case 33:
+{yyval = "";}
+break;
+case 34:
+{
+ yyval = yyvsp[0];
+ expr_FuncArgList();
+ result.m_isFunc = true;
+ }
+break;
+case 35:
+{yyval = yyvsp[0];}
+break;
+case 36:
+{yyval = yyvsp[0];}
+break;
+case 37:
+{yyval = yyvsp[0];}
+break;
+case 38:
+{yyval = yyvsp[0];}
+break;
+case 39:
+{yyval = ""; }
+break;
+case 40:
+{ yyval = yyvsp[0]; }
+break;
+case 41:
+{yyval = ""; }
+break;
+case 42:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 43:
+{ yyval = yyvsp[-1] + yyvsp[0]; }
+break;
+case 44:
+{yyval = "";}
+break;
+case 45:
+{ yyval = ";";}
+break;
+case 46:
+{ yyval = ":";}
+break;
+case 47:
+{
+ yyval = yyvsp[-5] + yyvsp[-4];
+ yyvsp[-5].erase(yyvsp[-5].find_last_not_of(":")+1);
+ result.m_scope = yyvsp[-5];
+ result.m_name = yyvsp[-4];
+ result.m_isPtr = (yyvsp[0].find("*") != (size_t)-1);;
+ result.m_isTemplate = true;
+ result.m_templateInitList = yyvsp[-3] + yyvsp[-2] + yyvsp[-1];
+ }
+break;
+case 48:
+{
+ yyval = yyvsp[-2] + yyvsp[-1];
+ yyvsp[-2].erase(yyvsp[-2].find_last_not_of(":")+1);
+ result.m_scope = yyvsp[-2];
+ result.m_name = yyvsp[-1];
+ result.m_isPtr = (yyvsp[0].find("*") != (size_t)-1);;
+ }
+break;
+case 49:
+{yyval = "";}
+break;
+case 50:
+{ yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 51:
+{yyval = yyvsp[-1]+ yyvsp[0];}
+break;
+case 52:
+{ yyval = ""; }
+break;
+case 53:
+{ expr_consumBracketsContent('['); yyval = "[]";}
+break;
+ }
+ yyssp -= yym;
+ yystate = *yyssp;
+ yyvsp -= yym;
+ yym = yylhs[yyn];
+ if (yystate == 0 && yym == 0)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state 0 to\
+ state %d\n", YYPREFIX, YYFINAL);
+#endif
+ yystate = YYFINAL;
+ *++yyssp = YYFINAL;
+ *++yyvsp = yyval;
+ if (yychar < 0)
+ {
+ if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, YYFINAL, yychar, yys);
+ }
+#endif
+ }
+ if (yychar == 0) goto yyaccept;
+ goto yyloop;
+ }
+ if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
+ yystate = yytable[yyn];
+ else
+ yystate = yydgoto[yym];
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state %d \
+to state %d\n", YYPREFIX, *yyssp, yystate);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate;
+ *++yyvsp = yyval;
+ goto yyloop;
+yyoverflow:
+ yyerror("yacc stack overflow");
+yyabort:
+ return (1);
+yyaccept:
+ return (0);
+}
diff --git a/plugins/symbol-db/cxxparser/expression-parser.h b/plugins/symbol-db/cxxparser/expression-parser.h
new file mode 100644
index 0000000..347d9d8
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/expression-parser.h
@@ -0,0 +1,35 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ *
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it>
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+
+#ifndef _EXPRESSION_PARSER_H_
+#define _EXPRESSION_PARSER_H_
+
+
+/**
+ * @warning This function, like the others in expression-parser.cpp,
+ * is not thread safe because it uses static variables to return results.
+ */
+ExpressionResult &parse_expression(const std::string &in);
+
+
+
+
+#endif
diff --git a/plugins/symbol-db/cxxparser/expression-result.cpp b/plugins/symbol-db/cxxparser/expression-result.cpp
new file mode 100644
index 0000000..fea2272
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/expression-result.cpp
@@ -0,0 +1,64 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#include "expression-result.h"
+
+#define BOOL_TO_STR(b) b ? "true" : "false"
+
+ExpressionResult::ExpressionResult()
+{
+ Reset();
+}
+
+ExpressionResult::~ExpressionResult()
+{
+}
+
+void ExpressionResult::Print()
+{
+ printf("%s\n", ToString().c_str());
+}
+
+std::string ExpressionResult::ToString() const
+{
+ char tmp[256];
+ sprintf(tmp, "{m_name:%s, m_isFunc:%s, m_isTemplate:%s, m_isThis:%s, m_isaType:%s, m_isPtr:%s, m_scope:%s, m_templateInitList:%s}",
+ m_name.c_str(),
+ BOOL_TO_STR(m_isFunc),
+ BOOL_TO_STR(m_isTemplate),
+ BOOL_TO_STR(m_isThis),
+ BOOL_TO_STR(m_isaType),
+ BOOL_TO_STR(m_isPtr),
+ m_scope.c_str(),
+ m_templateInitList.c_str());
+ return tmp;
+}
+
+void ExpressionResult::Reset()
+{
+ m_isFunc = false;
+ m_name = "";
+ m_isThis = false;
+ m_isaType = false;
+ m_isPtr = false;
+ m_scope = "";
+ m_isTemplate = false;
+ m_templateInitList = "";
+}
diff --git a/plugins/symbol-db/cxxparser/expression-result.h b/plugins/symbol-db/cxxparser/expression-result.h
new file mode 100644
index 0000000..9e799fc
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/expression-result.h
@@ -0,0 +1,47 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#ifndef EXPRESSION_RESULT_H
+#define EXPRESSION_RESULT_H
+
+#include <string>
+#include <stdio.h>
+
+class ExpressionResult
+{
+public:
+
+ bool m_isFunc;
+ std::string m_name;
+ bool m_isThis;
+ bool m_isaType;
+ bool m_isPtr;
+ std::string m_scope;
+ bool m_isTemplate;
+ std::string m_templateInitList;
+
+public:
+ ExpressionResult();
+ virtual ~ExpressionResult();
+ void Reset();
+ void Print();
+ std::string ToString() const;
+};
+#endif //EXPRESSION_RESULT_H
diff --git a/plugins/symbol-db/cxxparser/flex-lexer-klass-tab.h b/plugins/symbol-db/cxxparser/flex-lexer-klass-tab.h
new file mode 100644
index 0000000..0da4bf7
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/flex-lexer-klass-tab.h
@@ -0,0 +1,134 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//
+// copyright : (C) 2008 by Eran Ifrah
+// file name : y.tab.h
+//
+// -------------------------------------------------------------------------
+// A
+// _____ _ _ _ _
+// / __ \ | | | | (_) |
+// | / \/ ___ __| | ___| | _| |_ ___
+// | | / _ \ / _ |/ _ \ | | | __/ _ )
+// | \__/\ (_) | (_| | __/ |___| | || __/
+// \____/\___/ \__,_|\___\_____/_|\__\___|
+//
+// F i l e
+//
+// 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 2 of the License, or
+// (at your option) any later version.
+//
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+ /*#ifdef __cplusplus*/
+namespace flex
+{
+/*#endif*/
+
+#define AUTO 257
+#define lexDOUBLE 258
+#define lexINT 259
+#define lexSTRUCT 260
+#define BREAK 261
+#define ELSE 262
+#define lexLONG 263
+#define SWITCH 264
+#define CASE 265
+#define lexENUM 266
+#define REGISTER 267
+#define TYPEDEF 268
+#define lexCHAR 269
+#define EXTERN 270
+#define RETURN 271
+#define UNION 272
+#define lexCONST 273
+#define lexFLOAT 274
+#define lexSHORT 275
+#define UNSIGNED 276
+#define CONTINUE 277
+#define FOR 278
+#define SIGNED 279
+#define lexVOID 280
+#define lexDEFAULT 281
+#define GOTO 282
+#define SIZEOF 283
+#define VOLATILE 284
+#define DO 285
+#define IF 286
+#define STATIC 287
+#define WHILE 288
+#define NEW 289
+#define lexDELETE 290
+#define lexTHIS 291
+#define lexOPERATOR 292
+#define lexCLASS 293
+#define lexNAMESPACE 294
+#define lexPUBLIC 295
+#define lexPROTECTED 296
+#define lexPRIVATE 297
+#define VIRTUAL 298
+#define FRIEND 299
+#define INLINE 300
+#define OVERLOAD 301
+#define IDENTIFIER 302
+#define STRINGliteral 303
+#define FLOATINGconstant 304
+#define INTEGERconstant 305
+#define CHARACTERconstant 306
+#define OCTALconstant 307
+#define HEXconstant 308
+#define TYPEDEFname 309
+#define lexARROW 310
+#define ICR 311
+#define DECR 312
+#define LS 313
+#define RS 314
+#define LE 315
+#define GE 316
+#define EQ 317
+#define NE 318
+#define ANDAND 319
+#define OROR 320
+#define ELLIPSIS 321
+#define CLCL 322
+#define DOTstar 323
+#define ARROWstar 324
+#define MULTassign 325
+#define DIVassign 326
+#define MODassign 327
+#define PLUSassign 328
+#define MINUSassign 329
+#define LSassign 330
+#define RSassign 331
+#define ANDassign 332
+#define ERassign 333
+#define ORassign 334
+#define CComment 335
+#define CPPComment 336
+#define POUNDPOUND 337
+
+//#ifdef __cplusplus
+} // namespace flex
+//#endif
diff --git a/plugins/symbol-db/cxxparser/flex-lexer-klass.cpp b/plugins/symbol-db/cxxparser/flex-lexer-klass.cpp
new file mode 100644
index 0000000..575c195
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/flex-lexer-klass.cpp
@@ -0,0 +1,2583 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//
+// copyright : (C) 2008 by Eran Ifrah
+// file name : lex.yy.cpp
+//
+// -------------------------------------------------------------------------
+// A
+// _____ _ _ _ _
+// / __ \ | | | | (_) |
+// | / \/ ___ __| | ___| | _| |_ ___
+// | | / _ \ / _ |/ _ \ | | | __/ _ )
+// | \__/\ (_) | (_| | __/ |___| | || __/
+// \____/\___/ \__,_|\___\_____/_|\__\___|
+//
+// F i l e
+//
+// 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 2 of the License, or
+// (at your option) any later version.
+//
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+ /* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header: /CVS/wxUS/wxXtudio/Apps/USClient/lex.yy.cpp,v 1.3 2005/12/13 07:53:23 eran Exp $
+ */
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+#ifdef __cplusplus
+#include <stdlib.h>
+#include <unistd.h>
+#include <iostream>
+
+#include "flex-lexer-klass.h"
+#endif
+
+namespace flex
+{
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#ifdef __cplusplus
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ *yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+{
+ std::istream* yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+
+};
+
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define YY_USES_REJECT
+typedef unsigned char YY_CHAR;
+#define yytext_ptr yytext
+#define YY_INTERACTIVE
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 121
+#define YY_END_OF_BUFFER 122
+static yyconst short int yy_acclist[493] =
+ { 0,
+ 122, 120, 121, 3, 120, 121, 5, 121, 4, 120,
+ 121, 84, 120, 121, 120, 121, 72, 120, 121, 86,
+ 120, 121, 79, 120, 121, 120, 121, 69, 120, 121,
+ 70, 120, 121, 80, 120, 121, 81, 120, 121, 71,
+ 120, 121, 82, 120, 121, 78, 120, 121, 85, 120,
+ 121, 64, 120, 121, 63, 120, 121, 92, 120, 121,
+ 93, 120, 121, 87, 120, 121, 94, 120, 121, 88,
+ 120, 121, 91, 120, 121, 62, 120, 121, 62, 120,
+ 121, 76, 120, 121, 77, 120, 121, 89, 120, 121,
+ 62, 120, 121, 62, 120, 121, 62, 120, 121, 62,
+
+ 120, 121, 62, 120, 121, 62, 120, 121, 62, 120,
+ 121, 62, 120, 121, 62, 120, 121, 62, 120, 121,
+ 62, 120, 121, 62, 120, 121, 62, 120, 121, 62,
+ 120, 121, 62, 120, 121, 62, 120, 121, 62, 120,
+ 121, 62, 120, 121, 74, 120, 121, 90, 120, 121,
+ 75, 120, 121, 83, 120, 121, 3, 5, 4, 106,
+ 68, 73, 111, 107, 116, 109, 99, 112, 100, 113,
+ 97, 95, 66, 1, 2, 110, 66, 64, 64, 64,
+ 63, 63, 63, 96, 101, 103, 105, 104, 102, 62,
+ 117, 62, 62, 62, 62, 62, 62, 62, 15, 62,
+
+ 62, 62, 62, 62, 62, 62, 62, 62, 26, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 118, 108, 67, 98, 119, 66, 66, 64, 65, 63,
+ 114, 115, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62, 24, 62,
+ 62, 62, 62, 62, 62, 62, 30, 62, 62, 62,
+ 62, 54, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 66, 65, 65, 6,
+
+ 62, 62, 8, 62, 9, 62, 62, 62, 62, 62,
+ 62, 62, 62, 17, 62, 18, 62, 62, 20, 62,
+ 62, 62, 62, 62, 25, 62, 62, 62, 62, 62,
+ 31, 62, 32, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 62, 62, 62, 62, 62, 60,
+ 62, 62, 62, 62, 62, 62, 46, 62, 62, 62,
+ 65, 7, 62, 49, 62, 10, 62, 62, 62, 62,
+ 62, 62, 19, 62, 21, 62, 62, 23, 62, 62,
+ 27, 62, 62, 62, 62, 62, 62, 62, 62, 62,
+ 62, 62, 62, 62, 36, 62, 62, 62, 62, 62,
+
+ 62, 62, 43, 62, 44, 62, 62, 62, 62, 48,
+ 62, 62, 62, 13, 62, 51, 62, 16, 62, 22,
+ 62, 52, 62, 28, 62, 62, 53, 62, 62, 62,
+ 62, 33, 62, 62, 62, 59, 62, 62, 35, 62,
+ 37, 62, 38, 62, 39, 62, 40, 62, 41, 62,
+ 62, 62, 62, 62, 62, 12, 62, 14, 62, 29,
+ 62, 62, 62, 62, 58, 62, 62, 62, 42, 62,
+ 62, 61, 62, 62, 11, 62, 62, 55, 62, 56,
+ 62, 62, 34, 62, 45, 62, 47, 62, 50, 62,
+ 57, 62
+
+ } ;
+
+static yyconst short int yy_accept[365] =
+ { 0,
+ 1, 1, 1, 2, 4, 7, 9, 12, 15, 17,
+ 20, 23, 26, 28, 31, 34, 37, 40, 43, 46,
+ 49, 52, 55, 58, 61, 64, 67, 70, 73, 76,
+ 79, 82, 85, 88, 91, 94, 97, 100, 103, 106,
+ 109, 112, 115, 118, 121, 124, 127, 130, 133, 136,
+ 139, 142, 145, 148, 151, 154, 157, 158, 159, 159,
+ 160, 161, 161, 162, 162, 163, 164, 165, 166, 166,
+ 166, 167, 168, 169, 170, 171, 172, 173, 173, 174,
+ 175, 176, 177, 178, 179, 179, 179, 180, 181, 181,
+ 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+
+ 191, 191, 192, 193, 194, 195, 196, 197, 198, 199,
+ 201, 202, 203, 204, 205, 206, 207, 208, 209, 211,
+ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 223, 224, 225, 226, 227, 228, 229, 230, 231,
+ 232, 233, 233, 233, 234, 234, 234, 235, 236, 236,
+ 237, 237, 238, 239, 240, 241, 242, 243, 244, 245,
+ 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
+ 256, 257, 258, 259, 261, 262, 263, 264, 265, 266,
+ 267, 269, 270, 271, 272, 274, 275, 276, 277, 278,
+ 279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
+
+ 289, 290, 291, 292, 293, 294, 295, 296, 297, 297,
+ 297, 297, 297, 297, 298, 299, 300, 302, 303, 305,
+ 307, 308, 309, 310, 311, 312, 313, 314, 316, 318,
+ 319, 321, 322, 323, 324, 325, 327, 328, 329, 330,
+ 331, 333, 335, 336, 337, 338, 339, 340, 341, 342,
+ 343, 344, 345, 346, 347, 348, 349, 350, 352, 353,
+ 354, 355, 356, 357, 359, 360, 361, 361, 361, 361,
+ 361, 362, 364, 366, 368, 369, 370, 371, 372, 373,
+ 375, 377, 378, 380, 381, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 397, 398,
+
+ 399, 400, 401, 402, 403, 405, 407, 408, 409, 410,
+ 412, 413, 414, 416, 418, 420, 422, 424, 426, 427,
+ 429, 430, 431, 432, 434, 435, 436, 438, 439, 441,
+ 443, 445, 447, 449, 451, 452, 453, 454, 455, 456,
+ 458, 460, 462, 463, 464, 465, 467, 468, 469, 471,
+ 472, 474, 475, 477, 478, 480, 482, 483, 485, 487,
+ 489, 491, 493, 493
+ } ;
+
+static yyconst int yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 4, 5, 6, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 7, 8, 9, 10, 1, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 23,
+ 23, 23, 23, 23, 23, 24, 24, 25, 26, 27,
+ 28, 29, 30, 1, 31, 31, 31, 31, 32, 33,
+ 34, 34, 34, 34, 34, 35, 34, 34, 34, 34,
+ 34, 34, 34, 34, 36, 34, 34, 37, 34, 34,
+ 38, 39, 40, 41, 34, 1, 42, 43, 44, 45,
+
+ 46, 47, 48, 49, 50, 34, 51, 52, 53, 54,
+ 55, 56, 34, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 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 int yy_meta[70] =
+ { 0,
+ 1, 1, 2, 1, 1, 1, 1, 1, 3, 1,
+ 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 5, 6, 1, 1, 1, 1, 1, 3,
+ 6, 6, 6, 7, 7, 7, 7, 1, 3, 1,
+ 1, 5, 5, 6, 6, 6, 5, 7, 7, 7,
+ 7, 7, 7, 8, 7, 7, 8, 7, 8, 7,
+ 8, 7, 8, 7, 7, 1, 1, 1, 1
+ } ;
+
+static yyconst short int yy_base[372] =
+ { 0,
+ 0, 0, 570, 571, 68, 571, 74, 541, 73, 558,
+ 539, 71, 527, 571, 571, 537, 67, 571, 68, 69,
+ 82, 93, 100, 539, 571, 73, 535, 76, 571, 0,
+ 77, 571, 571, 534, 501, 503, 85, 56, 105, 86,
+ 504, 60, 71, 102, 86, 49, 512, 105, 69, 503,
+ 108, 507, 571, 103, 571, 571, 169, 571, 175, 181,
+ 571, 110, 571, 128, 571, 571, 571, 571, 153, 167,
+ 571, 571, 571, 571, 571, 539, 571, 534, 171, 571,
+ 571, 571, 175, 209, 192, 229, 160, 167, 0, 236,
+ 165, 174, 571, 525, 571, 571, 571, 524, 0, 196,
+
+ 512, 571, 491, 503, 490, 505, 504, 491, 187, 484,
+ 111, 168, 486, 483, 486, 483, 489, 479, 195, 198,
+ 483, 482, 482, 472, 487, 486, 212, 488, 152, 475,
+ 199, 221, 479, 478, 471, 225, 469, 224, 475, 571,
+ 571, 264, 0, 571, 267, 0, 571, 571, 275, 571,
+ 278, 285, 571, 269, 571, 571, 571, 469, 481, 476,
+ 464, 462, 178, 235, 473, 475, 470, 470, 465, 461,
+ 458, 466, 469, 0, 464, 454, 462, 462, 454, 455,
+ 0, 458, 455, 456, 0, 444, 443, 451, 437, 438,
+ 444, 445, 434, 436, 438, 445, 431, 429, 429, 429,
+
+ 440, 439, 429, 433, 423, 436, 438, 427, 301, 332,
+ 303, 367, 289, 335, 255, 279, 0, 427, 0, 0,
+ 419, 417, 425, 414, 419, 413, 419, 0, 0, 423,
+ 0, 412, 411, 408, 412, 0, 418, 418, 403, 408,
+ 0, 0, 403, 418, 407, 405, 415, 410, 405, 396,
+ 396, 386, 398, 384, 388, 382, 380, 0, 371, 361,
+ 353, 357, 344, 0, 344, 356, 256, 0, 280, 0,
+ 571, 0, 0, 0, 347, 345, 350, 349, 348, 0,
+ 0, 339, 0, 347, 0, 341, 341, 339, 328, 324,
+ 326, 331, 313, 325, 323, 307, 308, 0, 316, 313,
+
+ 309, 293, 302, 304, 0, 0, 295, 306, 297, 0,
+ 286, 286, 299, 0, 0, 0, 0, 0, 297, 0,
+ 297, 283, 294, 0, 289, 275, 0, 287, 0, 0,
+ 0, 0, 0, 0, 283, 282, 275, 270, 271, 0,
+ 0, 0, 240, 224, 234, 0, 220, 186, 0, 120,
+ 0, 62, 0, 48, 0, 0, 43, 0, 0, 0,
+ 0, 0, 571, 414, 422, 426, 432, 438, 442, 444,
+ 446
+ } ;
+
+static yyconst short int yy_def[372] =
+ { 0,
+ 363, 1, 363, 363, 363, 363, 363, 363, 364, 363,
+ 363, 363, 365, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 366,
+ 366, 363, 363, 363, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 364, 363, 367, 363, 363, 363, 363, 365, 368,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 369, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 366, 364,
+
+ 365, 363, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 363,
+ 363, 364, 370, 363, 365, 371, 363, 363, 363, 363,
+ 363, 363, 363, 369, 363, 363, 363, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+
+ 366, 366, 366, 366, 366, 366, 366, 366, 364, 364,
+ 365, 365, 363, 363, 363, 363, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 364, 210, 365, 212,
+ 363, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 366, 366, 366, 366, 366, 366, 366, 366,
+ 366, 366, 0, 363, 363, 363, 363, 363, 363, 363,
+ 363
+ } ;
+
+static yyconst short int yy_nxt[641] =
+ { 0,
+ 4, 5, 6, 7, 7, 7, 5, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 23, 24, 25, 26, 27, 28, 29,
+ 30, 30, 30, 30, 31, 30, 30, 32, 4, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 30, 42,
+ 30, 43, 30, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 30, 30, 30, 53, 54, 55, 56, 57,
+ 58, 59, 59, 59, 57, 59, 58, 60, 60, 60,
+ 59, 63, 67, 72, 77, 100, 74, 362, 78, 101,
+ 79, 79, 79, 361, 73, 75, 76, 80, 68, 94,
+
+ 95, 109, 81, 97, 98, 127, 119, 360, 128, 82,
+ 110, 64, 83, 120, 84, 84, 85, 134, 63, 83,
+ 121, 90, 90, 90, 86, 122, 105, 87, 88, 89,
+ 140, 86, 135, 106, 91, 92, 107, 115, 86, 108,
+ 116, 125, 117, 123, 87, 86, 126, 124, 64, 142,
+ 142, 91, 88, 130, 131, 89, 111, 137, 112, 92,
+ 167, 113, 138, 132, 359, 144, 133, 114, 168, 141,
+ 57, 58, 59, 59, 59, 57, 59, 58, 59, 59,
+ 59, 59, 59, 58, 60, 60, 60, 59, 145, 145,
+ 143, 70, 79, 79, 79, 153, 79, 79, 79, 192,
+
+ 155, 153, 149, 150, 63, 150, 149, 150, 155, 150,
+ 193, 83, 169, 85, 85, 85, 149, 150, 153, 153,
+ 149, 150, 150, 86, 155, 155, 150, 170, 83, 146,
+ 84, 84, 85, 164, 64, 222, 223, 86, 165, 177,
+ 86, 179, 358, 87, 88, 151, 195, 151, 178, 180,
+ 152, 152, 152, 188, 86, 83, 181, 90, 90, 90,
+ 87, 189, 197, 196, 63, 357, 190, 86, 88, 202,
+ 91, 92, 63, 206, 203, 207, 224, 198, 356, 144,
+ 355, 86, 204, 354, 225, 209, 209, 91, 211, 211,
+ 271, 213, 144, 213, 64, 92, 214, 214, 214, 152,
+
+ 152, 152, 64, 215, 216, 70, 152, 152, 152, 63,
+ 214, 214, 214, 271, 271, 144, 353, 150, 70, 150,
+ 215, 352, 267, 267, 269, 269, 351, 350, 216, 349,
+ 271, 150, 348, 347, 346, 345, 150, 344, 343, 64,
+ 63, 70, 342, 341, 340, 339, 338, 337, 336, 335,
+ 334, 333, 332, 268, 268, 268, 214, 214, 214, 331,
+ 330, 329, 268, 268, 268, 328, 327, 150, 326, 150,
+ 64, 325, 324, 268, 268, 268, 268, 268, 268, 144,
+ 323, 150, 322, 321, 320, 319, 150, 318, 270, 270,
+ 270, 317, 316, 315, 314, 313, 312, 270, 270, 270,
+
+ 311, 310, 309, 308, 307, 70, 306, 305, 270, 270,
+ 270, 270, 270, 270, 62, 304, 62, 62, 62, 62,
+ 62, 62, 69, 303, 69, 302, 69, 69, 69, 69,
+ 99, 99, 99, 99, 62, 62, 62, 301, 300, 62,
+ 69, 69, 69, 299, 298, 69, 154, 154, 210, 210,
+ 212, 212, 297, 296, 295, 294, 293, 292, 291, 290,
+ 289, 288, 287, 286, 285, 284, 283, 282, 281, 280,
+ 279, 278, 277, 276, 275, 274, 273, 272, 266, 265,
+ 264, 263, 262, 261, 260, 259, 258, 257, 256, 255,
+ 254, 253, 252, 251, 250, 249, 248, 247, 246, 245,
+
+ 244, 243, 242, 241, 240, 239, 238, 237, 236, 235,
+ 234, 233, 232, 231, 230, 229, 228, 227, 226, 221,
+ 220, 219, 218, 217, 208, 205, 201, 200, 199, 194,
+ 191, 187, 186, 185, 184, 183, 182, 176, 175, 174,
+ 173, 172, 171, 166, 163, 162, 161, 160, 159, 158,
+ 70, 157, 156, 148, 147, 139, 136, 129, 118, 104,
+ 103, 102, 96, 93, 71, 70, 66, 65, 61, 363,
+ 3, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363
+ } ;
+
+static yyconst short int yy_chk[641] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 5,
+ 5, 5, 5, 5, 5, 7, 7, 7, 7, 7,
+ 7, 9, 12, 17, 20, 31, 19, 357, 20, 31,
+ 20, 20, 20, 354, 17, 19, 19, 21, 12, 26,
+
+ 26, 38, 21, 28, 28, 46, 42, 352, 46, 21,
+ 38, 9, 22, 42, 22, 22, 22, 49, 62, 23,
+ 43, 23, 23, 23, 22, 43, 37, 22, 22, 22,
+ 54, 23, 49, 37, 23, 23, 37, 40, 22, 37,
+ 40, 45, 40, 44, 22, 23, 45, 44, 62, 64,
+ 64, 23, 22, 48, 48, 22, 39, 51, 39, 23,
+ 111, 39, 51, 48, 350, 69, 48, 39, 111, 54,
+ 57, 57, 57, 57, 57, 57, 59, 59, 59, 59,
+ 59, 59, 60, 60, 60, 60, 60, 60, 70, 70,
+ 64, 69, 79, 79, 79, 87, 83, 83, 83, 129,
+
+ 91, 88, 79, 79, 100, 79, 83, 83, 92, 83,
+ 129, 85, 112, 85, 85, 85, 79, 79, 88, 87,
+ 83, 83, 79, 85, 91, 92, 83, 112, 84, 70,
+ 84, 84, 84, 109, 100, 163, 163, 85, 109, 119,
+ 84, 120, 348, 84, 84, 86, 131, 86, 119, 120,
+ 86, 86, 86, 127, 84, 90, 120, 90, 90, 90,
+ 84, 127, 132, 131, 267, 347, 127, 90, 84, 136,
+ 90, 90, 142, 138, 136, 138, 164, 132, 345, 145,
+ 344, 90, 136, 343, 164, 142, 142, 90, 145, 145,
+ 215, 149, 269, 149, 267, 90, 149, 149, 149, 151,
+
+ 151, 151, 142, 154, 154, 145, 152, 152, 152, 209,
+ 213, 213, 213, 216, 215, 211, 339, 152, 269, 152,
+ 154, 338, 209, 209, 211, 211, 337, 336, 154, 335,
+ 216, 152, 328, 326, 325, 323, 152, 322, 321, 209,
+ 210, 211, 319, 313, 312, 311, 309, 308, 307, 304,
+ 303, 302, 301, 210, 210, 210, 214, 214, 214, 300,
+ 299, 297, 210, 210, 210, 296, 295, 214, 294, 214,
+ 210, 293, 292, 210, 210, 210, 210, 210, 210, 212,
+ 291, 214, 290, 289, 288, 287, 214, 286, 212, 212,
+ 212, 284, 282, 279, 278, 277, 276, 212, 212, 212,
+
+ 275, 266, 265, 263, 262, 212, 261, 260, 212, 212,
+ 212, 212, 212, 212, 364, 259, 364, 364, 364, 364,
+ 364, 364, 365, 257, 365, 256, 365, 365, 365, 365,
+ 366, 366, 366, 366, 367, 367, 367, 255, 254, 367,
+ 368, 368, 368, 253, 252, 368, 369, 369, 370, 370,
+ 371, 371, 251, 250, 249, 248, 247, 246, 245, 244,
+ 243, 240, 239, 238, 237, 235, 234, 233, 232, 230,
+ 227, 226, 225, 224, 223, 222, 221, 218, 208, 207,
+ 206, 205, 204, 203, 202, 201, 200, 199, 198, 197,
+ 196, 195, 194, 193, 192, 191, 190, 189, 188, 187,
+
+ 186, 184, 183, 182, 180, 179, 178, 177, 176, 175,
+ 173, 172, 171, 170, 169, 168, 167, 166, 165, 162,
+ 161, 160, 159, 158, 139, 137, 135, 134, 133, 130,
+ 128, 126, 125, 124, 123, 122, 121, 118, 117, 116,
+ 115, 114, 113, 110, 108, 107, 106, 105, 104, 103,
+ 101, 98, 94, 78, 76, 52, 50, 47, 41, 36,
+ 35, 34, 27, 24, 16, 13, 11, 10, 8, 3,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363,
+ 363, 363, 363, 363, 363, 363, 363, 363, 363, 363
+ } ;
+
+#define REJECT \
+ { \
+ *yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
+ yy_cp = yy_full_match; /* restore poss. backed-over text */ \
+ ++yy_lp; \
+ goto find_rule; \
+ }
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+#define INITIAL 0
+
+/* Copyright (C) 1989-1991 James A. Roskind, All rights reserved.
+This lexer description was written by James A. Roskind. Copying
+of this file, as a whole, is permitted providing this notice is
+intact and applicable in all complete copies. Direct
+translations as a whole to other lexer generator input languages
+(or lexical description languages) is permitted provided that
+this notice is intact and applicable in all such copies, along
+with a disclaimer that the contents are a translation. The
+reproduction of derived files or text, such as modified versions
+of this file, or the output of scanner generators, is permitted,
+provided the resulting work includes the copyright notice
+"Portions Copyright (c) 1989, 1990 James A. Roskind". Derived
+products must also provide the notice "Portions Copyright (c)
+1989, 1990 James A. Roskind" in a manner appropriate to the
+utility, and in keeping with copyright law (e.g.: EITHER
+displayed when first invoked/executed; OR displayed continuously
+on display terminal; OR via placement in the object code in form
+readable in a printout, with or near the title of the work, or at
+the end of the file). No royalties, licenses or commissions of
+any kind are required to copy this file, its translations, or
+derivative products, when the copies are made in compliance with
+this notice. Persons or corporations that do make copies in
+compliance with this notice may charge whatever price is
+agreeable to a buyer, for such copies or derivative works. THIS
+FILE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+James A. Roskind
+Independent Consultant
+516 Latania Palm Drive
+Indialantic FL, 32903
+(407)729-4348
+jar hq ileaf com
+or ...!uunet!leafusa!jar
+
+---end of copyright notice---
+
+
+COMMENTS-
+
+My goal is to see software developers adopt my C++ grammar as a
+standard until such time as a better standard is accessible. The
+only way to get it to become a standard, is to be sure that people
+know that derivations are based on a specific work. The intent of
+releasing this Flex input file is to facilitate experimentation with
+my C++ grammar. The intent of the copyright notice is to allow
+arbitrary commercial and non-commercial use of this file, as long as
+reference is given to my standardization effort. Without reference
+to a specific standard, many alternative grammars would develop. By
+referring to the standard, the C++ grammar is given publicity, which
+should lead to further use in compatible products and systems. The
+benefits of such a standard to commercial products (browsers,
+beautifiers, translators, compilers, ...) should be obvious to the
+developers, in that other compatible products will emerge, and the
+value of all conforming products will rise. Most developers are
+aware of the value of acquiring a fairly complete grammar for a
+language, and the copyright notice (and the resulting affiliation
+with my work) should not be too high a price to pay. By copyrighting
+my work, I have some minor control over what this standard is, and I
+can (hopefully) keep it from degrading without my approval. I will
+consistently attempt to provide upgraded grammars that are compliant
+with the current art, and the ANSI C++ Committee recommendation in
+particular. A developer is never prevented from modifying the
+grammar or this file to improve it in whatever way is seen fit. There
+is also no restriction on the sale of copies, or derivative works,
+providing the request in the copyright notice are satisfied.
+
+If you are not "copying" my work, but are rather only abstracting
+some of my work, an acknowledgment with references to such a standard
+would be appreciated. Specifically, agreements with my grammar and
+its resolution of otherwise ambiguous constructs, should be noted.
+
+Simply put: "make whatever use you would like of the grammar and this
+file, but include the ``portions Copyright ...'' as a reference to
+this standard."
+
+
+*/
+
+/* Last modified 7/4/91, Version 2.0 */
+
+/* File cpp5.l, becomes lex.yy.c after processing by FLEX */
+
+/* This file is a dramatically cut down version of the FLEX input file
+used in my ANSI C Preprocessor. The executable version of my
+preprocessor is available on many platforms (shareware), but this is
+the only source extract that is currently being distributed. If you
+need a full ANSI C preprocessor, with extensive diagnostic
+capabilities and customization facilities, please contact me at the
+addresses given above. Current platforms include IBMPC (DOS/OS2), Sun
+(SPARC and Motorola), and IBM R/6000. ... end of commercial
+announcement.
+
+This file is being distributed to facilitate experimentation and use
+of my C and C++ grammar.
+
+
+Comment removal must be done during the lexing, as context (such as
+enclosure in string literals) must be observed. For this cut-down
+lexer, we will assume that comments have been removed (don't assume
+this if you are writing a compiler or browser!).
+
+
+For each IDENTIFIER like string that is found, there are several
+distinct interpretations that can be applied:
+
+1) The preprocessor may interpret the string as a "keyword" in a
+directive (eg: "pragma" or "include", "defined").
+
+2) The parser may interpret the string as a keyword. (eg: "int").
+
+3) Both parser and preprocessor may interpret the string as a keyword
+(eg: "if").
+
+Since this file is based on source that actually lexically analyses
+text for both preprocessing and parsing, macro definitions were used
+throughout. The macro definitions supplied here have been customized
+to a C++ parse only, and all preprocessor keywords are passed as
+IDENTIFIER or TYPEDEFname. Also, since there is no symbol table to
+interrogate to decide whether a string is a TYPEDEFname, I simply
+assume that any identifier beginning with an upper case letter is a
+TYPEDEFname. This hack should allow you to check out how code
+segments are parsed using my grammar. Unfortunately, if you really
+want to parse major league code, you have to write a symbol table, and
+maintain appropriate scoping information.
+
+
+
+*/
+
+
+/* Included code before lex code */
+/*************** Includes and Defines *****************************/
+
+
+#include "flex-lexer-klass-tab.h" /* YACC generated definitions based on C++ grammar */
+
+typedef char * YYSTYPE; /* interface with lexer: should be in header
+ file*/
+
+extern char * yylval; /* We will always point at the text of the lexeme.
+ This makes it easy to print out nice trees when YYDEBUG is
+ enabled. (see C++ grammar file and its definition of
+ YYDEBUG_LEXER_TEXT to be "yylval" */
+
+#include <stdlib.h>
+#include <string.h>
+
+/* Prototypes */
+
+
+#define WHITE_RETURN(x) /* do nothing */
+
+#define NEW_LINE_RETURN() WHITE_RETURN('\n')
+
+#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */
+#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */
+#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */
+#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN()
+
+#define IDENTIFIER_RETURN() RETURN_VAL(IDENTIFIER)
+
+#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */
+#define NAMED_PPOP_RETURN(x) RETURN_VAL(x)
+#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */
+#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */
+
+#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */
+#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */
+#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */
+#define RETURN_VAL(x) return(x);
+#define yywrap() 1
+
+
+
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+* miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+* or sizeof(void*) != sizeof(int).
+*/
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+#define ECHO LexerOutput( yytext, yyleng )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) LexerError( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yyFlexLexer::yylex()
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ YY_USER_ACTION
+
+YY_DECL
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
+
+
+
+ if ( yy_init )
+ {
+ yy_init = 0;
+
+#ifdef YY_USER_INIT
+
+ YY_USER_INIT;
+#endif
+
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = &std::cin;
+
+ if ( ! yyout )
+ yyout = &std::cout;
+
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_load_buffer_state();
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yy_start;
+ yy_state_ptr = yy_state_buf;
+ *yy_state_ptr++ = yy_current_state;
+ yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 364 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *yy_state_ptr++ = yy_current_state;
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 571 );
+
+ yy_find_action:
+ yy_current_state = *--yy_state_ptr;
+ yy_lp = yy_accept[yy_current_state];
+ find_rule: /* we branch to this label when backing up */
+ for ( ; ; ) /* until we find what rule we matched */
+ {
+ if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
+ {
+ yy_act = yy_acclist[yy_lp];
+ {
+ yy_full_match = yy_cp;
+ break;
+ }
+ }
+ --yy_cp;
+ yy_current_state = *--yy_state_ptr;
+ yy_lp = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+ if ( yy_act != YY_END_OF_BUFFER )
+ {
+ int yyl;
+ for ( yyl = 0; yyl < yyleng; ++yyl )
+ if ( yytext[yyl] == '\n' )
+ ++yylineno;
+ }
+
+ do_action: /* This label is used only to access EOF actions. */
+
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+ case 1:
+ YY_RULE_SETUP
+ {
+ /* Handle C-Style comment */
+ register int c;
+ if (m_keepComments)
+ m_comment += yytext;
+ for ( ; ; )
+ {
+ while ( (c = yyinput()) != '*' && c != EOF )
+ {
+ if (m_keepComments)
+ m_comment += c;
+
+ ; /* eat up text of comment */
+ }
+ if (m_keepComments)
+ m_comment += c;
+ if ( c == '*' )
+ {
+ while ( (c = yyinput()) == '*' )
+ {
+ if (m_keepComments)
+ m_comment += c;
+ ;
+ }
+ if (m_keepComments)
+ m_comment += c;
+ if ( c == '/' )
+ {
+ break; /* found the end */
+ }
+ }
+ if ( c == EOF )
+ {
+ break;
+ }
+ }
+ if (m_keepComments )
+ return CComment;
+ }
+ YY_BREAK
+ case 2:
+ YY_RULE_SETUP
+ {
+ /* Handle CPP style comment */
+ /* Constume everything until the newline */
+ register int c;
+ if (m_keepComments)
+ m_comment += yytext;
+ while ((c = yyinput()) != '\n' && c != EOF)
+ {
+ if (m_keepComments)
+ m_comment += c;
+ }
+ if (m_keepComments)
+ m_comment += c;
+ if (m_keepComments )
+ return CPPComment;
+ }
+ YY_BREAK
+ case 3:
+ YY_RULE_SETUP
+ {
+ if (!m_returnWhite)
+ WHITE_RETURN(' ');
+ else
+ return ' ';
+
+ }
+ YY_BREAK
+ case 4:
+ YY_RULE_SETUP
+ {
+ if (!m_returnWhite)
+ WHITE_RETURN(' ');
+ else
+ return ' ';
+ }
+ YY_BREAK
+ case 5:
+ YY_RULE_SETUP
+ {
+ if (!m_returnWhite)
+ NEW_LINE_RETURN();
+ else
+ return '\n';
+ }
+ YY_BREAK
+ case 6:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(AUTO);
+ }
+ YY_BREAK
+ case 7:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(BREAK);
+ }
+ YY_BREAK
+ case 8:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(CASE);
+ }
+ YY_BREAK
+ case 9:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexCHAR);
+ }
+ YY_BREAK
+ case 10:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexCONST);
+ }
+ YY_BREAK
+ case 11:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(CONTINUE);
+ }
+ YY_BREAK
+ case 12:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexDEFAULT);
+ }
+ YY_BREAK
+ case 13:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(DEFINE);
+ }
+ YY_BREAK
+ case 14:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(OPDEFINED);
+ }
+ YY_BREAK
+ case 15:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(DO);
+ }
+ YY_BREAK
+ case 16:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexDOUBLE);
+ }
+ YY_BREAK
+ case 17:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(ELIF);
+ }
+ YY_BREAK
+ case 18:
+ YY_RULE_SETUP
+ {PPPA_KEYWORD_RETURN(ELSE);
+ }
+ YY_BREAK
+ case 19:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(ENDIF);
+ }
+ YY_BREAK
+ case 20:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexENUM);
+ }
+ YY_BREAK
+ case 21:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(ERROR);
+ }
+ YY_BREAK
+ case 22:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(EXTERN);
+ }
+ YY_BREAK
+ case 23:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexFLOAT);
+ }
+ YY_BREAK
+ case 24:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(FOR);
+ }
+ YY_BREAK
+ case 25:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(GOTO);
+ }
+ YY_BREAK
+ case 26:
+ YY_RULE_SETUP
+ {PPPA_KEYWORD_RETURN(IF);
+ }
+ YY_BREAK
+ case 27:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(IFDEF);
+ }
+ YY_BREAK
+ case 28:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(IFNDEF);
+ }
+ YY_BREAK
+ case 29:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(INCLUDE);
+ }
+ YY_BREAK
+ case 30:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexINT);
+ }
+ YY_BREAK
+ case 31:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(LINE);
+ }
+ YY_BREAK
+ case 32:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexLONG);
+ }
+ YY_BREAK
+ case 33:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(PRAGMA);
+ }
+ YY_BREAK
+ case 34:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(REGISTER);
+ }
+ YY_BREAK
+ case 35:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(RETURN);
+ }
+ YY_BREAK
+ case 36:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexSHORT);
+ }
+ YY_BREAK
+ case 37:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(SIGNED);
+ }
+ YY_BREAK
+ case 38:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(SIZEOF);
+ }
+ YY_BREAK
+ case 39:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(STATIC);
+ }
+ YY_BREAK
+ case 40:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexSTRUCT);
+ }
+ YY_BREAK
+ case 41:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(SWITCH);
+ }
+ YY_BREAK
+ case 42:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(TYPEDEF);
+ }
+ YY_BREAK
+ case 43:
+ YY_RULE_SETUP
+ {PP_KEYWORD_RETURN(UNDEF);
+ }
+ YY_BREAK
+ case 44:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(UNION);
+ }
+ YY_BREAK
+ case 45:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(UNSIGNED);
+ }
+ YY_BREAK
+ case 46:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(lexVOID);
+ }
+ YY_BREAK
+ case 47:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(VOLATILE);
+ }
+ YY_BREAK
+ case 48:
+ YY_RULE_SETUP
+ {PA_KEYWORD_RETURN(WHILE);
+ }
+ YY_BREAK
+ case 49:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(lexCLASS);
+ }
+ YY_BREAK
+ case 50:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(lexNAMESPACE);
+ }
+ YY_BREAK
+ case 51:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(lexDELETE);
+ }
+ YY_BREAK
+ case 52:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(FRIEND);
+ }
+ YY_BREAK
+ case 53:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(INLINE);
+ }
+ YY_BREAK
+ case 54:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(NEW);
+ }
+ YY_BREAK
+ case 55:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(lexOPERATOR);
+ }
+ YY_BREAK
+ case 56:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(OVERLOAD);
+ }
+ YY_BREAK
+ case 57:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(lexPROTECTED);
+ }
+ YY_BREAK
+ case 58:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(lexPRIVATE);
+ }
+ YY_BREAK
+ case 59:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(lexPUBLIC);
+ }
+ YY_BREAK
+ case 60:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(lexTHIS);
+ }
+ YY_BREAK
+ case 61:
+ YY_RULE_SETUP
+ {CPP_KEYWORD_RETURN(VIRTUAL);
+ }
+ YY_BREAK
+ case 62:
+ YY_RULE_SETUP
+ {IDENTIFIER_RETURN();
+ }
+ YY_BREAK
+ case 63:
+ YY_RULE_SETUP
+ {NUMERICAL_RETURN(INTEGERconstant);
+ }
+ YY_BREAK
+ case 64:
+ YY_RULE_SETUP
+ {NUMERICAL_RETURN(OCTALconstant);
+ }
+ YY_BREAK
+ case 65:
+ YY_RULE_SETUP
+ {NUMERICAL_RETURN(HEXconstant);
+ }
+ YY_BREAK
+ case 66:
+ YY_RULE_SETUP
+ {NUMERICAL_RETURN(FLOATINGconstant);
+ }
+ YY_BREAK
+ case 67:
+ YY_RULE_SETUP
+ {
+ NUMERICAL_RETURN(CHARACTERconstant);
+ }
+ YY_BREAK
+ case 68:
+ YY_RULE_SETUP
+ {
+ LITERAL_RETURN(STRINGliteral);
+ }
+ YY_BREAK
+ case 69:
+ YY_RULE_SETUP
+ {PPOP_RETURN(LP);
+ }
+ YY_BREAK
+ case 70:
+ YY_RULE_SETUP
+ {PPOP_RETURN(RP);
+ }
+ YY_BREAK
+ case 71:
+ YY_RULE_SETUP
+ {PPOP_RETURN(COMMA);
+ }
+ YY_BREAK
+ case 72:
+ YY_RULE_SETUP
+ {NAMED_PPOP_RETURN('#') ;
+ }
+ YY_BREAK
+ case 73:
+ YY_RULE_SETUP
+ {NAMED_PPOP_RETURN(POUNDPOUND);
+ }
+ YY_BREAK
+ case 74:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(LC);
+ }
+ YY_BREAK
+ case 75:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(RC);
+ }
+ YY_BREAK
+ case 76:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(LB);
+ }
+ YY_BREAK
+ case 77:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(RB);
+ }
+ YY_BREAK
+ case 78:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(DOT);
+ }
+ YY_BREAK
+ case 79:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(AND);
+ }
+ YY_BREAK
+ case 80:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(STAR);
+ }
+ YY_BREAK
+ case 81:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(PLUS);
+ }
+ YY_BREAK
+ case 82:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(MINUS);
+ }
+ YY_BREAK
+ case 83:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(NEGATE);
+ }
+ YY_BREAK
+ case 84:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(NOT);
+ }
+ YY_BREAK
+ case 85:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(DIV);
+ }
+ YY_BREAK
+ case 86:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(MOD);
+ }
+ YY_BREAK
+ case 87:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(LT);
+ }
+ YY_BREAK
+ case 88:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(GT);
+ }
+ YY_BREAK
+ case 89:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(XOR);
+ }
+ YY_BREAK
+ case 90:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(PIPE);
+ }
+ YY_BREAK
+ case 91:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(QUESTION);
+ }
+ YY_BREAK
+ case 92:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(COLON);
+ }
+ YY_BREAK
+ case 93:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(SEMICOLON);
+ }
+ YY_BREAK
+ case 94:
+ YY_RULE_SETUP
+ {ASCIIOP_RETURN(ASSIGN);
+ }
+ YY_BREAK
+ case 95:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(DOTstar);
+ }
+ YY_BREAK
+ case 96:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(CLCL);
+ }
+ YY_BREAK
+ case 97:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(lexARROW);
+ }
+ YY_BREAK
+ case 98:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(ARROWstar);
+ }
+ YY_BREAK
+ case 99:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(ICR);
+ }
+ YY_BREAK
+ case 100:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(DECR);
+ }
+ YY_BREAK
+ case 101:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(LS);
+ }
+ YY_BREAK
+ case 102:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(RS);
+ }
+ YY_BREAK
+ case 103:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(LE);
+ }
+ YY_BREAK
+ case 104:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(GE);
+ }
+ YY_BREAK
+ case 105:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(EQ);
+ }
+ YY_BREAK
+ case 106:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(NE);
+ }
+ YY_BREAK
+ case 107:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(ANDAND);
+ }
+ YY_BREAK
+ case 108:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(OROR);
+ }
+ YY_BREAK
+ case 109:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(MULTassign);
+ }
+ YY_BREAK
+ case 110:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(DIVassign);
+ }
+ YY_BREAK
+ case 111:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(MODassign);
+ }
+ YY_BREAK
+ case 112:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(PLUSassign);
+ }
+ YY_BREAK
+ case 113:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(MINUSassign);
+ }
+ YY_BREAK
+ case 114:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(LSassign);
+ }
+ YY_BREAK
+ case 115:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(RSassign);
+ }
+ YY_BREAK
+ case 116:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(ANDassign);
+ }
+ YY_BREAK
+ case 117:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(ERassign);
+ }
+ YY_BREAK
+ case 118:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(ORassign);
+ }
+ YY_BREAK
+ case 119:
+ YY_RULE_SETUP
+ {NAMEDOP_RETURN(ELLIPSIS);
+ }
+ YY_BREAK
+ case 120:
+ YY_RULE_SETUP
+ { return yytext[0];
+ }
+ YY_BREAK
+ case 121:
+ YY_RULE_SETUP
+ ECHO;
+ YY_BREAK
+ 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 - yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( yy_current_buffer->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
+ * yylex(). 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.
+ */
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->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 ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ /* 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 );
+
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
+ }
+
+ else
+ switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yy_did_buffer_switch_on_eof = 0;
+
+ if ( yywrap() )
+ {
+ /* 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.
+ */
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+} /* end of yylex */
+
+yyFlexLexer::yyFlexLexer( std::istream* arg_yyin, std::ostream* arg_yyout )
+{
+ yyin = arg_yyin;
+ yyout = arg_yyout;
+ yy_c_buf_p = 0;
+ yy_init = 1;
+ yy_start = 0;
+ yy_flex_debug = 0;
+ yylineno = 1; // this will only get updated if %option yylineno
+
+ yy_did_buffer_switch_on_eof = 0;
+
+ yy_looking_for_trail_begin = 0;
+ yy_more_flag = 0;
+ yy_more_len = 0;
+ yy_more_offset = yy_prev_more_offset = 0;
+
+ yy_start_stack_ptr = yy_start_stack_depth = 0;
+ yy_start_stack = 0;
+
+ yy_current_buffer = 0;
+
+#ifdef YY_USES_REJECT
+
+ yy_state_buf = new yy_state_type[YY_BUF_SIZE + 2];
+#else
+
+ yy_state_buf = 0;
+#endif
+
+}
+
+yyFlexLexer::~yyFlexLexer()
+{
+ delete[] yy_state_buf;
+ yy_delete_buffer( yy_current_buffer );
+}
+
+void yyFlexLexer::switch_streams( std::istream* new_in, std::ostream* new_out )
+{
+ if ( new_in )
+ {
+ yy_delete_buffer( yy_current_buffer );
+ yy_switch_to_buffer( yy_create_buffer( new_in, YY_BUF_SIZE ) );
+ }
+
+ if ( new_out )
+ yyout = new_out;
+}
+
+#ifdef YY_INTERACTIVE
+int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )
+#else
+int yyFlexLexer::LexerInput( char* buf, int max_size )
+#endif
+{
+ if ( yyin->eof() || yyin->fail() )
+ return 0;
+
+#ifdef YY_INTERACTIVE
+
+ yyin->get
+ ( buf[0] );
+
+ if ( yyin->eof() )
+ return 0;
+
+ if ( yyin->bad() )
+ return -1;
+
+ return 1;
+
+#else
+
+ (void) yyin->read( buf, max_size );
+
+ if ( yyin->bad() )
+ return -1;
+ else
+ return yyin->gcount();
+#endif
+
+}
+
+void yyFlexLexer::LexerOutput( const char* buf, int size )
+{
+ (void) yyout->write( buf, size );
+}
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+int yyFlexLexer::yy_get_next_buffer()
+{
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+#if 0
+ YY_FATAL_ERROR(
+ "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = yy_current_buffer;
+
+ int yy_c_buf_p_offset =
+ (int) (yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
+ }
+ 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" );
+
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = yy_current_buffer->yy_buf_size -
+ number_to_move - 1;
+#endif
+
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
+
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ if ( yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ yy_current_buffer->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+ return ret_val;
+}
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+yy_state_type yyFlexLexer::yy_get_previous_state()
+{
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = yy_start;
+ yy_state_ptr = yy_state_buf;
+ *yy_state_ptr++ = yy_current_state;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ 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 >= 364 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *yy_state_ptr++ = yy_current_state;
+ }
+
+ return yy_current_state;
+}
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
+{
+ register int yy_is_jam;
+
+ register YY_CHAR yy_c = 1;
+ 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 >= 364 )
+ 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 == 363);
+ if ( ! yy_is_jam )
+ *yy_state_ptr++ = yy_current_state;
+
+ return yy_is_jam ? 0 : yy_current_state;
+}
+
+
+void yyFlexLexer::yyunput( int c, register char* yy_bp )
+{
+ register char *yy_cp = yy_c_buf_p;
+
+ /* undo effects of setting up yytext */
+ *yy_cp = yy_hold_char;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
+ register char *source =
+ &yy_current_buffer->yy_ch_buf[number_to_move];
+
+ while ( source > yy_current_buffer->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+ if ( c == '\n' )
+ --yylineno;
+
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+}
+
+
+int yyFlexLexer::yyinput()
+{
+ int c;
+
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ /* This was really a NUL. */
+ *yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
+
+ switch ( yy_get_next_buffer() )
+ {
+ 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. */
+ yyrestart( yyin );
+
+ /* fall through */
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap() )
+ return EOF;
+
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+
+ return yyinput();
+#else
+
+ return input();
+#endif
+
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p = yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
+ if ( c == '\n' )
+ ++yylineno;
+
+ return c;
+}
+
+
+void yyFlexLexer::yyrestart( std::istream* input_file )
+{
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
+}
+
+
+void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+{
+ if ( yy_current_buffer == new_buffer )
+ return ;
+
+ if ( yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yy_did_buffer_switch_on_eof = 1;
+}
+
+
+void yyFlexLexer::yy_load_buffer_state()
+{
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+}
+
+
+YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
+{
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+}
+
+
+void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )
+{
+ if ( ! b )
+ return ;
+
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yy_flex_free( (void *) b->yy_ch_buf );
+
+ yy_flex_free( (void *) b );
+}
+
+
+/*extern "C" int isatty YY_PROTO(( int ));*/
+void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, std::istream* file )
+
+{
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+ b->yy_is_interactive = 0;
+}
+
+
+void yyFlexLexer::yy_flush_buffer( YY_BUFFER_STATE b )
+{
+ if ( ! b )
+ return ;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
+}
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+void yyFlexLexer::yy_push_state( int new_state )
+{
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
+
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
+
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
+
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
+
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+ BEGIN(new_state);
+}
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+void yyFlexLexer::yy_pop_state()
+{
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+}
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+int yyFlexLexer::yy_top_state()
+{
+ return yy_start_stack[yy_start_stack_ptr - 1];
+}
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+
+void yyFlexLexer::LexerError( yyconst char msg[] )
+{
+ std::cerr << msg << '\n';
+ exit( YY_EXIT_FAILURE );
+}
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+
+{
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+}
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+
+{
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+}
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+
+{
+ return (void *) malloc( size );
+}
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+
+{
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+}
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+
+{
+ free( ptr );
+}
+
+#if YY_MAIN
+int main()
+{
+ yylex();
+ return 0;
+}
+#endif
+
+
+
+} // namespace flex
diff --git a/plugins/symbol-db/cxxparser/flex-lexer-klass.h b/plugins/symbol-db/cxxparser/flex-lexer-klass.h
new file mode 100644
index 0000000..3acf199
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/flex-lexer-klass.h
@@ -0,0 +1,244 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//
+// copyright : (C) 2008 by Eran Ifrah
+// file name : FlexLexer.h
+//
+// -------------------------------------------------------------------------
+// A
+// _____ _ _ _ _
+// / __ \ | | | | (_) |
+// | / \/ ___ __| | ___| | _| |_ ___
+// | | / _ \ / _ |/ _ \ | | | __/ _ )
+// | \__/\ (_) | (_| | __/ |___| | || __/
+// \____/\___/ \__,_|\___\_____/_|\__\___|
+//
+// F i l e
+//
+// 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 2 of the License, or
+// (at your option) any later version.
+//
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+ // $Header: /CVS/wxUS/wxXtudio/Apps/USClient/FlexLexer.h,v 1.2 2006/02/08 14:30:12 eran Exp $
+
+// FlexLexer.h -- define interfaces for lexical analyzer classes generated
+// by flex
+
+// Copyright (c) 1993 The Regents of the University of California.
+// All rights reserved.
+//
+// This code is derived from software contributed to Berkeley by
+// Kent Williams and Tom Epperly.
+//
+// Redistribution and use in source and binary forms with or without
+// modification are permitted provided that: (1) source distributions retain
+// this entire copyright notice and comment, and (2) distributions including
+// binaries display the following acknowledgement: ``This product includes
+// software developed by the University of California, Berkeley and its
+// contributors'' in the documentation or other materials provided with the
+// distribution and in all advertising materials mentioning features or use
+// of this software. Neither the name of the University nor the names of
+// its contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+
+// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+// WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+// This file defines FlexLexer, an abstract class which specifies the
+// external interface provided to flex C++ lexer objects, and yyFlexLexer,
+// which defines a particular lexer class.
+//
+// If you want to create multiple lexer classes, you use the -P flag
+// to rename each yyFlexLexer to some other xxFlexLexer. You then
+// include <FlexLexer.h> in your other sources once per lexer class:
+//
+// #undef yyFlexLexer
+// #define yyFlexLexer xxFlexLexer
+// #include <FlexLexer.h>
+//
+// #undef yyFlexLexer
+// #define yyFlexLexer zzFlexLexer
+// #include <FlexLexer.h>
+// ...
+
+#ifndef CODELITE_FLEX_LEXER_H
+// Never included before - need to define base class.
+#define CODELITE_FLEX_LEXER_H
+#include <string>
+#include <iostream>
+
+//extern "C++" {
+
+using namespace std;
+
+namespace flex
+{
+
+struct yy_buffer_state;
+typedef int yy_state_type;
+
+class FlexLexer {
+public:
+ virtual ~FlexLexer() { }
+
+ const char* YYText() { return yytext; }
+ int YYLeng() { return yyleng; }
+
+ virtual void
+ yy_switch_to_buffer( struct yy_buffer_state* new_buffer ) = 0;
+ virtual struct yy_buffer_state*
+ yy_create_buffer( std::istream* s, int size ) = 0;
+ virtual void yy_delete_buffer( struct yy_buffer_state* b ) = 0;
+ virtual void yyrestart( std::istream* s ) = 0;
+
+ virtual int yylex() = 0;
+
+ /// Call yylex with new input/output sources.
+ int yylex( std::istream* new_in, std::ostream* new_out = 0 )
+ {
+ switch_streams( new_in, new_out );
+ return yylex();
+ }
+
+ /// Switch to new input/output streams. A nil stream pointer
+ /// indicates "keep the current one".
+ virtual void switch_streams( std::istream* new_in = 0,
+ std::ostream* new_out = 0 ) = 0;
+
+ int lineno() const { return yylineno; }
+
+ int debug() const { return yy_flex_debug; }
+ void set_debug( int flag ) { yy_flex_debug = flag; }
+
+protected:
+ char* yytext;
+ int yyleng;
+ int yylineno; ///< only maintained if you use %option yylineno
+ int yy_flex_debug; ///< only has effect with -d or "%option debug"
+
+ /// Hack for keeping comments from the lexer
+ string m_comment;
+ int m_keepComments;
+ int m_returnWhite;
+};
+
+//}
+
+#endif
+
+#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
+// Either this is the first time through (yyFlexLexerOnce not defined),
+// or this is a repeated include to define a different flavor of
+// yyFlexLexer, as discussed in the flex man page.
+#define yyFlexLexerOnce
+
+class yyFlexLexer : public FlexLexer {
+public:
+ /// arg_yyin and arg_yyout default to the cin and cout, but we
+ /// only make that assignment when initializing in yylex().
+ yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 );
+
+ virtual ~yyFlexLexer();
+
+ void yy_switch_to_buffer( struct yy_buffer_state* new_buffer );
+ struct yy_buffer_state* yy_create_buffer( std::istream* s, int size );
+ void yy_delete_buffer( struct yy_buffer_state* b );
+ void yyrestart( std::istream* s );
+
+ virtual int yylex();
+ virtual void switch_streams( std::istream* new_in, std::ostream* new_out );
+
+protected:
+ virtual int LexerInput( char* buf, int max_size );
+ virtual void LexerOutput( const char* buf, int size );
+ virtual void LexerError( const char* msg );
+
+ void yyunput( int c, char* buf_ptr );
+ int yyinput();
+
+ void yy_load_buffer_state();
+ void yy_init_buffer( struct yy_buffer_state* b, std::istream* s );
+ void yy_flush_buffer( struct yy_buffer_state* b );
+
+ int yy_start_stack_ptr;
+ int yy_start_stack_depth;
+ int* yy_start_stack;
+
+ void yy_push_state( int new_state );
+ void yy_pop_state();
+ int yy_top_state();
+
+ yy_state_type yy_get_previous_state();
+ yy_state_type yy_try_NUL_trans( yy_state_type current_state );
+ int yy_get_next_buffer();
+
+ std::istream* yyin; ///< input source for default LexerInput
+ std::ostream* yyout; ///< output sink for default LexerOutput
+
+ struct yy_buffer_state* yy_current_buffer;
+
+ /// yy_hold_char holds the character lost when yytext is formed.
+ char yy_hold_char;
+
+ /// Number of characters read into yy_ch_buf.
+ int yy_n_chars;
+
+ /// Points to current character in buffer.
+ char* yy_c_buf_p;
+
+ int yy_init; ///< whether we need to initialize
+ int yy_start; ///< start state number
+
+ /// Flag which is used to allow yywrap()'s to do buffer switches
+ /// instead of setting up a fresh yyin. A bit of a hack ...
+ int yy_did_buffer_switch_on_eof;
+
+ // The following are not always needed, but may be depending
+ // on use of certain flex features (like REJECT or yymore()).
+
+ yy_state_type yy_last_accepting_state;
+ char* yy_last_accepting_cpos;
+
+ yy_state_type* yy_state_buf;
+ yy_state_type* yy_state_ptr;
+
+ char* yy_full_match;
+ int* yy_full_state;
+ int yy_full_lp;
+
+ int yy_lp;
+ int yy_looking_for_trail_begin;
+
+ int yy_more_flag;
+ int yy_more_len;
+ int yy_more_offset;
+ int yy_prev_more_offset;
+};
+
+} // namespace flex
+
+#endif // CODELITE_FLEX_LEXER_H
diff --git a/plugins/symbol-db/cxxparser/flex-lexer-plain-tab.h b/plugins/symbol-db/cxxparser/flex-lexer-plain-tab.h
new file mode 100644
index 0000000..af89c78
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/flex-lexer-plain-tab.h
@@ -0,0 +1,111 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#define LE_AUTO 257
+#define LE_DOUBLE 258
+#define LE_INT 259
+#define LE_STRUCT 260
+#define LE_BREAK 261
+#define LE_ELSE 262
+#define LE_LONG 263
+#define LE_SWITCH 264
+#define LE_CASE 265
+#define LE_ENUM 266
+#define LE_REGISTER 267
+#define LE_TYPEDEF 268
+#define LE_CHAR 269
+#define LE_EXTERN 270
+#define LE_RETURN 271
+#define LE_UNION 272
+#define LE_CONST 273
+#define LE_FLOAT 274
+#define LE_SHORT 275
+#define LE_UNSIGNED 276
+#define LE_CONTINUE 277
+#define LE_FOR 278
+#define LE_SIGNED 279
+#define LE_VOID 280
+#define LE_DEFAULT 281
+#define LE_GOTO 282
+#define LE_SIZEOF 283
+#define LE_VOLATILE 284
+#define LE_DO 285
+#define LE_IF 286
+#define LE_STATIC 287
+#define LE_WHILE 288
+#define LE_NEW 289
+#define LE_DELETE 290
+#define LE_THIS 291
+#define LE_OPERATOR 292
+#define LE_CLASS 293
+#define LE_PUBLIC 294
+#define LE_PROTECTED 295
+#define LE_PRIVATE 296
+#define LE_VIRTUAL 297
+#define LE_FRIEND 298
+#define LE_INLINE 299
+#define LE_OVERLOAD 300
+#define LE_TEMPLATE 301
+#define LE_TYPENAME 302
+#define LE_THROW 303
+#define LE_CATCH 304
+#define LE_IDENTIFIER 305
+#define LE_STRINGliteral 306
+#define LE_FLOATINGconstant 307
+#define LE_INTEGERconstant 308
+#define LE_CHARACTERconstant 309
+#define LE_OCTALconstant 310
+#define LE_HEXconstant 311
+#define LE_POUNDPOUND 312
+#define LE_CComment 313
+#define LE_CPPComment 314
+#define LE_NAMESPACE 315
+#define LE_USING 316
+#define LE_TYPEDEFname 317
+#define LE_ARROW 318
+#define LE_ICR 319
+#define LE_DECR 320
+#define LE_LS 321
+#define LE_RS 322
+#define LE_LE 323
+#define LE_GE 324
+#define LE_EQ 325
+#define LE_NE 326
+#define LE_ANDAND 327
+#define LE_OROR 328
+#define LE_ELLIPSIS 329
+#define LE_CLCL 330
+#define LE_DOTstar 331
+#define LE_ARROWstar 332
+#define LE_MULTassign 333
+#define LE_DIVassign 334
+#define LE_MODassign 335
+#define LE_PLUSassign 336
+#define LE_MINUSassign 337
+#define LE_LSassign 338
+#define LE_RSassign 339
+#define LE_ANDassign 340
+#define LE_ERassign 341
+#define LE_ORassign 342
+#define LE_MACRO 343
+#define LE_DYNAMIC_CAST 344
+#define LE_STATIC_CAST 345
+#define LE_CONST_CAST 346
+#define LE_REINTERPRET_CAST 347
diff --git a/plugins/symbol-db/cxxparser/flex-lexer-plain.cpp b/plugins/symbol-db/cxxparser/flex-lexer-plain.cpp
new file mode 100644
index 0000000..a2bf947
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/flex-lexer-plain.cpp
@@ -0,0 +1,2759 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#define yy_create_buffer cl_scope__create_buffer
+#define yy_delete_buffer cl_scope__delete_buffer
+#define yy_scan_buffer cl_scope__scan_buffer
+#define yy_scan_string cl_scope__scan_string
+#define yy_scan_bytes cl_scope__scan_bytes
+#define yy_flex_debug cl_scope__flex_debug
+#define yy_init_buffer cl_scope__init_buffer
+#define yy_flush_buffer cl_scope__flush_buffer
+#define yy_load_buffer_state cl_scope__load_buffer_state
+#define yy_switch_to_buffer cl_scope__switch_to_buffer
+#define yyin cl_scope_in
+#define yyleng cl_scope_leng
+#define yylex cl_scope_lex
+#define yyout cl_scope_out
+#define yyrestart cl_scope_restart
+#define yytext cl_scope_text
+#define yylineno cl_scope_lineno
+#define yywrap cl_scope_wrap
+
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+#include <unistd.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else /* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif /* __STDC__ */
+#endif /* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index. If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition. This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state. The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384*10
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator). This
+ * avoids problems with code like:
+ *
+ * if ( condition_holds )
+ * yyless( 5 );
+ * else
+ * do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ *yy_cp = yy_hold_char; \
+ YY_RESTORE_YY_MORE_OFFSET \
+ yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+ } \
+ while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+ {
+ FILE *yy_input_file;
+
+ char *yy_ch_buf; /* input buffer */
+ char *yy_buf_pos; /* current position in input buffer */
+
+ /* Size of input buffer in bytes, not including room for EOB
+ * characters.
+ */
+ yy_size_t yy_buf_size;
+
+ /* Number of characters read into yy_ch_buf, not including EOB
+ * characters.
+ */
+ int yy_n_chars;
+
+ /* Whether we "own" the buffer - i.e., we know we created it,
+ * and can realloc() it to grow it, and should free() it to
+ * delete it.
+ */
+ int yy_is_our_buffer;
+
+ /* Whether this is an "interactive" input source; if so, and
+ * if we're using stdio for input, then we want to use getc()
+ * instead of fread(), to make sure we stop fetching input after
+ * each newline.
+ */
+ int yy_is_interactive;
+
+ /* Whether we're considered to be at the beginning of a line.
+ * If so, '^' rules will be active on the next match, otherwise
+ * not.
+ */
+ int yy_at_bol;
+
+ /* Whether to try to fill the input buffer when we reach the
+ * end of it.
+ */
+ int yy_fill_buffer;
+
+ int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+ /* When an EOF's been seen but there's still some text to process
+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+ * shouldn't try reading from the input source any more. We might
+ * still have a bunch of tokens to match, though, because of
+ * possible backing-up.
+ *
+ * When we actually see the EOF, we change the status to "new"
+ * (via yyrestart()), so that the user can continue scanning by
+ * just pointing yyin at a new input file.
+ */
+#define YY_BUFFER_EOF_PENDING 2
+ };
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars; /* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1; /* whether we need to initialize */
+static int yy_start = 0; /* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin. A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_is_interactive = is_interactive; \
+ }
+
+#define yy_set_bol(at_bol) \
+ { \
+ if ( ! yy_current_buffer ) \
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+ yy_current_buffer->yy_at_bol = at_bol; \
+ }
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+
+#define YY_USES_REJECT
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern int yylineno;
+int yylineno = 1;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+ yytext_ptr = yy_bp; \
+ yyleng = (int) (yy_cp - yy_bp); \
+ yy_hold_char = *yy_cp; \
+ *yy_cp = '\0'; \
+ yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 141
+#define YY_END_OF_BUFFER 142
+static yyconst short int yy_acclist[600] =
+ { 0,
+ 142, 128, 141, 3, 128, 141, 5, 141, 4, 128,
+ 141, 92, 128, 141, 128, 141, 94, 128, 141, 87,
+ 128, 141, 128, 141, 78, 128, 141, 79, 128, 141,
+ 88, 128, 141, 89, 128, 141, 80, 128, 141, 90,
+ 128, 141, 86, 128, 141, 93, 128, 141, 73, 128,
+ 141, 72, 128, 141, 100, 128, 141, 101, 128, 141,
+ 95, 128, 141, 102, 128, 141, 96, 128, 141, 99,
+ 128, 141, 71, 128, 141, 71, 128, 141, 84, 128,
+ 141, 85, 128, 141, 97, 128, 141, 71, 128, 141,
+ 71, 128, 141, 71, 128, 141, 71, 128, 141, 71,
+
+ 128, 141, 71, 128, 141, 71, 128, 141, 71, 128,
+ 141, 71, 128, 141, 71, 128, 141, 71, 128, 141,
+ 71, 128, 141, 71, 128, 141, 71, 128, 141, 71,
+ 128, 141, 71, 128, 141, 71, 128, 141, 71, 128,
+ 141, 82, 128, 141, 98, 128, 141, 83, 128, 141,
+ 91, 128, 141, 3, 128, 141, 81, 128, 141, 136,
+ 141, 129, 141, 134, 136, 141, 130, 136, 141, 134,
+ 136, 141, 135, 141, 132, 141, 133, 135, 141, 138,
+ 141, 137, 141, 140, 141, 141, 140, 141, 3, 5,
+ 4, 114, 77, 119, 115, 124, 117, 107, 120, 108,
+
+ 121, 105, 103, 75, 1, 2, 118, 75, 73, 73,
+ 73, 72, 72, 72, 104, 109, 111, 113, 112, 110,
+ 71, 125, 71, 71, 71, 71, 71, 71, 71, 15,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 26, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 126, 116, 3, 81, 134, 134,
+ 133, 139, 76, 106, 127, 75, 75, 73, 74, 72,
+ 122, 123, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+
+ 24, 71, 71, 71, 71, 71, 71, 71, 30, 71,
+ 71, 71, 71, 54, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 134, 75, 74, 74, 6, 71, 71, 8,
+ 71, 71, 9, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 17, 71, 18, 71, 71, 20, 71, 71,
+ 71, 71, 71, 25, 71, 71, 71, 71, 71, 31,
+ 71, 32, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+
+ 60, 71, 71, 71, 71, 71, 71, 71, 71, 46,
+ 71, 71, 71, 134, 74, 7, 71, 70, 71, 49,
+ 71, 10, 71, 71, 71, 71, 71, 71, 71, 19,
+ 71, 21, 71, 71, 23, 71, 71, 27, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 36, 71, 71, 71, 71, 71, 71, 71,
+ 69, 71, 71, 71, 43, 71, 44, 71, 71, 68,
+ 71, 71, 71, 48, 71, 134, 71, 71, 71, 13,
+ 71, 51, 71, 16, 71, 71, 22, 71, 52, 71,
+ 28, 71, 71, 53, 71, 71, 71, 71, 33, 71,
+
+ 71, 71, 59, 71, 71, 71, 35, 71, 37, 71,
+ 38, 71, 39, 71, 40, 71, 41, 71, 71, 71,
+ 71, 71, 71, 71, 131, 134, 71, 71, 12, 71,
+ 14, 71, 71, 29, 71, 71, 71, 71, 58, 71,
+ 71, 71, 71, 71, 71, 42, 71, 71, 71, 61,
+ 71, 71, 71, 11, 71, 71, 71, 55, 71, 56,
+ 71, 71, 34, 71, 71, 71, 62, 71, 63, 71,
+ 45, 71, 47, 71, 71, 71, 50, 71, 57, 71,
+ 71, 71, 66, 71, 71, 71, 71, 71, 71, 65,
+ 71, 64, 71, 71, 71, 71, 71, 67, 71
+
+ } ;
+
+static yyconst short int yy_accept[452] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 4, 7, 9, 12, 15, 17, 20, 23,
+ 25, 28, 31, 34, 37, 40, 43, 46, 49, 52,
+ 55, 58, 61, 64, 67, 70, 73, 76, 79, 82,
+ 85, 88, 91, 94, 97, 100, 103, 106, 109, 112,
+ 115, 118, 121, 124, 127, 130, 133, 136, 139, 142,
+ 145, 148, 151, 154, 157, 160, 162, 164, 167, 170,
+ 173, 175, 177, 180, 182, 184, 186, 187, 189, 190,
+ 191, 191, 192, 193, 193, 194, 194, 195, 196, 197,
+ 197, 197, 198, 199, 200, 201, 202, 203, 204, 204,
+
+ 205, 206, 207, 208, 209, 210, 210, 210, 211, 212,
+ 212, 213, 214, 215, 216, 217, 218, 219, 220, 221,
+ 222, 222, 222, 223, 224, 225, 226, 227, 228, 229,
+ 230, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+ 241, 243, 244, 245, 246, 247, 248, 249, 250, 251,
+ 252, 253, 254, 255, 256, 257, 258, 259, 260, 261,
+ 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
+ 272, 273, 273, 273, 274, 274, 274, 275, 276, 276,
+ 277, 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, 303, 304, 305, 306,
+ 307, 308, 309, 311, 312, 313, 314, 316, 317, 318,
+ 319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
+ 329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
+ 339, 340, 341, 342, 343, 344, 344, 344, 344, 344,
+ 344, 345, 346, 347, 349, 350, 352, 353, 355, 356,
+ 357, 358, 359, 360, 361, 362, 363, 365, 367, 368,
+ 370, 371, 372, 373, 374, 376, 377, 378, 379, 380,
+ 382, 384, 385, 386, 387, 388, 389, 390, 391, 392,
+ 393, 394, 395, 396, 397, 398, 399, 400, 401, 403,
+
+ 404, 405, 406, 407, 408, 409, 410, 412, 413, 414,
+ 415, 415, 415, 415, 415, 416, 418, 420, 422, 424,
+ 425, 426, 427, 428, 429, 430, 432, 434, 435, 437,
+ 438, 440, 441, 442, 443, 444, 445, 446, 447, 448,
+ 449, 450, 451, 452, 453, 455, 456, 457, 458, 459,
+ 460, 461, 463, 464, 465, 467, 469, 470, 472, 473,
+ 474, 476, 477, 478, 479, 480, 482, 484, 486, 487,
+ 489, 491, 493, 494, 496, 497, 498, 499, 501, 502,
+ 503, 505, 506, 507, 509, 511, 513, 515, 517, 519,
+ 520, 521, 522, 523, 524, 525, 527, 528, 529, 531,
+
+ 533, 534, 536, 537, 538, 539, 541, 542, 543, 544,
+ 545, 546, 548, 549, 550, 552, 553, 554, 556, 557,
+ 558, 560, 562, 563, 565, 566, 567, 569, 571, 573,
+ 575, 576, 577, 579, 581, 582, 583, 585, 586, 587,
+ 588, 589, 590, 592, 594, 595, 596, 597, 598, 600,
+ 600
+ } ;
+
+static yyconst int yy_ec[256] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 4, 5, 6, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 7, 8, 9, 10, 1, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 23,
+ 23, 23, 23, 23, 23, 24, 24, 25, 26, 27,
+ 28, 29, 30, 1, 31, 31, 31, 31, 32, 33,
+ 34, 34, 34, 34, 34, 35, 34, 34, 34, 34,
+ 34, 34, 34, 34, 36, 34, 34, 37, 34, 34,
+ 38, 39, 40, 41, 42, 1, 43, 44, 45, 46,
+
+ 47, 48, 49, 50, 51, 34, 52, 53, 54, 55,
+ 56, 57, 34, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 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 int yy_meta[71] =
+ { 0,
+ 1, 1, 2, 1, 1, 1, 1, 1, 3, 1,
+ 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 5, 6, 1, 1, 1, 1, 1, 3,
+ 6, 6, 6, 7, 7, 7, 7, 1, 3, 1,
+ 1, 7, 5, 5, 6, 6, 6, 5, 7, 7,
+ 7, 7, 7, 7, 8, 7, 7, 8, 7, 8,
+ 7, 8, 7, 8, 7, 7, 1, 1, 1, 1
+ } ;
+
+static yyconst short int yy_base[463] =
+ { 0,
+ 0, 69, 79, 0, 149, 0, 816, 815, 217, 218,
+ 817, 820, 220, 820, 233, 788, 219, 787, 217, 775,
+ 820, 820, 785, 213, 820, 223, 233, 238, 247, 240,
+ 787, 820, 45, 783, 46, 820, 0, 234, 820, 820,
+ 782, 748, 750, 235, 221, 249, 239, 751, 225, 247,
+ 201, 248, 238, 759, 264, 269, 191, 261, 755, 820,
+ 253, 820, 820, 326, 820, 820, 820, 0, 820, 757,
+ 820, 820, 0, 820, 820, 820, 820, 782, 335, 820,
+ 341, 347, 820, 222, 820, 300, 820, 820, 820, 296,
+ 303, 820, 820, 820, 820, 820, 786, 820, 781, 333,
+
+ 820, 820, 820, 337, 369, 351, 389, 229, 323, 0,
+ 397, 326, 342, 820, 772, 820, 820, 820, 771, 0,
+ 370, 759, 820, 737, 749, 18, 752, 751, 738, 346,
+ 731, 736, 337, 228, 732, 729, 732, 729, 735, 725,
+ 368, 365, 729, 728, 728, 718, 733, 732, 383, 734,
+ 386, 721, 358, 320, 725, 721, 380, 717, 390, 722,
+ 714, 267, 720, 820, 820, 449, 820, 0, 722, 0,
+ 820, 438, 0, 820, 444, 0, 820, 820, 446, 820,
+ 449, 452, 820, 443, 820, 820, 820, 713, 725, 720,
+ 721, 707, 705, 343, 397, 716, 718, 718, 712, 712,
+
+ 707, 703, 700, 708, 711, 0, 706, 696, 704, 704,
+ 696, 697, 0, 700, 697, 698, 0, 686, 685, 693,
+ 679, 680, 686, 687, 682, 675, 677, 679, 686, 672,
+ 670, 670, 672, 669, 671, 679, 678, 668, 672, 667,
+ 661, 674, 676, 665, 666, 471, 502, 468, 538, 475,
+ 479, 428, 347, 0, 664, 0, 665, 0, 655, 653,
+ 661, 650, 655, 649, 655, 653, 0, 0, 658, 0,
+ 647, 646, 643, 647, 0, 653, 653, 638, 643, 0,
+ 0, 638, 653, 642, 640, 650, 645, 640, 631, 629,
+ 630, 627, 639, 629, 633, 638, 637, 628, 0, 617,
+
+ 440, 631, 623, 628, 627, 614, 0, 614, 626, 617,
+ 388, 0, 449, 0, 820, 0, 0, 0, 629, 615,
+ 616, 621, 620, 619, 614, 0, 0, 609, 0, 617,
+ 0, 614, 615, 613, 602, 598, 601, 613, 595, 609,
+ 608, 592, 604, 595, 0, 603, 593, 595, 575, 584,
+ 571, 0, 565, 561, 0, 0, 525, 0, 536, 527,
+ 0, 529, 530, 513, 513, 526, 0, 0, 523, 0,
+ 0, 0, 520, 0, 523, 509, 521, 0, 516, 499,
+ 0, 511, 499, 0, 0, 0, 514, 0, 0, 495,
+ 506, 499, 505, 491, 490, 0, 499, 493, 0, 0,
+
+ 497, 0, 493, 479, 490, 0, 484, 472, 472, 483,
+ 476, 0, 475, 475, 0, 473, 460, 0, 473, 470,
+ 0, 0, 470, 0, 457, 470, 0, 0, 0, 0,
+ 449, 465, 0, 0, 459, 433, 0, 425, 422, 385,
+ 383, 400, 0, 0, 383, 372, 247, 172, 0, 820,
+ 586, 594, 602, 610, 614, 618, 622, 628, 634, 638,
+ 640, 642
+ } ;
+
+static yyconst short int yy_def[463] =
+ { 0,
+ 450, 1, 450, 3, 450, 5, 451, 451, 452, 452,
+ 450, 450, 450, 450, 450, 450, 453, 450, 450, 454,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 455, 455, 450, 450,
+ 450, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 450,
+ 450, 450, 450, 450, 450, 450, 450, 456, 450, 456,
+ 450, 450, 457, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 453, 450, 458, 450, 450, 450, 454,
+ 459, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 460,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 455,
+ 453, 454, 450, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 450, 450, 450, 450, 456, 456, 457,
+ 450, 453, 461, 450, 454, 462, 450, 450, 450, 450,
+ 450, 450, 450, 460, 450, 450, 450, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 456, 453, 453, 454, 454, 450,
+ 450, 450, 450, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 456,
+ 453, 247, 454, 249, 450, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 456, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 456, 455, 455, 455, 455,
+
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 455,
+ 455, 455, 455, 455, 455, 455, 455, 455, 455, 0,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450
+ } ;
+
+static yyconst short int yy_nxt[891] =
+ { 0,
+ 12, 13, 14, 15, 15, 15, 13, 16, 17, 12,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 30, 31, 32, 33, 34, 35, 36,
+ 37, 37, 37, 37, 38, 37, 37, 39, 12, 40,
+ 41, 37, 42, 43, 44, 45, 46, 47, 48, 37,
+ 49, 37, 50, 37, 51, 52, 53, 54, 55, 56,
+ 57, 58, 59, 37, 37, 37, 60, 61, 62, 63,
+ 64, 115, 116, 118, 119, 64, 190, 191, 65, 66,
+ 66, 67, 66, 66, 66, 66, 66, 66, 66, 66,
+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,
+
+ 66, 66, 66, 66, 66, 66, 66, 66, 66, 68,
+ 68, 68, 68, 68, 68, 68, 66, 69, 66, 66,
+ 68, 68, 68, 68, 70, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 66, 66, 66, 66, 71,
+ 71, 72, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
+ 71, 71, 71, 71, 71, 71, 71, 71, 71, 73,
+ 73, 73, 73, 73, 73, 73, 71, 71, 71, 71,
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+
+ 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
+ 73, 73, 73, 73, 73, 71, 71, 71, 71, 77,
+ 77, 79, 80, 81, 81, 81, 79, 85, 88, 93,
+ 85, 449, 78, 78, 81, 80, 82, 82, 82, 81,
+ 94, 95, 121, 145, 89, 159, 122, 146, 98, 160,
+ 96, 97, 99, 101, 100, 100, 100, 86, 102, 104,
+ 86, 111, 111, 111, 183, 103, 104, 130, 105, 105,
+ 106, 107, 141, 201, 112, 113, 131, 126, 107, 142,
+ 164, 108, 109, 110, 127, 132, 107, 128, 202, 183,
+ 129, 137, 112, 107, 138, 149, 139, 143, 150, 108,
+
+ 113, 133, 144, 134, 147, 448, 135, 109, 174, 148,
+ 110, 161, 136, 152, 153, 156, 162, 242, 157, 243,
+ 165, 172, 172, 154, 175, 175, 155, 166, 80, 81,
+ 81, 81, 166, 158, 91, 167, 79, 80, 81, 81,
+ 81, 79, 81, 80, 81, 81, 81, 81, 81, 80,
+ 82, 82, 82, 81, 100, 100, 100, 183, 100, 100,
+ 100, 185, 230, 173, 179, 180, 176, 180, 179, 180,
+ 104, 180, 106, 106, 106, 183, 185, 231, 85, 179,
+ 180, 315, 107, 179, 180, 180, 185, 199, 104, 180,
+ 105, 105, 106, 195, 185, 200, 85, 107, 196, 315,
+
+ 107, 260, 261, 108, 109, 181, 228, 181, 86, 211,
+ 182, 182, 182, 209, 447, 107, 104, 212, 111, 111,
+ 111, 108, 210, 229, 213, 220, 86, 446, 107, 109,
+ 234, 112, 113, 221, 224, 237, 225, 235, 222, 262,
+ 238, 445, 444, 107, 443, 226, 85, 263, 239, 112,
+ 166, 80, 81, 81, 81, 166, 174, 113, 167, 246,
+ 246, 174, 250, 315, 250, 248, 248, 251, 251, 251,
+ 182, 182, 182, 182, 182, 182, 86, 252, 253, 85,
+ 174, 442, 91, 441, 180, 353, 180, 91, 315, 313,
+ 313, 440, 311, 311, 354, 252, 251, 251, 251, 180,
+
+ 251, 251, 251, 253, 180, 439, 91, 438, 437, 86,
+ 85, 180, 436, 180, 435, 434, 433, 432, 431, 430,
+ 429, 428, 427, 312, 312, 312, 180, 426, 425, 424,
+ 423, 180, 312, 312, 312, 422, 421, 420, 419, 418,
+ 86, 417, 416, 415, 312, 312, 312, 312, 312, 312,
+ 174, 414, 413, 412, 411, 410, 409, 408, 407, 314,
+ 314, 314, 406, 405, 404, 403, 402, 401, 314, 314,
+ 314, 400, 399, 398, 397, 396, 91, 395, 394, 393,
+ 314, 314, 314, 314, 314, 314, 74, 74, 74, 74,
+ 74, 74, 74, 74, 76, 76, 76, 76, 76, 76,
+
+ 76, 76, 84, 392, 84, 84, 84, 84, 84, 84,
+ 90, 391, 90, 390, 90, 90, 90, 90, 120, 120,
+ 120, 120, 168, 168, 168, 168, 170, 170, 170, 170,
+ 84, 84, 84, 389, 388, 84, 90, 90, 90, 387,
+ 386, 90, 184, 184, 247, 247, 249, 249, 385, 384,
+ 383, 382, 381, 380, 379, 378, 377, 376, 375, 374,
+ 373, 372, 371, 370, 369, 368, 367, 366, 365, 364,
+ 363, 362, 361, 360, 359, 358, 357, 356, 355, 352,
+ 351, 350, 349, 348, 347, 346, 345, 344, 343, 342,
+ 341, 340, 339, 338, 337, 336, 335, 334, 333, 332,
+
+ 331, 330, 329, 328, 327, 326, 325, 324, 323, 322,
+ 321, 320, 319, 318, 317, 316, 310, 309, 308, 307,
+ 306, 305, 304, 303, 302, 301, 300, 299, 298, 297,
+ 296, 295, 294, 293, 292, 291, 290, 289, 288, 287,
+ 286, 285, 284, 283, 282, 281, 280, 279, 278, 277,
+ 276, 275, 274, 273, 272, 271, 270, 269, 268, 267,
+ 266, 265, 264, 259, 258, 257, 256, 255, 254, 245,
+ 244, 241, 240, 236, 233, 232, 227, 223, 219, 218,
+ 217, 216, 215, 214, 208, 207, 206, 205, 204, 203,
+ 198, 197, 194, 193, 192, 189, 188, 91, 187, 186,
+
+ 178, 177, 171, 169, 163, 151, 140, 125, 124, 123,
+ 117, 114, 92, 91, 87, 83, 450, 75, 75, 11,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450
+ } ;
+
+static yyconst short int yy_chk[891] =
+ { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 2, 33, 33, 35, 35, 2, 126, 126, 2, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 9,
+ 10, 13, 13, 13, 13, 13, 13, 17, 19, 24,
+ 84, 448, 9, 10, 15, 15, 15, 15, 15, 15,
+ 24, 26, 38, 51, 19, 57, 38, 51, 27, 57,
+ 26, 26, 27, 28, 27, 27, 27, 17, 28, 30,
+ 84, 30, 30, 30, 108, 28, 29, 45, 29, 29,
+ 29, 30, 49, 134, 30, 30, 45, 44, 29, 49,
+ 61, 29, 29, 29, 44, 45, 30, 44, 134, 108,
+ 44, 47, 30, 29, 47, 53, 47, 50, 53, 29,
+
+ 30, 46, 50, 46, 52, 447, 46, 29, 90, 52,
+ 29, 58, 46, 55, 55, 56, 58, 162, 56, 162,
+ 61, 86, 86, 55, 91, 91, 55, 64, 64, 64,
+ 64, 64, 64, 56, 90, 64, 79, 79, 79, 79,
+ 79, 79, 81, 81, 81, 81, 81, 81, 82, 82,
+ 82, 82, 82, 82, 100, 100, 100, 109, 104, 104,
+ 104, 112, 154, 86, 100, 100, 91, 100, 104, 104,
+ 106, 104, 106, 106, 106, 109, 113, 154, 121, 100,
+ 100, 253, 106, 104, 104, 100, 112, 133, 105, 104,
+ 105, 105, 105, 130, 113, 133, 311, 106, 130, 253,
+
+ 105, 194, 194, 105, 105, 107, 153, 107, 121, 142,
+ 107, 107, 107, 141, 446, 105, 111, 142, 111, 111,
+ 111, 105, 141, 153, 142, 149, 311, 445, 111, 105,
+ 157, 111, 111, 149, 151, 159, 151, 157, 149, 195,
+ 159, 442, 441, 111, 440, 151, 172, 195, 159, 111,
+ 166, 166, 166, 166, 166, 166, 175, 111, 166, 172,
+ 172, 313, 179, 252, 179, 175, 175, 179, 179, 179,
+ 181, 181, 181, 182, 182, 182, 172, 184, 184, 246,
+ 248, 439, 175, 438, 182, 301, 182, 313, 252, 248,
+ 248, 436, 246, 246, 301, 184, 250, 250, 250, 182,
+
+ 251, 251, 251, 184, 182, 435, 248, 432, 431, 246,
+ 247, 251, 426, 251, 425, 423, 420, 419, 417, 416,
+ 414, 413, 411, 247, 247, 247, 251, 410, 409, 408,
+ 407, 251, 247, 247, 247, 405, 404, 403, 401, 398,
+ 247, 397, 395, 394, 247, 247, 247, 247, 247, 247,
+ 249, 393, 392, 391, 390, 387, 383, 382, 380, 249,
+ 249, 249, 379, 377, 376, 375, 373, 369, 249, 249,
+ 249, 366, 365, 364, 363, 362, 249, 360, 359, 357,
+ 249, 249, 249, 249, 249, 249, 451, 451, 451, 451,
+ 451, 451, 451, 451, 452, 452, 452, 452, 452, 452,
+
+ 452, 452, 453, 354, 453, 453, 453, 453, 453, 453,
+ 454, 353, 454, 351, 454, 454, 454, 454, 455, 455,
+ 455, 455, 456, 456, 456, 456, 457, 457, 457, 457,
+ 458, 458, 458, 350, 349, 458, 459, 459, 459, 348,
+ 347, 459, 460, 460, 461, 461, 462, 462, 346, 344,
+ 343, 342, 341, 340, 339, 338, 337, 336, 335, 334,
+ 333, 332, 330, 328, 325, 324, 323, 322, 321, 320,
+ 319, 310, 309, 308, 306, 305, 304, 303, 302, 300,
+ 298, 297, 296, 295, 294, 293, 292, 291, 290, 289,
+ 288, 287, 286, 285, 284, 283, 282, 279, 278, 277,
+
+ 276, 274, 273, 272, 271, 269, 266, 265, 264, 263,
+ 262, 261, 260, 259, 257, 255, 245, 244, 243, 242,
+ 241, 240, 239, 238, 237, 236, 235, 234, 233, 232,
+ 231, 230, 229, 228, 227, 226, 225, 224, 223, 222,
+ 221, 220, 219, 218, 216, 215, 214, 212, 211, 210,
+ 209, 208, 207, 205, 204, 203, 202, 201, 200, 199,
+ 198, 197, 196, 193, 192, 191, 190, 189, 188, 169,
+ 163, 161, 160, 158, 156, 155, 152, 150, 148, 147,
+ 146, 145, 144, 143, 140, 139, 138, 137, 136, 135,
+ 132, 131, 129, 128, 127, 125, 124, 122, 119, 115,
+
+ 99, 97, 78, 70, 59, 54, 48, 43, 42, 41,
+ 34, 31, 23, 20, 18, 16, 11, 8, 7, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450,
+ 450, 450, 450, 450, 450, 450, 450, 450, 450, 450
+ } ;
+
+static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr;
+static char *yy_full_match;
+static int yy_lp;
+#define REJECT \
+{ \
+*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \
+yy_cp = yy_full_match; /* restore poss. backed-over text */ \
+++yy_lp; \
+goto find_rule; \
+}
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#define INITIAL 0
+/* Included code before lex code */
+/*************** Includes and Defines *****************************/
+
+
+#include <map>
+#include "flex-lexer-plain-tab.h" // YACC generated definitions based on C++ grammar
+#include <errno.h>
+
+#define YYSTYPE std::string
+
+#include <string>
+#include <stdlib.h>
+//#include <string.h>
+#include <vector>
+
+extern std::string cl_scope_lval;
+extern std::string cl_var_lval;
+extern std::string cl_func_lval;
+
+std::vector<std::string> currentScope;
+
+bool setLexerInput(const std::string &in, const std::map<std::string, std::string> &ignoreTokens);
+void setUseIgnoreMacros(bool ignore);
+
+std::string getCurrentScope();
+void printScopeName();
+void cl_scope_lex_clean();
+void cl_scope_less(int count);
+
+//we keep a very primitive map with only symbol name
+//that we encountered so far
+std::map<std::string, std::string> g_symbols;
+std::map<std::string, std::string> g_macros;
+
+static std::map<std::string, std::string> g_ignoreList;
+static bool gs_useMacroIgnore = true;
+
+bool isaTYPE(char *string);
+bool isaMACRO(char *string);
+bool isignoredToken(char *string);
+
+static bool defineFound = false;
+
+/* Prototypes */
+#define WHITE_RETURN(x) /* do nothing */
+
+#define PA_KEYWORD_RETURN(x) RETURN_VAL(x) /* standard C PArser Keyword */
+#define CPP_KEYWORD_RETURN(x) PA_KEYWORD_RETURN(x) /* C++ keyword */
+#define PPPA_KEYWORD_RETURN(x) RETURN_VAL(x) /* both PreProcessor and PArser keyword */
+#define PP_KEYWORD_RETURN(x) IDENTIFIER_RETURN()
+
+#define IDENTIFIER_RETURN(){\
+ if(isaTYPE(yytext)){\
+ RETURN_VAL(LE_TYPEDEFname);\
+ }else if(isaMACRO(yytext)){\
+ RETURN_VAL(LE_MACRO);\
+ }else if(isignoredToken(yytext)){\
+ }else{ RETURN_VAL(LE_IDENTIFIER);}\
+ }
+
+
+#define PPOP_RETURN(x) RETURN_VAL((int)*yytext) /* PreProcess and Parser operator */
+#define NAMED_PPOP_RETURN(x) RETURN_VAL(x)
+#define ASCIIOP_RETURN(x) RETURN_VAL((int)*yytext) /* a single character operator */
+#define NAMEDOP_RETURN(x) RETURN_VAL(x) /* a multichar operator, with a name */
+
+#define NUMERICAL_RETURN(x) RETURN_VAL(x) /* some sort of constant */
+#define LITERAL_RETURN(x) RETURN_VAL(x) /* a string literal */
+#define C_COMMENT_RETURN(x) RETURN_VAL(x) /* C Style comment */
+#define RETURN_VAL(x) {\
+ cl_scope_lval = yytext;\
+ cl_var_lval = yytext;\
+ cl_func_lval = yytext;\
+ return(x);}
+
+#define PREPR 1
+
+#define WRAP_PREP 2
+
+#define CPP_COMMENT 3
+
+#define C_COMMENT 4
+
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines. This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+ if ( yy_current_buffer->yy_is_interactive ) \
+ { \
+ int c = '*', n; \
+ for ( n = 0; n < max_size && \
+ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+ buf[n] = (char) c; \
+ if ( c == '\n' ) \
+ buf[n++] = (char) c; \
+ if ( c == EOF && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" ); \
+ result = n; \
+ } \
+ else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+ && ferror( yyin ) ) \
+ YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+ if ( yyleng > 0 ) \
+ yy_current_buffer->yy_at_bol = \
+ (yytext[yyleng - 1] == '\n'); \
+ YY_USER_ACTION
+
+YY_DECL
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp, *yy_bp;
+ register int yy_act;
+
+
+
+
+ if ( yy_init )
+ {
+ yy_init = 0;
+
+#ifdef YY_USER_INIT
+ YY_USER_INIT;
+#endif
+
+ if ( ! yy_start )
+ yy_start = 1; /* first start state */
+
+ if ( ! yyin )
+ yyin = stdin;
+
+ if ( ! yyout )
+ yyout = stdout;
+
+ if ( ! yy_current_buffer )
+ yy_current_buffer =
+ yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_load_buffer_state();
+ }
+
+ while ( 1 ) /* loops until end-of-file is reached */
+ {
+ yy_cp = yy_c_buf_p;
+
+ /* Support of yytext. */
+ *yy_cp = yy_hold_char;
+
+ /* yy_bp points to the position in yy_ch_buf of the start of
+ * the current run.
+ */
+ yy_bp = yy_cp;
+
+ yy_current_state = yy_start;
+ yy_current_state += YY_AT_BOL();
+ yy_state_ptr = yy_state_buf;
+ *yy_state_ptr++ = yy_current_state;
+yy_match:
+ do
+ {
+ register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+ {
+ yy_current_state = (int) yy_def[yy_current_state];
+ if ( yy_current_state >= 451 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *yy_state_ptr++ = yy_current_state;
+ ++yy_cp;
+ }
+ while ( yy_base[yy_current_state] != 820 );
+
+yy_find_action:
+ yy_current_state = *--yy_state_ptr;
+ yy_lp = yy_accept[yy_current_state];
+find_rule: /* we branch to this label when backing up */
+ for ( ; ; ) /* until we find what rule we matched */
+ {
+ if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] )
+ {
+ yy_act = yy_acclist[yy_lp];
+ {
+ yy_full_match = yy_cp;
+ break;
+ }
+ }
+ --yy_cp;
+ yy_current_state = *--yy_state_ptr;
+ yy_lp = yy_accept[yy_current_state];
+ }
+
+ YY_DO_BEFORE_ACTION;
+
+ if ( yy_act != YY_END_OF_BUFFER )
+ {
+ int yyl;
+ for ( yyl = 0; yyl < yyleng; ++yyl )
+ if ( yytext[yyl] == '\n' )
+ ++yylineno;
+ }
+
+do_action: /* This label is used only to access EOF actions. */
+
+
+ switch ( yy_act )
+ { /* beginning of action switch */
+case 1:
+YY_RULE_SETUP
+{
+ BEGIN C_COMMENT;
+ }
+ YY_BREAK
+case 2:
+YY_RULE_SETUP
+{
+ BEGIN CPP_COMMENT;
+ }
+ YY_BREAK
+case 3:
+YY_RULE_SETUP
+{
+ WHITE_RETURN(' ');
+ }
+ YY_BREAK
+case 4:
+YY_RULE_SETUP
+{
+ WHITE_RETURN(' ');
+ }
+ YY_BREAK
+case 5:
+YY_RULE_SETUP
+{
+ WHITE_RETURN('\n');
+ }
+ YY_BREAK
+case 6:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_AUTO);}
+ YY_BREAK
+case 7:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_BREAK);}
+ YY_BREAK
+case 8:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_CASE);}
+ YY_BREAK
+case 9:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_CHAR);}
+ YY_BREAK
+case 10:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_CONST);}
+ YY_BREAK
+case 11:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_CONTINUE);}
+ YY_BREAK
+case 12:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_DEFAULT);}
+ YY_BREAK
+case 13:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_DEFINE);}
+ YY_BREAK
+case 14:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_OPDEFINED);}
+ YY_BREAK
+case 15:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_DO);}
+ YY_BREAK
+case 16:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_DOUBLE);}
+ YY_BREAK
+case 17:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_ELIF);}
+ YY_BREAK
+case 18:
+YY_RULE_SETUP
+{PPPA_KEYWORD_RETURN(LE_ELSE);}
+ YY_BREAK
+case 19:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_ENDIF);}
+ YY_BREAK
+case 20:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_ENUM);}
+ YY_BREAK
+case 21:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_ERROR);}
+ YY_BREAK
+case 22:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_EXTERN);}
+ YY_BREAK
+case 23:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_FLOAT);}
+ YY_BREAK
+case 24:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_FOR);}
+ YY_BREAK
+case 25:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_GOTO);}
+ YY_BREAK
+case 26:
+YY_RULE_SETUP
+{PPPA_KEYWORD_RETURN(LE_IF);}
+ YY_BREAK
+case 27:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_IFDEF);}
+ YY_BREAK
+case 28:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_IFNDEF);}
+ YY_BREAK
+case 29:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_INCLUDE); }
+ YY_BREAK
+case 30:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_INT);}
+ YY_BREAK
+case 31:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_LINE);}
+ YY_BREAK
+case 32:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_LONG);}
+ YY_BREAK
+case 33:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_PRAGMA);}
+ YY_BREAK
+case 34:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_REGISTER);}
+ YY_BREAK
+case 35:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_RETURN);}
+ YY_BREAK
+case 36:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_SHORT);}
+ YY_BREAK
+case 37:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_SIGNED);}
+ YY_BREAK
+case 38:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_SIZEOF);}
+ YY_BREAK
+case 39:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_STATIC);}
+ YY_BREAK
+case 40:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_STRUCT);}
+ YY_BREAK
+case 41:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_SWITCH);}
+ YY_BREAK
+case 42:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_TYPEDEF);}
+ YY_BREAK
+case 43:
+YY_RULE_SETUP
+{PP_KEYWORD_RETURN(LE_UNDEF);}
+ YY_BREAK
+case 44:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_UNION);}
+ YY_BREAK
+case 45:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_UNSIGNED);}
+ YY_BREAK
+case 46:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_VOID);}
+ YY_BREAK
+case 47:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_VOLATILE);}
+ YY_BREAK
+case 48:
+YY_RULE_SETUP
+{PA_KEYWORD_RETURN(LE_WHILE);}
+ YY_BREAK
+case 49:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_CLASS);}
+ YY_BREAK
+case 50:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_NAMESPACE);}
+ YY_BREAK
+case 51:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_DELETE);}
+ YY_BREAK
+case 52:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_FRIEND);}
+ YY_BREAK
+case 53:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_INLINE);}
+ YY_BREAK
+case 54:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_NEW);}
+ YY_BREAK
+case 55:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_OPERATOR);}
+ YY_BREAK
+case 56:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_OVERLOAD);}
+ YY_BREAK
+case 57:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_PROTECTED);}
+ YY_BREAK
+case 58:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_PRIVATE);}
+ YY_BREAK
+case 59:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_PUBLIC);}
+ YY_BREAK
+case 60:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_THIS);}
+ YY_BREAK
+case 61:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_VIRTUAL);}
+ YY_BREAK
+case 62:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_TEMPLATE);}
+ YY_BREAK
+case 63:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_TYPENAME);}
+ YY_BREAK
+case 64:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_DYNAMIC_CAST);}
+ YY_BREAK
+case 65:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_STATIC_CAST);}
+ YY_BREAK
+case 66:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_CONST_CAST);}
+ YY_BREAK
+case 67:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_REINTERPRET_CAST);}
+ YY_BREAK
+case 68:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_USING);}
+ YY_BREAK
+case 69:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_THROW);}
+ YY_BREAK
+case 70:
+YY_RULE_SETUP
+{CPP_KEYWORD_RETURN(LE_CATCH);}
+ YY_BREAK
+case 71:
+YY_RULE_SETUP
+{IDENTIFIER_RETURN();}
+ YY_BREAK
+case 72:
+YY_RULE_SETUP
+{NUMERICAL_RETURN(LE_INTEGERconstant);}
+ YY_BREAK
+case 73:
+YY_RULE_SETUP
+{NUMERICAL_RETURN(LE_OCTALconstant);}
+ YY_BREAK
+case 74:
+YY_RULE_SETUP
+{NUMERICAL_RETURN(LE_HEXconstant);}
+ YY_BREAK
+case 75:
+YY_RULE_SETUP
+{NUMERICAL_RETURN(LE_FLOATINGconstant);}
+ YY_BREAK
+case 76:
+YY_RULE_SETUP
+{
+ NUMERICAL_RETURN(LE_CHARACTERconstant);
+ }
+ YY_BREAK
+case 77:
+YY_RULE_SETUP
+{
+ LITERAL_RETURN(LE_STRINGliteral);}
+ YY_BREAK
+case 78:
+YY_RULE_SETUP
+{PPOP_RETURN(LE_LP);}
+ YY_BREAK
+case 79:
+YY_RULE_SETUP
+{PPOP_RETURN(LE_RP);}
+ YY_BREAK
+case 80:
+YY_RULE_SETUP
+{PPOP_RETURN(LE_COMMA);}
+ YY_BREAK
+case 81:
+YY_RULE_SETUP
+{BEGIN PREPR;}
+ YY_BREAK
+case 82:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_LC);}
+ YY_BREAK
+case 83:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_RC);}
+ YY_BREAK
+case 84:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_LB);}
+ YY_BREAK
+case 85:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_RB);}
+ YY_BREAK
+case 86:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_DOT);}
+ YY_BREAK
+case 87:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_AND);}
+ YY_BREAK
+case 88:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_STAR);}
+ YY_BREAK
+case 89:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_PLUS);}
+ YY_BREAK
+case 90:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_MINUS);}
+ YY_BREAK
+case 91:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_NEGATE);}
+ YY_BREAK
+case 92:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_NOT);}
+ YY_BREAK
+case 93:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_DIV);}
+ YY_BREAK
+case 94:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_MOD);}
+ YY_BREAK
+case 95:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_LT);}
+ YY_BREAK
+case 96:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_GT);}
+ YY_BREAK
+case 97:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_XOR);}
+ YY_BREAK
+case 98:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_PIPE);}
+ YY_BREAK
+case 99:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_QUESTION);}
+ YY_BREAK
+case 100:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_COLON);}
+ YY_BREAK
+case 101:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_SEMICOLON);}
+ YY_BREAK
+case 102:
+YY_RULE_SETUP
+{ASCIIOP_RETURN(LE_ASSIGN);}
+ YY_BREAK
+case 103:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_DOTstar);}
+ YY_BREAK
+case 104:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_CLCL);}
+ YY_BREAK
+case 105:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ARROW);}
+ YY_BREAK
+case 106:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ARROWstar);}
+ YY_BREAK
+case 107:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ICR);}
+ YY_BREAK
+case 108:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_DECR);}
+ YY_BREAK
+case 109:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_LS);}
+ YY_BREAK
+case 110:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_RS);}
+ YY_BREAK
+case 111:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_LE);}
+ YY_BREAK
+case 112:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_GE);}
+ YY_BREAK
+case 113:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_EQ);}
+ YY_BREAK
+case 114:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_NE);}
+ YY_BREAK
+case 115:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ANDAND);}
+ YY_BREAK
+case 116:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_OROR);}
+ YY_BREAK
+case 117:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_MULTassign);}
+ YY_BREAK
+case 118:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_DIVassign);}
+ YY_BREAK
+case 119:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_MODassign);}
+ YY_BREAK
+case 120:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_PLUSassign);}
+ YY_BREAK
+case 121:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_MINUSassign);}
+ YY_BREAK
+case 122:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_LSassign);}
+ YY_BREAK
+case 123:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_RSassign);}
+ YY_BREAK
+case 124:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ANDassign);}
+ YY_BREAK
+case 125:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ERassign);}
+ YY_BREAK
+case 126:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ORassign);}
+ YY_BREAK
+case 127:
+YY_RULE_SETUP
+{NAMEDOP_RETURN(LE_ELLIPSIS);}
+ YY_BREAK
+case YY_STATE_EOF(INITIAL):
+case YY_STATE_EOF(PREPR):
+case YY_STATE_EOF(WRAP_PREP):
+case YY_STATE_EOF(CPP_COMMENT):
+case YY_STATE_EOF(C_COMMENT):
+{
+ //reset lexer
+ yyterminate();
+ }
+ YY_BREAK
+case 128:
+YY_RULE_SETUP
+{return yytext[0];}
+ YY_BREAK
+case 129:
+YY_RULE_SETUP
+{
+ defineFound = false;
+ cl_scope_lineno++;
+ BEGIN INITIAL;
+ }
+ YY_BREAK
+case 130:
+YY_RULE_SETUP
+{
+ BEGIN WRAP_PREP;
+ }
+ YY_BREAK
+case 131:
+YY_RULE_SETUP
+{
+ defineFound = true;
+ }
+ YY_BREAK
+case 132:
+YY_RULE_SETUP
+{
+ cl_scope_lineno++;
+ BEGIN PREPR;
+ }
+ YY_BREAK
+case 133:
+YY_RULE_SETUP
+{
+ if(defineFound)
+ {
+ defineFound = false;
+ g_macros[yytext] = true;
+ }
+ }
+ YY_BREAK
+case 134:
+YY_RULE_SETUP
+{
+ if(defineFound)
+ {
+ defineFound = false;
+ g_macros[yytext] = true;
+ }
+ }
+ YY_BREAK
+case 135:
+YY_RULE_SETUP
+{}
+ YY_BREAK
+case 136:
+YY_RULE_SETUP
+{}
+ YY_BREAK
+case 137:
+YY_RULE_SETUP
+{BEGIN INITIAL;}
+ YY_BREAK
+case 138:
+YY_RULE_SETUP
+{}
+ YY_BREAK
+case 139:
+YY_RULE_SETUP
+{BEGIN INITIAL;}
+ YY_BREAK
+case 140:
+YY_RULE_SETUP
+{}
+ YY_BREAK
+case 141:
+YY_RULE_SETUP
+ECHO;
+ YY_BREAK
+
+ case YY_END_OF_BUFFER:
+ {
+ /* Amount of text matched not including the EOB char. */
+ int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+ /* Undo the effects of YY_DO_BEFORE_ACTION. */
+ *yy_cp = yy_hold_char;
+ YY_RESTORE_YY_MORE_OFFSET
+
+ if ( yy_current_buffer->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
+ * yylex(). 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.
+ */
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yy_current_buffer->yy_input_file = yyin;
+ yy_current_buffer->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 ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ { /* This was really a NUL. */
+ yy_state_type yy_next_state;
+
+ yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ /* 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 );
+
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+ if ( yy_next_state )
+ {
+ /* Consume the NUL. */
+ yy_cp = ++yy_c_buf_p;
+ yy_current_state = yy_next_state;
+ goto yy_match;
+ }
+
+ else
+ {
+ yy_cp = yy_c_buf_p;
+ goto yy_find_action;
+ }
+ }
+
+ else switch ( yy_get_next_buffer() )
+ {
+ case EOB_ACT_END_OF_FILE:
+ {
+ yy_did_buffer_switch_on_eof = 0;
+
+ if ( yywrap() )
+ {
+ /* 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.
+ */
+ yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+ yy_act = YY_STATE_EOF(YY_START);
+ goto do_action;
+ }
+
+ else
+ {
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+ }
+ break;
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p =
+ yytext_ptr + yy_amount_of_matched_text;
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_match;
+
+ case EOB_ACT_LAST_MATCH:
+ yy_c_buf_p =
+ &yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+ yy_current_state = yy_get_previous_state();
+
+ yy_cp = yy_c_buf_p;
+ yy_bp = yytext_ptr + YY_MORE_ADJ;
+ goto yy_find_action;
+ }
+ break;
+ }
+
+ default:
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--no action found" );
+ } /* end of action switch */
+ } /* end of scanning one token */
+ } /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ * EOB_ACT_LAST_MATCH -
+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ * EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+ {
+ register char *dest = yy_current_buffer->yy_ch_buf;
+ register char *source = yytext_ptr;
+ register int number_to_move, i;
+ int ret_val;
+
+ if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+ YY_FATAL_ERROR(
+ "fatal flex scanner internal error--end of buffer missed" );
+
+ if ( yy_current_buffer->yy_fill_buffer == 0 )
+ { /* Don't try to fill the buffer, so this is an EOF. */
+ if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+ {
+ /* We matched a single character, the EOB, so
+ * treat this as a final EOF.
+ */
+ return EOB_ACT_END_OF_FILE;
+ }
+
+ else
+ {
+ /* We matched some text prior to the EOB, first
+ * process it.
+ */
+ return EOB_ACT_LAST_MATCH;
+ }
+ }
+
+ /* Try to read more data. */
+
+ /* First move last chars to start of buffer. */
+ number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+ for ( i = 0; i < number_to_move; ++i )
+ *(dest++) = *(source++);
+
+ if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+ /* don't do the read, it's not guaranteed to return an EOF,
+ * just force an EOF
+ */
+ yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+ else
+ {
+ int num_to_read =
+ yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+ while ( num_to_read <= 0 )
+ { /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+ YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+ /* just a shorter name for the current buffer */
+ YY_BUFFER_STATE b = yy_current_buffer;
+
+ int yy_c_buf_p_offset =
+ (int) (yy_c_buf_p - b->yy_ch_buf);
+
+ if ( b->yy_is_our_buffer )
+ {
+ int new_size = b->yy_buf_size * 2;
+
+ if ( new_size <= 0 )
+ b->yy_buf_size += b->yy_buf_size / 8;
+ else
+ b->yy_buf_size *= 2;
+
+ b->yy_ch_buf = (char *)
+ /* Include room in for 2 EOB chars. */
+ yy_flex_realloc( (void *) b->yy_ch_buf,
+ b->yy_buf_size + 2 );
+ }
+ 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" );
+
+ yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+ num_to_read = yy_current_buffer->yy_buf_size -
+ number_to_move - 1;
+#endif
+ }
+
+ if ( num_to_read > YY_READ_BUF_SIZE )
+ num_to_read = YY_READ_BUF_SIZE;
+
+ /* Read in more data. */
+ YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+ yy_n_chars, num_to_read );
+
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ if ( yy_n_chars == 0 )
+ {
+ if ( number_to_move == YY_MORE_ADJ )
+ {
+ ret_val = EOB_ACT_END_OF_FILE;
+ yyrestart( yyin );
+ }
+
+ else
+ {
+ ret_val = EOB_ACT_LAST_MATCH;
+ yy_current_buffer->yy_buffer_status =
+ YY_BUFFER_EOF_PENDING;
+ }
+ }
+
+ else
+ ret_val = EOB_ACT_CONTINUE_SCAN;
+
+ yy_n_chars += number_to_move;
+ yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+ yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+ yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+ return ret_val;
+ }
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+ {
+ register yy_state_type yy_current_state;
+ register char *yy_cp;
+
+ yy_current_state = yy_start;
+ yy_current_state += YY_AT_BOL();
+ yy_state_ptr = yy_state_buf;
+ *yy_state_ptr++ = yy_current_state;
+
+ for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+ {
+ register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ 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 >= 451 )
+ yy_c = yy_meta[(unsigned int) yy_c];
+ }
+ yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+ *yy_state_ptr++ = yy_current_state;
+ }
+
+ return yy_current_state;
+ }
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ * next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+ {
+ register int yy_is_jam;
+
+ register YY_CHAR yy_c = 1;
+ 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 >= 451 )
+ 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 == 450);
+ if ( ! yy_is_jam )
+ *yy_state_ptr++ = yy_current_state;
+
+ return yy_is_jam ? 0 : yy_current_state;
+ }
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+ {
+ register char *yy_cp = yy_c_buf_p;
+
+ /* undo effects of setting up yytext */
+ *yy_cp = yy_hold_char;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ { /* need to shift things up to make room */
+ /* +2 for EOB chars. */
+ register int number_to_move = yy_n_chars + 2;
+ register char *dest = &yy_current_buffer->yy_ch_buf[
+ yy_current_buffer->yy_buf_size + 2];
+ register char *source =
+ &yy_current_buffer->yy_ch_buf[number_to_move];
+
+ while ( source > yy_current_buffer->yy_ch_buf )
+ *--dest = *--source;
+
+ yy_cp += (int) (dest - source);
+ yy_bp += (int) (dest - source);
+ yy_current_buffer->yy_n_chars =
+ yy_n_chars = yy_current_buffer->yy_buf_size;
+
+ if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+ YY_FATAL_ERROR( "flex scanner push-back overflow" );
+ }
+
+ *--yy_cp = (char) c;
+
+ if ( c == '\n' )
+ --yylineno;
+
+ yytext_ptr = yy_bp;
+ yy_hold_char = *yy_cp;
+ yy_c_buf_p = yy_cp;
+ }
+#endif /* ifndef YY_NO_UNPUT */
+
+
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+ {
+ int c;
+
+ *yy_c_buf_p = yy_hold_char;
+
+ if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+ {
+ /* yy_c_buf_p now points to the character we want to return.
+ * If this occurs *before* the EOB characters, then it's a
+ * valid NUL; if not, then we've hit the end of the buffer.
+ */
+ if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+ /* This was really a NUL. */
+ *yy_c_buf_p = '\0';
+
+ else
+ { /* need more input */
+ int offset = yy_c_buf_p - yytext_ptr;
+ ++yy_c_buf_p;
+
+ switch ( yy_get_next_buffer() )
+ {
+ 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. */
+ yyrestart( yyin );
+
+ /* fall through */
+
+ case EOB_ACT_END_OF_FILE:
+ {
+ if ( yywrap() )
+ return EOF;
+
+ if ( ! yy_did_buffer_switch_on_eof )
+ YY_NEW_FILE;
+#ifdef __cplusplus
+ return yyinput();
+#else
+ return input();
+#endif
+ }
+
+ case EOB_ACT_CONTINUE_SCAN:
+ yy_c_buf_p = yytext_ptr + offset;
+ break;
+ }
+ }
+ }
+
+ c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
+ *yy_c_buf_p = '\0'; /* preserve yytext */
+ yy_hold_char = *++yy_c_buf_p;
+
+ yy_current_buffer->yy_at_bol = (c == '\n');
+ if ( yy_current_buffer->yy_at_bol )
+ ++yylineno;
+
+ return c;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+ {
+ if ( ! yy_current_buffer )
+ yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+ yy_init_buffer( yy_current_buffer, input_file );
+ yy_load_buffer_state();
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+ {
+ if ( yy_current_buffer == new_buffer )
+ return;
+
+ if ( yy_current_buffer )
+ {
+ /* Flush out information for old buffer. */
+ *yy_c_buf_p = yy_hold_char;
+ yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+ yy_current_buffer->yy_n_chars = yy_n_chars;
+ }
+
+ yy_current_buffer = new_buffer;
+ yy_load_buffer_state();
+
+ /* We don't actually know whether we did this switch during
+ * EOF (yywrap()) processing, but the only time this flag
+ * is looked at is after yywrap() is called, so it's safe
+ * to go ahead and always set it.
+ */
+ yy_did_buffer_switch_on_eof = 1;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+ {
+ yy_n_chars = yy_current_buffer->yy_n_chars;
+ yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+ yyin = yy_current_buffer->yy_input_file;
+ yy_hold_char = *yy_c_buf_p;
+ }
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_buf_size = size;
+
+ /* yy_ch_buf has to be 2 characters longer than the size given because
+ * we need to put in 2 end-of-buffer characters.
+ */
+ b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+ if ( ! b->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+ b->yy_is_our_buffer = 1;
+
+ yy_init_buffer( b, file );
+
+ return b;
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+ {
+ if ( ! b )
+ return;
+
+ if ( b == yy_current_buffer )
+ yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+ if ( b->yy_is_our_buffer )
+ yy_flex_free( (void *) b->yy_ch_buf );
+
+ yy_flex_free( (void *) b );
+ }
+
+
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+ {
+ yy_flush_buffer( b );
+
+ b->yy_input_file = file;
+ b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+ b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+ b->yy_is_interactive = 0;
+#else
+ b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+ }
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+ {
+ if ( ! b )
+ return;
+
+ b->yy_n_chars = 0;
+
+ /* We always need two end-of-buffer characters. The first causes
+ * a transition to the end-of-buffer state. The second causes
+ * a jam in that state.
+ */
+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+ b->yy_buf_pos = &b->yy_ch_buf[0];
+
+ b->yy_at_bol = 1;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ if ( b == yy_current_buffer )
+ yy_load_buffer_state();
+ }
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+ {
+ YY_BUFFER_STATE b;
+
+ if ( size < 2 ||
+ base[size-2] != YY_END_OF_BUFFER_CHAR ||
+ base[size-1] != YY_END_OF_BUFFER_CHAR )
+ /* They forgot to leave room for the EOB's. */
+ return 0;
+
+ b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+ if ( ! b )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
+ b->yy_buf_pos = b->yy_ch_buf = base;
+ b->yy_is_our_buffer = 0;
+ b->yy_input_file = 0;
+ b->yy_n_chars = b->yy_buf_size;
+ b->yy_is_interactive = 0;
+ b->yy_at_bol = 1;
+ b->yy_fill_buffer = 0;
+ b->yy_buffer_status = YY_BUFFER_NEW;
+
+ yy_switch_to_buffer( b );
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+ {
+ int len;
+ for ( len = 0; yy_str[len]; ++len )
+ ;
+
+ return yy_scan_bytes( yy_str, len );
+ }
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+ {
+ YY_BUFFER_STATE b;
+ char *buf;
+ yy_size_t n;
+ int i;
+
+ /* Get memory for full buffer, including space for trailing EOB's. */
+ n = len + 2;
+ buf = (char *) yy_flex_alloc( n );
+ if ( ! buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+ for ( i = 0; i < len; ++i )
+ buf[i] = bytes[i];
+
+ buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+ b = yy_scan_buffer( buf, n );
+ if ( ! b )
+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+ /* It's okay to grow etc. this buffer, and we should throw it
+ * away when we're done.
+ */
+ b->yy_is_our_buffer = 1;
+
+ return b;
+ }
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+ {
+ if ( yy_start_stack_ptr >= yy_start_stack_depth )
+ {
+ yy_size_t new_size;
+
+ yy_start_stack_depth += YY_START_STACK_INCR;
+ new_size = yy_start_stack_depth * sizeof( int );
+
+ if ( ! yy_start_stack )
+ yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+ else
+ yy_start_stack = (int *) yy_flex_realloc(
+ (void *) yy_start_stack, new_size );
+
+ if ( ! yy_start_stack )
+ YY_FATAL_ERROR(
+ "out of memory expanding start-condition stack" );
+ }
+
+ yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+ BEGIN(new_state);
+ }
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+ {
+ if ( --yy_start_stack_ptr < 0 )
+ YY_FATAL_ERROR( "start-condition stack underflow" );
+
+ BEGIN(yy_start_stack[yy_start_stack_ptr]);
+ }
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+ {
+ return yy_start_stack[yy_start_stack_ptr - 1];
+ }
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+ {
+ (void) fprintf( stderr, "%s\n", msg );
+ exit( YY_EXIT_FAILURE );
+ }
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+ do \
+ { \
+ /* Undo effects of setting up yytext. */ \
+ yytext[yyleng] = yy_hold_char; \
+ yy_c_buf_p = yytext + n; \
+ yy_hold_char = *yy_c_buf_p; \
+ *yy_c_buf_p = '\0'; \
+ yyleng = n; \
+ } \
+ while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+ {
+ register int i;
+ for ( i = 0; i < n; ++i )
+ s1[i] = s2[i];
+ }
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+ {
+ register int n;
+ for ( n = 0; s[n]; ++n )
+ ;
+
+ return n;
+ }
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+ {
+ return (void *) malloc( size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+ {
+ /* The cast to (char *) in the following accommodates both
+ * implementations that use char* generic pointers, and those
+ * that use void* generic pointers. It works with the latter
+ * because both ANSI C and C++ allow castless assignment from
+ * any pointer type to void*, and deal with argument conversions
+ * as though doing an assignment.
+ */
+ return (void *) realloc( (char *) ptr, size );
+ }
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+ {
+ free( ptr );
+ }
+
+#if YY_MAIN
+int main()
+ {
+ yylex();
+ return 0;
+ }
+#endif
+
+
+bool isaTYPE(char *string)
+{
+ return g_symbols.find(string) != g_symbols.end();
+}
+
+bool isignoredToken(char *string)
+{
+ std::map<std::string, std::string>::iterator iter = g_ignoreList.find(string);
+ if(iter == g_ignoreList.end()){
+ /* this string is not in the ignore macro list */
+ return false;
+ } else {
+ /* it exist, but maybe it has a replacement */
+ return iter->second.empty();
+ }
+}
+
+bool isaMACRO(char *string)
+{
+ if(gs_useMacroIgnore) {
+ return g_macros.find(string) != g_macros.end();
+ }else{
+ return false;
+ }
+}
+
+void cl_scope_lex_clean()
+{
+ yy_flush_buffer(YY_CURRENT_BUFFER);
+ yy_delete_buffer(YY_CURRENT_BUFFER);
+ cl_scope_lineno = 1;
+ currentScope.clear();
+ g_symbols.clear();
+ g_macros.clear();
+}
+
+/**
+ * scope util functions
+ */
+void printScopeName()
+{
+ /*
+ if(currentScope.empty())
+ {
+ printf("%d: current scope is global scope\n", cl_scope_lineno );
+ }
+ else
+ {
+ printf("%d: current scope is %s\n", cl_scope_lineno, getCurrentScope().c_str());
+ }
+ */
+}
+
+void increaseScope()
+{
+ static int value = 0;
+ std::string scopeName("__anon_");
+
+ char buf[100];
+ sprintf(buf, "%d", value++);
+ scopeName += buf;
+ currentScope.push_back(scopeName);
+}
+
+std::string getCurrentScope()
+{
+ //format scope name
+ std::string scope;
+ if(currentScope.empty()){
+ return "";
+ }
+
+ std::vector<std::string> tmpscope(currentScope);
+
+ while( tmpscope.empty() == false ){
+ std::string _scope = tmpscope.front();
+ tmpscope.erase(tmpscope.begin());
+
+ if(_scope.find("__anon_") == (size_t)-1 && _scope.empty() == false){
+ scope += _scope;
+ scope += "::";
+ }
+ }
+
+ //remove the trailing '::'
+ scope.erase(scope.find_last_not_of(":")+1);
+ return scope;
+}
+
+/*******************************************************************/
+bool setLexerInput(const std::string &in, const std::map<std::string, std::string> &ignoreTokens)
+{
+ BEGIN INITIAL;
+ yy_scan_string(in.c_str());
+
+ g_ignoreList = ignoreTokens;
+
+ //update the working file name
+ return true;
+}
+
+void setUseIgnoreMacros(bool ignore) {
+ gs_useMacroIgnore = ignore;
+}
+
+int yywrap(){
+ return 1;
+}
+
+void cl_scope_less(int count){
+ yyless(count);
+}
diff --git a/plugins/symbol-db/cxxparser/function-parser.cpp b/plugins/symbol-db/cxxparser/function-parser.cpp
new file mode 100644
index 0000000..b985761
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/function-parser.cpp
@@ -0,0 +1,1014 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+
+#ifndef lint
+static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
+#endif
+#define YYBYACC 1
+#define YYMAJOR 1
+#define YYMINOR 9
+#define yyclearin (yychar=(-1))
+#define yyerrok (yyerrflag=0)
+#define YYRECOVERING (yyerrflag!=0)
+#define yyparse cl_func_parse
+#define yylex cl_func_lex
+#define yyerror cl_func_error
+#define yychar cl_func_char
+#define yyval cl_func_val
+#define yylval cl_func_lval
+#define yydebug cl_func_debug
+#define yynerrs cl_func_nerrs
+#define yyerrflag cl_func_errflag
+#define yyss cl_func_ss
+#define yyssp cl_func_ssp
+#define yyvs cl_func_vs
+#define yyvsp cl_func_vsp
+#define yylhs cl_func_lhs
+#define yylen cl_func_len
+#define yydefred cl_func_defred
+#define yydgoto cl_func_dgoto
+#define yysindex cl_func_sindex
+#define yyrindex cl_func_rindex
+#define yygindex cl_func_gindex
+#define yytable cl_func_table
+#define yycheck cl_func_check
+#define yyname cl_func_name
+#define yyrule cl_func_rule
+#define YYPREFIX "cl_func_"
+/* Copyright Eran Ifrah(c)*/
+/*************** Includes and Defines *****************************/
+#include "string"
+#include "vector"
+#include "stdio.h"
+#include "map"
+#include "function-result.h"
+
+#define YYDEBUG_LEXER_TEXT (cl_func_lval)
+#define YYSTYPE std::string
+#define YYDEBUG 0 /* get the pretty debugging code to compile*/
+
+#ifdef yylex
+#undef yylex
+#define yylex cl_scope_lex
+#endif
+
+int cl_func_parse();
+void cl_func_error(char *string);
+
+static FunctionList *g_funcs = NULL;
+static clFunction curr_func;
+
+/*---------------------------------------------*/
+/* externs defined in the lexer*/
+/*---------------------------------------------*/
+extern char *cl_func_text;
+extern int cl_scope_lex();
+extern bool setLexerInput(const std::string &in, const std::map<std::string, std::string> &ignoreTokens);
+extern int cl_scope_lineno;
+extern void cl_scope_lex_clean();
+
+
+/*************** Standard ytab.c continues here *********************/
+#define LE_AUTO 257
+#define LE_DOUBLE 258
+#define LE_INT 259
+#define LE_STRUCT 260
+#define LE_BREAK 261
+#define LE_ELSE 262
+#define LE_LONG 263
+#define LE_SWITCH 264
+#define LE_CASE 265
+#define LE_ENUM 266
+#define LE_REGISTER 267
+#define LE_TYPEDEF 268
+#define LE_CHAR 269
+#define LE_EXTERN 270
+#define LE_RETURN 271
+#define LE_UNION 272
+#define LE_CONST 273
+#define LE_FLOAT 274
+#define LE_SHORT 275
+#define LE_UNSIGNED 276
+#define LE_CONTINUE 277
+#define LE_FOR 278
+#define LE_SIGNED 279
+#define LE_VOID 280
+#define LE_DEFAULT 281
+#define LE_GOTO 282
+#define LE_SIZEOF 283
+#define LE_VOLATILE 284
+#define LE_DO 285
+#define LE_IF 286
+#define LE_STATIC 287
+#define LE_WHILE 288
+#define LE_NEW 289
+#define LE_DELETE 290
+#define LE_THIS 291
+#define LE_OPERATOR 292
+#define LE_CLASS 293
+#define LE_PUBLIC 294
+#define LE_PROTECTED 295
+#define LE_PRIVATE 296
+#define LE_VIRTUAL 297
+#define LE_FRIEND 298
+#define LE_INLINE 299
+#define LE_OVERLOAD 300
+#define LE_TEMPLATE 301
+#define LE_TYPENAME 302
+#define LE_THROW 303
+#define LE_CATCH 304
+#define LE_IDENTIFIER 305
+#define LE_STRINGliteral 306
+#define LE_FLOATINGconstant 307
+#define LE_INTEGERconstant 308
+#define LE_CHARACTERconstant 309
+#define LE_OCTALconstant 310
+#define LE_HEXconstant 311
+#define LE_POUNDPOUND 312
+#define LE_CComment 313
+#define LE_CPPComment 314
+#define LE_NAMESPACE 315
+#define LE_USING 316
+#define LE_TYPEDEFname 317
+#define LE_ARROW 318
+#define LE_ICR 319
+#define LE_DECR 320
+#define LE_LS 321
+#define LE_RS 322
+#define LE_LE 323
+#define LE_GE 324
+#define LE_EQ 325
+#define LE_NE 326
+#define LE_ANDAND 327
+#define LE_OROR 328
+#define LE_ELLIPSIS 329
+#define LE_CLCL 330
+#define LE_DOTstar 331
+#define LE_ARROWstar 332
+#define LE_MULTassign 333
+#define LE_DIVassign 334
+#define LE_MODassign 335
+#define LE_PLUSassign 336
+#define LE_MINUSassign 337
+#define LE_LSassign 338
+#define LE_RSassign 339
+#define LE_ANDassign 340
+#define LE_ERassign 341
+#define LE_ORassign 342
+#define LE_MACRO 343
+#define LE_DYNAMIC_CAST 344
+#define LE_STATIC_CAST 345
+#define LE_CONST_CAST 346
+#define LE_REINTERPRET_CAST 347
+#define YYERRCODE 256
+short cl_func_lhs[] = { -1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 0, 0, 5, 3, 3, 6,
+ 6, 8, 8, 7, 7, 9, 9, 10, 10, 10,
+ 11, 11, 11, 15, 15, 15, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
+ 16, 16, 16, 16, 16, 16, 16, 20, 4, 21,
+ 21, 23, 23, 13, 13, 22, 22, 24, 25, 24,
+ 18, 18, 12, 12, 26, 26, 27, 27, 14, 17,
+ 17, 17, 19, 19, 19,
+};
+short cl_func_len[] = { 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 1, 0, 2, 0, 2, 1, 0,
+ 2, 1, 3, 1, 1, 0, 4, 0, 1, 3,
+ 4, 4, 7, 1, 2, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 2, 1, 1, 1, 0, 13, 0,
+ 4, 1, 1, 0, 2, 0, 2, 2, 0, 4,
+ 0, 1, 0, 1, 0, 1, 0, 2, 2, 0,
+ 1, 1, 3, 3, 6,
+};
+short cl_func_defred[] = { 15,
+ 0, 19, 16, 0, 91, 92, 18, 0, 0, 0,
+ 0, 82, 0, 24, 25, 22, 0, 0, 84, 74,
+ 21, 0, 27, 0, 74, 23, 6, 1, 0, 2,
+ 5, 3, 0, 0, 9, 0, 14, 87, 75, 0,
+ 13, 12, 4, 8, 7, 10, 11, 78, 0, 94,
+ 0, 93, 0, 0, 0, 0, 0, 29, 74, 0,
+ 88, 86, 89, 65, 66, 53, 57, 58, 49, 50,
+ 59, 60, 61, 62, 51, 52, 56, 54, 67, 47,
+ 48, 45, 37, 38, 39, 40, 41, 42, 43, 44,
+ 46, 55, 0, 0, 36, 79, 35, 68, 0, 87,
+ 0, 80, 63, 64, 0, 30, 95, 0, 87, 0,
+ 0, 31, 32, 0, 0, 0, 0, 0, 0, 87,
+ 0, 77, 72, 73, 69, 33, 71,
+};
+short cl_func_dgoto[] = { 1,
+ 37, 38, 3, 7, 4, 16, 17, 18, 10, 57,
+ 58, 59, 24, 50, 56, 95, 8, 13, 25, 105,
+ 115, 119, 125, 39, 60, 63, 51,
+};
+short cl_func_sindex[] = { 0,
+ -220, 0, 0, -15, 0, 0, 0, -244, 19, -233,
+ -226, 0, -193, 0, 0, 0, -223, -6, 0, 0,
+ 0, -226, 0, -82, 0, 0, 0, 0, -189, 0,
+ 0, 0, -55, -55, 0, -59, 0, 0, 0, -120,
+ 0, 0, 0, 0, 0, 0, 0, 0, -193, 0,
+ 33, 0, -33, -58, -221, 45, 6, 0, 0, -242,
+ 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, 49, 5, 0, 0, 0, 0, -193, 0,
+ -63, 0, 0, 0, -193, 0, 0, -57, 0, -206,
+ -193, 0, 0, 61, 41, 7, -193, -205, -42, 0,
+ -13, 0, 0, 0, 0, 0, 0,
+};
+short cl_func_rindex[] = { 0,
+ 62, 0, 0, -147, 0, 0, 0, -114, 0, -106,
+ 10, 0, 71, 0, 0, 0, 0, 0, 0, 0,
+ 0, 10, 0, 0, 0, 0, 0, 0, -22, 0,
+ 0, 0, 4, 11, 0, -8, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -29, 0,
+ -23, 0, 0, 67, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 71, 0,
+ 0, 0, 0, 0, -36, 0, 0, 21, 0, -24,
+ -29, 0, 0, 0, -27, 0, 48, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,
+};
+short cl_func_gindex[] = { 0,
+ 44, 8, 0, 0, 0, 86, 0, 0, 0, -70,
+ 14, -5, 1, -14, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0,
+};
+#define YYTABLESIZE 376
+short cl_func_table[] = { 91,
+ 49, 96, 111, 87, 89, 55, 93, 20, 85, 83,
+ 79, 84, 92, 86, 28, 4, 124, 85, 4, 4,
+ 85, 4, 83, 52, 83, 40, 80, 127, 81, 87,
+ 99, 76, 28, 87, 70, 2, 70, 22, 85, 4,
+ 116, 8, 6, 5, 8, 8, 121, 8, 7, 99,
+ 99, 7, 7, 20, 7, 23, 9, 94, 87, 101,
+ 88, 87, 87, 12, 87, 8, 14, 100, 120, 41,
+ 62, 20, 7, 42, 61, 15, 46, 47, 11, 19,
+ 123, 21, 87, 97, 98, 107, 83, 102, 28, 103,
+ 90, 28, 82, 112, 113, 76, 114, 104, 70, 110,
+ 117, 118, 85, 4, 122, 126, 34, 26, 109, 0,
+ 90, 90, 106, 0, 0, 90, 0, 87, 0, 17,
+ 17, 90, 0, 0, 0, 90, 90, 90, 90, 8,
+ 0, 90, 90, 0, 0, 0, 7, 0, 0, 0,
+ 0, 0, 0, 26, 26, 0, 0, 0, 26, 90,
+ 0, 81, 81, 90, 26, 0, 81, 90, 26, 26,
+ 26, 26, 81, 0, 26, 26, 81, 81, 81, 81,
+ 0, 53, 81, 81, 0, 27, 28, 0, 0, 0,
+ 29, 0, 26, 0, 54, 0, 30, 0, 0, 0,
+ 26, 31, 32, 33, 27, 28, 34, 35, 81, 29,
+ 0, 0, 27, 28, 0, 30, 0, 43, 0, 0,
+ 31, 32, 33, 30, 0, 34, 35, 0, 31, 32,
+ 44, 0, 36, 45, 35, 0, 0, 0, 83, 83,
+ 0, 0, 0, 83, 0, 0, 0, 0, 0, 83,
+ 0, 108, 0, 0, 83, 83, 83, 0, 0, 83,
+ 83, 0, 0, 0, 0, 64, 65, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 83, 0, 85, 4,
+ 48, 48, 48, 0, 0, 83, 0, 0, 0, 0,
+ 0, 85, 4, 87, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 75, 76, 8, 87, 77, 78, 0,
+ 79, 0, 7, 0, 0, 83, 83, 0, 8, 0,
+ 83, 0, 0, 0, 0, 7, 83, 0, 0, 17,
+ 17, 83, 83, 83, 17, 0, 83, 83, 83, 83,
+ 17, 0, 0, 83, 17, 17, 17, 17, 0, 83,
+ 17, 17, 0, 0, 83, 83, 83, 0, 0, 83,
+ 83, 0, 83, 0, 0, 0, 0, 0, 17, 0,
+ 0, 0, 17, 0, 0, 0, 17, 0, 0, 0,
+ 0, 0, 0, 0, 0, 83,
+};
+short cl_func_check[] = { 33,
+ 60, 60, 60, 37, 38, 126, 40, 13, 42, 43,
+ 44, 45, 46, 47, 44, 38, 59, 41, 41, 42,
+ 44, 44, 59, 38, 61, 25, 60, 41, 62, 38,
+ 44, 59, 62, 42, 59, 256, 61, 44, 62, 62,
+ 111, 38, 58, 59, 41, 42, 117, 44, 38, 44,
+ 44, 41, 42, 44, 44, 62, 301, 91, 38, 59,
+ 94, 41, 42, 297, 44, 62, 293, 62, 62, 259,
+ 38, 62, 62, 263, 42, 302, 33, 34, 60, 273,
+ 123, 305, 62, 305, 40, 100, 123, 330, 41, 41,
+ 124, 44, 126, 108, 109, 123, 303, 93, 123, 105,
+ 40, 61, 126, 126, 310, 120, 40, 22, 101, -1,
+ 258, 259, 99, -1, -1, 263, -1, 126, -1, 58,
+ 59, 269, -1, -1, -1, 273, 274, 275, 276, 126,
+ -1, 279, 280, -1, -1, -1, 126, -1, -1, -1,
+ -1, -1, -1, 258, 259, -1, -1, -1, 263, 297,
+ -1, 258, 259, 301, 269, -1, 263, 305, 273, 274,
+ 275, 276, 269, -1, 279, 280, 273, 274, 275, 276,
+ -1, 292, 279, 280, -1, 258, 259, -1, -1, -1,
+ 263, -1, 297, -1, 305, -1, 269, -1, -1, -1,
+ 305, 274, 275, 276, 258, 259, 279, 280, 305, 263,
+ -1, -1, 258, 259, -1, 269, -1, 263, -1, -1,
+ 274, 275, 276, 269, -1, 279, 280, -1, 274, 275,
+ 276, -1, 305, 279, 280, -1, -1, -1, 258, 259,
+ -1, -1, -1, 263, -1, -1, -1, -1, -1, 269,
+ -1, 305, -1, -1, 274, 275, 276, -1, -1, 279,
+ 280, -1, -1, -1, -1, 289, 290, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 303, -1, 292, 292,
+ 330, 330, 330, -1, -1, 305, -1, -1, -1, -1,
+ -1, 305, 305, 292, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 292, 305, 331, 332, -1,
+ 330, -1, 292, -1, -1, 258, 259, -1, 305, -1,
+ 263, -1, -1, -1, -1, 305, 269, -1, -1, 258,
+ 259, 274, 275, 276, 263, -1, 279, 280, 258, 259,
+ 269, -1, -1, 263, 273, 274, 275, 276, -1, 269,
+ 279, 280, -1, -1, 274, 275, 276, -1, -1, 279,
+ 280, -1, 305, -1, -1, -1, -1, -1, 297, -1,
+ -1, -1, 301, -1, -1, -1, 305, -1, -1, -1,
+ -1, -1, -1, -1, -1, 305,
+};
+#define YYFINAL 1
+#ifndef YYDEBUG
+#define YYDEBUG 1
+#endif
+#define YYMAXTOKEN 347
+#if YYDEBUG
+char *cl_func_name[] = {
+"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+"'!'",0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'","','","'-'","'.'","'/'",0,0,0,
+0,0,0,0,0,0,0,"':'","';'","'<'","'='","'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,"'['",0,"']'","'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,"'{'","'|'",0,"'~'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"LE_AUTO","LE_DOUBLE",
+"LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE","LE_LONG","LE_SWITCH","LE_CASE",
+"LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR","LE_EXTERN","LE_RETURN",
+"LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT","LE_UNSIGNED","LE_CONTINUE",
+"LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT","LE_GOTO","LE_SIZEOF","LE_VOLATILE",
+"LE_DO","LE_IF","LE_STATIC","LE_WHILE","LE_NEW","LE_DELETE","LE_THIS",
+"LE_OPERATOR","LE_CLASS","LE_PUBLIC","LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL",
+"LE_FRIEND","LE_INLINE","LE_OVERLOAD","LE_TEMPLATE","LE_TYPENAME","LE_THROW",
+"LE_CATCH","LE_IDENTIFIER","LE_STRINGliteral","LE_FLOATINGconstant",
+"LE_INTEGERconstant","LE_CHARACTERconstant","LE_OCTALconstant","LE_HEXconstant",
+"LE_POUNDPOUND","LE_CComment","LE_CPPComment","LE_NAMESPACE","LE_USING",
+"LE_TYPEDEFname","LE_ARROW","LE_ICR","LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE",
+"LE_EQ","LE_NE","LE_ANDAND","LE_OROR","LE_ELLIPSIS","LE_CLCL","LE_DOTstar",
+"LE_ARROWstar","LE_MULTassign","LE_DIVassign","LE_MODassign","LE_PLUSassign",
+"LE_MINUSassign","LE_LSassign","LE_RSassign","LE_ANDassign","LE_ERassign",
+"LE_ORassign","LE_MACRO","LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST",
+"LE_REINTERPRET_CAST",
+};
+char *cl_func_rule[] = {
+"$accept : translation_unit",
+"basic_type_name_inter : LE_INT",
+"basic_type_name_inter : LE_CHAR",
+"basic_type_name_inter : LE_SHORT",
+"basic_type_name_inter : LE_LONG",
+"basic_type_name_inter : LE_FLOAT",
+"basic_type_name_inter : LE_DOUBLE",
+"basic_type_name_inter : LE_SIGNED",
+"basic_type_name_inter : LE_UNSIGNED",
+"basic_type_name_inter : LE_VOID",
+"basic_type_name : LE_UNSIGNED basic_type_name_inter",
+"basic_type_name : LE_SIGNED basic_type_name_inter",
+"basic_type_name : LE_LONG LE_LONG",
+"basic_type_name : LE_LONG LE_INT",
+"basic_type_name : basic_type_name_inter",
+"translation_unit :",
+"translation_unit : translation_unit external_decl",
+"$$1 :",
+"external_decl : $$1 function_decl",
+"external_decl : error",
+"template_arg :",
+"template_arg : template_specifiter LE_IDENTIFIER",
+"template_arg_list : template_arg",
+"template_arg_list : template_arg_list ',' template_arg",
+"template_specifiter : LE_CLASS",
+"template_specifiter : LE_TYPENAME",
+"opt_template_qualifier :",
+"opt_template_qualifier : LE_TEMPLATE '<' template_arg_list '>'",
+"template_parameter_list :",
+"template_parameter_list : template_parameter",
+"template_parameter_list : template_parameter_list ',' template_parameter",
+"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp",
+"template_parameter : const_spec nested_scope_specifier basic_type_name special_star_amp",
+"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER '<' template_parameter_list '>' special_star_amp",
+"func_name : LE_IDENTIFIER",
+"func_name : '~' LE_IDENTIFIER",
+"func_name : LE_OPERATOR any_operator",
+"any_operator : '+'",
+"any_operator : '-'",
+"any_operator : '*'",
+"any_operator : '/'",
+"any_operator : '%'",
+"any_operator : '^'",
+"any_operator : '&'",
+"any_operator : '|'",
+"any_operator : '~'",
+"any_operator : '!'",
+"any_operator : '<'",
+"any_operator : '>'",
+"any_operator : LE_LS",
+"any_operator : LE_RS",
+"any_operator : LE_ANDAND",
+"any_operator : LE_OROR",
+"any_operator : LE_ARROW",
+"any_operator : LE_ARROWstar",
+"any_operator : '.'",
+"any_operator : LE_DOTstar",
+"any_operator : LE_ICR",
+"any_operator : LE_DECR",
+"any_operator : LE_LE",
+"any_operator : LE_GE",
+"any_operator : LE_EQ",
+"any_operator : LE_NE",
+"any_operator : '(' ')'",
+"any_operator : '[' ']'",
+"any_operator : LE_NEW",
+"any_operator : LE_DELETE",
+"any_operator : ','",
+"$$2 :",
+"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec variable_decl nested_scope_specifier func_name '(' $$2 const_spec declare_throw opt_pure_virtual func_postfix",
+"declare_throw :",
+"declare_throw : LE_THROW '(' template_parameter_list ')'",
+"func_postfix : '{'",
+"func_postfix : ';'",
+"nested_scope_specifier :",
+"nested_scope_specifier : nested_scope_specifier scope_specifier",
+"opt_pure_virtual :",
+"opt_pure_virtual : '=' LE_OCTALconstant",
+"scope_specifier : LE_IDENTIFIER LE_CLCL",
+"$$3 :",
+"scope_specifier : LE_IDENTIFIER '<' $$3 LE_CLCL",
+"virtual_spec :",
+"virtual_spec : LE_VIRTUAL",
+"const_spec :",
+"const_spec : LE_CONST",
+"amp_item :",
+"amp_item : '&'",
+"star_list :",
+"star_list : star_list '*'",
+"special_star_amp : star_list amp_item",
+"stmnt_starter :",
+"stmnt_starter : ';'",
+"stmnt_starter : ':'",
+"variable_decl : nested_scope_specifier basic_type_name special_star_amp",
+"variable_decl : nested_scope_specifier LE_IDENTIFIER special_star_amp",
+"variable_decl : nested_scope_specifier LE_IDENTIFIER '<' template_parameter_list '>' special_star_amp",
+};
+#endif
+#ifndef YYSTYPE
+typedef int YYSTYPE;
+#endif
+#ifdef YYSTACKSIZE
+#undef YYMAXDEPTH
+#define YYMAXDEPTH YYSTACKSIZE
+#else
+#ifdef YYMAXDEPTH
+#define YYSTACKSIZE YYMAXDEPTH
+#else
+#define YYSTACKSIZE 500
+#define YYMAXDEPTH 500
+#endif
+#endif
+int yydebug;
+int yynerrs;
+int yyerrflag;
+int yychar;
+short *yyssp;
+YYSTYPE *yyvsp;
+YYSTYPE yyval;
+YYSTYPE yylval;
+short yyss[YYSTACKSIZE];
+YYSTYPE yyvs[YYSTACKSIZE];
+#define yystacksize YYSTACKSIZE
+void yyerror(char *s) {}
+
+void func_consumeFuncArgList()
+{
+ curr_func.m_signature = "(";
+
+ int depth = 1;
+ while(depth > 0)
+ {
+ int ch = cl_scope_lex();
+ if(ch == 0)
+ {
+ break;
+ }
+
+ curr_func.m_signature += cl_func_lval;
+ curr_func.m_signature += " ";
+ if(ch == ')')
+ {
+ depth--;
+ continue;
+ }
+ else if(ch == '(')
+ {
+ depth ++ ;
+ continue;
+ }
+ }
+}
+
+/**
+ * consume all token until matching closing brace is found
+ */
+void func_consumeDecl()
+{
+ int depth = 1;
+ while(depth > 0)
+ {
+ int ch = cl_scope_lex();
+ //printf("ch=%d\n", ch);
+ //fflush(stdout);
+ if(ch ==0)
+ {
+ break;
+ }
+ if(ch == '}')
+ {
+ depth--;
+ continue;
+ }
+ else if(ch == '{')
+ {
+ depth ++ ;
+ continue;
+ }
+ }
+
+}
+
+void func_consumeTemplateDecl()
+{
+ int depth = 1;
+ while(depth > 0)
+ {
+ int ch = cl_scope_lex();
+ //printf("ch=%d\n", ch);
+ //fflush(stdout);
+ if(ch ==0){
+ break;
+ }
+
+ if(ch == '>')
+ {
+ depth--;
+ continue;
+ }
+ else if(ch == '<')
+ {
+ depth ++ ;
+ continue;
+ }
+ }
+}
+
+// return the scope name at the end of the input string
+void get_functions(const std::string &in, FunctionList &li, const std::map<std::string, std::string> &ignoreTokens)
+{
+ if( !setLexerInput(in, ignoreTokens) )
+ {
+ return;
+ }
+
+ g_funcs = &li;
+
+ //call tghe main parsing routine
+ cl_func_parse();
+ g_funcs = NULL;
+
+ //do the lexer cleanup
+ cl_scope_lex_clean();
+}
+#define YYABORT goto yyabort
+#define YYREJECT goto yyabort
+#define YYACCEPT goto yyaccept
+#define YYERROR goto yyerrlab
+int
+yyparse()
+{
+ register int yym, yyn, yystate;
+#if YYDEBUG
+ register char *yys;
+ extern char *getenv();
+
+ if (yys = getenv("YYDEBUG"))
+ {
+ yyn = *yys;
+ if (yyn >= '0' && yyn <= '9')
+ yydebug = yyn - '0';
+ }
+#endif
+
+ yynerrs = 0;
+ yyerrflag = 0;
+ yychar = (-1);
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+ *yyssp = yystate = 0;
+
+yyloop:
+ if (yyn = yydefred[yystate]) goto yyreduce;
+ if (yychar < 0)
+ {
+ if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ }
+ if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, shifting to state %d\n",
+ YYPREFIX, yystate, yytable[yyn]);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ yychar = (-1);
+ if (yyerrflag > 0) --yyerrflag;
+ goto yyloop;
+ }
+ if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ {
+ yyn = yytable[yyn];
+ goto yyreduce;
+ }
+ if (yyerrflag) goto yyinrecovery;
+#ifdef lint
+ goto yynewerror;
+#endif
+yynewerror:
+ yyerror("syntax error");
+#ifdef lint
+ goto yyerrlab;
+#endif
+yyerrlab:
+ ++yynerrs;
+yyinrecovery:
+ if (yyerrflag < 3)
+ {
+ yyerrflag = 3;
+ for (;;)
+ {
+ if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, error recovery shifting\
+ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ goto yyloop;
+ }
+ else
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: error recovery discarding state %d\n",
+ YYPREFIX, *yyssp);
+#endif
+ if (yyssp <= yyss) goto yyabort;
+ --yyssp;
+ --yyvsp;
+ }
+ }
+ }
+ else
+ {
+ if (yychar == 0) goto yyabort;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ yychar = (-1);
+ goto yyloop;
+ }
+yyreduce:
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, reducing by rule %d (%s)\n",
+ YYPREFIX, yystate, yyn, yyrule[yyn]);
+#endif
+ yym = yylen[yyn];
+ yyval = yyvsp[1-yym];
+ switch (yyn)
+ {
+case 1:
+{ yyval = yyvsp[0]; }
+break;
+case 2:
+{ yyval = yyvsp[0]; }
+break;
+case 3:
+{ yyval = yyvsp[0]; }
+break;
+case 4:
+{ yyval = yyvsp[0]; }
+break;
+case 5:
+{ yyval = yyvsp[0]; }
+break;
+case 6:
+{ yyval = yyvsp[0]; }
+break;
+case 7:
+{ yyval = yyvsp[0]; }
+break;
+case 8:
+{ yyval = yyvsp[0]; }
+break;
+case 9:
+{ yyval = yyvsp[0]; }
+break;
+case 10:
+{ yyval = yyvsp[-1] + " " + yyvsp[0]; }
+break;
+case 11:
+{ yyval = yyvsp[-1] + " " + yyvsp[0]; }
+break;
+case 12:
+{ yyval = yyvsp[-1] + " " + yyvsp[0]; }
+break;
+case 13:
+{ yyval = yyvsp[-1] + " " + yyvsp[0]; }
+break;
+case 14:
+{ yyval = yyvsp[0]; }
+break;
+case 17:
+{curr_func.Reset();}
+break;
+case 19:
+{
+ /*printf("CodeLite: syntax error, unexpected token '%s' found\n", cl_func_lval.c_str());*/
+ }
+break;
+case 20:
+{ yyval = "";}
+break;
+case 21:
+{yyval = yyvsp[-1] + " " + yyvsp[0];}
+break;
+case 22:
+{ yyval = yyvsp[0]; }
+break;
+case 23:
+{ yyval = yyvsp[-2] + " " + yyvsp[-1] + " " + yyvsp[0]; }
+break;
+case 24:
+{ yyval = yyvsp[0]; }
+break;
+case 25:
+{ yyval = yyvsp[0]; }
+break;
+case 27:
+{ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0];}
+break;
+case 28:
+{yyval = "";}
+break;
+case 29:
+{yyval = yyvsp[0];}
+break;
+case 30:
+{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];}
+break;
+case 31:
+{
+ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] +yyvsp[0];
+ }
+break;
+case 32:
+{
+ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] +yyvsp[0];
+ }
+break;
+case 33:
+{
+ yyval = yyvsp[-6] + yyvsp[-5] + yyvsp[-4] +yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0] + " " ;
+ }
+break;
+case 34:
+{yyval = yyvsp[0];}
+break;
+case 35:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 36:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 68:
+{func_consumeFuncArgList();}
+break;
+case 69:
+{
+ /*trim down trailing '::' from scope name*/
+ yyvsp[-7].erase(yyvsp[-7].find_last_not_of(":")+1);
+ curr_func.m_isVirtual = yyvsp[-10].find("virtual") != std::string::npos;
+ curr_func.m_isPureVirtual = yyvsp[-1].find("=") != std::string::npos;
+ curr_func.m_isConst = yyvsp[-3].find("const") != std::string::npos;
+ curr_func.m_name = yyvsp[-6];
+ curr_func.m_scope = yyvsp[-7];
+ curr_func.m_retrunValusConst = yyvsp[-9];
+ curr_func.m_lineno = cl_scope_lineno;
+ if(g_funcs)
+ {
+ g_funcs->push_back(curr_func);
+ }
+ curr_func.Reset();
+ }
+break;
+case 70:
+{yyval = "";}
+break;
+case 71:
+{yyval = yyvsp[-1];}
+break;
+case 74:
+{yyval = "";}
+break;
+case 75:
+{ yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 76:
+{yyval = "";}
+break;
+case 77:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 78:
+{yyval = yyvsp[-1]+ yyvsp[0];}
+break;
+case 79:
+{func_consumeTemplateDecl();}
+break;
+case 80:
+{yyval = yyvsp[-3] + yyvsp[0];}
+break;
+case 81:
+{yyval = ""; }
+break;
+case 82:
+{ yyval = yyvsp[0]; }
+break;
+case 83:
+{yyval = ""; }
+break;
+case 84:
+{ yyval = yyvsp[0]; }
+break;
+case 85:
+{yyval = ""; }
+break;
+case 86:
+{ yyval = yyvsp[0]; }
+break;
+case 87:
+{yyval = ""; }
+break;
+case 88:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 89:
+{ yyval = yyvsp[-1] + yyvsp[0]; }
+break;
+case 90:
+{yyval = "";}
+break;
+case 91:
+{ yyval = ";";}
+break;
+case 92:
+{ yyval = ":";}
+break;
+case 93:
+{
+ yyvsp[-2].erase(yyvsp[-2].find_last_not_of(":")+1);
+ curr_func.m_returnValue.m_type = yyvsp[-1];
+ curr_func.m_returnValue.m_typeScope = yyvsp[-2];
+ curr_func.m_returnValue.m_starAmp = yyvsp[0];
+ curr_func.m_returnValue.m_isPtr = (yyvsp[0].find("*") != (size_t)-1);
+ yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];
+ }
+break;
+case 94:
+{
+ yyvsp[-2].erase(yyvsp[-2].find_last_not_of(":")+1);
+ curr_func.m_returnValue.m_type = yyvsp[-1];
+ curr_func.m_returnValue.m_typeScope = yyvsp[-2];
+ curr_func.m_returnValue.m_starAmp = yyvsp[0];
+ curr_func.m_returnValue.m_isPtr = (yyvsp[0].find("*") != (size_t)-1);
+ yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;
+ }
+break;
+case 95:
+{
+ yyvsp[-5].erase(yyvsp[-5].find_last_not_of(":")+1);
+ curr_func.m_returnValue.m_type = yyvsp[-4];
+ curr_func.m_returnValue.m_typeScope = yyvsp[-5];
+ curr_func.m_returnValue.m_starAmp = yyvsp[0];
+ curr_func.m_returnValue.m_isPtr = (yyvsp[0].find("*") != (size_t)-1);
+ curr_func.m_returnValue.m_isTemplate = true;
+ curr_func.m_returnValue.m_templateDecl = yyvsp[-2];
+ yyval = yyvsp[-5] + yyvsp[-4] + yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;
+ }
+break;
+ }
+ yyssp -= yym;
+ yystate = *yyssp;
+ yyvsp -= yym;
+ yym = yylhs[yyn];
+ if (yystate == 0 && yym == 0)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state 0 to\
+ state %d\n", YYPREFIX, YYFINAL);
+#endif
+ yystate = YYFINAL;
+ *++yyssp = YYFINAL;
+ *++yyvsp = yyval;
+ if (yychar < 0)
+ {
+ if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, YYFINAL, yychar, yys);
+ }
+#endif
+ }
+ if (yychar == 0) goto yyaccept;
+ goto yyloop;
+ }
+ if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
+ yystate = yytable[yyn];
+ else
+ yystate = yydgoto[yym];
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state %d \
+to state %d\n", YYPREFIX, *yyssp, yystate);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate;
+ *++yyvsp = yyval;
+ goto yyloop;
+yyoverflow:
+ yyerror("yacc stack overflow");
+yyabort:
+ return (1);
+yyaccept:
+ return (0);
+}
diff --git a/plugins/symbol-db/cxxparser/function-result.cpp b/plugins/symbol-db/cxxparser/function-result.cpp
new file mode 100644
index 0000000..3d51cd0
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/function-result.cpp
@@ -0,0 +1,64 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#include "function-result.h"
+
+clFunction::clFunction()
+{
+ Reset();
+}
+
+clFunction::~clFunction()
+{
+}
+
+void clFunction::Reset()
+{
+ m_name = "";
+ m_scope = "";
+ m_returnValue.Reset();
+ m_name = "";
+ m_signature = "";
+ m_lineno = 0;
+ m_retrunValusConst = "";
+ m_isVirtual = false;
+ m_isPureVirtual = false;
+ m_isConst = false;
+}
+
+void clFunction::Print()
+{
+ fprintf(
+ stdout, "{m_name=%s, m_isConst=%s, m_lineno=%d, m_scope=%s, m_signature=%s, m_isVirtual=%s, m_isPureVirtual=%s, m_retrunValusConst=%s\nm_returnValue=",
+ m_name.c_str(),
+ m_isConst ? "yes" : "no",
+ m_lineno,
+ m_scope.c_str(),
+ m_signature.c_str(),
+ m_isVirtual ? "yes" : "no",
+ m_isPureVirtual ? "yes" : "no",
+ m_retrunValusConst.c_str()
+ );
+
+ m_returnValue.Print();
+ fprintf(stdout, "}\n");
+ fflush(stdout);
+}
+
diff --git a/plugins/symbol-db/cxxparser/function-result.h b/plugins/symbol-db/cxxparser/function-result.h
new file mode 100644
index 0000000..3004494
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/function-result.h
@@ -0,0 +1,54 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#ifndef FUNCTION_H
+#define FUNCTION_H
+
+#include "string"
+#include "list"
+#include "variable-result.h"
+#include <stdio.h>
+
+class clFunction
+{
+public:
+ std::string m_name;
+ std::string m_scope; //functions' scope
+ std::string m_retrunValusConst; // is the return value a const?
+ std::string m_signature;
+ Variable m_returnValue;
+ int m_lineno;
+ bool m_isVirtual;
+ bool m_isPureVirtual;
+ bool m_isConst;
+
+public:
+ clFunction();
+ virtual ~clFunction();
+
+ //clear the class content
+ void Reset();
+
+ //print the variable to stdout
+ void Print();
+};
+
+typedef std::list<clFunction> FunctionList;
+#endif //FUNCTION_H
diff --git a/plugins/symbol-db/cxxparser/main.c b/plugins/symbol-db/cxxparser/main.c
new file mode 100644
index 0000000..a493b10
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/main.c
@@ -0,0 +1,160 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it>
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+
+//#include <libanjuta/interfaces/ianjuta-symbol-manager.h>
+#include "../symbol-db-engine.h"
+#include <gtk/gtk.h>
+
+#include <errno.h>
+#include <stdlib.h>
+
+#include "engine-parser.h"
+
+static gchar *
+load_file(const gchar *fileName)
+{
+ FILE *fp;
+ glong len;
+ gchar *buf = NULL;
+
+ fp = fopen(fileName, "rb");
+ if (!fp) {
+ printf("failed to open file 'test.h': %s\n", strerror(errno));
+ return NULL;
+ }
+
+ //read the whole file
+ fseek(fp, 0, SEEK_END); //go to end
+ len = ftell(fp); //get position at end (length)
+ fseek(fp, 0, SEEK_SET); //go to begining
+ buf = (gchar *)malloc(len+1); //malloc buffer
+
+ //read into buffer
+ glong bytes = fread(buf, sizeof(gchar), len, fp);
+ printf("read: %ld\n", bytes);
+ if (bytes != len) {
+ fclose(fp);
+ printf("failed to read from file 'test.h': %s\n", strerror(errno));
+ return NULL;
+ }
+
+ buf[len] = 0; // make it null terminated string
+ fclose(fp);
+ return buf;
+}
+
+
+#define SAMPLE_DB_ABS_PATH "/home/pescio/gitroot/anjuta/plugins/symbol-db/cxxparser/sample-db/"
+#define ANJUTA_TAGS "/home/pescio/svnroot/svninstalled/usr/bin/anjuta-tags"
+
+static void
+on_test_simple_struct_scan_end (SymbolDBEngine* dbe, gpointer user_data)
+{
+ gchar *associated_source_file = SAMPLE_DB_ABS_PATH"test-simple-struct.c";
+ gchar *file_content = load_file (associated_source_file);
+
+ g_message ("above text: %s", file_content);
+
+
+ engine_parser_process_expression ("var.", file_content, associated_source_file, 9);
+
+// g_free (file_content);
+}
+
+static void
+test_simple_struct ()
+{
+ gchar *associated_source_file = SAMPLE_DB_ABS_PATH"test-simple-struct.c";
+ gchar *associated_db_file = "test-simple-struct";
+ gchar *root_dir = SAMPLE_DB_ABS_PATH;
+ SymbolDBEngine *dbe = symbol_db_engine_new_full (ANJUTA_TAGS,
+ associated_db_file);
+ symbol_db_engine_open_db (dbe, root_dir, root_dir);
+ symbol_db_engine_add_new_project (dbe, NULL, root_dir);
+
+ g_signal_connect (dbe, "scan-end",
+ G_CALLBACK (on_test_simple_struct_scan_end), NULL);
+
+ GPtrArray *files_array = g_ptr_array_new ();
+ g_ptr_array_add (files_array, associated_source_file);
+
+ GPtrArray *source_array = g_ptr_array_new ();
+ g_ptr_array_add (source_array, "C");
+
+ if (symbol_db_engine_add_new_files (dbe, root_dir, files_array, source_array, TRUE) < 0)
+ g_warning ("Error on scanning");
+
+
+ engine_parser_init (dbe);
+}
+
+/**
+ * This main simulate an anjuta glib/gtk process. We'll then call some functions
+ * of the C++ parser to retrieve the type of an expression.
+ */
+int main (int argc, char *argv[])
+{
+ gtk_init(&argc, &argv);
+ g_thread_init (NULL);
+ gda_init ();
+ g_test_init (&argc, &argv, NULL);
+
+ g_test_add_func ("/simple_c/test-simple-struct", test_simple_struct);
+
+
+ g_test_run();
+ gtk_main ();
+ return 0;
+}
+#if 0
+
+ // FIXME: an instance of symbolmanager should be passed instead of a dbe one.
+ engine_parser_init (dbe);
+
+ //engine_parser_DEBUG_print_tokens (buf);
+
+// char *test_str = "str.";
+ char *test_str = "Std::String *asd";
+
+// char *test_str = "(wxString*)str.";
+// char *test_str = "((Std::string*)eran)->";
+// char *test_str = "((TypeDefFoo)((Std::string*)eran))->func_returning_klass ().";
+ //char *test_str = "((A*)((B*)(foo)))->"; // should return A* as m_name. Check here..
+// char *test_str = "*this->"; // should return A* as m_name. Check here.
+
+// printf ("print tokens.....\n");
+// engine_parser_DEBUG_print_tokens (test_str);
+
+ printf ("process expression..... %s\n", test_str);
+ engine_parser_process_expression (test_str);
+
+/*
+ engine_parser_test_optimize_scope (buf);
+ engine_parser_get_local_variables (buf);
+*/
+ //gtk_main();
+#endif
+
+ return 0;
+}
+#endif
+
+
+
diff --git a/plugins/symbol-db/cxxparser/sample-db/test-simple-struct.c b/plugins/symbol-db/cxxparser/sample-db/test-simple-struct.c
new file mode 100644
index 0000000..131a67b
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/sample-db/test-simple-struct.c
@@ -0,0 +1,11 @@
+
+
+struct asd {
+ char a;
+ int b;
+};
+
+
+void main () {
+ asd var;
+ var.
diff --git a/plugins/symbol-db/cxxparser/sample-db/test.h b/plugins/symbol-db/cxxparser/sample-db/test.h
new file mode 100644
index 0000000..ecbf13b
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/sample-db/test.h
@@ -0,0 +1,102 @@
+/*struct asd {
+ char a;
+ int b;
+};
+
+(wxString*) str.abc ("foofaaa")->
+*/
+
+namespace Destroy {
+ class Faa {
+
+ }
+
+ void Faa::bazz () {
+ }
+
+char fruffu;
+
+int Faa::foo(const char *asd)
+{
+ for () {
+
+
+ int a=0;
+ }
+
+
+ for (int i = 0; i < 1; i++) {
+ int i =0;
+/* }
+}
+}
+ */
+
+
+//"hello");
+
+
+
+
+//------------------------------
+// Expression test suite
+//------------------------------
+
+//Singleton<MyClass>
+//*this
+//this
+//Singleton
+//dynamic_cast<Std::Name::Singleton*>
+//(Std::String*) eran
+//((Std::string*)eran)
+//((Singleton<MyClass>*)Eran)
+//Eran(dfd, dfdf, dfdf)
+//foo();
+//std::map<wxString, std::vector>
+//void ~MyClass(){};
+//((str)A.member)->add (
+//const bool &is_ok() const;
+//void ~MyClass();
+
+//std::map<wxString, std::list<CppToken>* > m_matches;
+//int a,b,*c;
+//std::vector<int, int> vector;
+//(void *buffer, size_t size, size_t nmemb, void *stream)
+//wxStaticLine *line = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+//Glib :: SignalProxy0 < void > signal_clicked ( ) ;
+//const std::vector<int> &Class::get_vector() const {
+//(std::vector<int>&, int name)
+//(SOCKET,char*,int,int);
+//
+//void SymbolViewPlugin::SetNodeData(wxTreeCtrl *tree, wxTreeItemId id, const TagEntry &tag)
+//{
+// wxString key = treetag ? treetag->Key() : tree->GetItemText(id);
+//}
+//
+//void SymbolViewPlugin::SortChildren()
+//{
+//}
+//
+//int SymbolViewPlugin::AddSymbol(const TagEntry &tag, const std::multimap<wxString, wxString> &filePaths)
+// {
+
+//MyClass::MyClass()
+//: m_st{
+
+//std::auto_ptr<std::string>::element_type str;
+//struct HiddenStruct yy;
+//
+//struct MyOtherStruct {
+// int val;
+//} bb, cc;
+
+//namespace AA {
+// namespace BB {
+// class MyC {
+// int a;
+// int b;
+// };
+// }
+//}
+//int Class::my_foo();
+//(GLint i, char buff[30], int j)
diff --git a/plugins/symbol-db/cxxparser/scope-parser.cpp b/plugins/symbol-db/cxxparser/scope-parser.cpp
new file mode 100644
index 0000000..cc53b8f
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/scope-parser.cpp
@@ -0,0 +1,1277 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#ifndef lint
+static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
+#endif
+#define YYBYACC 1
+#define YYMAJOR 1
+#define YYMINOR 9
+#define yyclearin (yychar=(-1))
+#define yyerrok (yyerrflag=0)
+#define YYRECOVERING (yyerrflag!=0)
+#define yyparse cl_scope_parse
+#define yylex cl_scope_lex
+#define yyerror cl_scope_error
+#define yychar cl_scope_char
+#define yyval cl_scope_val
+#define yylval cl_scope_lval
+#define yydebug cl_scope_debug
+#define yynerrs cl_scope_nerrs
+#define yyerrflag cl_scope_errflag
+#define yyss cl_scope_ss
+#define yyssp cl_scope_ssp
+#define yyvs cl_scope_vs
+#define yyvsp cl_scope_vsp
+#define yylhs cl_scope_lhs
+#define yylen cl_scope_len
+#define yydefred cl_scope_defred
+#define yydgoto cl_scope_dgoto
+#define yysindex cl_scope_sindex
+#define yyrindex cl_scope_rindex
+#define yygindex cl_scope_gindex
+#define yytable cl_scope_table
+#define yycheck cl_scope_check
+#define yyname cl_scope_name
+#define yyrule cl_scope_rule
+#define YYPREFIX "cl_scope_"
+/* Copyright Eran Ifrah(c)*/
+/*************** Includes and Defines *****************************/
+#include "string"
+#include "vector"
+#include "stdio.h"
+#include "map"
+
+#define YYDEBUG_LEXER_TEXT (cl_scope_lval)
+#define YYSTYPE std::string
+#define YYDEBUG 0 /* get the pretty debugging code to compile*/
+
+int cl_scope_parse();
+void cl_scope_error(char *string);
+void syncParser();
+
+static std::vector<std::string> gs_additionlNS;
+
+/*---------------------------------------------*/
+/* externs defined in the lexer*/
+/*---------------------------------------------*/
+extern char *cl_scope_text;
+extern int cl_scope_lex();
+extern bool setLexerInput(const std::string &in, const std::map<std::string, std::string> &ignoreTokens);
+extern int cl_scope_lineno;
+extern std::vector<std::string> currentScope;
+extern void printScopeName(); /*print the current scope name*/
+extern void increaseScope(); /*increase scope with anonymouse value*/
+extern std::string getCurrentScope();
+extern void cl_scope_lex_clean();
+extern void cl_scope_less(int count);
+
+/*************** Standard ytab.c continues here *********************/
+#define LE_AUTO 257
+#define LE_DOUBLE 258
+#define LE_INT 259
+#define LE_STRUCT 260
+#define LE_BREAK 261
+#define LE_ELSE 262
+#define LE_LONG 263
+#define LE_SWITCH 264
+#define LE_CASE 265
+#define LE_ENUM 266
+#define LE_REGISTER 267
+#define LE_TYPEDEF 268
+#define LE_CHAR 269
+#define LE_EXTERN 270
+#define LE_RETURN 271
+#define LE_UNION 272
+#define LE_CONST 273
+#define LE_FLOAT 274
+#define LE_SHORT 275
+#define LE_UNSIGNED 276
+#define LE_CONTINUE 277
+#define LE_FOR 278
+#define LE_SIGNED 279
+#define LE_VOID 280
+#define LE_DEFAULT 281
+#define LE_GOTO 282
+#define LE_SIZEOF 283
+#define LE_VOLATILE 284
+#define LE_DO 285
+#define LE_IF 286
+#define LE_STATIC 287
+#define LE_WHILE 288
+#define LE_NEW 289
+#define LE_DELETE 290
+#define LE_THIS 291
+#define LE_OPERATOR 292
+#define LE_CLASS 293
+#define LE_PUBLIC 294
+#define LE_PROTECTED 295
+#define LE_PRIVATE 296
+#define LE_VIRTUAL 297
+#define LE_FRIEND 298
+#define LE_INLINE 299
+#define LE_OVERLOAD 300
+#define LE_TEMPLATE 301
+#define LE_TYPENAME 302
+#define LE_THROW 303
+#define LE_CATCH 304
+#define LE_IDENTIFIER 305
+#define LE_STRINGliteral 306
+#define LE_FLOATINGconstant 307
+#define LE_INTEGERconstant 308
+#define LE_CHARACTERconstant 309
+#define LE_OCTALconstant 310
+#define LE_HEXconstant 311
+#define LE_POUNDPOUND 312
+#define LE_CComment 313
+#define LE_CPPComment 314
+#define LE_NAMESPACE 315
+#define LE_USING 316
+#define LE_TYPEDEFname 317
+#define LE_ARROW 318
+#define LE_ICR 319
+#define LE_DECR 320
+#define LE_LS 321
+#define LE_RS 322
+#define LE_LE 323
+#define LE_GE 324
+#define LE_EQ 325
+#define LE_NE 326
+#define LE_ANDAND 327
+#define LE_OROR 328
+#define LE_ELLIPSIS 329
+#define LE_CLCL 330
+#define LE_DOTstar 331
+#define LE_ARROWstar 332
+#define LE_MULTassign 333
+#define LE_DIVassign 334
+#define LE_MODassign 335
+#define LE_PLUSassign 336
+#define LE_MINUSassign 337
+#define LE_LSassign 338
+#define LE_RSassign 339
+#define LE_ANDassign 340
+#define LE_ERassign 341
+#define LE_ORassign 342
+#define LE_MACRO 343
+#define LE_DYNAMIC_CAST 344
+#define LE_STATIC_CAST 345
+#define LE_CONST_CAST 346
+#define LE_REINTERPRET_CAST 347
+#define YYERRCODE 256
+short cl_scope_lhs[] = { -1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 12, 12, 14, 14, 13, 13, 15, 15, 16,
+ 16, 16, 17, 19, 19, 18, 18, 18, 18, 20,
+ 20, 20, 21, 21, 21, 8, 7, 7, 26, 26,
+ 3, 3, 9, 10, 11, 27, 27, 28, 28, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 30, 30, 31, 31, 34, 6, 35, 6, 36, 6,
+ 23, 23, 37, 38, 37, 32, 32, 22, 22, 39,
+ 39, 40, 40, 24, 25, 25, 25, 33, 33, 33,
+ 42, 4, 43, 43, 43, 43, 44, 41, 41, 41,
+ 5,
+};
+short cl_scope_len[] = { 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 2, 1, 3, 1, 1, 0, 4, 0,
+ 1, 3, 3, 0, 3, 0, 1, 1, 1, 0,
+ 1, 3, 4, 4, 7, 5, 4, 3, 0, 1,
+ 6, 8, 1, 1, 1, 1, 1, 1, 2, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 0, 4, 0, 12, 0, 9, 0, 11,
+ 0, 2, 2, 0, 4, 0, 1, 0, 1, 0,
+ 1, 0, 2, 2, 0, 1, 1, 3, 3, 6,
+ 0, 7, 0, 2, 2, 2, 2, 0, 1, 3,
+ 4,
+};
+short cl_scope_defred[] = { 10,
+ 0, 21, 0, 126, 54, 127, 53, 55, 11, 12,
+ 13, 14, 15, 16, 17, 18, 19, 20, 0, 111,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 48, 57, 56, 117, 0, 0, 0, 112, 131, 141,
+ 26, 27, 24, 0, 0, 47, 50, 0, 119, 111,
+ 113, 114, 46, 0, 23, 0, 29, 0, 0, 111,
+ 0, 0, 0, 139, 25, 51, 0, 6, 1, 4,
+ 2, 5, 3, 8, 7, 9, 0, 0, 0, 122,
+ 0, 0, 115, 0, 137, 0, 132, 37, 39, 38,
+ 0, 31, 0, 88, 89, 76, 80, 81, 72, 73,
+ 82, 83, 84, 85, 74, 75, 79, 77, 91, 92,
+ 93, 94, 95, 96, 97, 98, 99, 100, 90, 70,
+ 71, 60, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 78, 0, 0, 59, 0, 129, 0, 58, 0,
+ 128, 107, 0, 0, 136, 135, 134, 140, 0, 52,
+ 0, 86, 87, 0, 41, 111, 123, 121, 124, 109,
+ 0, 105, 32, 0, 33, 0, 122, 0, 0, 101,
+ 102, 108, 0, 0, 42, 130, 0, 122, 0, 0,
+ 35, 0, 43, 44, 110, 0, 0, 0, 0, 106,
+ 122, 0, 45, 104,
+};
+short cl_scope_dgoto[] = { 1,
+ 80, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 43, 44, 45, 25, 91, 92, 93, 165, 154,
+ 155, 156, 26, 137, 19, 48, 35, 81, 135, 172,
+ 187, 36, 60, 173, 161, 169, 38, 61, 159, 138,
+ 63, 54, 85, 64,
+};
+short cl_scope_sindex[] = { 0,
+ -37, 0, -290, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, -223, 0,
+ -242, -231, 25, -105, -210, -201, -13, 2, -247, 9,
+ 0, 0, 0, 0, -227, -178, -58, 0, 0, 0,
+ 0, 0, 0, -188, 3, 0, 0, -171, 0, 0,
+ 0, 0, 0, -164, 0, -247, 0, -20, 108, 0,
+ -187, 81, -12, 0, 0, 0, -156, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, -33, -57, -248, 0,
+ 110, -191, 0, -180, 0, -164, 0, 0, 0, 0,
+ -4, 0, -157, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 112, 58, 0, -178, 0, 67, 0, 114,
+ 0, 0, -54, 117, 0, 0, 0, 0, -156, 0,
+ 96, 0, 0, 4, 0, 0, 0, 0, 0, 0,
+ -16, 0, 0, -178, 0, -178, 0, -207, -178, 0,
+ 0, 0, -178, 38, 0, 0, -52, 0, 41, -135,
+ 0, -178, 0, 0, 0, 129, 47, 40, -178, 0,
+ 0, 71, 0, 0,
+};
+short cl_scope_rindex[] = { 0,
+ -114, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 76, 0,
+ 0, 0, 0, 0, -47, 0, 0, 0, 46, 0,
+ 0, 0, 0, 0, -134, 116, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -7, 0, 46, 0, 0, 0, 0,
+ 0, -5, 0, 0, 0, 0, -24, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, -23, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, -9, 0, -8, 0, 0,
+ 0, 0, 132, 0, 0, 0, 0, 0, -132, 0,
+ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, -28, 0, -199, 0, 0, 51, 0,
+ 0, 0, -100, 0, 0, 0, 85, 0, 0, 52,
+ 0, -9, 0, 0, 0, 0, 0, 0, 53, 0,
+ 0, 0, 0, 0,
+};
+short cl_scope_gindex[] = { 0,
+ 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 121, 0, 0, 0, 0, 31, 0, 0, -93,
+ 15, -6, -19, -56, 0, 0, 0, 54, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 98,
+};
+#define YYTABLESIZE 421
+short cl_scope_table[] = { 131,
+ 53, 52, 136, 126, 128, 52, 133, 182, 124, 122,
+ 119, 125, 132, 125, 122, 40, 58, 31, 122, 30,
+ 6, 4, 118, 141, 20, 8, 120, 123, 121, 50,
+ 59, 86, 120, 40, 40, 120, 138, 67, 133, 149,
+ 82, 171, 21, 77, 34, 41, 56, 166, 22, 32,
+ 68, 69, 40, 120, 42, 70, 139, 134, 118, 118,
+ 127, 71, 27, 118, 57, 167, 72, 73, 74, 118,
+ 174, 75, 76, 28, 118, 118, 118, 23, 116, 118,
+ 118, 166, 33, 166, 29, 5, 34, 7, 188, 22,
+ 129, 24, 130, 40, 49, 192, 40, 177, 30, 181,
+ 77, 191, 66, 37, 158, 118, 170, 22, 157, 39,
+ 176, 194, 87, 143, 166, 47, 55, 138, 150, 133,
+ 183, 184, 122, 34, 40, 122, 122, 145, 122, 146,
+ 147, 46, 140, 58, 193, 144, 168, 88, 89, 90,
+ 62, 84, 83, 125, 125, 125, 122, 151, 125, 142,
+ 153, 125, 152, 160, 125, 164, 162, 125, 125, 125,
+ 125, 125, 179, 185, 125, 125, 180, 186, 189, 190,
+ 49, 58, 36, 118, 103, 178, 65, 125, 125, 163,
+ 175, 0, 125, 148, 0, 0, 125, 0, 0, 0,
+ 125, 0, 0, 0, 0, 0, 0, 0, 0, 30,
+ 125, 28, 118, 0, 0, 0, 0, 0, 0, 0,
+ 116, 116, 0, 0, 0, 116, 0, 0, 2, 0,
+ 0, 116, 0, 0, 0, 116, 116, 116, 116, 118,
+ 118, 116, 116, 79, 118, 0, 0, 0, 0, 0,
+ 118, 118, 0, 0, 116, 118, 118, 118, 118, 118,
+ 118, 118, 0, 118, 0, 94, 95, 116, 0, 118,
+ 0, 0, 0, 0, 118, 118, 118, 0, 122, 118,
+ 118, 51, 51, 0, 0, 51, 118, 51, 3, 0,
+ 36, 122, 0, 120, 96, 97, 98, 99, 100, 101,
+ 102, 103, 104, 105, 106, 118, 120, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 0,
+ 118, 118, 0, 0, 0, 118, 0, 0, 0, 0,
+ 114, 118, 0, 0, 0, 0, 118, 118, 118, 0,
+ 0, 118, 118, 28, 28, 28, 0, 0, 28, 0,
+ 0, 0, 0, 0, 28, 0, 0, 0, 28, 28,
+ 28, 28, 0, 0, 28, 28, 0, 118, 0, 0,
+ 0, 0, 0, 0, 0, 68, 69, 28, 28, 0,
+ 70, 0, 28, 118, 118, 0, 71, 0, 118, 0,
+ 28, 72, 73, 74, 118, 0, 75, 76, 0, 118,
+ 118, 118, 0, 0, 118, 118, 0, 0, 0, 77,
+ 0, 0, 0, 0, 0, 0, 0, 118, 0, 0,
+ 0, 0, 78, 0, 0, 0, 0, 0, 0, 0,
+ 118,
+};
+short cl_scope_check[] = { 33,
+ 59, 60, 60, 37, 38, 60, 40, 60, 42, 43,
+ 44, 126, 46, 47, 38, 44, 40, 123, 42, 44,
+ 58, 59, 123, 80, 315, 63, 60, 61, 62, 36,
+ 50, 44, 41, 62, 44, 44, 44, 58, 44, 44,
+ 60, 58, 266, 292, 44, 293, 44, 44, 272, 260,
+ 258, 259, 62, 62, 302, 263, 305, 91, 258, 259,
+ 94, 269, 305, 263, 62, 62, 274, 275, 276, 269,
+ 164, 279, 280, 305, 274, 275, 276, 301, 126, 279,
+ 280, 44, 293, 44, 60, 123, 297, 125, 182, 44,
+ 124, 315, 126, 41, 273, 189, 44, 305, 123, 62,
+ 292, 62, 123, 305, 38, 305, 123, 62, 42, 123,
+ 167, 41, 125, 305, 44, 343, 305, 125, 123, 125,
+ 177, 178, 38, 123, 123, 41, 42, 308, 44, 310,
+ 311, 123, 79, 305, 191, 82, 156, 294, 295, 296,
+ 305, 61, 330, 258, 259, 260, 62, 305, 263, 40,
+ 93, 266, 41, 40, 269, 60, 40, 272, 273, 274,
+ 275, 276, 169, 123, 279, 280, 173, 303, 40, 123,
+ 305, 40, 305, 123, 123, 168, 56, 292, 293, 149,
+ 166, -1, 297, 86, -1, -1, 301, -1, -1, -1,
+ 305, -1, -1, -1, -1, -1, -1, -1, -1, 305,
+ 315, 126, 303, -1, -1, -1, -1, -1, -1, -1,
+ 258, 259, -1, -1, -1, 263, -1, -1, 256, -1,
+ -1, 269, -1, -1, -1, 273, 274, 275, 276, 258,
+ 259, 279, 280, 126, 263, -1, -1, -1, -1, -1,
+ 269, 126, -1, -1, 292, 274, 275, 276, 258, 259,
+ 279, 280, -1, 263, -1, 289, 290, 305, -1, 269,
+ -1, -1, -1, -1, 274, 275, 276, -1, 292, 279,
+ 280, 330, 330, -1, -1, 330, 305, 330, 316, -1,
+ 305, 305, -1, 292, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 305, 305, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 341, 342, -1,
+ 258, 259, -1, -1, -1, 263, -1, -1, -1, -1,
+ 330, 269, -1, -1, -1, -1, 274, 275, 276, -1,
+ -1, 279, 280, 258, 259, 260, -1, -1, 263, -1,
+ -1, -1, -1, -1, 269, -1, -1, -1, 273, 274,
+ 275, 276, -1, -1, 279, 280, -1, 305, -1, -1,
+ -1, -1, -1, -1, -1, 258, 259, 292, 293, -1,
+ 263, -1, 297, 258, 259, -1, 269, -1, 263, -1,
+ 305, 274, 275, 276, 269, -1, 279, 280, -1, 274,
+ 275, 276, -1, -1, 279, 280, -1, -1, -1, 292,
+ -1, -1, -1, -1, -1, -1, -1, 292, -1, -1,
+ -1, -1, 305, -1, -1, -1, -1, -1, -1, -1,
+ 305,
+};
+#define YYFINAL 1
+#ifndef YYDEBUG
+#define YYDEBUG 1
+#endif
+#define YYMAXTOKEN 347
+#if YYDEBUG
+char *cl_scope_name[] = {
+"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+"'!'",0,0,0,"'%'","'&'",0,"'('","')'","'*'","'+'","','",0,"'.'","'/'",0,0,0,0,0,
+0,0,0,0,0,"':'","';'","'<'","'='","'>'","'?'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,"'['",0,"']'","'^'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,"'{'","'|'","'}'","'~'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"LE_AUTO",
+"LE_DOUBLE","LE_INT","LE_STRUCT","LE_BREAK","LE_ELSE","LE_LONG","LE_SWITCH",
+"LE_CASE","LE_ENUM","LE_REGISTER","LE_TYPEDEF","LE_CHAR","LE_EXTERN",
+"LE_RETURN","LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT","LE_UNSIGNED",
+"LE_CONTINUE","LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT","LE_GOTO","LE_SIZEOF",
+"LE_VOLATILE","LE_DO","LE_IF","LE_STATIC","LE_WHILE","LE_NEW","LE_DELETE",
+"LE_THIS","LE_OPERATOR","LE_CLASS","LE_PUBLIC","LE_PROTECTED","LE_PRIVATE",
+"LE_VIRTUAL","LE_FRIEND","LE_INLINE","LE_OVERLOAD","LE_TEMPLATE","LE_TYPENAME",
+"LE_THROW","LE_CATCH","LE_IDENTIFIER","LE_STRINGliteral","LE_FLOATINGconstant",
+"LE_INTEGERconstant","LE_CHARACTERconstant","LE_OCTALconstant","LE_HEXconstant",
+"LE_POUNDPOUND","LE_CComment","LE_CPPComment","LE_NAMESPACE","LE_USING",
+"LE_TYPEDEFname","LE_ARROW","LE_ICR","LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE",
+"LE_EQ","LE_NE","LE_ANDAND","LE_OROR","LE_ELLIPSIS","LE_CLCL","LE_DOTstar",
+"LE_ARROWstar","LE_MULTassign","LE_DIVassign","LE_MODassign","LE_PLUSassign",
+"LE_MINUSassign","LE_LSassign","LE_RSassign","LE_ANDassign","LE_ERassign",
+"LE_ORassign","LE_MACRO","LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST",
+"LE_REINTERPRET_CAST",
+};
+char *cl_scope_rule[] = {
+"$accept : translation_unit",
+"basic_type_name : LE_INT",
+"basic_type_name : LE_CHAR",
+"basic_type_name : LE_SHORT",
+"basic_type_name : LE_LONG",
+"basic_type_name : LE_FLOAT",
+"basic_type_name : LE_DOUBLE",
+"basic_type_name : LE_SIGNED",
+"basic_type_name : LE_UNSIGNED",
+"basic_type_name : LE_VOID",
+"translation_unit :",
+"translation_unit : translation_unit external_decl",
+"external_decl : class_decl",
+"external_decl : enum_decl",
+"external_decl : union_decl",
+"external_decl : function_decl",
+"external_decl : namespace_decl",
+"external_decl : using_namespace",
+"external_decl : scope_reducer",
+"external_decl : scope_increaer",
+"external_decl : question_expression",
+"external_decl : error",
+"template_arg :",
+"template_arg : template_specifiter LE_IDENTIFIER",
+"template_arg_list : template_arg",
+"template_arg_list : template_arg_list ',' template_arg",
+"template_specifiter : LE_CLASS",
+"template_specifiter : LE_TYPENAME",
+"opt_template_qualifier :",
+"opt_template_qualifier : LE_TEMPLATE '<' template_arg_list '>'",
+"derivation_list :",
+"derivation_list : parent_class",
+"derivation_list : derivation_list ',' parent_class",
+"parent_class : access_specifier LE_IDENTIFIER opt_template_specifier",
+"opt_template_specifier :",
+"opt_template_specifier : '<' template_parameter_list '>'",
+"access_specifier :",
+"access_specifier : LE_PUBLIC",
+"access_specifier : LE_PRIVATE",
+"access_specifier : LE_PROTECTED",
+"template_parameter_list :",
+"template_parameter_list : template_parameter",
+"template_parameter_list : template_parameter_list ',' template_parameter",
+"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp",
+"template_parameter : const_spec nested_scope_specifier basic_type_name special_star_amp",
+"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER '<' template_parameter_list '>' special_star_amp",
+"using_namespace : LE_USING LE_NAMESPACE nested_scope_specifier LE_IDENTIFIER ';'",
+"namespace_decl : stmnt_starter LE_NAMESPACE LE_IDENTIFIER '{'",
+"namespace_decl : stmnt_starter LE_NAMESPACE '{'",
+"opt_class_qualifier :",
+"opt_class_qualifier : LE_MACRO",
+"class_decl : stmnt_starter opt_template_qualifier class_keyword opt_class_qualifier LE_IDENTIFIER '{'",
+"class_decl : stmnt_starter opt_template_qualifier class_keyword opt_class_qualifier LE_IDENTIFIER ':' derivation_list '{'",
+"scope_reducer : '}'",
+"scope_increaer : '{'",
+"question_expression : '?'",
+"class_keyword : LE_CLASS",
+"class_keyword : LE_STRUCT",
+"func_name : LE_IDENTIFIER",
+"func_name : LE_OPERATOR any_operator",
+"any_operator : '+'",
+"any_operator : '='",
+"any_operator : '*'",
+"any_operator : '/'",
+"any_operator : '%'",
+"any_operator : '^'",
+"any_operator : '&'",
+"any_operator : '|'",
+"any_operator : '~'",
+"any_operator : '!'",
+"any_operator : '<'",
+"any_operator : '>'",
+"any_operator : LE_LS",
+"any_operator : LE_RS",
+"any_operator : LE_ANDAND",
+"any_operator : LE_OROR",
+"any_operator : LE_ARROW",
+"any_operator : LE_ARROWstar",
+"any_operator : '.'",
+"any_operator : LE_DOTstar",
+"any_operator : LE_ICR",
+"any_operator : LE_DECR",
+"any_operator : LE_LE",
+"any_operator : LE_GE",
+"any_operator : LE_EQ",
+"any_operator : LE_NE",
+"any_operator : '(' ')'",
+"any_operator : '[' ']'",
+"any_operator : LE_NEW",
+"any_operator : LE_DELETE",
+"any_operator : ','",
+"any_operator : LE_MULTassign",
+"any_operator : LE_DIVassign",
+"any_operator : LE_MODassign",
+"any_operator : LE_PLUSassign",
+"any_operator : LE_MINUSassign",
+"any_operator : LE_LSassign",
+"any_operator : LE_RSassign",
+"any_operator : LE_ANDassign",
+"any_operator : LE_ERassign",
+"any_operator : LE_ORassign",
+"optional_initialization_list : '{'",
+"optional_initialization_list : ':'",
+"declare_throw :",
+"declare_throw : LE_THROW '(' template_parameter_list ')'",
+"$$1 :",
+"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec variable_decl nested_scope_specifier func_name '(' $$1 const_spec declare_throw '{'",
+"$$2 :",
+"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec nested_scope_specifier func_name '(' $$2 optional_initialization_list",
+"$$3 :",
+"function_decl : stmnt_starter opt_template_qualifier virtual_spec const_spec nested_scope_specifier '~' func_name '(' $$3 const_spec '{'",
+"nested_scope_specifier :",
+"nested_scope_specifier : nested_scope_specifier scope_specifier",
+"scope_specifier : LE_IDENTIFIER LE_CLCL",
+"$$4 :",
+"scope_specifier : LE_IDENTIFIER '<' $$4 LE_CLCL",
+"virtual_spec :",
+"virtual_spec : LE_VIRTUAL",
+"const_spec :",
+"const_spec : LE_CONST",
+"amp_item :",
+"amp_item : '&'",
+"star_list :",
+"star_list : star_list '*'",
+"special_star_amp : star_list amp_item",
+"stmnt_starter :",
+"stmnt_starter : ';'",
+"stmnt_starter : ':'",
+"variable_decl : nested_scope_specifier basic_type_name special_star_amp",
+"variable_decl : nested_scope_specifier LE_IDENTIFIER special_star_amp",
+"variable_decl : nested_scope_specifier LE_IDENTIFIER '<' template_parameter_list '>' special_star_amp",
+"$$5 :",
+"enum_decl : stmnt_starter LE_ENUM LE_IDENTIFIER '{' $$5 enum_arg_list '}'",
+"enum_optional_assign :",
+"enum_optional_assign : '=' LE_HEXconstant",
+"enum_optional_assign : '=' LE_OCTALconstant",
+"enum_optional_assign : '=' LE_INTEGERconstant",
+"enum_argument : LE_IDENTIFIER enum_optional_assign",
+"enum_arg_list :",
+"enum_arg_list : enum_argument",
+"enum_arg_list : enum_arg_list ',' enum_argument",
+"union_decl : stmnt_starter LE_UNION LE_IDENTIFIER '{'",
+};
+#endif
+#ifndef YYSTYPE
+typedef int YYSTYPE;
+#endif
+#ifdef YYSTACKSIZE
+#undef YYMAXDEPTH
+#define YYMAXDEPTH YYSTACKSIZE
+#else
+#ifdef YYMAXDEPTH
+#define YYSTACKSIZE YYMAXDEPTH
+#else
+#define YYSTACKSIZE 500
+#define YYMAXDEPTH 500
+#endif
+#endif
+int yydebug;
+int yynerrs;
+int yyerrflag;
+int yychar;
+short *yyssp;
+YYSTYPE *yyvsp;
+YYSTYPE yyval;
+YYSTYPE yylval;
+short yyss[YYSTACKSIZE];
+YYSTYPE yyvs[YYSTACKSIZE];
+#define yystacksize YYSTACKSIZE
+void yyerror(char *s) {}
+
+void syncParser(){
+ //move lexer to the next ';' line or scope opening '{'
+ //int ch = cl_scope_lex();
+}
+
+//swallow all tokens up to the first '{'
+void consumeInitializationList(){
+ while( true ){
+ int ch = cl_scope_lex();
+ if(ch == 0){
+ break;
+ }
+
+ if(ch == '{'){
+ break;
+ }
+ }
+}
+
+//swallow all tokens up to the first '{'
+void consumeBody (){
+ std::string cs = "{";
+ int depth = 1;
+ while( true ) {
+ int ch = cl_scope_lex();
+ if(ch == 0){
+ break;
+ }
+
+ cs += cl_scope_text;
+ cs += " ";
+
+ if(ch == '{'){
+ depth++;
+ }else if(ch == '}'){
+ depth--;
+ if(depth == 0){
+ cl_scope_less(0);
+ break;
+ }
+ }
+ }
+ printf("Consumed body: [%s]\n", cs.c_str());
+}
+
+void consumeFuncArgList(){
+ int depth = 1;
+ while(depth > 0){
+ int ch = cl_scope_lex();
+ if(ch == 0){
+ break;
+ }
+
+ if(ch == ')'){
+ depth--;
+ continue;
+ }
+ else if(ch == '('){
+ depth ++ ;
+ continue;
+ }
+ }
+}
+
+/**
+ * consume all token until matching closing brace is found
+ */
+void consumeDecl()
+{
+ int depth = 1;
+ while(depth > 0)
+ {
+ int ch = cl_scope_lex();
+ if(ch ==0)
+ {
+ break;
+ }
+ if(ch == '}')
+ {
+ depth--;
+ if(depth == 0) currentScope.pop_back();//reduce the scope
+ continue;
+ }
+ else if(ch == '{')
+ {
+ depth ++ ;
+ continue;
+ }
+ }
+
+}
+
+void consumeTemplateDecl()
+{
+ int depth = 1;
+ while(depth > 0)
+ {
+ int ch = cl_scope_lex();
+ //printf("ch=%d\n", ch);
+ fflush(stdout);
+ if(ch ==0){
+ break;
+ }
+
+ if(ch == '>')
+ {
+ depth--;
+ continue;
+ }
+ else if(ch == '<')
+ {
+ depth ++ ;
+ continue;
+ }
+ }
+}
+
+//swallow all tokens up to the first '{'
+void consumeNotIncluding(int ch){
+ while( true ){
+ int c = cl_scope_lex();
+ if(c == 0){ // EOF?
+ break;
+ }
+
+ //keep the function signature
+ if(c == ch){
+ cl_scope_less(0);
+ break;
+ }
+ }
+}
+
+// return the scope name at the end of the input string
+std::string get_scope_name( const std::string &in,
+ std::vector<std::string> &additionalNS,
+ const std::map<std::string, std::string> &ignoreTokens)
+{
+ if( !setLexerInput(in, ignoreTokens) ){
+ return "";
+ }
+
+ //call tghe main parsing routine
+ cl_scope_parse();
+ std::string scope = getCurrentScope();
+ //do the lexer cleanup
+ cl_scope_lex_clean();
+
+ for(size_t i=0; i<gs_additionlNS.size(); i++){
+ additionalNS.push_back(gs_additionlNS.at(i));
+ }
+ gs_additionlNS.clear();
+ return scope;
+}
+#define YYABORT goto yyabort
+#define YYREJECT goto yyabort
+#define YYACCEPT goto yyaccept
+#define YYERROR goto yyerrlab
+int
+yyparse()
+{
+ register int yym, yyn, yystate;
+#if YYDEBUG
+ register char *yys;
+ extern char *getenv();
+
+ if (yys = getenv("YYDEBUG"))
+ {
+ yyn = *yys;
+ if (yyn >= '0' && yyn <= '9')
+ yydebug = yyn - '0';
+ }
+#endif
+
+ yynerrs = 0;
+ yyerrflag = 0;
+ yychar = (-1);
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+ *yyssp = yystate = 0;
+
+yyloop:
+ if (yyn = yydefred[yystate]) goto yyreduce;
+ if (yychar < 0)
+ {
+ if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ }
+ if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, shifting to state %d\n",
+ YYPREFIX, yystate, yytable[yyn]);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ yychar = (-1);
+ if (yyerrflag > 0) --yyerrflag;
+ goto yyloop;
+ }
+ if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ {
+ yyn = yytable[yyn];
+ goto yyreduce;
+ }
+ if (yyerrflag) goto yyinrecovery;
+#ifdef lint
+ goto yynewerror;
+#endif
+yynewerror:
+ yyerror("syntax error");
+#ifdef lint
+ goto yyerrlab;
+#endif
+yyerrlab:
+ ++yynerrs;
+yyinrecovery:
+ if (yyerrflag < 3)
+ {
+ yyerrflag = 3;
+ for (;;)
+ {
+ if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, error recovery shifting\
+ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ goto yyloop;
+ }
+ else
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: error recovery discarding state %d\n",
+ YYPREFIX, *yyssp);
+#endif
+ if (yyssp <= yyss) goto yyabort;
+ --yyssp;
+ --yyvsp;
+ }
+ }
+ }
+ else
+ {
+ if (yychar == 0) goto yyabort;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ yychar = (-1);
+ goto yyloop;
+ }
+yyreduce:
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, reducing by rule %d (%s)\n",
+ YYPREFIX, yystate, yyn, yyrule[yyn]);
+#endif
+ yym = yylen[yyn];
+ yyval = yyvsp[1-yym];
+ switch (yyn)
+ {
+case 1:
+{ yyval = yyvsp[0]; }
+break;
+case 2:
+{ yyval = yyvsp[0]; }
+break;
+case 3:
+{ yyval = yyvsp[0]; }
+break;
+case 4:
+{ yyval = yyvsp[0]; }
+break;
+case 5:
+{ yyval = yyvsp[0]; }
+break;
+case 6:
+{ yyval = yyvsp[0]; }
+break;
+case 7:
+{ yyval = yyvsp[0]; }
+break;
+case 8:
+{ yyval = yyvsp[0]; }
+break;
+case 9:
+{ yyval = yyvsp[0]; }
+break;
+case 21:
+{
+/* printf("CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_scope_text, cl_scope_lineno);*/
+/* syncParser();*/
+ }
+break;
+case 22:
+{ yyval = "";}
+break;
+case 23:
+{yyval = yyvsp[-1] + " " + yyvsp[0];}
+break;
+case 24:
+{ yyval = yyvsp[0]; }
+break;
+case 25:
+{ yyval = yyvsp[-2] + " " + yyvsp[-1] + " " + yyvsp[0]; }
+break;
+case 26:
+{ yyval = yyvsp[0]; }
+break;
+case 27:
+{ yyval = yyvsp[0]; }
+break;
+case 29:
+{ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0];}
+break;
+case 30:
+{yyval = "";}
+break;
+case 31:
+{yyval = yyvsp[0];}
+break;
+case 32:
+{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];}
+break;
+case 33:
+{yyval = yyvsp[-2] + " " + yyvsp[-1] + yyvsp[0];}
+break;
+case 34:
+{yyval = "";}
+break;
+case 35:
+{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];}
+break;
+case 36:
+{yyval = "";}
+break;
+case 37:
+{yyval = yyvsp[0];}
+break;
+case 38:
+{yyval = yyvsp[0];}
+break;
+case 39:
+{yyval = yyvsp[0];}
+break;
+case 40:
+{yyval = "";}
+break;
+case 41:
+{yyval = yyvsp[0];}
+break;
+case 42:
+{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];}
+break;
+case 43:
+{
+ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] +yyvsp[0];
+ }
+break;
+case 44:
+{
+ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] +yyvsp[0];
+ }
+break;
+case 45:
+{
+ yyval = yyvsp[-6] + yyvsp[-5] + yyvsp[-4] +yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0] + " " ;
+ }
+break;
+case 46:
+{
+ /*printf("Found using namespace %s\n", $3.c_str());*/
+ gs_additionlNS.push_back(yyvsp[-2]+yyvsp[-1]);
+ }
+break;
+case 47:
+{
+ currentScope.push_back(yyvsp[-1]);
+ printScopeName();
+ }
+break;
+case 48:
+{
+ /*anonymouse namespace*/
+ increaseScope();
+ printScopeName();
+ }
+break;
+case 49:
+{yyval = "";}
+break;
+case 50:
+{yyval = yyvsp[0];}
+break;
+case 51:
+{
+ /*increase the scope level*/
+ currentScope.push_back(yyvsp[-1]);
+ printScopeName();
+ }
+break;
+case 52:
+{
+ /*increase the scope level*/
+ currentScope.push_back(yyvsp[-3]);
+ printScopeName();
+ }
+break;
+case 53:
+{
+ if(currentScope.empty())
+ {
+ /*fatal error!*/
+ /*printf("CodeLite: fatal error - cant go beyond global scope!\n");*/
+ }
+ else
+ {
+ currentScope.pop_back();
+ printScopeName();
+ }
+ }
+break;
+case 54:
+{
+ /*increase random scope*/
+ increaseScope();
+ printScopeName();
+ }
+break;
+case 55:
+{
+ consumeNotIncluding(';');
+ }
+break;
+case 56:
+{yyval = yyvsp[0];}
+break;
+case 57:
+{yyval = yyvsp[0];}
+break;
+case 58:
+{yyval = yyvsp[0];}
+break;
+case 59:
+{yyval = yyvsp[-1];}
+break;
+case 101:
+{yyval = '{';}
+break;
+case 102:
+{consumeInitializationList() /*eat everything including the open brace*/;}
+break;
+case 103:
+{yyval = "";}
+break;
+case 104:
+{yyval = yyvsp[-1];}
+break;
+case 105:
+{consumeFuncArgList();}
+break;
+case 106:
+{
+ /*trim down trailing '::' from scope name*/
+ if(yyvsp[-6].find_last_not_of(":") != std::string::npos){
+ yyvsp[-6].erase(yyvsp[-6].find_last_not_of(":")+1);
+ }
+ currentScope.push_back(yyvsp[-6]);
+ printScopeName();
+ }
+break;
+case 107:
+{consumeFuncArgList();}
+break;
+case 108:
+{
+
+ /*trim down trailing '::' from scope name*/
+ if(yyvsp[-4].find_last_not_of(":") != std::string::npos){
+ yyvsp[-4].erase(yyvsp[-4].find_last_not_of(":")+1);
+ }
+ currentScope.push_back(yyvsp[-4]);
+ printScopeName();
+ }
+break;
+case 109:
+{consumeFuncArgList();}
+break;
+case 110:
+{
+
+ /*trim down trailing '::' from scope name*/
+ if(yyvsp[-6].find_last_not_of(":") != std::string::npos){
+ yyvsp[-6].erase(yyvsp[-6].find_last_not_of(":")+1);
+ }
+ currentScope.push_back(yyvsp[-6]);
+ printScopeName();
+ }
+break;
+case 111:
+{yyval = "";}
+break;
+case 112:
+{ yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 113:
+{yyval = yyvsp[-1]+ yyvsp[0];}
+break;
+case 114:
+{consumeTemplateDecl();}
+break;
+case 115:
+{yyval = yyvsp[-3] + yyvsp[0];}
+break;
+case 116:
+{yyval = ""; }
+break;
+case 117:
+{ yyval = yyvsp[0]; }
+break;
+case 118:
+{yyval = ""; }
+break;
+case 119:
+{ yyval = yyvsp[0]; }
+break;
+case 120:
+{yyval = ""; }
+break;
+case 121:
+{ yyval = yyvsp[0]; }
+break;
+case 122:
+{yyval = ""; }
+break;
+case 123:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 124:
+{ yyval = yyvsp[-1] + yyvsp[0]; }
+break;
+case 125:
+{yyval = "";}
+break;
+case 126:
+{ yyval = ";";}
+break;
+case 127:
+{ yyval = ":";}
+break;
+case 128:
+{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;}
+break;
+case 129:
+{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;}
+break;
+case 130:
+{yyval = yyvsp[-5] + yyvsp[-4] + yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0] ;}
+break;
+case 131:
+{currentScope.push_back(yyvsp[-1]); printScopeName();}
+break;
+case 132:
+{
+ currentScope.pop_back();/*reduce the scope*/
+ printScopeName();
+ /*printf("found enum: %s, args are: %s\n", $2.c_str(), $5.c_str());*/
+ }
+break;
+case 133:
+{yyval = "";}
+break;
+case 134:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 135:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 136:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 137:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 138:
+{yyval = "";}
+break;
+case 139:
+{yyval = yyvsp[0];}
+break;
+case 140:
+{yyval = yyvsp[-2] + yyvsp[-1] + yyvsp[0];}
+break;
+case 141:
+{
+ currentScope.push_back(yyvsp[-1]);
+ printScopeName();
+ consumeDecl();
+ printScopeName();
+ }
+break;
+ }
+ yyssp -= yym;
+ yystate = *yyssp;
+ yyvsp -= yym;
+ yym = yylhs[yyn];
+ if (yystate == 0 && yym == 0)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state 0 to\
+ state %d\n", YYPREFIX, YYFINAL);
+#endif
+ yystate = YYFINAL;
+ *++yyssp = YYFINAL;
+ *++yyvsp = yyval;
+ if (yychar < 0)
+ {
+ if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, YYFINAL, yychar, yys);
+ }
+#endif
+ }
+ if (yychar == 0) goto yyaccept;
+ goto yyloop;
+ }
+ if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
+ yystate = yytable[yyn];
+ else
+ yystate = yydgoto[yym];
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state %d \
+to state %d\n", YYPREFIX, *yyssp, yystate);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate;
+ *++yyvsp = yyval;
+ goto yyloop;
+yyoverflow:
+ yyerror("yacc stack overflow");
+yyabort:
+ return (1);
+yyaccept:
+ return (0);
+}
diff --git a/plugins/symbol-db/cxxparser/scope-parser.h b/plugins/symbol-db/cxxparser/scope-parser.h
new file mode 100644
index 0000000..e129028
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/scope-parser.h
@@ -0,0 +1,34 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it>
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#ifndef _SCOPE_PARSER_H_
+#define _SCOPE_PARSER_H_
+
+#include <string>
+#include <vector>
+#include <map>
+
+using namespace std;
+
+
+std::string get_scope_name( const std::string &in,
+ std::vector<std::string> &additionalNS,
+ const std::map<std::string, std::string> &ignoreTokens);
+
+#endif
diff --git a/plugins/symbol-db/cxxparser/variable-parser.cpp b/plugins/symbol-db/cxxparser/variable-parser.cpp
new file mode 100644
index 0000000..de8c7a1
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/variable-parser.cpp
@@ -0,0 +1,1111 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#ifndef lint
+static char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93";
+#endif
+#define YYBYACC 1
+#define YYMAJOR 1
+#define YYMINOR 9
+#define yyclearin (yychar=(-1))
+#define yyerrok (yyerrflag=0)
+#define YYRECOVERING (yyerrflag!=0)
+#define yyparse cl_var_parse
+#define yylex cl_var_lex
+#define yyerror cl_var_error
+#define yychar cl_var_char
+#define yyval cl_var_val
+#define yylval cl_var_lval
+#define yydebug cl_var_debug
+#define yynerrs cl_var_nerrs
+#define yyerrflag cl_var_errflag
+#define yyss cl_var_ss
+#define yyssp cl_var_ssp
+#define yyvs cl_var_vs
+#define yyvsp cl_var_vsp
+#define yylhs cl_var_lhs
+#define yylen cl_var_len
+#define yydefred cl_var_defred
+#define yydgoto cl_var_dgoto
+#define yysindex cl_var_sindex
+#define yyrindex cl_var_rindex
+#define yygindex cl_var_gindex
+#define yytable cl_var_table
+#define yycheck cl_var_check
+#define yyname cl_var_name
+#define yyrule cl_var_rule
+#define YYPREFIX "cl_var_"
+
+/*************** Includes and Defines *****************************/
+#include "string"
+#include "vector"
+#include "stdio.h"
+#include "map"
+#include "variable-result.h"
+
+#ifdef yylex
+#undef yylex
+#define yylex cl_scope_lex
+#endif
+
+#define YYSTYPE std::string
+#define YYDEBUG 0 /* get the pretty debugging code to compile*/
+
+void cl_scope_error(char *string);
+int cl_var_parse();
+void syncParser();
+void var_consumeDefaultValue(char c1, char c2);
+
+static VariableList *gs_vars = NULL;
+static std::vector<std::string> gs_names;
+static bool g_isUsedWithinFunc = false;
+Variable curr_var;
+static std::string s_tmpString;
+
+/*---------------------------------------------*/
+/* externs defined in the lexer*/
+/*---------------------------------------------*/
+extern char *cl_scope_text;
+extern int cl_scope_lex();
+extern void cl_scope_less(int count);
+
+extern int cl_scope_lineno;
+extern std::vector<std::string> currentScope;
+extern bool setLexerInput(const std::string &in, const std::map<std::string, std::string> &ignoreMap);
+extern void setUseIgnoreMacros(bool ignore);
+extern void cl_scope_lex_clean();
+
+/*************** Standard ytab.c continues here *********************/
+#define LE_AUTO 257
+#define LE_DOUBLE 258
+#define LE_INT 259
+#define LE_STRUCT 260
+#define LE_BREAK 261
+#define LE_ELSE 262
+#define LE_LONG 263
+#define LE_SWITCH 264
+#define LE_CASE 265
+#define LE_ENUM 266
+#define LE_REGISTER 267
+#define LE_TYPEDEF 268
+#define LE_CHAR 269
+#define LE_EXTERN 270
+#define LE_RETURN 271
+#define LE_UNION 272
+#define LE_CONST 273
+#define LE_FLOAT 274
+#define LE_SHORT 275
+#define LE_UNSIGNED 276
+#define LE_CONTINUE 277
+#define LE_FOR 278
+#define LE_SIGNED 279
+#define LE_VOID 280
+#define LE_DEFAULT 281
+#define LE_GOTO 282
+#define LE_SIZEOF 283
+#define LE_VOLATILE 284
+#define LE_DO 285
+#define LE_IF 286
+#define LE_STATIC 287
+#define LE_WHILE 288
+#define LE_NEW 289
+#define LE_DELETE 290
+#define LE_THIS 291
+#define LE_OPERATOR 292
+#define LE_CLASS 293
+#define LE_PUBLIC 294
+#define LE_PROTECTED 295
+#define LE_PRIVATE 296
+#define LE_VIRTUAL 297
+#define LE_FRIEND 298
+#define LE_INLINE 299
+#define LE_OVERLOAD 300
+#define LE_TEMPLATE 301
+#define LE_TYPENAME 302
+#define LE_THROW 303
+#define LE_CATCH 304
+#define LE_IDENTIFIER 305
+#define LE_STRINGliteral 306
+#define LE_FLOATINGconstant 307
+#define LE_INTEGERconstant 308
+#define LE_CHARACTERconstant 309
+#define LE_OCTALconstant 310
+#define LE_HEXconstant 311
+#define LE_POUNDPOUND 312
+#define LE_CComment 313
+#define LE_CPPComment 314
+#define LE_NAMESPACE 315
+#define LE_USING 316
+#define LE_TYPEDEFname 317
+#define LE_ARROW 318
+#define LE_ICR 319
+#define LE_DECR 320
+#define LE_LS 321
+#define LE_RS 322
+#define LE_LE 323
+#define LE_GE 324
+#define LE_EQ 325
+#define LE_NE 326
+#define LE_ANDAND 327
+#define LE_OROR 328
+#define LE_ELLIPSIS 329
+#define LE_CLCL 330
+#define LE_DOTstar 331
+#define LE_ARROWstar 332
+#define LE_MULTassign 333
+#define LE_DIVassign 334
+#define LE_MODassign 335
+#define LE_PLUSassign 336
+#define LE_MINUSassign 337
+#define LE_LSassign 338
+#define LE_RSassign 339
+#define LE_ANDassign 340
+#define LE_ERassign 341
+#define LE_ORassign 342
+#define LE_MACRO 343
+#define LE_DYNAMIC_CAST 344
+#define LE_STATIC_CAST 345
+#define LE_CONST_CAST 346
+#define LE_REINTERPRET_CAST 347
+#define YYERRCODE 256
+short cl_var_lhs[] = { -1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 2, 0, 0, 5, 3, 3, 6,
+ 6, 6, 7, 7, 7, 4, 4, 4, 4, 4,
+ 13, 13, 16, 16, 15, 15, 15, 15, 14, 14,
+ 14, 14, 14, 17, 17, 9, 9, 8, 8, 18,
+ 18, 19, 19, 10, 11, 11, 11, 11, 11, 12,
+ 12, 12, 20, 12, 12,
+};
+short cl_var_len[] = { 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 2, 2, 1, 0, 2, 0, 2, 1, 0,
+ 1, 3, 4, 4, 7, 5, 5, 5, 4, 4,
+ 1, 4, 1, 1, 0, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 5, 0, 2, 0, 1, 0,
+ 1, 0, 2, 2, 0, 1, 1, 1, 1, 2,
+ 3, 6, 0, 6, 4,
+};
+short cl_var_defred[] = { 15,
+ 0, 19, 16, 0, 0, 0, 56, 57, 58, 59,
+ 18, 0, 49, 0, 52, 52, 52, 6, 1, 46,
+ 0, 2, 5, 3, 0, 0, 9, 14, 60, 0,
+ 0, 0, 0, 0, 0, 13, 12, 4, 8, 7,
+ 10, 11, 0, 47, 0, 33, 34, 30, 51, 53,
+ 54, 0, 29, 31, 0, 0, 44, 0, 37, 36,
+ 38, 28, 27, 52, 42, 41, 40, 43, 39, 26,
+ 0, 63, 0, 21, 46, 0, 0, 64, 0, 0,
+ 0, 32, 0, 22, 45, 0, 52, 0, 23, 24,
+ 0, 0, 25,
+};
+short cl_var_dgoto[] = { 1,
+ 28, 29, 3, 11, 4, 73, 74, 75, 30, 31,
+ 12, 15, 55, 70, 62, 48, 44, 51, 32, 78,
+};
+short cl_var_sindex[] = { 0,
+ -242, 0, 0, 17, -256, -256, 0, 0, 0, 0,
+ 0, -256, 0, -83, 0, 0, 0, 0, 0, 0,
+ -254, 0, 0, 0, -75, -75, 0, 0, 0, -285,
+ -37, 36, 3, -263, -214, 0, 0, 0, 0, 0,
+ 0, 0, -57, 0, -35, 0, 0, 0, 0, 0,
+ 0, -35, 0, 0, 26, -58, 0, -256, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ -256, 0, -31, 0, 0, -211, -23, 0, -256, -234,
+ -147, 0, -234, 0, 0, -52, 0, -256, 0, 0,
+ 9, -234, 0,
+};
+short cl_var_rindex[] = { 0,
+ 24, 0, 0, -170, -115, -115, 0, 0, 0, 0,
+ 0, -115, 0, -205, 0, 0, 0, 0, 0, 0,
+ -26, 0, 0, 0, -19, -14, 0, 0, 0, 0,
+ 0, 10, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, -9, 0, 1, 0, 0, 0, 0, 0,
+ 0, 1, 0, 0, 0, -4, 0, 51, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 51, 0, 0, 0, 0, 0, 0, 0, -107, 8,
+ 0, 0, 0, 0, 0, 35, 0, 51, 0, 0,
+ 0, 35, 0,
+};
+short cl_var_gindex[] = { 0,
+ 82, 21, 0, 0, 0, 13, 39, 57, -20, -6,
+ 0, 86, 0, 0, 62, 87, 0, 0, 0, 0,
+};
+#define YYTABLESIZE 356
+short cl_var_table[] = { 35,
+ 35, 71, 58, 47, 36, 59, 46, 88, 37, 33,
+ 34, 4, 79, 2, 4, 4, 13, 4, 8, 43,
+ 79, 8, 8, 7, 8, 60, 7, 7, 61, 7,
+ 80, 61, 61, 65, 61, 4, 65, 65, 83, 65,
+ 35, 54, 8, 47, 35, 62, 46, 7, 62, 62,
+ 50, 62, 79, 50, 81, 61, 6, 76, 35, 35,
+ 5, 14, 14, 17, 72, 65, 66, 17, 14, 64,
+ 92, 50, 52, 49, 10, 7, 52, 50, 52, 89,
+ 90, 17, 17, 77, 69, 93, 67, 55, 55, 55,
+ 56, 16, 55, 82, 20, 85, 52, 17, 55, 46,
+ 91, 87, 55, 55, 55, 55, 41, 42, 55, 55,
+ 18, 19, 20, 63, 0, 21, 68, 84, 0, 53,
+ 0, 22, 0, 35, 0, 35, 23, 24, 25, 0,
+ 0, 26, 27, 0, 55, 0, 0, 0, 0, 8,
+ 0, 9, 48, 48, 48, 0, 17, 48, 17, 0,
+ 48, 48, 0, 48, 0, 48, 0, 86, 48, 48,
+ 48, 48, 0, 48, 48, 0, 48, 48, 48, 0,
+ 0, 48, 48, 0, 18, 19, 20, 0, 0, 21,
+ 0, 0, 18, 19, 0, 22, 0, 38, 0, 48,
+ 23, 24, 25, 22, 0, 26, 27, 48, 23, 24,
+ 39, 0, 0, 40, 27, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 35, 0, 35, 35,
+ 35, 0, 0, 35, 0, 0, 0, 45, 0, 35,
+ 0, 57, 57, 35, 35, 35, 35, 57, 4, 35,
+ 35, 17, 17, 17, 0, 8, 17, 0, 0, 0,
+ 7, 0, 17, 0, 0, 61, 17, 17, 17, 17,
+ 65, 0, 17, 17, 0, 35, 0, 52, 48, 48,
+ 0, 0, 62, 48, 50, 0, 0, 0, 0, 48,
+ 0, 0, 0, 0, 48, 48, 48, 0, 17, 48,
+ 48, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 48,
+};
+short cl_var_check[] = { 20,
+ 0, 60, 60, 41, 259, 41, 44, 60, 263, 16,
+ 17, 38, 44, 256, 41, 42, 273, 44, 38, 305,
+ 44, 41, 42, 38, 44, 61, 41, 42, 38, 44,
+ 62, 41, 42, 38, 44, 62, 41, 42, 62, 44,
+ 40, 305, 62, 41, 44, 38, 44, 62, 41, 42,
+ 41, 44, 44, 44, 75, 91, 40, 64, 58, 59,
+ 44, 5, 6, 40, 123, 40, 41, 44, 12, 44,
+ 62, 62, 38, 38, 58, 59, 42, 42, 44, 86,
+ 87, 58, 59, 71, 59, 92, 61, 258, 259, 260,
+ 305, 6, 263, 305, 44, 330, 62, 12, 269, 305,
+ 88, 81, 273, 274, 275, 276, 25, 26, 279, 280,
+ 258, 259, 62, 52, -1, 263, 91, 79, -1, 33,
+ -1, 269, -1, 123, -1, 125, 274, 275, 276, -1,
+ -1, 279, 280, -1, 305, -1, -1, -1, -1, 123,
+ -1, 125, 258, 259, 260, -1, 123, 263, 125, -1,
+ 258, 259, -1, 269, -1, 263, -1, 305, 274, 275,
+ 276, 269, -1, 279, 280, -1, 274, 275, 276, -1,
+ -1, 279, 280, -1, 258, 259, 260, -1, -1, 263,
+ -1, -1, 258, 259, -1, 269, -1, 263, -1, 305,
+ 274, 275, 276, 269, -1, 279, 280, 305, 274, 275,
+ 276, -1, -1, 279, 280, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 256, -1, 258, 259,
+ 260, -1, -1, 263, -1, -1, -1, 305, -1, 269,
+ -1, 330, 330, 273, 274, 275, 276, 330, 305, 279,
+ 280, 258, 259, 260, -1, 305, 263, -1, -1, -1,
+ 305, -1, 269, -1, -1, 305, 273, 274, 275, 276,
+ 305, -1, 279, 280, -1, 305, -1, 305, 258, 259,
+ -1, -1, 305, 263, 305, -1, -1, -1, -1, 269,
+ -1, -1, -1, -1, 274, 275, 276, -1, 305, 279,
+ 280, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 305,
+};
+#define YYFINAL 1
+#ifndef YYDEBUG
+#define YYDEBUG 1
+#endif
+#define YYMAXTOKEN 347
+#if YYDEBUG
+char *cl_var_name[] = {
+"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,"'&'",0,"'('","')'","'*'",0,"','",0,0,0,0,0,0,0,0,0,0,0,0,0,"':'","';'",
+"'<'","'='","'>'",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'['",
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'{'",0,"'}'",0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+0,0,0,0,0,0,0,0,0,"LE_AUTO","LE_DOUBLE","LE_INT","LE_STRUCT","LE_BREAK",
+"LE_ELSE","LE_LONG","LE_SWITCH","LE_CASE","LE_ENUM","LE_REGISTER","LE_TYPEDEF",
+"LE_CHAR","LE_EXTERN","LE_RETURN","LE_UNION","LE_CONST","LE_FLOAT","LE_SHORT",
+"LE_UNSIGNED","LE_CONTINUE","LE_FOR","LE_SIGNED","LE_VOID","LE_DEFAULT",
+"LE_GOTO","LE_SIZEOF","LE_VOLATILE","LE_DO","LE_IF","LE_STATIC","LE_WHILE",
+"LE_NEW","LE_DELETE","LE_THIS","LE_OPERATOR","LE_CLASS","LE_PUBLIC",
+"LE_PROTECTED","LE_PRIVATE","LE_VIRTUAL","LE_FRIEND","LE_INLINE","LE_OVERLOAD",
+"LE_TEMPLATE","LE_TYPENAME","LE_THROW","LE_CATCH","LE_IDENTIFIER",
+"LE_STRINGliteral","LE_FLOATINGconstant","LE_INTEGERconstant",
+"LE_CHARACTERconstant","LE_OCTALconstant","LE_HEXconstant","LE_POUNDPOUND",
+"LE_CComment","LE_CPPComment","LE_NAMESPACE","LE_USING","LE_TYPEDEFname",
+"LE_ARROW","LE_ICR","LE_DECR","LE_LS","LE_RS","LE_LE","LE_GE","LE_EQ","LE_NE",
+"LE_ANDAND","LE_OROR","LE_ELLIPSIS","LE_CLCL","LE_DOTstar","LE_ARROWstar",
+"LE_MULTassign","LE_DIVassign","LE_MODassign","LE_PLUSassign","LE_MINUSassign",
+"LE_LSassign","LE_RSassign","LE_ANDassign","LE_ERassign","LE_ORassign",
+"LE_MACRO","LE_DYNAMIC_CAST","LE_STATIC_CAST","LE_CONST_CAST",
+"LE_REINTERPRET_CAST",
+};
+char *cl_var_rule[] = {
+"$accept : translation_unit",
+"basic_type_name_inter : LE_INT",
+"basic_type_name_inter : LE_CHAR",
+"basic_type_name_inter : LE_SHORT",
+"basic_type_name_inter : LE_LONG",
+"basic_type_name_inter : LE_FLOAT",
+"basic_type_name_inter : LE_DOUBLE",
+"basic_type_name_inter : LE_SIGNED",
+"basic_type_name_inter : LE_UNSIGNED",
+"basic_type_name_inter : LE_VOID",
+"basic_type_name : LE_UNSIGNED basic_type_name_inter",
+"basic_type_name : LE_SIGNED basic_type_name_inter",
+"basic_type_name : LE_LONG LE_LONG",
+"basic_type_name : LE_LONG LE_INT",
+"basic_type_name : basic_type_name_inter",
+"translation_unit :",
+"translation_unit : translation_unit external_decl",
+"$$1 :",
+"external_decl : $$1 variables",
+"external_decl : error",
+"parameter_list :",
+"parameter_list : template_parameter",
+"parameter_list : parameter_list ',' template_parameter",
+"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER special_star_amp",
+"template_parameter : const_spec nested_scope_specifier basic_type_name special_star_amp",
+"template_parameter : const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>' special_star_amp",
+"variables : stmnt_starter variable_decl special_star_amp variable_name_list postfix",
+"variables : '(' variable_decl special_star_amp LE_IDENTIFIER postfix2",
+"variables : ',' variable_decl special_star_amp LE_IDENTIFIER postfix2",
+"variables : '(' variable_decl special_star_amp postfix3",
+"variables : ',' variable_decl special_star_amp postfix3",
+"variable_name_list : LE_IDENTIFIER",
+"variable_name_list : variable_name_list ',' special_star_amp LE_IDENTIFIER",
+"postfix3 : ','",
+"postfix3 : ')'",
+"postfix2 :",
+"postfix2 : '='",
+"postfix2 : ')'",
+"postfix2 : '['",
+"postfix : ';'",
+"postfix : '='",
+"postfix : ')'",
+"postfix : '('",
+"postfix : '['",
+"scope_specifier : LE_IDENTIFIER LE_CLCL",
+"scope_specifier : LE_IDENTIFIER '<' parameter_list '>' LE_CLCL",
+"nested_scope_specifier :",
+"nested_scope_specifier : nested_scope_specifier scope_specifier",
+"const_spec :",
+"const_spec : LE_CONST",
+"amp_item :",
+"amp_item : '&'",
+"star_list :",
+"star_list : star_list '*'",
+"special_star_amp : star_list amp_item",
+"stmnt_starter :",
+"stmnt_starter : ';'",
+"stmnt_starter : '{'",
+"stmnt_starter : '}'",
+"stmnt_starter : ':'",
+"variable_decl : const_spec basic_type_name",
+"variable_decl : const_spec nested_scope_specifier LE_IDENTIFIER",
+"variable_decl : const_spec nested_scope_specifier LE_IDENTIFIER '<' parameter_list '>'",
+"$$2 :",
+"variable_decl : const_spec LE_STRUCT nested_scope_specifier LE_IDENTIFIER '{' $$2",
+"variable_decl : const_spec LE_STRUCT nested_scope_specifier LE_IDENTIFIER",
+};
+#endif
+#ifndef YYSTYPE
+typedef int YYSTYPE;
+#endif
+#ifdef YYSTACKSIZE
+#undef YYMAXDEPTH
+#define YYMAXDEPTH YYSTACKSIZE
+#else
+#ifdef YYMAXDEPTH
+#define YYSTACKSIZE YYMAXDEPTH
+#else
+#define YYSTACKSIZE 500
+#define YYMAXDEPTH 500
+#endif
+#endif
+int yydebug;
+int yynerrs;
+int yyerrflag;
+int yychar;
+short *yyssp;
+YYSTYPE *yyvsp;
+YYSTYPE yyval;
+YYSTYPE yylval;
+short yyss[YYSTACKSIZE];
+YYSTYPE yyvs[YYSTACKSIZE];
+#define yystacksize YYSTACKSIZE
+void yyerror(char *s) {}
+
+
+std::string var_consumBracketsContent(char openBrace)
+{
+ char closeBrace;
+
+ switch(openBrace) {
+ case '(': closeBrace = ')'; break;
+ case '[': closeBrace = ']'; break;
+ case '<': closeBrace = '>'; break;
+ case '{': closeBrace = '}'; break;
+ default:
+ openBrace = '(';
+ closeBrace = ')';
+ break;
+ }
+
+ std::string consumedData;
+ int depth = 1;
+ while(depth > 0)
+ {
+ int ch = cl_scope_lex();
+ if(ch == 0){
+ break;
+ }
+
+
+ if(ch == closeBrace)
+ {
+ consumedData.erase(0, consumedData.find_first_not_of(" "));
+ consumedData.erase(consumedData.find_last_not_of(" ")+1);
+ consumedData += cl_scope_text;
+
+ depth--;
+ continue;
+ }
+ else if(ch == openBrace)
+ {
+ consumedData.erase(0, consumedData.find_first_not_of(" "));
+ consumedData.erase(consumedData.find_last_not_of(" ")+1);
+ consumedData += cl_scope_text;
+
+ depth ++ ;
+ continue;
+ }
+
+ consumedData += cl_scope_text;
+ consumedData += " ";
+ }
+
+ return consumedData;
+}
+
+void var_consumeDefaultValue(char c1, char c2)
+{
+ int depth = 0;
+ bool cont(true);
+
+ while (depth >= 0) {
+ int ch = cl_scope_lex();
+ if(ch == 0) { break;}
+
+ if(ch == c1 && depth == 0) {
+ cl_scope_less(0);
+ break;
+ }
+
+ if(ch == c2 && depth == 0) {
+ cl_scope_less(0);
+ break;
+ }
+
+ curr_var.m_defaultValue += cl_scope_text;
+ if(ch == ')' || ch == '}'){
+ depth--;
+ continue;
+ } else if(ch == '(' || ch == '{') {
+ depth ++ ;
+ continue;
+ }
+ }
+}
+
+void var_syncParser(){
+// int depth = 1;
+// bool cont(true);
+//
+// while (depth > 0 && cont) {
+// int ch = cl_scope_lex();
+// if(ch == 0) { break;}
+// if(ch == ',' && depth == 0) { break;}
+// if(ch == ';' && depth == 0) { break;}
+// if(ch == ')' && depth == 0) { break;}
+//
+// if(ch == ')'){
+// depth--;
+// continue;
+// }
+// else if(ch == '('){
+// depth ++ ;
+// continue;
+// }
+// printf("%d ", ch);
+// }
+// printf("\n");
+}
+
+// return the scope name at the end of the input string
+void get_variables(const std::string &in, VariableList &li, const std::map<std::string, std::string> &ignoreMap, bool isUsedWithinFunc)
+{
+ //provide the lexer with new input
+ if( !setLexerInput(in, ignoreMap) ){
+ return;
+ }
+
+ //set the parser local output to our variable list
+ gs_vars = &li;
+ setUseIgnoreMacros(false);
+
+ // the 'g_isUsedWithinFunc' allows us to parse variabels without name
+ // this is typical when used as function declaration (e.g. void setValue(bool);)
+ g_isUsedWithinFunc = isUsedWithinFunc;
+
+ //call tghe main parsing routine
+ cl_var_parse();
+ gs_vars = NULL;
+
+ // restore settings
+ setUseIgnoreMacros(true);
+ g_isUsedWithinFunc = false;
+
+ //do the lexer cleanup
+ cl_scope_lex_clean();
+}
+
+#define YYABORT goto yyabort
+#define YYREJECT goto yyabort
+#define YYACCEPT goto yyaccept
+#define YYERROR goto yyerrlab
+int
+yyparse()
+{
+ register int yym, yyn, yystate;
+#if YYDEBUG
+ register char *yys;
+ extern char *getenv();
+
+ if (yys = getenv("YYDEBUG"))
+ {
+ yyn = *yys;
+ if (yyn >= '0' && yyn <= '9')
+ yydebug = yyn - '0';
+ }
+#endif
+
+ yynerrs = 0;
+ yyerrflag = 0;
+ yychar = (-1);
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+ *yyssp = yystate = 0;
+
+yyloop:
+ if (yyn = yydefred[yystate]) goto yyreduce;
+ if (yychar < 0)
+ {
+ if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ }
+ if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, shifting to state %d\n",
+ YYPREFIX, yystate, yytable[yyn]);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ yychar = (-1);
+ if (yyerrflag > 0) --yyerrflag;
+ goto yyloop;
+ }
+ if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
+ {
+ yyn = yytable[yyn];
+ goto yyreduce;
+ }
+ if (yyerrflag) goto yyinrecovery;
+#ifdef lint
+ goto yynewerror;
+#endif
+yynewerror:
+ yyerror("syntax error");
+#ifdef lint
+ goto yyerrlab;
+#endif
+yyerrlab:
+ ++yynerrs;
+yyinrecovery:
+ if (yyerrflag < 3)
+ {
+ yyerrflag = 3;
+ for (;;)
+ {
+ if ((yyn = yysindex[*yyssp]) && (yyn += YYERRCODE) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, error recovery shifting\
+ to state %d\n", YYPREFIX, *yyssp, yytable[yyn]);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate = yytable[yyn];
+ *++yyvsp = yylval;
+ goto yyloop;
+ }
+ else
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: error recovery discarding state %d\n",
+ YYPREFIX, *yyssp);
+#endif
+ if (yyssp <= yyss) goto yyabort;
+ --yyssp;
+ --yyvsp;
+ }
+ }
+ }
+ else
+ {
+ if (yychar == 0) goto yyabort;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
+ YYPREFIX, yystate, yychar, yys);
+ }
+#endif
+ yychar = (-1);
+ goto yyloop;
+ }
+yyreduce:
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: state %d, reducing by rule %d (%s)\n",
+ YYPREFIX, yystate, yyn, yyrule[yyn]);
+#endif
+ yym = yylen[yyn];
+ yyval = yyvsp[1-yym];
+ switch (yyn)
+ {
+case 1:
+{ yyval = yyvsp[0]; }
+break;
+case 2:
+{ yyval = yyvsp[0]; }
+break;
+case 3:
+{ yyval = yyvsp[0]; }
+break;
+case 4:
+{ yyval = yyvsp[0]; }
+break;
+case 5:
+{ yyval = yyvsp[0]; }
+break;
+case 6:
+{ yyval = yyvsp[0]; }
+break;
+case 7:
+{ yyval = yyvsp[0]; }
+break;
+case 8:
+{ yyval = yyvsp[0]; }
+break;
+case 9:
+{ yyval = yyvsp[0]; }
+break;
+case 10:
+{ yyval = yyvsp[-1] + " " + yyvsp[0]; }
+break;
+case 11:
+{ yyval = yyvsp[-1] + " " + yyvsp[0]; }
+break;
+case 12:
+{ yyval = yyvsp[-1] + " " + yyvsp[0]; }
+break;
+case 13:
+{ yyval = yyvsp[-1] + " " + yyvsp[0]; }
+break;
+case 14:
+{ yyval = yyvsp[0]; }
+break;
+case 17:
+{curr_var.Reset(); gs_names.clear(); s_tmpString.clear();}
+break;
+case 19:
+{
+ yyclearin; /*clear lookahead token*/
+ yyerrok;
+ /*printf("CodeLite: syntax error, unexpected token '%s' found at line %d \n", cl_var_lval.c_str(), cl_scope_lineno);*/
+ var_syncParser();
+ }
+break;
+case 20:
+{yyval = "";}
+break;
+case 21:
+{yyval = yyvsp[0];}
+break;
+case 22:
+{yyval = yyvsp[-2] + yyvsp[-1] + " " + yyvsp[0];}
+break;
+case 23:
+{
+ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] +yyvsp[0];
+ }
+break;
+case 24:
+{
+ yyval = yyvsp[-3] + yyvsp[-2] + yyvsp[-1] +yyvsp[0];
+ }
+break;
+case 25:
+{
+ yyval = yyvsp[-6] + yyvsp[-5] + yyvsp[-4] +yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0] + " " ;
+ }
+break;
+case 26:
+{
+ if(gs_vars)
+ {
+ Variable var;
+ std::string pattern;
+ curr_var.m_isPtr = (yyvsp[-2].find("*") != (size_t)-1);
+ curr_var.m_starAmp = yyvsp[-2];
+ curr_var.m_lineno = cl_scope_lineno;
+ for(size_t i=0; i< gs_names.size(); i++)
+ {
+ /*create new variable for every variable name found*/
+ var = curr_var;
+ var.m_pattern = "/^" + yyvsp[-4] + " " + yyvsp[-3] + " " + yyvsp[-2] + gs_names.at(i) + " $/";
+ var.m_name = gs_names.at(i);
+ gs_vars->push_back(var);
+ }
+ curr_var.Reset();
+ gs_names.clear();
+ }
+ }
+break;
+case 27:
+{
+ if(gs_vars)
+ {
+ Variable var;
+ std::string pattern;
+ curr_var.m_pattern = "/^";
+ curr_var.m_pattern += yyvsp[-4] + " " + yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] + yyvsp[0] + "$/";
+ curr_var.m_isPtr = (yyvsp[-2].find("*") != (size_t)-1);
+ curr_var.m_starAmp = yyvsp[-2];
+ curr_var.m_arrayBrackets = yyvsp[0];
+ curr_var.m_lineno = cl_scope_lineno;
+ /*create new variable for every variable name found*/
+ var = curr_var;
+ var.m_name = yyvsp[-1];;
+ gs_vars->push_back(var);
+ curr_var.Reset();
+ gs_names.clear();
+ }
+ }
+break;
+case 28:
+{
+ if(gs_vars && g_isUsedWithinFunc)
+ {
+ Variable var;
+ std::string pattern;
+ curr_var.m_pattern = "/^";
+ curr_var.m_pattern += yyvsp[-4] + " " + yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] + yyvsp[0] + "$/";
+ curr_var.m_isPtr = (yyvsp[-2].find("*") != (size_t)-1);
+ curr_var.m_starAmp = yyvsp[-2];
+ curr_var.m_arrayBrackets = yyvsp[0];
+ curr_var.m_lineno = cl_scope_lineno;
+
+ /*create new variable for every variable name found*/
+ var = curr_var;
+ var.m_name = yyvsp[-1];
+ gs_vars->push_back(var);
+
+ curr_var.Reset();
+ gs_names.clear();
+ }
+ }
+break;
+case 29:
+{
+ if(gs_vars && g_isUsedWithinFunc)
+ {
+ Variable var;
+ std::string pattern;
+ curr_var.m_pattern = "/^";
+ curr_var.m_pattern += yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] + " " + "$/";
+ curr_var.m_isPtr = (yyvsp[-1].find("*") != (size_t)-1);
+ curr_var.m_starAmp = yyvsp[-1];
+ curr_var.m_lineno = cl_scope_lineno;
+
+ /*create new variable for every variable name found*/
+ var = curr_var;
+ var.m_name = "";
+ gs_vars->push_back(var);
+
+ curr_var.Reset();
+ gs_names.clear();
+ }
+ if(yyvsp[0] == ",") {
+ cl_scope_less(0);
+ }
+ }
+break;
+case 30:
+{
+ if(gs_vars && g_isUsedWithinFunc)
+ {
+ Variable var;
+ std::string pattern;
+ curr_var.m_pattern = "/^";
+ curr_var.m_pattern += yyvsp[-3] + " " + yyvsp[-2] + " " + yyvsp[-1] + " " + "$/";
+ curr_var.m_isPtr = (yyvsp[-1].find("*") != (size_t)-1);
+ curr_var.m_starAmp = yyvsp[-1];
+ curr_var.m_lineno = cl_scope_lineno;
+
+ /*create new variable for every variable name found*/
+ var = curr_var;
+ var.m_name = "";
+ gs_vars->push_back(var);
+
+ curr_var.Reset();
+ gs_names.clear();
+ }
+ if(yyvsp[0] == ",") {
+ cl_scope_less(0);
+ }
+ }
+break;
+case 31:
+{
+ gs_names.push_back(yyvsp[0]);
+ yyval = yyvsp[0];
+ }
+break;
+case 32:
+{
+ /*collect all the names*/
+ gs_names.push_back(yyvsp[0]);
+ yyval = yyvsp[-3] + yyvsp[-2] + " " + yyvsp[-1] + yyvsp[0];
+ }
+break;
+case 35:
+{yyval = "";}
+break;
+case 36:
+{var_consumeDefaultValue(',', ')'); yyval = ""; }
+break;
+case 37:
+{ yyval = ""; }
+break;
+case 38:
+{ yyval = yyvsp[0] + var_consumBracketsContent('[');}
+break;
+case 42:
+{ yyval = yyvsp[0] + var_consumBracketsContent('(');}
+break;
+case 43:
+{ yyval = yyvsp[0] + var_consumBracketsContent('[');}
+break;
+case 44:
+{yyval = yyvsp[-1]+ yyvsp[0]; }
+break;
+case 45:
+{yyval = yyvsp[-4] + yyvsp[-3] + yyvsp[-2] + yyvsp[-1] + yyvsp[0];}
+break;
+case 46:
+{yyval = "";}
+break;
+case 47:
+{ yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 48:
+{yyval = ""; }
+break;
+case 49:
+{ yyval = yyvsp[0]; }
+break;
+case 50:
+{yyval = ""; }
+break;
+case 51:
+{ yyval = yyvsp[0]; }
+break;
+case 52:
+{yyval = ""; }
+break;
+case 53:
+{yyval = yyvsp[-1] + yyvsp[0];}
+break;
+case 54:
+{ yyval = yyvsp[-1] + yyvsp[0]; }
+break;
+case 55:
+{yyval = "";}
+break;
+case 56:
+{ yyval = ";";}
+break;
+case 57:
+{ yyval = "{";}
+break;
+case 58:
+{ yyval = "}";}
+break;
+case 59:
+{ yyval = ":";}
+break;
+case 60:
+{
+ yyval = yyvsp[-1] + " " + yyvsp[0];
+ yyvsp[0].erase(yyvsp[0].find_last_not_of(":")+1);
+ curr_var.m_type = yyvsp[0];
+ curr_var.m_isConst = !yyvsp[-1].empty();
+ }
+break;
+case 61:
+{
+ yyval = yyvsp[-2] + " " + yyvsp[-1] + yyvsp[0];
+ yyvsp[-1].erase(yyvsp[-1].find_last_not_of(":")+1);
+ curr_var.m_typeScope = yyvsp[-1];
+ curr_var.m_type = yyvsp[0];
+ curr_var.m_isConst = !yyvsp[-2].empty();
+ s_tmpString.clear();
+ }
+break;
+case 62:
+{
+ yyval = yyvsp[-5] + " " + yyvsp[-4] + yyvsp[-3] + " " + yyvsp[-2] + yyvsp[-1] + yyvsp[0];
+ yyvsp[-4].erase(yyvsp[-4].find_last_not_of(":")+1);
+ curr_var.m_typeScope = yyvsp[-4];
+ curr_var.m_type = yyvsp[-3];
+ curr_var.m_isTemplate = true;
+ curr_var.m_templateDecl = yyvsp[-2] +yyvsp[-1] +yyvsp[0];
+ curr_var.m_isConst = !yyvsp[-5].empty();
+ s_tmpString.clear();
+ }
+break;
+case 63:
+{s_tmpString = var_consumBracketsContent('{');}
+break;
+case 64:
+{
+ yyval = yyvsp[-5] + " " + yyvsp[-4] + " " + yyvsp[-3] + " " + yyvsp[-2] + yyvsp[-1] + yyvsp[0] + s_tmpString;
+ yyvsp[-3].erase(yyvsp[-3].find_last_not_of(":")+1);
+ curr_var.m_typeScope = yyvsp[-3];
+ curr_var.m_type = yyvsp[-2];
+ curr_var.m_isTemplate = false;
+ curr_var.m_isConst = !yyvsp[-5].empty();
+ s_tmpString.clear();
+ }
+break;
+case 65:
+{
+ yyval = yyvsp[-4];
+ yyvsp[-1].erase(yyvsp[-1].find_last_not_of(":")+1);
+ curr_var.m_typeScope = yyvsp[-1];
+ curr_var.m_type = yyvsp[0];
+ curr_var.m_isTemplate = false;
+ curr_var.m_isConst = !yyvsp[-3].empty();
+ s_tmpString.clear();
+ }
+break;
+ }
+ yyssp -= yym;
+ yystate = *yyssp;
+ yyvsp -= yym;
+ yym = yylhs[yyn];
+ if (yystate == 0 && yym == 0)
+ {
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state 0 to\
+ state %d\n", YYPREFIX, YYFINAL);
+#endif
+ yystate = YYFINAL;
+ *++yyssp = YYFINAL;
+ *++yyvsp = yyval;
+ if (yychar < 0)
+ {
+ if ((yychar = yylex()) < 0) yychar = 0;
+#if YYDEBUG
+ if (yydebug)
+ {
+ yys = 0;
+ if (yychar <= YYMAXTOKEN) yys = yyname[yychar];
+ if (!yys) yys = "illegal-symbol";
+ printf("%sdebug: state %d, reading %d (%s)\n",
+ YYPREFIX, YYFINAL, yychar, yys);
+ }
+#endif
+ }
+ if (yychar == 0) goto yyaccept;
+ goto yyloop;
+ }
+ if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
+ yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
+ yystate = yytable[yyn];
+ else
+ yystate = yydgoto[yym];
+#if YYDEBUG
+ if (yydebug)
+ printf("%sdebug: after reduction, shifting from state %d \
+to state %d\n", YYPREFIX, *yyssp, yystate);
+#endif
+ if (yyssp >= yyss + yystacksize - 1)
+ {
+ goto yyoverflow;
+ }
+ *++yyssp = yystate;
+ *++yyvsp = yyval;
+ goto yyloop;
+yyoverflow:
+ yyerror("yacc stack overflow");
+yyabort:
+ return (1);
+yyaccept:
+ return (0);
+}
diff --git a/plugins/symbol-db/cxxparser/variable-parser.h b/plugins/symbol-db/cxxparser/variable-parser.h
new file mode 100644
index 0000000..d9fbdb7
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/variable-parser.h
@@ -0,0 +1,34 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it>
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#ifndef _VARIABLE_PARSER_H
+#define _VARIABLE_PARSER_H
+
+#include <string>
+#include <map>
+#include "variable-result.h"
+
+using namespace std;
+
+
+void
+get_variables(const std::string &in, VariableList &li,
+ const std::map<std::string, std::string> &ignoreMap, bool isUsedWithinFunc);
+
+#endif
diff --git a/plugins/symbol-db/cxxparser/variable-result.cpp b/plugins/symbol-db/cxxparser/variable-result.cpp
new file mode 100644
index 0000000..8bf1346
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/variable-result.cpp
@@ -0,0 +1,87 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
+/*
+ * anjuta
+ * Copyright (C) Eran Ifrah (Main file for CodeLite www.codelite.org/ )
+ * Copyright (C) Massimo Cora' 2009 <maxcvs email it> (Customizations for Anjuta)
+ *
+ * anjuta 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.
+ *
+ * anjuta 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/>.
+ */
+
+#include "variable-result.h"
+
+Variable::Variable()
+{
+ Reset();
+}
+
+Variable::~Variable()
+{
+}
+
+Variable::Variable(const Variable &src)
+{
+ *this = src;
+}
+
+Variable & Variable::operator =(const Variable &src)
+{
+ m_type = src.m_type;
+ m_templateDecl = src.m_templateDecl;
+ m_name = src.m_name;
+ m_isTemplate = src.m_isTemplate;
+ m_isPtr = src.m_isPtr;
+ m_typeScope = src.m_typeScope;
+ m_pattern = src.m_pattern;
+ m_starAmp = src.m_starAmp;
+ m_lineno = src.m_lineno;
+ m_isConst = src.m_isConst;
+ m_defaultValue = src.m_defaultValue;
+ m_arrayBrackets = src.m_arrayBrackets;
+ return *this;
+}
+
+void Variable::Reset()
+{
+ m_type = "";
+ m_templateDecl = "";
+ m_name = "";
+ m_isTemplate = false;
+ m_isPtr = false;
+ m_typeScope = "";
+ m_pattern = "";
+ m_starAmp = "";
+ m_lineno = 0;
+ m_isConst = false;
+ m_defaultValue = "";
+ m_arrayBrackets = "";
+}
+
+void Variable::Print()
+{
+ fprintf( stdout, "{m_name=%s, m_defaultValue=%s, m_lineno=%d, m_starAmp=%s, m_type=%s, m_isConst=%s, m_typeScope=%s, m_templateDecl=%s, m_arrayBrackets=%s, m_isPtr=%s, m_isTemplate=%s }\n",
+ m_name.c_str(),
+ m_defaultValue.c_str(),
+ m_lineno,
+ m_starAmp.c_str(),
+ m_type.c_str(),
+ m_isConst ? "true" : "false",
+ m_typeScope.c_str(),
+ m_templateDecl.c_str(),
+ m_arrayBrackets.c_str(),
+ m_isPtr ? "true" : "false",
+ m_isTemplate ? "true" : "false");
+
+ fprintf( stdout, "Pattern: %s\n", m_pattern.c_str());
+ fflush(stdout);
+}
diff --git a/plugins/symbol-db/cxxparser/variable-result.h b/plugins/symbol-db/cxxparser/variable-result.h
new file mode 100644
index 0000000..b595fed
--- /dev/null
+++ b/plugins/symbol-db/cxxparser/variable-result.h
@@ -0,0 +1,42 @@
+#ifndef VARIABLE_H
+#define VARIABLE_H
+
+#include "string"
+#include "list"
+#include <stdio.h>
+
+class Variable
+{
+public:
+ std::string m_name;
+ bool m_isTemplate;
+ std::string m_templateDecl;
+ bool m_isPtr;
+ std::string m_type; //as in 'int a;' -> type=int
+ std::string m_typeScope;//as in 'std::string a;' -> typeScope = std, type=string
+ std::string m_pattern;
+ std::string m_starAmp;
+ int m_lineno;
+ bool m_isConst;
+ std::string m_defaultValue; // used mainly for function arguments with default values foo(int = 0);
+ std::string m_arrayBrackets;
+
+public:
+ Variable();
+ virtual ~Variable();
+
+ //copy ctor
+ Variable(const Variable& src);
+
+ //operator =
+ Variable& operator=(const Variable& src);
+
+ //clear the class content
+ void Reset();
+
+ //print the variable to stdout
+ void Print();
+};
+
+typedef std::list<Variable> VariableList;
+#endif //VARIABLE_H
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]