summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/kernel/qapplication.cpp124
-rw-r--r--src/kernel/qapplication.h13
-rw-r--r--src/kernel/qevent.h2
-rw-r--r--src/kernel/qeventloop.cpp32
-rw-r--r--src/kernel/qeventloop_unix.cpp1
-rw-r--r--src/kernel/qeventloop_unix_glib.cpp20
-rw-r--r--src/kernel/qeventloop_x11.cpp98
-rw-r--r--src/kernel/qeventloop_x11_glib.cpp600
-rw-r--r--src/kernel/qobject.cpp328
-rw-r--r--src/kernel/qobject.h16
-rw-r--r--src/kernel/qthread.cpp17
-rw-r--r--src/kernel/qthread.h14
-rw-r--r--src/kernel/qthread_unix.cpp46
-rw-r--r--src/kernel/qwidget.cpp9
-rw-r--r--src/moc/moc.y1
-rw-r--r--src/moc/moc_lex.cpp499
-rw-r--r--src/moc/moc_yacc.cpp6113
-rw-r--r--src/moc/moc_yacc.h230
-rw-r--r--src/tools/qmutex_unix.cpp1
-rw-r--r--src/tools/qthreadinstance_p.h6
-rw-r--r--src/tools/qucom.cpp24
-rw-r--r--src/tools/qucom_p.h4
22 files changed, 5251 insertions, 2947 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp
index 51aa247..a9c9fb8 100644
--- a/src/kernel/qapplication.cpp
+++ b/src/kernel/qapplication.cpp
@@ -68,6 +68,7 @@
#if defined(QT_THREAD_SUPPORT)
# include "qmutex.h"
# include "qthread.h"
+# include <private/qthreadinstance_p.h>
#endif // QT_THREAD_SUPPORT
#include <stdlib.h>
@@ -383,7 +384,25 @@ Q_EXPORT Qt::HANDLE qt_get_application_thread_id()
}
#endif // QT_THREAD_SUPPORT
+#ifndef QT_THREAD_SUPPORT
QEventLoop *QApplication::eventloop = 0; // application event loop
+#endif
+
+#ifdef QT_THREAD_SUPPORT
+QEventLoop* QApplication::currentEventLoop() {
+ QThread* thread = QThread::currentThreadObject();
+ if (thread) {
+ if (thread->d) {
+ return thread->d->eventLoop;
+ }
+ }
+ return NULL;
+}
+#else
+QEventLoop* QApplication::currentEventLoop() {
+ return QApplication::eventloop;
+}
+#endif
#ifndef QT_NO_ACCEL
extern bool qt_dispatchAccelEvent( QWidget*, QKeyEvent* ); // def in qaccel.cpp
@@ -516,6 +535,41 @@ QClipboard *qt_clipboard = 0; // global clipboard object
#endif
QWidgetList * qt_modal_stack=0; // stack of modal widgets
+#ifdef QT_THREAD_SUPPORT
+// thread wrapper for the main() thread
+class QCoreApplicationThread : public QThread
+{
+public:
+ inline QCoreApplicationThread()
+ {
+ QThreadInstance::setCurrentThread(this);
+
+ // thread should be running and not finished for the lifetime
+ // of the application (even if QCoreApplication goes away)
+ d->running = true;
+ d->finished = false;
+ d->eventLoop = NULL;
+ }
+ inline ~QCoreApplicationThread()
+ {
+ // avoid warning from QThread
+ d->running = false;
+ }
+private:
+ inline void run()
+ {
+ // this function should never be called, it is implemented
+ // only so that we can instantiate the object
+ qFatal("QCoreApplicationThread: internal error");
+ }
+};
+
+static QCoreApplicationThread qt_main_thread;
+static QThread *mainThread() { return &qt_main_thread; }
+#else
+static QThread* mainThread() { return QThread::currentThread(); }
+#endif
+
// Definitions for posted events
struct QPostEvent {
QPostEvent( QObject *r, QEvent *e ): receiver( r ), event( e ) {}
@@ -818,8 +872,8 @@ void QApplication::construct( int &argc, char **argv, Type type )
initialize( argc, argv );
if ( qt_is_gui_used )
qt_maxWindowRect = desktop()->rect();
- if ( eventloop )
- eventloop->appStartingUp();
+ if ( currentEventLoop() )
+ currentEventLoop()->appStartingUp();
}
/*!
@@ -874,8 +928,8 @@ QApplication::QApplication( Display* dpy, HANDLE visual, HANDLE colormap )
if ( qt_is_gui_used )
qt_maxWindowRect = desktop()->rect();
- if ( eventloop )
- eventloop->appStartingUp();
+ if ( currentEventLoop() )
+ currentEventLoop()->appStartingUp();
}
/*!
@@ -916,13 +970,26 @@ QApplication::QApplication(Display *dpy, int argc, char **argv,
if ( qt_is_gui_used )
qt_maxWindowRect = desktop()->rect();
- if ( eventloop )
- eventloop->appStartingUp();
+ if ( currentEventLoop() )
+ currentEventLoop()->appStartingUp();
}
#endif // Q_WS_X11
+#ifdef QT_THREAD_SUPPORT
+QThread* QApplication::guiThread() {
+ return mainThread();
+}
+
+bool QApplication::isGuiThread() {
+ return (QThread::currentThreadObject() == guiThread());
+}
+#else
+bool QApplication::isGuiThread() {
+ return true;
+}
+#endif
void QApplication::init_precmdline()
{
@@ -1030,8 +1097,8 @@ QApplication::~QApplication()
}
#endif
- if ( eventloop )
- eventloop->appClosingDown();
+ if ( currentEventLoop() )
+ currentEventLoop()->appClosingDown();
if ( postRList ) {
QVFuncList::Iterator it = postRList->begin();
while ( it != postRList->end() ) { // call post routines
@@ -2698,8 +2765,20 @@ bool QApplication::internalNotify( QObject *receiver, QEvent * e)
}
- if (!handled)
+ if (!handled) {
+#if defined(QT_THREAD_SUPPORT)
+ bool locked = QApplication::qt_mutex->locked();
+ if (locked) {
+ QApplication::qt_mutex->unlock();
+ }
+#endif
consumed = receiver->event( e );
+#if defined(QT_THREAD_SUPPORT)
+ if (locked) {
+ QApplication::qt_mutex->lock();
+ }
+#endif
+ }
e->spont = FALSE;
return consumed;
}
@@ -2793,9 +2872,10 @@ void QApplication::processOneEvent()
*/
QEventLoop *QApplication::eventLoop()
{
- if ( !eventloop && !is_app_closing )
+ if ( !currentEventLoop() && !is_app_closing ) {
(void) new QEventLoop( qApp, "default event loop" );
- return eventloop;
+ }
+ return currentEventLoop();
}
@@ -3263,8 +3343,23 @@ void QApplication::postEvent( QObject *receiver, QEvent *event )
l->append( pe );
globalPostedEvents->append( pe );
- if (eventloop)
- eventloop->wakeUp();
+#ifdef QT_THREAD_SUPPORT
+ if ( event->type() == QEvent::MetaCall ) {
+ // Wake up the receiver thread event loop
+ QThread* thread = receiver->contextThreadObject();
+ if (thread) {
+ if (thread->d) {
+ if (thread->d->eventLoop) {
+ thread->d->eventLoop->wakeUp();
+ }
+ }
+ }
+ return;
+ }
+#endif
+
+ if (currentEventLoop())
+ currentEventLoop()->wakeUp();
}
@@ -3326,7 +3421,8 @@ void QApplication::sendPostedEvents( QObject *receiver, int event_type )
&& ( receiver == 0 // we send to all receivers
|| receiver == pe->receiver ) // we send to THAT receiver
&& ( event_type == 0 // we send all types
- || event_type == pe->event->type() ) ) { // we send THAT type
+ || event_type == pe->event->type() ) // we send THAT type
+ && ( (!pe->receiver) || (pe->receiver->contextThreadObject() == QThread::currentThreadObject()) ) ) { // only send if active thread is receiver object owning thread
// first, we diddle the event so that we can deliver
// it, and that noone will try to touch it later.
pe->event->posted = FALSE;
diff --git a/src/kernel/qapplication.h b/src/kernel/qapplication.h
index c34ff45..5611164 100644
--- a/src/kernel/qapplication.h
+++ b/src/kernel/qapplication.h
@@ -63,6 +63,7 @@ class QWSDecoration;
#ifdef QT_THREAD_SUPPORT
class QMutex;
+class QThread;
#endif // QT_THREAD_SUPPORT
@@ -369,7 +370,9 @@ private:
#ifndef QT_NO_CURSOR
static QCursor *app_cursor;
#endif
+#ifndef QT_THREAD_SUPPORT
static QEventLoop* eventloop;
+#endif
static int app_tracking;
static bool is_app_running;
static bool is_app_closing;
@@ -425,6 +428,7 @@ private:
static void removePostedEvent( QEvent * );
static void removePostedEvents( QObject *receiver, int event_type );
+ friend class QObject;
friend class QWidget;
friend class QETWidget;
friend class QDialog;
@@ -444,6 +448,15 @@ private: // Disabled copy constructor and operator=
QApplication( const QApplication & );
QApplication &operator=( const QApplication & );
#endif
+
+private:
+ static QEventLoop* currentEventLoop();
+
+public:
+#ifdef QT_THREAD_SUPPORT
+ static QThread* guiThread();
+#endif
+ static bool isGuiThread();
};
inline int QApplication::argc() const
diff --git a/src/kernel/qevent.h b/src/kernel/qevent.h
index 6512b9a..9587b8f 100644
--- a/src/kernel/qevent.h
+++ b/src/kernel/qevent.h
@@ -137,6 +137,8 @@ public:
HelpRequest = 95, // CE (?) button pressed
WindowStateChange = 96, // window state has changed
IconDrag = 97, // proxy icon dragged
+ MetaCall = 98, // meta method call (internal)
+ ThreadChange = 99, // thread changed
User = 1000, // first user event id
MaxUser = 65535 // last user event id
};
diff --git a/src/kernel/qeventloop.cpp b/src/kernel/qeventloop.cpp
index 1f6a130..5eadb9e 100644
--- a/src/kernel/qeventloop.cpp
+++ b/src/kernel/qeventloop.cpp
@@ -41,6 +41,11 @@
#include "qapplication.h"
#include "qdatetime.h"
+#ifdef QT_THREAD_SUPPORT
+# include "qthread.h"
+# include "qthreadinstance_p.h"
+#endif
+
/*!
\class QEventLoop
\brief The QEventLoop class manages the event queue.
@@ -100,15 +105,27 @@ QEventLoop::QEventLoop( QObject *parent, const char *name )
: QObject( parent, name )
{
#if defined(QT_CHECK_STATE)
- if ( QApplication::eventloop )
- qFatal( "QEventLoop: there must be only one event loop object. \nConstruct it before QApplication." );
- // for now ;)
+ if ( QApplication::currentEventLoop() )
+ qFatal( "QEventLoop: there must be only one event loop object per thread. \nIf this is supposed to be the main GUI event loop, construct it before QApplication." );
+ if (!QThread::currentThreadObject()) {
+ qFatal( "QEventLoop: this object can only be used in threads constructed via QThread." );
+ }
#endif // QT_CHECK_STATE
d = new QEventLoopPrivate;
init();
+
+#ifdef QT_THREAD_SUPPORT
+ QThread* thread = QThread::currentThreadObject();
+ if (thread) {
+ if (thread->d) {
+ thread->d->eventLoop = this;
+ }
+ }
+#else
QApplication::eventloop = this;
+#endif
}
/*!
@@ -118,7 +135,16 @@ QEventLoop::~QEventLoop()
{
cleanup();
delete d;
+#ifdef QT_THREAD_SUPPORT
+ QThread* thread = QThread::currentThreadObject();
+ if (thread) {
+ if (thread->d) {
+ thread->d->eventLoop = 0;
+ }
+ }
+#else
QApplication::eventloop = 0;
+#endif
}
/*!
diff --git a/src/kernel/qeventloop_unix.cpp b/src/kernel/qeventloop_unix.cpp
index b0ad8b9..202ef12 100644
--- a/src/kernel/qeventloop_unix.cpp
+++ b/src/kernel/qeventloop_unix.cpp
@@ -40,6 +40,7 @@
#include "qeventloop.h"
#include "qapplication.h"
#include "qbitarray.h"
+#include "qmutex.h"
#include <stdlib.h>
#include <sys/types.h>
diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp
index e607447..9d3ce27 100644
--- a/src/kernel/qeventloop_unix_glib.cpp
+++ b/src/kernel/qeventloop_unix_glib.cpp
@@ -44,6 +44,7 @@
#include "qeventloop.h"
#include "qapplication.h"
#include "qbitarray.h"
+#include "qmutex.h"
#include <stdlib.h>
#include <sys/types.h>
@@ -578,17 +579,14 @@ int QEventLoop::activateSocketNotifiers()
while ( (sn=it.current()) ) {
++it;
d->sn_pending_list.removeRef( sn );
- if ( sn->pending ) {
-
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("activate sn : send event fd=%d\n", sn->gPollFD.fd );
- #endif
-
-
- sn->pending = FALSE;
- QApplication::sendEvent( sn->obj, &event );
- n_act++;
- }
+ if ( sn->pending ) {
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("activate sn : send event fd=%d\n", sn->gPollFD.fd );
+#endif
+ sn->pending = FALSE;
+ QApplication::sendEvent( sn->obj, &event );
+ n_act++;
+ }
}
return n_act;
diff --git a/src/kernel/qeventloop_x11.cpp b/src/kernel/qeventloop_x11.cpp
index 833be69..cd3e865 100644
--- a/src/kernel/qeventloop_x11.cpp
+++ b/src/kernel/qeventloop_x11.cpp
@@ -146,55 +146,57 @@ bool QEventLoop::processEvents( ProcessEventsFlags flags )
if ( qt_is_gui_used ) {
QApplication::sendPostedEvents();
- // Two loops so that posted events accumulate
- while ( XPending( QPaintDevice::x11AppDisplay() ) ) {
- // also flushes output buffer
- while ( XPending( QPaintDevice::x11AppDisplay() ) ) {
- if ( d->shortcut ) {
- return FALSE;
- }
-
- XNextEvent( QPaintDevice::x11AppDisplay(), &event );
-
- if ( flags & ExcludeUserInput ) {
- switch ( event.type ) {
- case ButtonPress:
- case ButtonRelease:
- case MotionNotify:
- case XKeyPress:
- case XKeyRelease:
- case EnterNotify:
- case LeaveNotify:
- continue;
-
- case ClientMessage:
- {
- // from qapplication_x11.cpp
- extern Atom qt_wm_protocols;
- extern Atom qt_wm_take_focus;
- extern Atom qt_qt_scrolldone;
-
- // only keep the wm_take_focus and
- // qt_qt_scrolldone protocols, discard all
- // other client messages
- if ( event.xclient.format != 32 )
- continue;
-
- if ( event.xclient.message_type == qt_wm_protocols ||
- (Atom) event.xclient.data.l[0] == qt_wm_take_focus )
- break;
- if ( event.xclient.message_type == qt_qt_scrolldone )
- break;
+ if (QApplication::isGuiThread()) {
+ // Two loops so that posted events accumulate
+ while ( XPending( QPaintDevice::x11AppDisplay() ) ) {
+ // also flushes output buffer
+ while ( XPending( QPaintDevice::x11AppDisplay() ) ) {
+ if ( d->shortcut ) {
+ return FALSE;
+ }
+
+ XNextEvent( QPaintDevice::x11AppDisplay(), &event );
+
+ if ( flags & ExcludeUserInput ) {
+ switch ( event.type ) {
+ case ButtonPress:
+ case ButtonRelease:
+ case MotionNotify:
+ case XKeyPress:
+ case XKeyRelease:
+ case EnterNotify:
+ case LeaveNotify:
+ continue;
+
+ case ClientMessage:
+ {
+ // from qapplication_x11.cpp
+ extern Atom qt_wm_protocols;
+ extern Atom qt_wm_take_focus;
+ extern Atom qt_qt_scrolldone;
+
+ // only keep the wm_take_focus and
+ // qt_qt_scrolldone protocols, discard all
+ // other client messages
+ if ( event.xclient.format != 32 )
+ continue;
+
+ if ( event.xclient.message_type == qt_wm_protocols ||
+ (Atom) event.xclient.data.l[0] == qt_wm_take_focus )
+ break;
+ if ( event.xclient.message_type == qt_qt_scrolldone )
+ break;
+ }
+
+ default: break;
+ }
+ }
+
+ nevents++;
+ if ( qApp->x11ProcessEvent( &event ) == 1 )
+ return TRUE;
}
-
- default: break;
- }
}
-
- nevents++;
- if ( qApp->x11ProcessEvent( &event ) == 1 )
- return TRUE;
- }
}
}
@@ -261,7 +263,7 @@ bool QEventLoop::processEvents( ProcessEventsFlags flags )
FD_ZERO( &d->sn_vec[2].select_fds );
}
- if ( qt_is_gui_used ) {
+ if ( qt_is_gui_used && QApplication::isGuiThread() ) {
// select for events on the event socket - only on X11
FD_SET( d->xfd, &d->sn_vec[0].select_fds );
highest = QMAX( highest, d->xfd );
diff --git a/src/kernel/qeventloop_x11_glib.cpp b/src/kernel/qeventloop_x11_glib.cpp
index 59ab8a1..b3d881a 100644
--- a/src/kernel/qeventloop_x11_glib.cpp
+++ b/src/kernel/qeventloop_x11_glib.cpp
@@ -39,7 +39,6 @@
**
**********************************************************************/
-
#include "qeventloop_glib_p.h" // includes qplatformdefs.h
#include "qeventloop.h"
#include "qapplication.h"
@@ -58,23 +57,21 @@
// Qt-GSource Structure and Callbacks
typedef struct {
- GSource source;
- QEventLoop * qeventLoop;
+ GSource source;
+ QEventLoop * qeventLoop;
} QtGSource;
-static gboolean qt_gsource_prepare ( GSource *source,
- gint *timeout );
+static gboolean qt_gsource_prepare ( GSource *source, gint *timeout );
static gboolean qt_gsource_check ( GSource *source );
-static gboolean qt_gsource_dispatch ( GSource *source,
- GSourceFunc callback, gpointer user_data );
+static gboolean qt_gsource_dispatch ( GSource *source, GSourceFunc callback, gpointer user_data );
static GSourceFuncs qt_gsource_funcs = {
- qt_gsource_prepare,
- qt_gsource_check,
- qt_gsource_dispatch,
- NULL,
- NULL,
- NULL
+ qt_gsource_prepare,
+ qt_gsource_check,
+ qt_gsource_dispatch,
+ NULL,
+ NULL,
+ NULL
};
// forward main loop callbacks to QEventLoop methods!
@@ -82,25 +79,25 @@ static GSourceFuncs qt_gsource_funcs = {
static gboolean qt_gsource_prepare ( GSource *source,
gint *timeout )
{
- QtGSource * qtGSource;
+ QtGSource * qtGSource;
qtGSource = (QtGSource*) source;
- return qtGSource->qeventLoop->gsourcePrepare(source, timeout);
+ return qtGSource->qeventLoop->gsourcePrepare(source, timeout);
}
static gboolean qt_gsource_check ( GSource *source )
{
- QtGSource * qtGSource = (QtGSource*) source;
- return qtGSource->qeventLoop->gsourceCheck(source);
+ QtGSource * qtGSource = (QtGSource*) source;
+ return qtGSource->qeventLoop->gsourceCheck(source);
}
static gboolean qt_gsource_dispatch ( GSource *source,
GSourceFunc callback, gpointer user_data )
{
- Q_UNUSED(callback);
- Q_UNUSED(user_data);
-
- QtGSource * qtGSource = (QtGSource*) source;
- return qtGSource->qeventLoop->gsourceDispatch(source);
+ Q_UNUSED(callback);
+ Q_UNUSED(user_data);
+
+ QtGSource * qtGSource = (QtGSource*) source;
+ return qtGSource->qeventLoop->gsourceDispatch(source);
}
@@ -134,82 +131,84 @@ static QVFuncList *qt_postselect_handler = 0;
void qt_install_preselect_handler( VFPTR handler )
{
- if ( !qt_preselect_handler )
- qt_preselect_handler = new QVFuncList;
- qt_preselect_handler->append( handler );
+ if ( !qt_preselect_handler ) {
+ qt_preselect_handler = new QVFuncList;
+ }
+ qt_preselect_handler->append( handler );
}
+
void qt_remove_preselect_handler( VFPTR handler )
{
- if ( qt_preselect_handler ) {
- QVFuncList::Iterator it = qt_preselect_handler->find( handler );
- if ( it != qt_preselect_handler->end() )
- qt_preselect_handler->remove( it );
- }
+ if ( qt_preselect_handler ) {
+ QVFuncList::Iterator it = qt_preselect_handler->find( handler );
+ if ( it != qt_preselect_handler->end() ) {
+ qt_preselect_handler->remove( it );
+ }
+ }
}
+
void qt_install_postselect_handler( VFPTR handler )
{
- if ( !qt_postselect_handler )
- qt_postselect_handler = new QVFuncList;
- qt_postselect_handler->prepend( handler );
+ if ( !qt_postselect_handler ) {
+ qt_postselect_handler = new QVFuncList;
+ }
+ qt_postselect_handler->prepend( handler );
}
+
void qt_remove_postselect_handler( VFPTR handler )
{
- if ( qt_postselect_handler ) {
- QVFuncList::Iterator it = qt_postselect_handler->find( handler );
- if ( it != qt_postselect_handler->end() )
- qt_postselect_handler->remove( it );
- }
+ if ( qt_postselect_handler ) {
+ QVFuncList::Iterator it = qt_postselect_handler->find( handler );
+ if ( it != qt_postselect_handler->end() ) {
+ qt_postselect_handler->remove( it );
+ }
+ }
}
-
void QEventLoop::init()
{
// initialize ProcessEventFlags (all events & wait for more)
-
d->pev_flags = AllEvents | WaitForMore;
- // initialize the common parts of the event loop
- if (pipe( d->thread_pipe ) < 0) {
- // Error!
- }
- fcntl(d->thread_pipe[0], F_SETFD, FD_CLOEXEC);
- fcntl(d->thread_pipe[1], F_SETFD, FD_CLOEXEC);
+ // initialize the common parts of the event loop
+ if (pipe( d->thread_pipe ) < 0) {
+ // Error!
+ }
+ fcntl(d->thread_pipe[0], F_SETFD, FD_CLOEXEC);
+ fcntl(d->thread_pipe[1], F_SETFD, FD_CLOEXEC);
- // intitialize the X11 parts of the event loop
- d->xfd = -1;
- if ( qt_is_gui_used )
- d->xfd = XConnectionNumber( QPaintDevice::x11AppDisplay() );
+ // intitialize the X11 parts of the event loop
+ d->xfd = -1;
+ if ( qt_is_gui_used && QApplication::isGuiThread() ) {
+ d->xfd = XConnectionNumber( QPaintDevice::x11AppDisplay() );
+ }
- // new GSource
+ // new GSource
+ QtGSource * qtGSource = (QtGSource*) g_source_new(&qt_gsource_funcs, sizeof(QtGSource));
- QtGSource * qtGSource = (QtGSource*) g_source_new(&qt_gsource_funcs,
- sizeof(QtGSource));
-
- g_source_set_can_recurse ((GSource*)qtGSource, TRUE);
+ g_source_set_can_recurse ((GSource*)qtGSource, TRUE);
+
+ qtGSource->qeventLoop = this;
- qtGSource->qeventLoop = this;
-
// init main loop and attach gsource
-
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside init(1)\n");
- #endif
-
- g_main_loop_new (NULL, 1);
-
- g_source_attach( (GSource*)qtGSource, NULL );
+
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside init(1)\n");
+#endif
+
+ g_main_loop_new (NULL, 1);
+
+ g_source_attach( (GSource*)qtGSource, NULL );
d->gSource = (GSource*) qtGSource;
// poll for X11 events
- if ( qt_is_gui_used ) {
-
-
+ if ( qt_is_gui_used && QApplication::isGuiThread() ) {
d->x_gPollFD.fd = d->xfd;
d->x_gPollFD.events = G_IO_IN | G_IO_HUP;
g_source_add_poll(d->gSource, &d->x_gPollFD);
- }
+ }
// poll thread-pipe
@@ -218,21 +217,21 @@ void QEventLoop::init()
g_source_add_poll(d->gSource, &d->threadPipe_gPollFD);
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside init(2)\n");
- #endif
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside init(2)\n");
+#endif
}
void QEventLoop::cleanup()
{
- // cleanup the common parts of the event loop
- close( d->thread_pipe[0] );
- close( d->thread_pipe[1] );
- cleanupTimers();
-
- // cleanup the X11 parts of the event loop
- d->xfd = -1;
+ // cleanup the common parts of the event loop
+ close( d->thread_pipe[0] );
+ close( d->thread_pipe[1] );
+ cleanupTimers();
+
+ // cleanup the X11 parts of the event loop
+ d->xfd = -1;
// todo: destroy gsource
}
@@ -240,186 +239,189 @@ void QEventLoop::cleanup()
bool QEventLoop::processEvents( ProcessEventsFlags flags )
{
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside processEvents(1) looplevel=%d\n", d->looplevel );
- #endif
- ProcessEventsFlags save_flags;
- int rval;
- save_flags = d->pev_flags;
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside processEvents(1) looplevel=%d\n", d->looplevel );
+#endif
- d->pev_flags = flags;
-
- rval = g_main_context_iteration(NULL, flags & WaitForMore ? TRUE : FALSE);
-
- d->pev_flags = save_flags;
+ ProcessEventsFlags save_flags;
+ int rval;
+ save_flags = d->pev_flags;
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside processEvents(2) looplevel=%d rval=%d\n", d->looplevel, rval );
- #endif
+ d->pev_flags = flags;
- return rval; // were events processed?
+ rval = g_main_context_iteration(NULL, flags & WaitForMore ? TRUE : FALSE);
+
+ d->pev_flags = save_flags;
+
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside processEvents(2) looplevel=%d rval=%d\n", d->looplevel, rval );
+#endif
+
+ return rval; // were events processed?
}
bool QEventLoop::processX11Events()
{
ProcessEventsFlags flags = d->pev_flags;
- // process events from the X server
- XEvent event;
- int nevents = 0;
+ // process events from the X server
+ XEvent event;
+ int nevents = 0;
#if defined(QT_THREAD_SUPPORT)
- QMutexLocker locker( QApplication::qt_mutex );
+ QMutexLocker locker( QApplication::qt_mutex );
#endif
- // handle gui and posted events
- if ( qt_is_gui_used ) {
- QApplication::sendPostedEvents();
-
- // Two loops so that posted events accumulate
- while ( XPending( QPaintDevice::x11AppDisplay() ) ) {
- // also flushes output buffer
- while ( XPending( QPaintDevice::x11AppDisplay() ) ) {
- if ( d->shortcut ) {
- return FALSE;
- }
-
- XNextEvent( QPaintDevice::x11AppDisplay(), &event );
-
- if ( flags & ExcludeUserInput ) {
- switch ( event.type ) {
- case ButtonPress:
- case ButtonRelease:
- case MotionNotify:
- case XKeyPress:
- case XKeyRelease:
- case EnterNotify:
- case LeaveNotify:
- continue;
-
- case ClientMessage:
- {
- // from qapplication_x11.cpp
- extern Atom qt_wm_protocols;
- extern Atom qt_wm_take_focus;
- extern Atom qt_qt_scrolldone;
-
- // only keep the wm_take_focus and
- // qt_qt_scrolldone protocols, discard all
- // other client messages
- if ( event.xclient.format != 32 )
- continue;
-
- if ( event.xclient.message_type == qt_wm_protocols ||
- (Atom) event.xclient.data.l[0] == qt_wm_take_focus )
- break;
- if ( event.xclient.message_type == qt_qt_scrolldone )
- break;
+ // handle gui and posted events
+ if ( qt_is_gui_used ) {
+ QApplication::sendPostedEvents();
+
+ if (QApplication::isGuiThread()) {
+ // Two loops so that posted events accumulate
+ while ( XPending( QPaintDevice::x11AppDisplay() ) ) {
+ // also flushes output buffer
+ while ( XPending( QPaintDevice::x11AppDisplay() ) ) {
+ if ( d->shortcut ) {
+ return FALSE;
+ }
+
+ XNextEvent( QPaintDevice::x11AppDisplay(), &event );
+
+ if ( flags & ExcludeUserInput ) {
+ switch ( event.type ) {
+ case ButtonPress:
+ case ButtonRelease:
+ case MotionNotify:
+ case XKeyPress:
+ case XKeyRelease:
+ case EnterNotify:
+ case LeaveNotify:
+ continue;
+
+ case ClientMessage:
+ {
+ // from qapplication_x11.cpp
+ extern Atom qt_wm_protocols;
+ extern Atom qt_wm_take_focus;
+ extern Atom qt_qt_scrolldone;
+
+ // only keep the wm_take_focus and
+ // qt_qt_scrolldone protocols, discard all
+ // other client messages
+ if ( event.xclient.format != 32 )
+ continue;
+
+ if ( event.xclient.message_type == qt_wm_protocols ||
+ (Atom) event.xclient.data.l[0] == qt_wm_take_focus )
+ break;
+ if ( event.xclient.message_type == qt_qt_scrolldone )
+ break;
+ }
+
+ default: break;
+ }
+ }
+
+ nevents++;
+ if ( qApp->x11ProcessEvent( &event ) == 1 )
+ return TRUE;
+ }
}
-
- default: break;
- }
}
-
- nevents++;
- if ( qApp->x11ProcessEvent( &event ) == 1 )
- return TRUE;
- }
}
- }
-
- if ( d->shortcut ) {
+
+ if ( d->shortcut ) {
+ return FALSE;
+ }
+
+ QApplication::sendPostedEvents();
+
+ const uint exclude_all = ExcludeSocketNotifiers | 0x08;
+ // 0x08 == ExcludeTimers for X11 only
+ if ( nevents > 0 && ( flags & exclude_all ) == exclude_all && ( flags & WaitForMore ) ) {
+ return TRUE;
+ }
return FALSE;
- }
-
- QApplication::sendPostedEvents();
-
- const uint exclude_all = ExcludeSocketNotifiers | 0x08;
- // 0x08 == ExcludeTimers for X11 only
- if ( nevents > 0 && ( flags & exclude_all ) == exclude_all &&
- ( flags & WaitForMore ) ) {
- return TRUE;
- }
- return FALSE;
}
-
-
+
+
bool QEventLoop::gsourcePrepare(GSource *gs, int * timeout)
{
Q_UNUSED(gs);
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourcePrepare(1)\n");
- #endif
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourcePrepare(1)\n");
+#endif
ProcessEventsFlags flags = d->pev_flags;
-
+
#if defined(QT_THREAD_SUPPORT)
- QMutexLocker locker( QApplication::qt_mutex );
+ QMutexLocker locker( QApplication::qt_mutex );
#endif
-
- // don't block if exitLoop() or exit()/quit() has been called.
- bool canWait = d->exitloop || d->quitnow ? FALSE : (flags & WaitForMore);
-
- // Process timers and socket notifiers - the common UNIX stuff
-
- // return the maximum time we can wait for an event.
- static timeval zerotm;
- timeval *tm = 0;
- if ( ! ( flags & 0x08 ) ) { // 0x08 == ExcludeTimers for X11 only
- tm = qt_wait_timer(); // wait for timer or X event
- if ( !canWait ) {
- if ( !tm )
- tm = &zerotm;
- tm->tv_sec = 0; // no time to wait
- tm->tv_usec = 0;
- }
- }
-
- // include or exclude SocketNotifiers (by setting or cleaning poll events)
-
- if ( ! ( flags & ExcludeSocketNotifiers ) ) {
- QPtrListIterator<QSockNotGPollFD> it( d->sn_list );
- QSockNotGPollFD *sn;
- while ( (sn=it.current()) ) {
- ++it;
- sn->gPollFD.events = sn->events; // restore poll events
+
+ // don't block if exitLoop() or exit()/quit() has been called.
+ bool canWait = d->exitloop || d->quitnow ? FALSE : (flags & WaitForMore);
+
+ // Process timers and socket notifiers - the common UNIX stuff
+
+ // return the maximum time we can wait for an event.
+ static timeval zerotm;
+ timeval *tm = 0;
+ if ( ! ( flags & 0x08 ) ) { // 0x08 == ExcludeTimers for X11 only
+ tm = qt_wait_timer(); // wait for timer or X event
+ if ( !canWait ) {
+ if ( !tm ) {
+ tm = &zerotm;
+ }
+ tm->tv_sec = 0; // no time to wait
+ tm->tv_usec = 0;
}
- } else {
- QPtrListIterator<QSockNotGPollFD> it( d->sn_list );
- QSockNotGPollFD *sn;
- while ( (sn=it.current()) ) {
- ++it;
- sn->gPollFD.events = 0; // delete poll events
+ }
+
+ // include or exclude SocketNotifiers (by setting or cleaning poll events)
+ if ( ! ( flags & ExcludeSocketNotifiers ) ) {
+ QPtrListIterator<QSockNotGPollFD> it( d->sn_list );
+ QSockNotGPollFD *sn;
+ while ( (sn=it.current()) ) {
+ ++it;
+ sn->gPollFD.events = sn->events; // restore poll events
+ }
+ }
+ else {
+ QPtrListIterator<QSockNotGPollFD> it( d->sn_list );
+ QSockNotGPollFD *sn;
+ while ( (sn=it.current()) ) {
+ ++it;
+ sn->gPollFD.events = 0; // delete poll events
}
}
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourcePrepare(2) canwait=%d\n", canWait);
- #endif
-
- if ( canWait )
- emit aboutToBlock();
-
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourcePrepare(2) canwait=%d\n", canWait);
+#endif
- if ( qt_preselect_handler ) {
- QVFuncList::Iterator it, end = qt_preselect_handler->end();
- for ( it = qt_preselect_handler->begin(); it != end; ++it )
- (**it)();
- }
+ if ( canWait ) {
+ emit aboutToBlock();
+ }
- // unlock the GUI mutex and select. when we return from this function, there is
- // something for us to do
+ if ( qt_preselect_handler ) {
+ QVFuncList::Iterator it, end = qt_preselect_handler->end();
+ for ( it = qt_preselect_handler->begin(); it != end; ++it )
+ (**it)();
+ }
+
+ // unlock the GUI mutex and select. when we return from this function, there is
+ // something for us to do
#if defined(QT_THREAD_SUPPORT)
- locker.mutex()->unlock();
+ locker.mutex()->unlock();
#endif
-
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourcePrepare(2.1) canwait=%d\n", canWait);
- #endif
-
+
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourcePrepare(2.1) canwait=%d\n", canWait);
+#endif
+
// do we have to dispatch events?
- if (hasPendingEvents()) {
+ if (hasPendingEvents()) {
*timeout = 0; // no time to stay in poll
#ifdef DEBUG_QT_GLIBMAINLOOP
@@ -427,8 +429,8 @@ bool QEventLoop::gsourcePrepare(GSource *gs, int * timeout)
#endif
return FALSE;
- }
-
+ }
+
// stay in poll until something happens?
if (!tm) { // fixme
*timeout = -1; // wait forever
@@ -439,25 +441,24 @@ bool QEventLoop::gsourcePrepare(GSource *gs, int * timeout)
return FALSE;
}
-
+
// else timeout >=0
*timeout = tm->tv_sec * 1000 + tm->tv_usec/1000;
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourcePrepare(3c) timeout=%d \n", *timeout);
- #endif
-
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourcePrepare(3c) timeout=%d \n", *timeout);
+#endif
- return FALSE;
+ return FALSE;
}
bool QEventLoop::gsourceCheck(GSource *gs) {
Q_UNUSED(gs);
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourceCheck(1)\n");
- #endif
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourceCheck(1)\n");
+#endif
// Socketnotifier events?
@@ -476,45 +477,45 @@ bool QEventLoop::gsourceCheck(GSource *gs) {
//}
if (d->x_gPollFD.revents) {
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourceCheck(2) xfd!\n");
- #endif
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourceCheck(2) xfd!\n");
+#endif
return TRUE; // we got events!
}
- if (d->threadPipe_gPollFD.revents) {
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourceCheck(2) threadpipe!!\n");
- #endif
+ if (d->threadPipe_gPollFD.revents) {
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourceCheck(2) threadpipe!!\n");
+#endif
return TRUE; // we got events!
}
- if (hasPendingEvents()) {
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourceCheck(2) pendingEvents!\n");
- #endif
+ if (hasPendingEvents()) {
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourceCheck(2) pendingEvents!\n");
+#endif
return TRUE; // we got more X11 events!
}
- // check if we have timers to activate?
+ // check if we have timers to activate?
timeval * tm =qt_wait_timer();
- if (tm && (tm->tv_sec == 0 && tm->tv_usec == 0 )) {
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourceCheck(2) qtwaittimer!\n");
- #endif
-
- return TRUE;
- }
+ if (tm && (tm->tv_sec == 0 && tm->tv_usec == 0 )) {
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourceCheck(2) qtwaittimer!\n");
+#endif
+
+ return TRUE;
+ }
- // nothing to dispatch
+ // nothing to dispatch
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourceCheck(2) nothing to dispatch!\n");
- #endif
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourceCheck(2) nothing to dispatch!\n");
+#endif
- return FALSE;
+ return FALSE;
}
@@ -533,37 +534,35 @@ bool QEventLoop::gsourceDispatch(GSource *gs) {
ProcessEventsFlags flags = d->pev_flags;
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourceDispatch(1)\n");
- #endif
-
- // we are awake, broadcast it
- emit awake();
- emit qApp->guiThreadAwake();
-
- // some other thread woke us up... consume the data on the thread pipe so that
- // select doesn't immediately return next time
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourceDispatch(1)\n");
+#endif
+ // we are awake, broadcast it
+ emit awake();
+ emit qApp->guiThreadAwake();
+
+ // some other thread woke us up... consume the data on the thread pipe so that
+ // select doesn't immediately return next time
+
if ( d->threadPipe_gPollFD.revents) {
- char c;
- if (::read( d->thread_pipe[0], &c, 1 ) < 0) {
- // Error!
- }
- }
+ char c;
+ if (::read( d->thread_pipe[0], &c, 1 ) < 0) {
+ // Error!
+ }
+ }
- if ( qt_postselect_handler ) {
- QVFuncList::Iterator it, end = qt_postselect_handler->end();
- for ( it = qt_postselect_handler->begin(); it != end; ++it )
- (**it)();
- }
+ if ( qt_postselect_handler ) {
+ QVFuncList::Iterator it, end = qt_postselect_handler->end();
+ for ( it = qt_postselect_handler->begin(); it != end; ++it )
+ (**it)();
+ }
- // activate socket notifiers
- if ( ! ( flags & ExcludeSocketNotifiers )) {
+ // activate socket notifiers
+ if ( ! ( flags & ExcludeSocketNotifiers )) {
// if select says data is ready on any socket, then set the socket notifier
// to pending
// if ( &d->sn_list ) {
-
-
QPtrList<QSockNotGPollFD> *list = &d->sn_list;
QSockNotGPollFD *sn = list->first();
while ( sn ) {
@@ -572,39 +571,35 @@ bool QEventLoop::gsourceDispatch(GSource *gs) {
sn = list->next();
}
// }
-
+
nevents += activateSocketNotifiers();
- }
+ }
- // activate timers
- if ( ! ( flags & 0x08 ) ) {
+ // activate timers
+ if ( ! ( flags & 0x08 ) ) {
// 0x08 == ExcludeTimers for X11 only
nevents += activateTimers();
- }
-
-
+ }
// return true if we handled events, false otherwise
//return (nevents > 0);
// now process x11 events!
- #ifdef DEBUG_QT_GLIBMAINLOOP
- printf("inside gsourceDispatch(2) hasPendingEvents=%d\n", hasPendingEvents());
- #endif
+#ifdef DEBUG_QT_GLIBMAINLOOP
+ printf("inside gsourceDispatch(2) hasPendingEvents=%d\n", hasPendingEvents());
+#endif
if (hasPendingEvents()) {
-
// color approx. optimization - only on X11
qt_reset_color_avail();
processX11Events();
-
}
#if defined(QT_THREAD_SUPPORT)
- locker.mutex()->unlock();
+ locker.mutex()->unlock();
#endif
if (d->singletoolkit) {
@@ -617,21 +612,22 @@ bool QEventLoop::gsourceDispatch(GSource *gs) {
bool QEventLoop::hasPendingEvents() const
{
- extern uint qGlobalPostedEventsCount(); // from qapplication.cpp
- return ( qGlobalPostedEventsCount() || ( qt_is_gui_used ? XPending( QPaintDevice::x11AppDisplay() ) : 0));
+ extern uint qGlobalPostedEventsCount(); // from qapplication.cpp
+ return ( qGlobalPostedEventsCount() || ( (qt_is_gui_used && QApplication::isGuiThread()) ? XPending( QPaintDevice::x11AppDisplay() ) : 0));
}
void QEventLoop::appStartingUp()
{
- if ( qt_is_gui_used )
- d->xfd = XConnectionNumber( QPaintDevice::x11AppDisplay() );
+ if ( qt_is_gui_used ) {
+ d->xfd = XConnectionNumber( QPaintDevice::x11AppDisplay() );
+ }
}
void QEventLoop::appClosingDown()
{
- d->xfd = -1;
+ d->xfd = -1;
}
void QEventLoop::setSingleToolkitEventHandling(bool enabled) {
- d->singletoolkit = enabled;
+ d->singletoolkit = enabled;
} \ No newline at end of file
diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp
index 7e01dec..13486f4 100644
--- a/src/kernel/qobject.cpp
+++ b/src/kernel/qobject.cpp
@@ -50,22 +50,107 @@
#include "qptrvector.h"
#ifdef QT_THREAD_SUPPORT
-#include <qmutex.h>
+#include "qmutex.h"
#include <private/qmutexpool_p.h>
+#include "qthread.h"
#endif
#include <ctype.h>
-
+#include <stdlib.h>
#ifndef QT_NO_USERDATA
class QObjectPrivate : public QPtrVector<QObjectUserData>
+#else
+class QObjectPrivate {
+#endif
{
public:
+#ifndef QT_NO_USERDATA
QObjectPrivate( uint s ) : QPtrVector<QObjectUserData>(s){ setAutoDelete( TRUE ); }
+#endif
+ QThread* ownThread;
};
-#else
-class QObjectPrivate {
+
+#if defined(QT_THREAD_SUPPORT)
+
+void QObject::moveToThread_helper(QThread *targetThread)
+{
+ QEvent e(QEvent::ThreadChange);
+ QApplication::sendEvent(this, &e);
+
+ if (childObjects) {
+ QObject *child;
+ QObjectListIt it(*childObjects);
+ while ( (child=it.current()) ) {
+ ++it;
+ child->moveToThread_helper(targetThread);
+ }
+ }
+}
+
+void QObject::setThreadObject_helper(QThread *targetThread)
+{
+ d->ownThread = targetThread;
+
+ if (childObjects) {
+ QObject *child;
+ QObjectListIt it(*childObjects);
+ while ( (child=it.current()) ) {
+ ++it;
+ child->moveToThread_helper(targetThread);
+ }
+ }
+}
+
+/*!
+ Changes the thread affinity for this object and its children. The
+ object cannot be moved if it has a parent. Event processing will
+ continue in the \a targetThread. To move an object to the main
+ thread, pass QApplication::guiThread() as the \a targetThread.
+
+ Note that all active timers for the object will be reset. The
+ timers are first stopped in the current thread and restarted (with
+ the same interval) in the \a targetThread. As a result, constantly
+ moving an object between threads can postpone timer events
+ indefinitely.
+
+ \sa contextThreadObject()
+ */
+void QObject::moveToThread(QThread *targetThread)
+{
+ QMutexLocker locker( QApplication::qt_mutex );
+
+ if (parentObj) {
+#if defined(QT_DEBUG)
+ qWarning( "QObject::moveToThread: Cannot move objects with a parent" );
+#endif
+ return;
+ }
+ if (isWidget) {
+#if defined(QT_DEBUG)
+ qWarning( "QObject::moveToThread: Widgets cannot be moved to a new thread" );
+#endif
+ return;
+ }
+
+ QThread *objectThread = contextThreadObject();
+ QThread *currentThread = QThread::currentThreadObject();
+
+ if (objectThread != currentThread) {
+#if defined(QT_DEBUG)
+ qWarning( "QObject::moveToThread: Current thread is not the object's thread" );
+#endif
+ return;
+ }
+
+ if (objectThread == targetThread) {
+ return;
+ }
+
+ moveToThread_helper(targetThread);
+ setThreadObject_helper(targetThread);
}
+
#endif
class QSenderObjectList : public QObjectList, public QShared
@@ -75,6 +160,41 @@ public:
QObject *currentSender;
};
+class Q_EXPORT QMetaCallEvent : public QEvent
+{
+public:
+ enum MetaCallType {
+ MetaCallEmit = 0,
+ MetaCallInvoke = 1
+ };
+
+public:
+ QMetaCallEvent(int id, QObject *sender, QUObject *data, MetaCallType type);
+ ~QMetaCallEvent();
+
+ inline int id() const { return id_; }
+ inline QObject *sender() const { return sender_; }
+ inline QUObject *data() const { return data_; }
+ inline MetaCallType type() const { return type_; }
+
+private:
+ const int id_;
+ QObject *sender_;
+ QUObject *data_;
+ const MetaCallType type_;
+};
+
+/*! \internal
+ */
+QMetaCallEvent::QMetaCallEvent(int id, QObject *sender, QUObject *data, MetaCallType type)
+ :QEvent(MetaCall), id_(id), sender_(sender), data_(data), type_(type)
+{ }
+
+/*! \internal
+ */
+QMetaCallEvent::~QMetaCallEvent()
+{ }
+
/*!
\class Qt qnamespace.h
@@ -269,7 +389,21 @@ void *qt_find_obj_child( QObject *parent, const char *type, const char *name )
return 0;
}
+#ifdef QT_THREAD_SUPPORT
+/*!
+ Returns a pointer to the QThread* associated with
+ the current thread affinity of this object.
+
+ \sa moveToThread()
+ */
+
+QThread* QObject::contextThreadObject() const
+{
+ return d->ownThread;
+}
+
+#endif
#ifndef QT_NO_PRELIMINARY_SIGNAL_SPY
/*
@@ -436,6 +570,11 @@ QObject::QObject( QObject *parent, const char *name )
insert_tree( this );
isTree = TRUE;
}
+
+ if ( !d )
+ d = new QObjectPrivate(0);
+
+ d->ownThread = QThread::currentThreadObject();
}
@@ -720,6 +859,36 @@ QObject* QObject::child( const char *objName, const char *inheritsClass,
return obj;
}
+/*! \internal */
+QUObject* deepCopyQUObjectArray(QUObject* origArray)
+{
+ QUObject* newArray;
+ int count = 0;
+ while (!((origArray+count)->isLastObject)) {
+ count++;
+ }
+ count++;
+ newArray = (QUObject*)malloc(sizeof(QUObject)*count);
+ for (int i=0; i<count; i++) {
+ (origArray+i)->deepCopy(newArray+i);
+ }
+ return newArray;
+}
+
+/*! \internal */
+void destroyDeepCopiedQUObjectArray(QUObject* uArray)
+{
+ int count = 0;
+ while (!((uArray+count)->isLastObject)) {
+ count++;
+ }
+ count++;
+ for (int i=0; i<count; i++) {
+ (uArray+i)->~QUObject();
+ }
+ free(uArray);
+}
+
/*!
\fn bool QObject::isWidgetType() const
@@ -777,6 +946,40 @@ bool QObject::event( QEvent *e )
delete this;
return TRUE;
+ case QEvent::MetaCall:
+ {
+ QMetaCallEvent* metaEvent = dynamic_cast<QMetaCallEvent*>(e);
+ if (metaEvent) {
+ if (d->ownThread == QThread::currentThreadObject()) {
+ QSenderObjectList* sol;
+ QObject* oldSender = 0;
+ sol = senderObjects;
+ if ( sol ) {
+ oldSender = sol->currentSender;
+ sol->ref();
+ sol->currentSender = metaEvent->sender();
+ }
+ QUObject *o = metaEvent->data();
+ if (metaEvent->type() == QMetaCallEvent::MetaCallEmit) {
+ qt_emit( metaEvent->id(), o );
+ }
+ if (metaEvent->type() == QMetaCallEvent::MetaCallInvoke) {
+ qt_invoke( metaEvent->id(), o );
+ }
+ if (sol ) {
+ sol->currentSender = oldSender;
+ if ( sol->deref() ) {
+ delete sol;
+ }
+ }
+ }
+ else {
+ qWarning("QObject: Ignoring metacall event from non-owning thread");
+ }
+ destroyDeepCopiedQUObjectArray(metaEvent->data());
+ }
+ }
+
default:
if ( e->type() >= QEvent::User ) {
customEvent( (QCustomEvent*) e );
@@ -2337,6 +2540,7 @@ void QObject::activate_signal( int signal )
if ( !signalsBlocked() && signal >= 0 &&
( !connections || !connections->at( signal ) ) ) {
QUObject o[1];
+ o[0].isLastObject = true;
qt_spy_signal( this, signal, o );
return;
}
@@ -2349,6 +2553,7 @@ void QObject::activate_signal( int signal )
if ( !clist )
return;
QUObject o[1];
+ o[0].isLastObject = true;
activate_signal( clist, o );
}
@@ -2364,6 +2569,8 @@ void QObject::activate_signal( QConnectionList *clist, QUObject *o )
qt_spy_signal( this, connections->findRef( clist), o );
#endif
+ const QThread *currentThread = QThread::currentThreadObject();
+
QObject *object;
QSenderObjectList* sol;
QObject* oldSender = 0;
@@ -2377,10 +2584,26 @@ void QObject::activate_signal( QConnectionList *clist, QUObject *o )
sol->ref();
sol->currentSender = this;
}
- if ( c->memberType() == QSIGNAL_CODE )
- object->qt_emit( c->member(), o );
- else
- object->qt_invoke( c->member(), o );
+ if ( c->memberType() == QSIGNAL_CODE ) {
+ if (object->d->ownThread == currentThread) {
+ object->qt_emit( c->member(), o );
+ }
+ else {
+ if (object->d->ownThread && !object->d->ownThread->finished()) {
+ QApplication::postEvent(object, new QMetaCallEvent(c->member(), this, deepCopyQUObjectArray(o), QMetaCallEvent::MetaCallEmit));
+ }
+ }
+ }
+ else {
+ if (object->d->ownThread == currentThread) {
+ object->qt_invoke( c->member(), o );
+ }
+ else {
+ if (object->d->ownThread && !object->d->ownThread->finished()) {
+ QApplication::postEvent(object, new QMetaCallEvent(c->member(), this, deepCopyQUObjectArray(o), QMetaCallEvent::MetaCallInvoke));
+ }
+ }
+ }
if ( sol ) {
sol->currentSender = oldSender;
if ( sol->deref() )
@@ -2401,10 +2624,26 @@ void QObject::activate_signal( QConnectionList *clist, QUObject *o )
sol->ref();
sol->currentSender = this;
}
- if ( c->memberType() == QSIGNAL_CODE )
- object->qt_emit( c->member(), o );
- else
- object->qt_invoke( c->member(), o );
+ if ( c->memberType() == QSIGNAL_CODE ) {
+ if (object->d->ownThread == currentThread) {
+ object->qt_emit( c->member(), o );
+ }
+ else {
+ if (object->d->ownThread && !object->d->ownThread->finished()) {
+ QApplication::postEvent(object, new QMetaCallEvent(c->member(), this, deepCopyQUObjectArray(o), QMetaCallEvent::MetaCallEmit));
+ }
+ }
+ }
+ else {
+ if (object->d->ownThread == currentThread) {
+ object->qt_invoke( c->member(), o );
+ }
+ else {
+ if (object->d->ownThread && !object->d->ownThread->finished()) {
+ QApplication::postEvent(object, new QMetaCallEvent(c->member(), this, deepCopyQUObjectArray(o), QMetaCallEvent::MetaCallInvoke));
+ }
+ }
+ }
if (sol ) {
sol->currentSender = oldSender;
if ( sol->deref() )
@@ -2435,39 +2674,42 @@ void QObject::activate_signal( QConnectionList *clist, QUObject *o )
*/
#ifndef QT_NO_PRELIMINARY_SIGNAL_SPY
-#define ACTIVATE_SIGNAL_WITH_PARAM(FNAME,TYPE) \
-void QObject::FNAME( int signal, TYPE param ) \
-{ \
- if ( qt_preliminary_signal_spy ) { \
- if ( !signalsBlocked() && signal >= 0 && \
- ( !connections || !connections->at( signal ) ) ) { \
- QUObject o[2]; \
- static_QUType_##TYPE.set( o+1, param ); \
- qt_spy_signal( this, signal, o ); \
- return; \
- } \
- } \
- if ( !connections || signalsBlocked() || signal < 0 ) \
- return; \
- QConnectionList *clist = connections->at( signal ); \
- if ( !clist ) \
- return; \
- QUObject o[2]; \
- static_QUType_##TYPE.set( o+1, param ); \
- activate_signal( clist, o ); \
+#define ACTIVATE_SIGNAL_WITH_PARAM(FNAME,TYPE) \
+void QObject::FNAME( int signal, TYPE param ) \
+{ \
+ if ( qt_preliminary_signal_spy ) { \
+ if ( !signalsBlocked() && signal >= 0 && \
+ ( !connections || !connections->at( signal ) ) ) { \
+ QUObject o[2]; \
+ o[1].isLastObject = true; \
+ static_QUType_##TYPE.set( o+1, param ); \
+ qt_spy_signal( this, signal, o ); \
+ return; \
+ } \
+ } \
+ if ( !connections || signalsBlocked() || signal < 0 ) \
+ return; \
+ QConnectionList *clist = connections->at( signal ); \
+ if ( !clist ) \
+ return; \
+ QUObject o[2]; \
+ o[1].isLastObject = true; \
+ static_QUType_##TYPE.set( o+1, param ); \
+ activate_signal( clist, o ); \
}
#else
-#define ACTIVATE_SIGNAL_WITH_PARAM(FNAME,TYPE) \
-void QObject::FNAME( int signal, TYPE param ) \
-{ \
- if ( !connections || signalsBlocked() || signal < 0 ) \
- return; \
- QConnectionList *clist = connections->at( signal ); \
- if ( !clist ) \
- return; \
- QUObject o[2]; \
- static_QUType_##TYPE.set( o+1, param ); \
- activate_signal( clist, o ); \
+#define ACTIVATE_SIGNAL_WITH_PARAM(FNAME,TYPE) \
+void QObject::FNAME( int signal, TYPE param ) \
+{ \
+ if ( !connections || signalsBlocked() || signal < 0 ) \
+ return; \
+ QConnectionList *clist = connections->at( signal ); \
+ if ( !clist ) \
+ return; \
+ QUObject o[2]; \
+ o[1].isLastObject = true; \
+ static_QUType_##TYPE.set( o+1, param ); \
+ activate_signal( clist, o ); \
}
#endif
diff --git a/src/kernel/qobject.h b/src/kernel/qobject.h
index 6de28db..2f469ba 100644
--- a/src/kernel/qobject.h
+++ b/src/kernel/qobject.h
@@ -63,6 +63,10 @@ class QObjectUserData;
#endif
struct QUObject;
+#ifdef QT_THREAD_SUPPORT
+class QThread;
+#endif
+
class Q_EXPORT QObject: public Qt
{
Q_OBJECT
@@ -217,6 +221,18 @@ private: // Disabled copy constructor and operator=
QObject( const QObject & );
QObject &operator=( const QObject & );
#endif
+
+public:
+#ifdef QT_THREAD_SUPPORT
+ QThread* contextThreadObject() const;
+ void moveToThread(QThread *targetThread);
+#endif
+
+private:
+#ifdef QT_THREAD_SUPPORT
+ void moveToThread_helper(QThread *targetThread);
+ void setThreadObject_helper(QThread *targetThread);
+#endif
};
diff --git a/src/kernel/qthread.cpp b/src/kernel/qthread.cpp
index 1653a51..cfe8c56 100644
--- a/src/kernel/qthread.cpp
+++ b/src/kernel/qthread.cpp
@@ -41,6 +41,7 @@
#include "qplatformdefs.h"
#include "qthread.h"
+#include "qeventloop.h"
#include <private/qthreadinstance_p.h>
#ifndef QT_H
@@ -238,4 +239,20 @@ void QThread::postEvent( QObject * receiver, QEvent * event )
}
#endif
+QEventLoopThread::QEventLoopThread() : QThread()
+{
+ //
+}
+
+QEventLoopThread::~QEventLoopThread()
+{
+ //
+}
+
+void QEventLoopThread::run()
+{
+ QEventLoop* eventLoop = QApplication::eventLoop();
+ if (eventLoop) eventLoop->exec();
+}
+
#endif // QT_THREAD_SUPPORT
diff --git a/src/kernel/qthread.h b/src/kernel/qthread.h
index 160919f..0188ea6 100644
--- a/src/kernel/qthread.h
+++ b/src/kernel/qthread.h
@@ -118,11 +118,25 @@ protected:
private:
QThreadInstance * d;
friend class QThreadInstance;
+ friend class QCoreApplicationThread;
+ friend class QApplication;
+ friend class QEventLoop;
#if defined(Q_DISABLE_COPY)
QThread( const QThread & );
QThread &operator=( const QThread & );
#endif // Q_DISABLE_COPY
+
+public:
+ static QThread* currentThreadObject();
+};
+
+class Q_EXPORT QEventLoopThread : public QThread
+{
+ public:
+ QEventLoopThread();
+ ~QEventLoopThread();
+ virtual void run();
};
#endif // QT_THREAD_SUPPORT
diff --git a/src/kernel/qthread_unix.cpp b/src/kernel/qthread_unix.cpp
index e4d6625..52b070e 100644
--- a/src/kernel/qthread_unix.cpp
+++ b/src/kernel/qthread_unix.cpp
@@ -52,11 +52,6 @@ typedef pthread_mutex_t Q_MUTEX_T;
#include <sched.h>
-static QThreadInstance main_instance = {
- 0, { 0, &main_instance }, 0, 0, 1, 0, PTHREAD_COND_INITIALIZER, 0
-};
-
-
static QMutexPool *qt_thread_mutexpool = 0;
@@ -82,10 +77,20 @@ static void create_storage_key()
** QThreadInstance
*************************************************************************/
+void QThreadInstance::setCurrentThread(QThread *thread)
+{
+ pthread_once(&storage_key_once, create_storage_key);
+ pthread_setspecific(storage_key, thread);
+}
+
QThreadInstance *QThreadInstance::current()
{
+ QThreadInstance *ret = NULL;
pthread_once( &storage_key_once, create_storage_key );
- QThreadInstance *ret = (QThreadInstance *) pthread_getspecific( storage_key );
+ QThread *thread = (QThread *) pthread_getspecific( storage_key );
+ if (thread) {
+ ret = thread->d;
+ }
return ret;
}
@@ -101,6 +106,8 @@ void QThreadInstance::init(unsigned int stackSize)
pthread_cond_init(&thread_done, NULL);
thread_id = 0;
+ eventLoop = 0;
+
// threads have not been initialized yet, do it now
if (! qt_thread_mutexpool) QThread::initialize();
}
@@ -114,8 +121,8 @@ void *QThreadInstance::start( void *_arg )
{
void **arg = (void **) _arg;
- pthread_once( &storage_key_once, create_storage_key );
- pthread_setspecific( storage_key, arg[1] );
+ setCurrentThread( (QThread *) arg[0] );
+
pthread_cleanup_push( QThreadInstance::finish, arg[1] );
pthread_testcancel();
@@ -192,9 +199,6 @@ void QThread::initialize()
qt_global_mutexpool = new QMutexPool( TRUE, 73 );
if ( ! qt_thread_mutexpool )
qt_thread_mutexpool = new QMutexPool( FALSE, 127 );
-
- pthread_once( &storage_key_once, create_storage_key );
- pthread_setspecific( storage_key, &main_instance );
}
/*! \internal
@@ -206,11 +210,6 @@ void QThread::cleanup()
delete qt_thread_mutexpool;
qt_global_mutexpool = 0;
qt_thread_mutexpool = 0;
-
- QThreadInstance::finish(&main_instance);
-
- pthread_once( &storage_key_once, create_storage_key );
- pthread_setspecific( storage_key, 0 );
}
/*!
@@ -470,5 +469,20 @@ bool QThread::wait( unsigned long time )
return (ret == 0);
}
+/*!
+ Returns a pointer to the currently executing QThread. If the
+ current thread was not started using the QThread API, this
+ function returns zero.
+
+ Note that QApplication creates a QThread object to represent the
+ main thread; calling this function from main() after creating
+ QApplication will return a valid pointer.
+*/
+QThread *QThread::currentThreadObject()
+{
+ pthread_once(&storage_key_once, create_storage_key);
+ return reinterpret_cast<QThread *>(pthread_getspecific(storage_key));
+}
+
#endif // QT_THREAD_SUPPORT
diff --git a/src/kernel/qwidget.cpp b/src/kernel/qwidget.cpp
index 704681d..5ad69a0 100644
--- a/src/kernel/qwidget.cpp
+++ b/src/kernel/qwidget.cpp
@@ -56,6 +56,9 @@
#include "qstyle.h"
#include "qmetaobject.h"
#include "qguardedptr.h"
+#if defined(QT_THREAD_SUPPORT)
+#include "qthread.h"
+#endif
#if defined(QT_ACCESSIBILITY_SUPPORT)
#include "qaccessible.h"
#endif
@@ -887,6 +890,12 @@ QWidget::QWidget( QWidget *parent, const char *name, WFlags f, NFlags n )
}
#endif
+#if defined(QT_THREAD_SUPPORT) && defined(QT_CHECK_STATE)
+ if (QThread::currentThreadObject() != QApplication::guiThread()) {
+ qFatal( "QWidget: Cannot create a QWidget outside of the main GUI thread" );
+ }
+#endif
+
fstrut_dirty = 1;
isWidget = TRUE; // is a widget
diff --git a/src/moc/moc.y b/src/moc/moc.y
index 2914150..316efba 100644
--- a/src/moc/moc.y
+++ b/src/moc/moc.y
@@ -3193,6 +3193,7 @@ void generateClass() // generate C++ source code for a class
offset++;
}
}
+ fprintf( out, " o[%d].isLastObject = true;\n", f->args->count() + 0 );
fprintf( out, " activate_signal( clist, o );\n" );
// get return values from inOut parameters
diff --git a/src/moc/moc_lex.cpp b/src/moc/moc_lex.cpp
index bef27ad..44aa983 100644
--- a/src/moc/moc_lex.cpp
+++ b/src/moc/moc_lex.cpp
@@ -8,7 +8,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 31
+#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -30,7 +30,15 @@
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
-#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+
+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
+ * if you want the limit (max/min) macros for int types.
+ */
+#ifndef __STDC_LIMIT_MACROS
+#define __STDC_LIMIT_MACROS 1
+#endif
+
#include <inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
@@ -45,7 +53,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -76,6 +83,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -85,11 +94,12 @@ typedef unsigned int flex_uint32_t;
#else /* ! __cplusplus */
-#if __STDC__
+/* C99 requires __STDC__ to be defined as 1. */
+#if defined (__STDC__)
#define YY_USE_CONST
-#endif /* __STDC__ */
+#endif /* defined (__STDC__) */
#endif /* ! __cplusplus */
#ifdef YY_USE_CONST
@@ -131,9 +141,21 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
+/* The state buf must be large enough to hold one state per character in the main buffer.
+ */
+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type))
+
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedef struct yy_buffer_state *YY_BUFFER_STATE;
@@ -165,14 +187,9 @@ extern FILE *yyin, *yyout;
#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).
- */
-
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
-typedef unsigned int yy_size_t;
+typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
@@ -267,7 +284,7 @@ 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_init = 0; /* 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
@@ -928,22 +945,22 @@ int yy_flex_debug = 0;
char *yytext;
#line 1 "moc.l"
/****************************************************************************
-** $Id: qt/moc_lex.cpp 3.3.8 edited Feb 2 14:59 $
**
** Lexical analyzer for meta object compiler
**
** Created : 930417
**
-** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
+** Copyright (C) 1992-2008 Trolltech ASA. All rights reserved.
**
** This file is part of the Qt GUI Toolkit.
**
-** This file may be used under the terms of the GNU General Public
-** License versions 2.0 or 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Alternatively you may (at your option) use any
-** later version of the GNU General Public License if such license has
-** been publicly approved by Trolltech ASA (or its successors, if any)
+** This file may be used under the terms of the GNU General
+** Public License versions 2.0 or 3.0 as published by the Free
+** Software Foundation and appearing in the files LICENSE.GPL2
+** and LICENSE.GPL3 included in the packaging of this file.
+** Alternatively you may (at your option) use any later version
+** of the GNU General Public License if such license has been
+** publicly approved by Trolltech ASA (or its successors, if any)
** and the KDE Free Qt Foundation.
**
** Please review the following information to ensure GNU General
@@ -966,7 +983,7 @@ char *yytext;
** herein.
**
*****************************************************************************/
-#line 39 "moc.l"
+#line 42 "moc.l"
#ifdef MOC_YACC_CODE
#ifdef MOC_MWERKS_PLUGIN
@@ -1032,7 +1049,7 @@ extern void addExpressionChar( const char );
extern void addExpressionString( const char * );
extern void moc_warn( const char *msg );
-#line 1033 "lex.yy.c"
+#line 1053 "lex.yy.c"
#define INITIAL 0
#define OUTSIDE 1
@@ -1061,6 +1078,37 @@ extern void moc_warn( const char *msg );
#define YY_EXTRA_TYPE void *
#endif
+static int yy_init_globals (void );
+
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy (void );
+
+int yyget_debug (void );
+
+void yyset_debug (int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra (void );
+
+void yyset_extra (YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in (void );
+
+void yyset_in (FILE * in_str );
+
+FILE *yyget_out (void );
+
+void yyset_out (FILE * out_str );
+
+int yyget_leng (void );
+
+char *yyget_text (void );
+
+int yyget_lineno (void );
+
+void yyset_lineno (int line_number );
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -1095,7 +1143,12 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -1103,7 +1156,7 @@ static int input (void );
/* 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 )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -1199,14 +1252,14 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-#line 110 "moc.l"
+#line 113 "moc.l"
-#line 1203 "lex.yy.c"
+#line 1259 "lex.yy.c"
- if ( (yy_init) )
+ if ( !(yy_init) )
{
- (yy_init) = 0;
+ (yy_init) = 1;
#ifdef YY_USER_INIT
YY_USER_INIT;
@@ -1288,126 +1341,126 @@ do_action: /* This label is used only to access EOF actions. */
case 1:
YY_RULE_SETUP
-#line 112 "moc.l"
+#line 115 "moc.l"
{ X;
BEGIN QT_DEF;
return CLASS; }
YY_BREAK
case 2:
YY_RULE_SETUP
-#line 115 "moc.l"
+#line 118 "moc.l"
{ X;
BEGIN QT_DEF;
return NAMESPACE; }
YY_BREAK
case 3:
YY_RULE_SETUP
-#line 118 "moc.l"
+#line 121 "moc.l"
{ X;
BEGIN QT_DEF;
return USING; }
YY_BREAK
case 4:
YY_RULE_SETUP
-#line 121 "moc.l"
+#line 124 "moc.l"
{ X;
BEGIN QT_DEF;
return TEMPLATE; }
YY_BREAK
case 5:
YY_RULE_SETUP
-#line 124 "moc.l"
+#line 127 "moc.l"
{ X; return Q_OBJECT; }
YY_BREAK
case 6:
YY_RULE_SETUP
-#line 125 "moc.l"
+#line 128 "moc.l"
{ X; return SIGNALS; }
YY_BREAK
case 7:
YY_RULE_SETUP
-#line 126 "moc.l"
+#line 129 "moc.l"
{ X; return SLOTS; }
YY_BREAK
case 8:
YY_RULE_SETUP
-#line 127 "moc.l"
+#line 130 "moc.l"
{ X; return Q_CLASSINFO; }
YY_BREAK
case 9:
YY_RULE_SETUP
-#line 128 "moc.l"
+#line 131 "moc.l"
{ X; return Q_PROPERTY; }
YY_BREAK
case 10:
YY_RULE_SETUP
-#line 129 "moc.l"
+#line 132 "moc.l"
{ X; return Q_OVERRIDE; }
YY_BREAK
case 11:
YY_RULE_SETUP
-#line 130 "moc.l"
+#line 133 "moc.l"
{ X; return Q_ENUMS; }
YY_BREAK
case 12:
YY_RULE_SETUP
-#line 131 "moc.l"
+#line 134 "moc.l"
{ X; return Q_SETS; }
YY_BREAK
case 13:
YY_RULE_SETUP
-#line 133 "moc.l"
+#line 136 "moc.l"
{ fctLevel++;Y; }
YY_BREAK
case 14:
YY_RULE_SETUP
-#line 134 "moc.l"
+#line 137 "moc.l"
{ fctLevel--;Y;if (fctLevel==0){X;return '}';}}
YY_BREAK
case 15:
YY_RULE_SETUP
-#line 135 "moc.l"
+#line 138 "moc.l"
{ classPLevel++;Y; }
YY_BREAK
case 16:
YY_RULE_SETUP
-#line 136 "moc.l"
+#line 139 "moc.l"
{ classPLevel--;Y;if (classPLevel == 0)
{X;return '}';} }
YY_BREAK
case 17:
YY_RULE_SETUP
-#line 138 "moc.l"
+#line 141 "moc.l"
{ X;if( classPLevel == 1 ) return PUBLIC; }
YY_BREAK
case 18:
YY_RULE_SETUP
-#line 139 "moc.l"
+#line 142 "moc.l"
{ X;if( classPLevel == 1 ) return PROTECTED; }
YY_BREAK
case 19:
YY_RULE_SETUP
-#line 140 "moc.l"
+#line 143 "moc.l"
{ X;if( classPLevel == 1 ) return PRIVATE; }
YY_BREAK
case 20:
YY_RULE_SETUP
-#line 141 "moc.l"
+#line 144 "moc.l"
{ X;if( classPLevel == 1 ) return SIGNALS; }
YY_BREAK
case 21:
YY_RULE_SETUP
-#line 142 "moc.l"
+#line 145 "moc.l"
{ X;if( classPLevel == 1 ) return SLOTS; }
YY_BREAK
case 22:
YY_RULE_SETUP
-#line 143 "moc.l"
+#line 146 "moc.l"
{ X;if( classPLevel == 1 ) return Q_CLASSINFO; }
YY_BREAK
case 23:
YY_RULE_SETUP
-#line 144 "moc.l"
+#line 147 "moc.l"
{ X;
if ( classPLevel == 1 )
return Q_OBJECT;
@@ -1417,212 +1470,212 @@ YY_RULE_SETUP
YY_BREAK
case 24:
YY_RULE_SETUP
-#line 150 "moc.l"
+#line 153 "moc.l"
{ X;if( classPLevel == 1 ) return Q_PROPERTY; }
YY_BREAK
case 25:
YY_RULE_SETUP
-#line 151 "moc.l"
+#line 154 "moc.l"
{ X;if( classPLevel == 1 ) return Q_OVERRIDE; }
YY_BREAK
case 26:
YY_RULE_SETUP
-#line 152 "moc.l"
+#line 155 "moc.l"
{ X;if( classPLevel == 1 ) return Q_ENUMS; }
YY_BREAK
case 27:
YY_RULE_SETUP
-#line 153 "moc.l"
+#line 156 "moc.l"
{ X;if( classPLevel == 1 ) return Q_SETS; }
YY_BREAK
case 28:
YY_RULE_SETUP
-#line 155 "moc.l"
+#line 158 "moc.l"
{ namespacePLevel++;Y; }
YY_BREAK
case 29:
YY_RULE_SETUP
-#line 156 "moc.l"
+#line 159 "moc.l"
{ namespacePLevel--;Y;if (namespacePLevel == 0)
{X;return '}';}}
YY_BREAK
case 30:
YY_RULE_SETUP
-#line 158 "moc.l"
+#line 161 "moc.l"
{ X;
BEGIN QT_DEF;
return CLASS; }
YY_BREAK
case 31:
YY_RULE_SETUP
-#line 161 "moc.l"
+#line 164 "moc.l"
{ X;
BEGIN QT_DEF;
return TEMPLATE; }
YY_BREAK
case 32:
YY_RULE_SETUP
-#line 164 "moc.l"
+#line 167 "moc.l"
{ X;
BEGIN QT_DEF;
return NAMESPACE; }
YY_BREAK
case 33:
YY_RULE_SETUP
-#line 167 "moc.l"
+#line 170 "moc.l"
{ X;
BEGIN QT_DEF;
return USING; }
YY_BREAK
case 34:
YY_RULE_SETUP
-#line 171 "moc.l"
+#line 174 "moc.l"
{ X; return '('; }
YY_BREAK
case 35:
YY_RULE_SETUP
-#line 172 "moc.l"
+#line 175 "moc.l"
{ X; return ')'; }
YY_BREAK
case 36:
YY_RULE_SETUP
-#line 173 "moc.l"
+#line 176 "moc.l"
{ X; return READ; }
YY_BREAK
case 37:
YY_RULE_SETUP
-#line 174 "moc.l"
+#line 177 "moc.l"
{ X; return WRITE; }
YY_BREAK
case 38:
YY_RULE_SETUP
-#line 175 "moc.l"
+#line 178 "moc.l"
{ X; return STORED; }
YY_BREAK
case 39:
YY_RULE_SETUP
-#line 176 "moc.l"
+#line 179 "moc.l"
{ X; return RESET; }
YY_BREAK
case 40:
YY_RULE_SETUP
-#line 177 "moc.l"
+#line 180 "moc.l"
{ X; return DESIGNABLE; }
YY_BREAK
case 41:
YY_RULE_SETUP
-#line 178 "moc.l"
+#line 181 "moc.l"
{ X; return SCRIPTABLE; }
YY_BREAK
case 42:
YY_RULE_SETUP
-#line 181 "moc.l"
+#line 184 "moc.l"
{ expLevel++;X; }
YY_BREAK
case 43:
YY_RULE_SETUP
-#line 182 "moc.l"
+#line 185 "moc.l"
{ expLevel--;Y;if (expLevel == 0)
{ X; BEGIN QT_DEF; return ')';} }
YY_BREAK
case 44:
YY_RULE_SETUP
-#line 184 "moc.l"
+#line 187 "moc.l"
{ expLevel++;X; }
YY_BREAK
case 45:
YY_RULE_SETUP
-#line 185 "moc.l"
+#line 188 "moc.l"
{ expLevel--;X;if (expLevel == 0)
{ X; BEGIN QT_DEF; return ']';} }
YY_BREAK
case 46:
YY_RULE_SETUP
-#line 187 "moc.l"
+#line 190 "moc.l"
{ if (expLevel == 0)
{ X; BEGIN QT_DEF; return ',' ;} }
YY_BREAK
case 47:
YY_RULE_SETUP
-#line 189 "moc.l"
+#line 192 "moc.l"
{ if (expLevel == 0)
{ X; BEGIN QT_DEF; return ';' ;} }
YY_BREAK
case 48:
YY_RULE_SETUP
-#line 191 "moc.l"
+#line 194 "moc.l"
{ expLevel++;X; }
YY_BREAK
case 49:
YY_RULE_SETUP
-#line 192 "moc.l"
+#line 195 "moc.l"
{ expLevel--;Y;if (expLevel == 0)
{ X; BEGIN QT_DEF; return ')';} }
YY_BREAK
case 50:
YY_RULE_SETUP
-#line 194 "moc.l"
+#line 197 "moc.l"
{ expLevel++;X; }
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 195 "moc.l"
+#line 198 "moc.l"
{ expLevel--;X;if (expLevel == 0)
{ X; BEGIN QT_DEF; return ']';} }
YY_BREAK
case 52:
YY_RULE_SETUP
-#line 197 "moc.l"
+#line 200 "moc.l"
{ if (expLevel <= 1)
{ X; BEGIN QT_DEF; return ',' ;} }
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 199 "moc.l"
+#line 202 "moc.l"
{ if (expLevel == 0)
{ X; BEGIN QT_DEF; return ';' ;} }
YY_BREAK
case 54:
YY_RULE_SETUP
-#line 201 "moc.l"
+#line 204 "moc.l"
{ enumLevel++;X; }
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 202 "moc.l"
+#line 205 "moc.l"
{ enumLevel--;X; }
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 203 "moc.l"
+#line 206 "moc.l"
{ enumLevel++;X; }
YY_BREAK
case 57:
YY_RULE_SETUP
-#line 204 "moc.l"
+#line 207 "moc.l"
{ enumLevel--;X }
YY_BREAK
case 58:
YY_RULE_SETUP
-#line 205 "moc.l"
+#line 208 "moc.l"
{ if (enumLevel == 0)
{ X; BEGIN QT_DEF; return ',' ;} }
YY_BREAK
case 59:
YY_RULE_SETUP
-#line 207 "moc.l"
+#line 210 "moc.l"
{ if (enumLevel == 0)
{ X; BEGIN QT_DEF; return ';' ;} }
YY_BREAK
case 60:
YY_RULE_SETUP
-#line 209 "moc.l"
+#line 212 "moc.l"
{ if (enumLevel == 0)
{ X; BEGIN QT_DEF; return '}' ;} }
YY_BREAK
case 61:
YY_RULE_SETUP
-#line 211 "moc.l"
+#line 214 "moc.l"
{ templLevel++;
Y;
addExpressionChar( yytext[0] );
@@ -1630,7 +1683,7 @@ YY_RULE_SETUP
YY_BREAK
case 62:
YY_RULE_SETUP
-#line 215 "moc.l"
+#line 218 "moc.l"
{ templLevel--;
Y;
if ( templLevel == 0 ) {
@@ -1644,187 +1697,187 @@ YY_RULE_SETUP
YY_BREAK
case 63:
YY_RULE_SETUP
-#line 225 "moc.l"
+#line 228 "moc.l"
{ X;return FRIEND; }
YY_BREAK
case 64:
YY_RULE_SETUP
-#line 226 "moc.l"
+#line 229 "moc.l"
{ X;return TYPEDEF; }
YY_BREAK
case 65:
YY_RULE_SETUP
-#line 227 "moc.l"
+#line 230 "moc.l"
{ X;return AUTO; }
YY_BREAK
case 66:
YY_RULE_SETUP
-#line 228 "moc.l"
+#line 231 "moc.l"
{ X;return REGISTER; }
YY_BREAK
case 67:
YY_RULE_SETUP
-#line 229 "moc.l"
+#line 232 "moc.l"
{ X;return STATIC; }
YY_BREAK
case 68:
YY_RULE_SETUP
-#line 230 "moc.l"
+#line 233 "moc.l"
{ X;return EXTERN; }
YY_BREAK
case 69:
YY_RULE_SETUP
-#line 231 "moc.l"
+#line 234 "moc.l"
{ X;return INLINE; }
YY_BREAK
case 70:
YY_RULE_SETUP
-#line 232 "moc.l"
+#line 235 "moc.l"
{ X;return INLINE; }
YY_BREAK
case 71:
YY_RULE_SETUP
-#line 233 "moc.l"
+#line 236 "moc.l"
{ X;return VIRTUAL; }
YY_BREAK
case 72:
YY_RULE_SETUP
-#line 234 "moc.l"
+#line 237 "moc.l"
{ X;return CONST; }
YY_BREAK
case 73:
YY_RULE_SETUP
-#line 235 "moc.l"
+#line 238 "moc.l"
{ X;return VOLATILE; }
YY_BREAK
case 74:
YY_RULE_SETUP
-#line 236 "moc.l"
+#line 239 "moc.l"
{ X;return CHAR; }
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 237 "moc.l"
+#line 240 "moc.l"
{ X;return SHORT; }
YY_BREAK
case 76:
YY_RULE_SETUP
-#line 238 "moc.l"
+#line 241 "moc.l"
{ X;return INT; }
YY_BREAK
case 77:
YY_RULE_SETUP
-#line 239 "moc.l"
+#line 242 "moc.l"
{ X;return LONG; }
YY_BREAK
case 78:
YY_RULE_SETUP
-#line 240 "moc.l"
+#line 243 "moc.l"
{ X;return SIGNED; }
YY_BREAK
case 79:
YY_RULE_SETUP
-#line 241 "moc.l"
+#line 244 "moc.l"
{ X;return UNSIGNED; }
YY_BREAK
case 80:
YY_RULE_SETUP
-#line 242 "moc.l"
+#line 245 "moc.l"
{ X;return FLOAT; }
YY_BREAK
case 81:
YY_RULE_SETUP
-#line 243 "moc.l"
+#line 246 "moc.l"
{ X;return DOUBLE; }
YY_BREAK
case 82:
YY_RULE_SETUP
-#line 244 "moc.l"
+#line 247 "moc.l"
{ X;return VOID; }
YY_BREAK
case 83:
YY_RULE_SETUP
-#line 245 "moc.l"
+#line 248 "moc.l"
{ X;return ENUM; }
YY_BREAK
case 84:
YY_RULE_SETUP
-#line 246 "moc.l"
+#line 249 "moc.l"
{ X;return CLASS; }
YY_BREAK
case 85:
YY_RULE_SETUP
-#line 247 "moc.l"
+#line 250 "moc.l"
{ X;return STRUCT; }
YY_BREAK
case 86:
YY_RULE_SETUP
-#line 248 "moc.l"
+#line 251 "moc.l"
{ X;return UNION; }
YY_BREAK
case 87:
YY_RULE_SETUP
-#line 249 "moc.l"
+#line 252 "moc.l"
{ X;return ASM; }
YY_BREAK
case 88:
YY_RULE_SETUP
-#line 250 "moc.l"
+#line 253 "moc.l"
{ X;return PRIVATE; }
YY_BREAK
case 89:
YY_RULE_SETUP
-#line 251 "moc.l"
+#line 254 "moc.l"
{ X;return PROTECTED; }
YY_BREAK
case 90:
YY_RULE_SETUP
-#line 252 "moc.l"
+#line 255 "moc.l"
{ X;return PUBLIC; }
YY_BREAK
case 91:
YY_RULE_SETUP
-#line 253 "moc.l"
+#line 256 "moc.l"
{ X;return OPERATOR; }
YY_BREAK
case 92:
YY_RULE_SETUP
-#line 254 "moc.l"
+#line 257 "moc.l"
{ X;return DBL_COLON; }
YY_BREAK
case 93:
YY_RULE_SETUP
-#line 255 "moc.l"
+#line 258 "moc.l"
{ X;return TRIPLE_DOT; }
YY_BREAK
case 94:
YY_RULE_SETUP
-#line 256 "moc.l"
+#line 259 "moc.l"
{ X;return TEMPLATE; }
YY_BREAK
case 95:
YY_RULE_SETUP
-#line 257 "moc.l"
+#line 260 "moc.l"
{ X;return MUTABLE; }
YY_BREAK
case 96:
YY_RULE_SETUP
-#line 258 "moc.l"
+#line 261 "moc.l"
{ X;return THROW; }
YY_BREAK
case 97:
YY_RULE_SETUP
-#line 259 "moc.l"
+#line 262 "moc.l"
{ X;return USING; }
YY_BREAK
case 98:
YY_RULE_SETUP
-#line 260 "moc.l"
+#line 263 "moc.l"
{ X;return NAMESPACE; }
YY_BREAK
case 99:
YY_RULE_SETUP
-#line 262 "moc.l"
+#line 265 "moc.l"
{
X;
yylval.string = qstrdup(yytext);
@@ -1833,7 +1886,7 @@ YY_RULE_SETUP
YY_BREAK
case 100:
YY_RULE_SETUP
-#line 268 "moc.l"
+#line 271 "moc.l"
{
X;
yylval.string = qstrdup(yytext);
@@ -1842,23 +1895,23 @@ YY_RULE_SETUP
YY_BREAK
case 101:
YY_RULE_SETUP
-#line 274 "moc.l"
+#line 277 "moc.l"
{ X; return '('; }
YY_BREAK
case 102:
YY_RULE_SETUP
-#line 275 "moc.l"
+#line 278 "moc.l"
{ X; return ')'; }
YY_BREAK
case 103:
YY_RULE_SETUP
-#line 276 "moc.l"
+#line 279 "moc.l"
{ X; return ','; }
YY_BREAK
case 104:
/* rule 104 can match eol */
YY_RULE_SETUP
-#line 278 "moc.l"
+#line 281 "moc.l"
{
X;
yylval.string = qstrdup( yytext + 1 );
@@ -1868,23 +1921,23 @@ YY_RULE_SETUP
YY_BREAK
case 105:
YY_RULE_SETUP
-#line 285 "moc.l"
+#line 288 "moc.l"
;
YY_BREAK
case 106:
YY_RULE_SETUP
-#line 286 "moc.l"
+#line 289 "moc.l"
;
YY_BREAK
case 107:
YY_RULE_SETUP
-#line 287 "moc.l"
+#line 290 "moc.l"
;
YY_BREAK
case 108:
/* rule 108 can match eol */
YY_RULE_SETUP
-#line 289 "moc.l"
+#line 292 "moc.l"
{ /* discard strings */
Z;
}
@@ -1892,7 +1945,7 @@ YY_RULE_SETUP
case 109:
/* rule 109 can match eol */
YY_RULE_SETUP
-#line 293 "moc.l"
+#line 296 "moc.l"
{ /* discard strings */
Z;
}
@@ -1900,7 +1953,7 @@ YY_RULE_SETUP
case 110:
/* rule 110 can match eol */
YY_RULE_SETUP
-#line 297 "moc.l"
+#line 300 "moc.l"
{ /* discard strings */
Z;
}
@@ -1908,7 +1961,7 @@ YY_RULE_SETUP
case 111:
/* rule 111 can match eol */
YY_RULE_SETUP
-#line 301 "moc.l"
+#line 304 "moc.l"
{ /* discard strings */
Z;
addExpressionString( yytext );
@@ -1918,7 +1971,7 @@ YY_RULE_SETUP
case 112:
/* rule 112 can match eol */
YY_RULE_SETUP
-#line 308 "moc.l"
+#line 311 "moc.l"
{
X;
addExpressionString( yytext );
@@ -1929,7 +1982,7 @@ YY_RULE_SETUP
case 113:
/* rule 113 can match eol */
YY_RULE_SETUP
-#line 315 "moc.l"
+#line 318 "moc.l"
{
X;
yylval.string = qstrdup( yytext + 1 );
@@ -1939,7 +1992,7 @@ YY_RULE_SETUP
YY_BREAK
case 114:
YY_RULE_SETUP
-#line 322 "moc.l"
+#line 325 "moc.l"
{ X;
yylval.char_val = yytext[1];
return CHAR_VAL;
@@ -1947,7 +2000,7 @@ YY_RULE_SETUP
YY_BREAK
case 115:
YY_RULE_SETUP
-#line 327 "moc.l"
+#line 330 "moc.l"
{ X;
yylval.char_val = '\a';
return CHAR_VAL;
@@ -1955,7 +2008,7 @@ YY_RULE_SETUP
YY_BREAK
case 116:
YY_RULE_SETUP
-#line 332 "moc.l"
+#line 335 "moc.l"
{ X;
yylval.char_val = '\b';
return CHAR_VAL;
@@ -1963,7 +2016,7 @@ YY_RULE_SETUP
YY_BREAK
case 117:
YY_RULE_SETUP
-#line 337 "moc.l"
+#line 340 "moc.l"
{ X;
yylval.char_val = '\f';
return CHAR_VAL;
@@ -1971,7 +2024,7 @@ YY_RULE_SETUP
YY_BREAK
case 118:
YY_RULE_SETUP
-#line 342 "moc.l"
+#line 345 "moc.l"
{ X;
yylval.char_val = '\n';
return CHAR_VAL;
@@ -1979,7 +2032,7 @@ YY_RULE_SETUP
YY_BREAK
case 119:
YY_RULE_SETUP
-#line 347 "moc.l"
+#line 350 "moc.l"
{ X;
yylval.char_val = '\r';
return CHAR_VAL;
@@ -1987,7 +2040,7 @@ YY_RULE_SETUP
YY_BREAK
case 120:
YY_RULE_SETUP
-#line 352 "moc.l"
+#line 355 "moc.l"
{ X;
yylval.char_val = '\t';
return CHAR_VAL;
@@ -1995,7 +2048,7 @@ YY_RULE_SETUP
YY_BREAK
case 121:
YY_RULE_SETUP
-#line 357 "moc.l"
+#line 360 "moc.l"
{ X;
yylval.char_val = '\v';
return CHAR_VAL;
@@ -2003,7 +2056,7 @@ YY_RULE_SETUP
YY_BREAK
case 122:
YY_RULE_SETUP
-#line 362 "moc.l"
+#line 365 "moc.l"
{ X;
yylval.char_val = '\\';
return CHAR_VAL;
@@ -2011,7 +2064,7 @@ YY_RULE_SETUP
YY_BREAK
case 123:
YY_RULE_SETUP
-#line 367 "moc.l"
+#line 370 "moc.l"
{ X;
yylval.char_val = '\?';
return CHAR_VAL;
@@ -2019,7 +2072,7 @@ YY_RULE_SETUP
YY_BREAK
case 124:
YY_RULE_SETUP
-#line 372 "moc.l"
+#line 375 "moc.l"
{ X;
yylval.char_val = '\'';
return CHAR_VAL;
@@ -2027,7 +2080,7 @@ YY_RULE_SETUP
YY_BREAK
case 125:
YY_RULE_SETUP
-#line 377 "moc.l"
+#line 380 "moc.l"
{ X;
yylval.char_val = '\"'; /* " */
return CHAR_VAL;
@@ -2035,7 +2088,7 @@ YY_RULE_SETUP
YY_BREAK
case 126:
YY_RULE_SETUP
-#line 382 "moc.l"
+#line 385 "moc.l"
{ X;
yylval.char_val = '\0';
return CHAR_VAL;
@@ -2043,7 +2096,7 @@ YY_RULE_SETUP
YY_BREAK
case 127:
YY_RULE_SETUP
-#line 387 "moc.l"
+#line 390 "moc.l"
{ X;
yylval.char_val =
(char)strtol( &yytext[1], 0, 8 );
@@ -2052,7 +2105,7 @@ YY_RULE_SETUP
YY_BREAK
case 128:
YY_RULE_SETUP
-#line 393 "moc.l"
+#line 396 "moc.l"
{ X;
yylval.char_val =
(char)strtol( &yytext[2], 0, 16 );
@@ -2061,7 +2114,7 @@ YY_RULE_SETUP
YY_BREAK
case 129:
YY_RULE_SETUP
-#line 399 "moc.l"
+#line 402 "moc.l"
{ X;
yylval.char_val = ' ';
return CHAR_VAL;
@@ -2069,7 +2122,7 @@ YY_RULE_SETUP
YY_BREAK
case 130:
YY_RULE_SETUP
-#line 404 "moc.l"
+#line 407 "moc.l"
{ X;
yylval.int_val = atoi(yytext);
return INT_VAL;
@@ -2077,7 +2130,7 @@ YY_RULE_SETUP
YY_BREAK
case 131:
YY_RULE_SETUP
-#line 409 "moc.l"
+#line 412 "moc.l"
{ X;
yylval.double_val = atof(yytext);
return DOUBLE_VAL;
@@ -2085,7 +2138,7 @@ YY_RULE_SETUP
YY_BREAK
case 132:
YY_RULE_SETUP
-#line 414 "moc.l"
+#line 417 "moc.l"
{ X;
yylval.double_val = atof(yytext);
return DOUBLE_VAL;
@@ -2096,7 +2149,7 @@ case 133:
(yy_c_buf_p) = yy_cp -= 1;
YY_DO_BEFORE_ACTION; /* set up yytext again */
YY_RULE_SETUP
-#line 420 "moc.l"
+#line 423 "moc.l"
{ /* skip multi-line macro-definitions */
int c, c1;
input(); /* Discard the '\n'. */
@@ -2110,12 +2163,12 @@ YY_RULE_SETUP
YY_BREAK
case 134:
YY_RULE_SETUP
-#line 431 "moc.l"
+#line 434 "moc.l"
{ /* preprocessor commands are skipped */}
YY_BREAK
case 135:
YY_RULE_SETUP
-#line 432 "moc.l"
+#line 435 "moc.l"
{ /* C++ comment */
QCString s = yytext;
if ( s.contains( "MOC_SKIP_BEGIN" ) ) {
@@ -2139,7 +2192,7 @@ YY_RULE_SETUP
YY_BREAK
case 136:
YY_RULE_SETUP
-#line 452 "moc.l"
+#line 455 "moc.l"
{ /* C comment */
int c = ' ';
do {
@@ -2155,12 +2208,12 @@ YY_RULE_SETUP
YY_BREAK
case 137:
YY_RULE_SETUP
-#line 465 "moc.l"
+#line 468 "moc.l"
{ addExpressionChar( yytext[0] ); }
YY_BREAK
case 138:
YY_RULE_SETUP
-#line 467 "moc.l"
+#line 470 "moc.l"
{
/* spaces are important in template args,
e.g. Foo<const int> */
@@ -2168,52 +2221,52 @@ YY_RULE_SETUP
YY_BREAK
case 139:
YY_RULE_SETUP
-#line 471 "moc.l"
+#line 474 "moc.l"
;
YY_BREAK
case 140:
YY_RULE_SETUP
-#line 472 "moc.l"
+#line 475 "moc.l"
;
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 473 "moc.l"
+#line 476 "moc.l"
;
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 474 "moc.l"
+#line 477 "moc.l"
;
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 475 "moc.l"
+#line 478 "moc.l"
{ addExpressionChar( yytext[0] ); }
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 476 "moc.l"
+#line 479 "moc.l"
;
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 477 "moc.l"
+#line 480 "moc.l"
{ addExpressionChar( yytext[0] ); }
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 478 "moc.l"
+#line 481 "moc.l"
;
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 479 "moc.l"
+#line 482 "moc.l"
;
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 480 "moc.l"
+#line 483 "moc.l"
{
X;
return yytext[0];
@@ -2221,7 +2274,7 @@ YY_RULE_SETUP
YY_BREAK
case 149:
YY_RULE_SETUP
-#line 484 "moc.l"
+#line 487 "moc.l"
{
X;
return ';';
@@ -2230,17 +2283,17 @@ YY_RULE_SETUP
case 150:
/* rule 150 can match eol */
YY_RULE_SETUP
-#line 488 "moc.l"
+#line 491 "moc.l"
{
lineNo++;
}
YY_BREAK
case 151:
YY_RULE_SETUP
-#line 493 "moc.l"
+#line 496 "moc.l"
ECHO;
YY_BREAK
-#line 2241 "lex.yy.c"
+#line 2297 "lex.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(OUTSIDE):
case YY_STATE_EOF(QT_DEF):
@@ -2439,7 +2492,7 @@ static int yy_get_next_buffer (void)
else
{
- size_t num_to_read =
+ int num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
@@ -2484,7 +2537,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
- (yy_n_chars), num_to_read );
+ (yy_n_chars), (size_t) num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@@ -2508,6 +2561,14 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
+ /* Extend the array by 50%, plus the number we really need. */
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ }
+
(yy_n_chars) += number_to_move;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
@@ -2926,7 +2987,9 @@ static void yyensure_buffer_stack (void)
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);
-
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
(yy_buffer_stack_max) = num_to_alloc;
@@ -2944,6 +3007,8 @@ static void yyensure_buffer_stack (void)
((yy_buffer_stack),
num_to_alloc * sizeof(struct yy_buffer_state*)
);
+ if ( ! (yy_buffer_stack) )
+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
/* zero only the new slots.*/
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
@@ -2988,26 +3053,26 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
/** Setup the input buffer state to scan a string. The next call to yylex() will
* scan from a @e copy of @a str.
- * @param str a NUL-terminated string to scan
+ * @param yystr a NUL-terminated string to scan
*
* @return the newly allocated buffer state object.
* @note If you want to scan bytes that may contain NUL values, then use
* yy_scan_bytes() instead.
*/
-YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str )
+YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
- return yy_scan_bytes(yy_str,strlen(yy_str) );
+ return yy_scan_bytes(yystr,strlen(yystr) );
}
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
-YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
+YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
@@ -3015,15 +3080,15 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len )
int i;
/* Get memory for full buffer, including space for trailing EOB's. */
- n = len + 2;
+ n = _yybytes_len + 2;
buf = (char *) yyalloc(n );
if ( ! buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
+ for ( i = 0; i < _yybytes_len; ++i )
+ buf[i] = yybytes[i];
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
b = yy_scan_buffer(buf,n );
if ( ! b )
@@ -3144,6 +3209,34 @@ void yyset_debug (int bdebug )
yy_flex_debug = bdebug ;
}
+static int yy_init_globals (void)
+{
+ /* Initialization is the same as for the non-reentrant scanner.
+ * This function is called from yylex_destroy(), so don't allocate here.
+ */
+
+ (yy_buffer_stack) = 0;
+ (yy_buffer_stack_top) = 0;
+ (yy_buffer_stack_max) = 0;
+ (yy_c_buf_p) = (char *) 0;
+ (yy_init) = 0;
+ (yy_start) = 0;
+
+/* Defined in main.c */
+#ifdef YY_STDINIT
+ yyin = stdin;
+ yyout = stdout;
+#else
+ yyin = (FILE *) 0;
+ yyout = (FILE *) 0;
+#endif
+
+ /* For future reference: Set errno on error, since we are called by
+ * yylex_init()
+ */
+ return 0;
+}
+
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy (void)
{
@@ -3159,6 +3252,10 @@ int yylex_destroy (void)
yyfree((yy_buffer_stack) );
(yy_buffer_stack) = NULL;
+ /* Reset the globals. This is important in a non-reentrant scanner so the next time
+ * yylex() is called, initialization will occur. */
+ yy_init_globals( );
+
return 0;
}
@@ -3170,7 +3267,7 @@ int yylex_destroy (void)
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
{
register int i;
- for ( i = 0; i < n; ++i )
+ for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
#endif
@@ -3179,7 +3276,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
static int yy_flex_strlen (yyconst char * s )
{
register int n;
- for ( n = 0; s[n]; ++n )
+ for ( n = 0; s[n]; ++n )
;
return n;
@@ -3210,19 +3307,7 @@ void yyfree (void * ptr )
#define YYTABLES_NAME "yytables"
-#undef YY_NEW_FILE
-#undef YY_FLUSH_BUFFER
-#undef yy_set_bol
-#undef yy_new_buffer
-#undef yy_set_interactive
-#undef yytext_ptr
-#undef YY_DO_BEFORE_ACTION
-
-#ifdef YY_DECL_IS_OURS
-#undef YY_DECL_IS_OURS
-#undef YY_DECL
-#endif
-#line 493 "moc.l"
+#line 496 "moc.l"
diff --git a/src/moc/moc_yacc.cpp b/src/moc/moc_yacc.cpp
index 72867ec..b30fa23 100644
--- a/src/moc/moc_yacc.cpp
+++ b/src/moc/moc_yacc.cpp
@@ -1,14 +1,75 @@
-#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 YYPREFIX "yy"
-#line 55 "moc.y"
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.4.1"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+
+
+/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
+#line 57 "moc.y"
+
#define MOC_YACC_CODE
void yyerror( const char *msg );
@@ -52,10 +113,10 @@ bool isEnumType( const char* type );
int enumIndex( const char* type );
bool isVariantType( const char* type );
int qvariant_nameToType( const char* name );
-static void init(); /* initialize*/
-static void initClass(); /* prepare for new class*/
-static void generateClass(); /* generate C++ code for class*/
-static void initExpression(); /* prepare for new expression*/
+static void init(); // initialize
+static void initClass(); // prepare for new class
+static void generateClass(); // generate C++ code for class
+static void initExpression(); // prepare for new expression
static void enterNameSpace( const char *name = 0 );
static void leaveNameSpace();
static void selectOutsideClassState();
@@ -79,7 +140,7 @@ static const char* const utype_map[] =
};
inline bool isIdentChar( char x )
-{ /* Avoid bug in isalnum*/
+{ // Avoid bug in isalnum
return x == '_' || (x >= '0' && x <= '9') ||
(x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z');
}
@@ -278,7 +339,7 @@ static QCString rmWS( const char * );
enum Access { Private, Protected, Public };
-class Argument /* single arg meta data*/
+class Argument // single arg meta data
{
public:
Argument( const char *left, const char *right, const char* argName = 0, bool isDefaultArgument = FALSE )
@@ -326,7 +387,7 @@ public:
bool isDefault;
};
-class ArgList : public QPtrList<Argument> { /* member function arg list*/
+class ArgList : public QPtrList<Argument> { // member function arg list
public:
ArgList() { setAutoDelete( TRUE ); }
~ArgList() { clear(); }
@@ -363,10 +424,10 @@ public:
};
-struct Function /* member function meta data*/
+struct Function // member function meta data
{
Access access;
- QCString qualifier; /* const or volatile*/
+ QCString qualifier; // const or volatile
QCString name;
QCString type;
QCString signature;
@@ -383,7 +444,7 @@ struct Function /* member function meta data*/
}
};
-class FuncList : public QPtrList<Function> { /* list of member functions*/
+class FuncList : public QPtrList<Function> { // list of member functions
public:
FuncList( bool autoDelete = FALSE ) { setAutoDelete( autoDelete ); }
@@ -405,7 +466,7 @@ public:
bool set;
};
-class EnumList : public QPtrList<Enum> { /* list of property enums*/
+class EnumList : public QPtrList<Enum> { // list of property enums
public:
EnumList() { setAutoDelete(TRUE); }
};
@@ -452,10 +513,10 @@ struct Property
Function* setfunc;
Function* getfunc;
- int oredEnum; /* If the enums item may be ored. That means the data type is int.*/
- /* Allowed values are 1 (True), 0 (False), and -1 (Unset)*/
- QCString enumsettype; /* contains the set function type in case of oredEnum*/
- QCString enumgettype; /* contains the get function type in case of oredEnum*/
+ int oredEnum; // If the enums item may be ored. That means the data type is int.
+ // Allowed values are 1 (True), 0 (False), and -1 (Unset)
+ QCString enumsettype; // contains the set function type in case of oredEnum
+ QCString enumgettype; // contains the get function type in case of oredEnum
enum Specification { Unspecified, Class, Reference, Pointer, ConstCharStar };
Specification sspec;
@@ -485,7 +546,7 @@ struct Property
}
};
-class PropList : public QPtrList<Property> { /* list of properties*/
+class PropList : public QPtrList<Property> { // list of properties
public:
PropList() { setAutoDelete( TRUE ); }
};
@@ -500,7 +561,7 @@ struct ClassInfo
QCString value;
};
-class ClassInfoList : public QPtrList<ClassInfo> { /* list of class infos*/
+class ClassInfoList : public QPtrList<ClassInfo> { // list of class infos
public:
ClassInfoList() { setAutoDelete( TRUE ); }
};
@@ -510,61 +571,61 @@ class parser_reg {
parser_reg();
~parser_reg();
- /* some temporary values*/
- QCString tmpExpression; /* Used to store the characters the lexer*/
- /* is currently skipping (see addExpressionChar and friends)*/
- QCString fileName; /* file name*/
- QCString outputFile; /* output file name*/
- QCString pchFile; /* name of PCH file (used on Windows)*/
- QStrList includeFiles; /* name of #include files*/
- QCString includePath; /* #include file path*/
- QCString qtPath; /* #include qt file path*/
- int gen_count; /*number of classes generated*/
- bool noInclude; /* no #include <filename>*/
- bool generatedCode; /* no code generated*/
- bool mocError; /* moc parsing error occurred*/
- bool hasVariantIncluded; /*whether or not qvariant.h was included yet*/
- QCString className; /* name of parsed class*/
- QCString superClassName; /* name of first super class*/
- QStrList multipleSuperClasses; /* other superclasses*/
- FuncList signals; /* signal interface*/
- FuncList slots; /* slots interface*/
- FuncList propfuncs; /* all possible property access functions*/
- FuncList funcs; /* all parsed functions, including signals*/
- EnumList enums; /* enums used in properties*/
- PropList props; /* list of all properties*/
- ClassInfoList infos; /* list of all class infos*/
-
-/* Used to store the values in the Q_PROPERTY macro*/
- QCString propWrite; /* set function*/
- QCString propRead; /* get function*/
- QCString propReset; /* reset function*/
- QCString propStored; /**/
- QCString propDesignable; /* "true", "false" or function or empty if not specified*/
- QCString propScriptable; /* "true", "false" or function or empty if not specified*/
- bool propOverride; /* Wether OVERRIDE was detected*/
-
- QStrList qtEnums; /* Used to store the contents of Q_ENUMS*/
- QStrList qtSets; /* Used to store the contents of Q_SETS*/
+ // some temporary values
+ QCString tmpExpression; // Used to store the characters the lexer
+ // is currently skipping (see addExpressionChar and friends)
+ QCString fileName; // file name
+ QCString outputFile; // output file name
+ QCString pchFile; // name of PCH file (used on Windows)
+ QStrList includeFiles; // name of #include files
+ QCString includePath; // #include file path
+ QCString qtPath; // #include qt file path
+ int gen_count; //number of classes generated
+ bool noInclude; // no #include <filename>
+ bool generatedCode; // no code generated
+ bool mocError; // moc parsing error occurred
+ bool hasVariantIncluded; //whether or not qvariant.h was included yet
+ QCString className; // name of parsed class
+ QCString superClassName; // name of first super class
+ QStrList multipleSuperClasses; // other superclasses
+ FuncList signals; // signal interface
+ FuncList slots; // slots interface
+ FuncList propfuncs; // all possible property access functions
+ FuncList funcs; // all parsed functions, including signals
+ EnumList enums; // enums used in properties
+ PropList props; // list of all properties
+ ClassInfoList infos; // list of all class infos
+
+// Used to store the values in the Q_PROPERTY macro
+ QCString propWrite; // set function
+ QCString propRead; // get function
+ QCString propReset; // reset function
+ QCString propStored; //
+ QCString propDesignable; // "true", "false" or function or empty if not specified
+ QCString propScriptable; // "true", "false" or function or empty if not specified
+ bool propOverride; // Wether OVERRIDE was detected
+
+ QStrList qtEnums; // Used to store the contents of Q_ENUMS
+ QStrList qtSets; // Used to store the contents of Q_SETS
};
static parser_reg *g = 0;
-ArgList *addArg( Argument * ); /* add arg to tmpArgList*/
+ArgList *addArg( Argument * ); // add arg to tmpArgList
enum Member { SignalMember,
SlotMember,
PropertyCandidateMember
};
-void addMember( Member ); /* add tmpFunc to current class*/
-void addEnum(); /* add tmpEnum to current class*/
+void addMember( Member ); // add tmpFunc to current class
+void addEnum(); // add tmpEnum to current class
-char *stradd( const char *, const char * ); /* add two strings*/
-char *stradd( const char *, const char *, /* add three strings*/
+char *stradd( const char *, const char * ); // add two strings
+char *stradd( const char *, const char *, // add three strings
const char * );
-char *stradd( const char *, const char *, /* adds 4 strings*/
+char *stradd( const char *, const char *, // adds 4 strings
const char *, const char * );
char *straddSpc( const char *, const char * );
@@ -575,35 +636,35 @@ char *straddSpc( const char *, const char *,
extern int yydebug;
bool lexDebug = FALSE;
-int lineNo; /* current line number*/
-bool errorControl = FALSE; /* controled errors*/
+int lineNo; // current line number
+bool errorControl = FALSE; // controled errors
bool displayWarnings = TRUE;
-bool skipClass; /* don't generate for class*/
-bool skipFunc; /* don't generate for func*/
-bool templateClass; /* class is a template*/
-bool templateClassOld; /* previous class is a template*/
-
-ArgList *tmpArgList; /* current argument list*/
-Function *tmpFunc; /* current member function*/
-Enum *tmpEnum; /* current enum*/
-Access tmpAccess; /* current access permission*/
-Access subClassPerm; /* current access permission*/
-
-bool Q_OBJECTdetected; /* TRUE if current class*/
- /* contains the Q_OBJECT macro*/
-bool Q_PROPERTYdetected; /* TRUE if current class*/
- /* contains at least one Q_PROPERTY,*/
- /* Q_OVERRIDE, Q_SETS or Q_ENUMS macro*/
-bool tmpPropOverride; /* current property override setting*/
-
-int tmpYYStart; /* Used to store the lexers current mode*/
-int tmpYYStart2; /* Used to store the lexers current mode*/
- /* (if tmpYYStart is already used)*/
-
-/* if the format revision changes, you MUST change it in qmetaobject.h too*/
-const int formatRevision = 26; /* moc output format revision*/
-
-/* if the flags change, you HAVE to change it in qmetaobject.h too*/
+bool skipClass; // don't generate for class
+bool skipFunc; // don't generate for func
+bool templateClass; // class is a template
+bool templateClassOld; // previous class is a template
+
+ArgList *tmpArgList; // current argument list
+Function *tmpFunc; // current member function
+Enum *tmpEnum; // current enum
+Access tmpAccess; // current access permission
+Access subClassPerm; // current access permission
+
+bool Q_OBJECTdetected; // TRUE if current class
+ // contains the Q_OBJECT macro
+bool Q_PROPERTYdetected; // TRUE if current class
+ // contains at least one Q_PROPERTY,
+ // Q_OVERRIDE, Q_SETS or Q_ENUMS macro
+bool tmpPropOverride; // current property override setting
+
+int tmpYYStart; // Used to store the lexers current mode
+int tmpYYStart2; // Used to store the lexers current mode
+ // (if tmpYYStart is already used)
+
+// if the format revision changes, you MUST change it in qmetaobject.h too
+const int formatRevision = 26; // moc output format revision
+
+// if the flags change, you HAVE to change it in qmetaobject.h too
enum Flags {
Invalid = 0x00000000,
Readable = 0x00000001,
@@ -637,9 +698,159 @@ extern "C" int hack_isatty( int )
# define YYDEBUG 1
# include "moc_yacc.h"
# include "moc_lex.cpp"
-#endif /*YYBISON*/
-#line 689 "moc.y"
-typedef union {
+#endif //YYBISON
+
+
+/* Line 189 of yacc.c */
+#line 706 "moc_yacc"
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ CHAR_VAL = 258,
+ INT_VAL = 259,
+ DOUBLE_VAL = 260,
+ STRING = 261,
+ IDENTIFIER = 262,
+ FRIEND = 263,
+ TYPEDEF = 264,
+ AUTO = 265,
+ REGISTER = 266,
+ STATIC = 267,
+ EXTERN = 268,
+ INLINE = 269,
+ VIRTUAL = 270,
+ CONST = 271,
+ VOLATILE = 272,
+ CHAR = 273,
+ SHORT = 274,
+ INT = 275,
+ LONG = 276,
+ SIGNED = 277,
+ UNSIGNED = 278,
+ FLOAT = 279,
+ DOUBLE = 280,
+ VOID = 281,
+ ENUM = 282,
+ CLASS = 283,
+ STRUCT = 284,
+ UNION = 285,
+ ASM = 286,
+ PRIVATE = 287,
+ PROTECTED = 288,
+ PUBLIC = 289,
+ OPERATOR = 290,
+ DBL_COLON = 291,
+ TRIPLE_DOT = 292,
+ TEMPLATE = 293,
+ NAMESPACE = 294,
+ USING = 295,
+ MUTABLE = 296,
+ THROW = 297,
+ SIGNALS = 298,
+ SLOTS = 299,
+ Q_OBJECT = 300,
+ Q_PROPERTY = 301,
+ Q_OVERRIDE = 302,
+ Q_CLASSINFO = 303,
+ Q_ENUMS = 304,
+ Q_SETS = 305,
+ READ = 306,
+ WRITE = 307,
+ STORED = 308,
+ DESIGNABLE = 309,
+ SCRIPTABLE = 310,
+ RESET = 311
+ };
+#endif
+/* Tokens. */
+#define CHAR_VAL 258
+#define INT_VAL 259
+#define DOUBLE_VAL 260
+#define STRING 261
+#define IDENTIFIER 262
+#define FRIEND 263
+#define TYPEDEF 264
+#define AUTO 265
+#define REGISTER 266
+#define STATIC 267
+#define EXTERN 268
+#define INLINE 269
+#define VIRTUAL 270
+#define CONST 271
+#define VOLATILE 272
+#define CHAR 273
+#define SHORT 274
+#define INT 275
+#define LONG 276
+#define SIGNED 277
+#define UNSIGNED 278
+#define FLOAT 279
+#define DOUBLE 280
+#define VOID 281
+#define ENUM 282
+#define CLASS 283
+#define STRUCT 284
+#define UNION 285
+#define ASM 286
+#define PRIVATE 287
+#define PROTECTED 288
+#define PUBLIC 289
+#define OPERATOR 290
+#define DBL_COLON 291
+#define TRIPLE_DOT 292
+#define TEMPLATE 293
+#define NAMESPACE 294
+#define USING 295
+#define MUTABLE 296
+#define THROW 297
+#define SIGNALS 298
+#define SLOTS 299
+#define Q_OBJECT 300
+#define Q_PROPERTY 301
+#define Q_OVERRIDE 302
+#define Q_CLASSINFO 303
+#define Q_ENUMS 304
+#define Q_SETS 305
+#define READ 306
+#define WRITE 307
+#define STORED 308
+#define DESIGNABLE 309
+#define SCRIPTABLE 310
+#define RESET 311
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 214 of yacc.c */
+#line 692 "moc.y"
+
char char_val;
int int_val;
double double_val;
@@ -648,1003 +859,3579 @@ typedef union {
Function *function;
ArgList *arg_list;
Argument *arg;
+
+
+
+/* Line 214 of yacc.c */
+#line 867 "moc_yacc"
} YYSTYPE;
-#line 653 "y.tab.c"
-#define CHAR_VAL 257
-#define INT_VAL 258
-#define DOUBLE_VAL 259
-#define STRING 260
-#define IDENTIFIER 261
-#define FRIEND 262
-#define TYPEDEF 263
-#define AUTO 264
-#define REGISTER 265
-#define STATIC 266
-#define EXTERN 267
-#define INLINE 268
-#define VIRTUAL 269
-#define CONST 270
-#define VOLATILE 271
-#define CHAR 272
-#define SHORT 273
-#define INT 274
-#define LONG 275
-#define SIGNED 276
-#define UNSIGNED 277
-#define FLOAT 278
-#define DOUBLE 279
-#define VOID 280
-#define ENUM 281
-#define CLASS 282
-#define STRUCT 283
-#define UNION 284
-#define ASM 285
-#define PRIVATE 286
-#define PROTECTED 287
-#define PUBLIC 288
-#define OPERATOR 289
-#define DBL_COLON 290
-#define TRIPLE_DOT 291
-#define TEMPLATE 292
-#define NAMESPACE 293
-#define USING 294
-#define MUTABLE 295
-#define THROW 296
-#define SIGNALS 297
-#define SLOTS 298
-#define Q_OBJECT 299
-#define Q_PROPERTY 300
-#define Q_OVERRIDE 301
-#define Q_CLASSINFO 302
-#define Q_ENUMS 303
-#define Q_SETS 304
-#define READ 305
-#define WRITE 306
-#define STORED 307
-#define DESIGNABLE 308
-#define SCRIPTABLE 309
-#define RESET 310
-#define YYERRCODE 256
-short yylhs[] = { -1,
- 0, 0, 40, 40, 40, 40, 40, 42, 42, 48,
- 50, 46, 51, 52, 47, 49, 43, 45, 44, 44,
- 54, 41, 1, 1, 2, 55, 56, 57, 58, 30,
- 30, 30, 30, 30, 29, 31, 31, 32, 32, 59,
- 59, 59, 59, 34, 34, 33, 33, 11, 11, 11,
- 12, 12, 13, 13, 13, 13, 13, 13, 13, 13,
- 13, 3, 60, 60, 14, 14, 15, 15, 16, 16,
- 17, 17, 17, 19, 19, 21, 21, 25, 25, 61,
- 61, 20, 20, 24, 62, 24, 24, 63, 24, 22,
- 22, 23, 64, 23, 65, 23, 23, 23, 35, 35,
- 66, 35, 35, 39, 67, 10, 10, 73, 10, 74,
- 10, 75, 72, 76, 72, 38, 38, 37, 37, 36,
- 36, 26, 26, 27, 27, 28, 28, 71, 71, 71,
- 78, 77, 81, 53, 53, 53, 53, 53, 53, 18,
- 18, 18, 18, 18, 82, 82, 79, 83, 69, 69,
- 84, 68, 68, 85, 86, 86, 88, 87, 4, 4,
- 80, 80, 89, 89, 91, 91, 93, 90, 94, 90,
- 90, 96, 99, 90, 100, 101, 90, 102, 103, 90,
- 104, 106, 90, 107, 109, 90, 92, 92, 111, 92,
- 92, 98, 98, 112, 112, 113, 95, 95, 115, 115,
- 116, 110, 110, 117, 117, 118, 119, 119, 5, 6,
- 6, 7, 7, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 9, 9, 9, 120, 120, 120, 120,
- 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
- 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
- 120, 120, 120, 120, 120, 120, 120, 120, 120, 120,
- 120, 120, 120, 120, 120, 120, 120, 121, 121, 122,
- 122, 122, 122, 122, 122, 122, 122, 122, 122, 122,
- 122, 114, 114, 114, 114, 114, 114, 114, 114, 126,
- 127, 114, 124, 124, 128, 129, 128, 130, 128, 123,
- 131, 123, 125, 133, 133, 132, 132, 70, 70, 134,
- 134, 134, 135, 136, 135, 138, 97, 137, 137, 137,
- 137, 137, 137, 137, 105, 105, 108, 108,
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 264 of yacc.c */
+#line 879 "moc_yacc"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+ int yyi;
+#endif
+{
+ return yyi;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
};
-short yylen[] = { 2,
- 0, 2, 1, 1, 1, 1, 1, 1, 1, 0,
- 0, 7, 0, 0, 6, 1, 5, 2, 2, 2,
- 0, 3, 1, 1, 4, 0, 0, 0, 0, 1,
- 1, 1, 1, 1, 3, 0, 1, 1, 2, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 4, 0, 1, 2, 2, 1, 2, 3, 1,
- 2, 2, 2, 2, 3, 0, 1, 0, 1, 0,
- 1, 3, 1, 2, 0, 5, 4, 0, 7, 0,
- 1, 2, 0, 4, 0, 5, 1, 3, 1, 2,
- 0, 5, 3, 1, 8, 1, 2, 0, 4, 0,
- 5, 0, 4, 0, 5, 0, 1, 1, 2, 2,
- 2, 0, 1, 1, 2, 1, 1, 1, 1, 3,
- 0, 3, 0, 5, 1, 3, 3, 4, 2, 1,
- 1, 1, 1, 1, 2, 3, 2, 3, 0, 1,
- 4, 0, 1, 2, 1, 3, 0, 5, 0, 1,
- 0, 1, 2, 1, 1, 1, 0, 3, 0, 4,
- 1, 0, 0, 7, 0, 0, 7, 0, 0, 9,
- 0, 0, 7, 0, 0, 7, 2, 3, 0, 3,
- 1, 0, 1, 2, 1, 1, 0, 1, 2, 1,
- 1, 0, 1, 2, 1, 1, 0, 2, 2, 3,
- 1, 4, 4, 1, 3, 2, 3, 2, 1, 3,
- 2, 3, 2, 1, 1, 1, 3, 3, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 3, 3, 2, 2,
- 2, 2, 1, 3, 2, 2, 2, 0, 1, 2,
- 1, 3, 5, 2, 3, 4, 3, 2, 6, 4,
- 5, 3, 4, 6, 4, 4, 5, 3, 3, 0,
- 0, 7, 1, 3, 1, 0, 4, 0, 3, 0,
- 0, 3, 2, 0, 1, 5, 4, 0, 1, 0,
- 1, 3, 1, 0, 4, 0, 4, 0, 3, 3,
- 3, 3, 3, 3, 0, 2, 0, 2,
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 2
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 612
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 79
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 140
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 329
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 492
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 311
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 78, 2, 2, 2, 74, 69, 2,
+ 66, 67, 68, 71, 63, 72, 2, 73, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 70, 60,
+ 61, 59, 62, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 64, 2, 65, 75, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 57, 76, 58, 77, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56
};
-short yydefred[] = { 1,
- 0, 0, 0, 2, 3, 4, 5, 6, 7, 8,
- 9, 0, 0, 0, 19, 20, 18, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 14, 26, 140, 40,
- 41, 42, 43, 44, 45, 46, 47, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 141, 139, 142, 144,
- 143, 0, 70, 24, 0, 22, 65, 66, 133, 0,
- 0, 0, 0, 147, 160, 0, 0, 0, 0, 11,
- 1, 0, 26, 146, 0, 0, 0, 136, 137, 0,
- 0, 224, 225, 226, 0, 219, 211, 0, 214, 0,
- 17, 1, 0, 0, 62, 0, 69, 169, 166, 171,
- 172, 175, 178, 181, 184, 165, 0, 0, 164, 167,
- 138, 0, 221, 0, 216, 0, 0, 223, 218, 0,
- 15, 25, 0, 0, 0, 0, 0, 0, 134, 163,
- 0, 0, 0, 220, 215, 210, 222, 217, 12, 0,
- 0, 0, 0, 0, 0, 191, 0, 0, 189, 168,
- 212, 213, 0, 33, 34, 0, 0, 0, 0, 0,
- 0, 64, 271, 0, 0, 52, 0, 49, 48, 38,
- 0, 31, 32, 30, 0, 170, 201, 0, 200, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 187, 0, 0, 108, 112, 0, 0, 0, 303, 73,
- 0, 0, 0, 263, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 278, 0,
- 0, 0, 0, 0, 0, 0, 270, 0, 118, 0,
- 51, 0, 0, 0, 0, 0, 39, 290, 207, 199,
- 0, 0, 301, 207, 0, 309, 0, 316, 173, 176,
- 0, 326, 182, 328, 185, 188, 206, 0, 205, 190,
- 0, 195, 196, 27, 27, 110, 114, 0, 0, 0,
- 311, 252, 253, 0, 254, 0, 267, 266, 244, 248,
- 259, 242, 261, 243, 0, 262, 245, 246, 247, 249,
- 260, 250, 251, 0, 0, 288, 0, 207, 277, 126,
- 127, 120, 0, 124, 121, 0, 0, 0, 275, 119,
- 148, 72, 0, 71, 0, 0, 272, 0, 0, 0,
- 83, 0, 0, 27, 0, 207, 0, 207, 0, 0,
- 0, 0, 0, 0, 204, 194, 109, 0, 27, 27,
- 0, 314, 0, 0, 257, 258, 264, 227, 228, 207,
- 0, 125, 0, 276, 280, 0, 291, 208, 0, 0,
- 81, 74, 93, 0, 0, 0, 97, 0, 302, 0,
- 0, 0, 298, 0, 99, 0, 293, 0, 0, 0,
- 0, 0, 0, 0, 317, 174, 177, 179, 183, 186,
- 113, 111, 0, 0, 29, 312, 307, 0, 281, 0,
- 273, 0, 0, 75, 82, 27, 0, 104, 85, 0,
- 95, 92, 35, 296, 0, 27, 101, 100, 207, 0,
- 0, 0, 0, 0, 0, 0, 0, 115, 306, 315,
- 279, 207, 0, 0, 153, 0, 98, 28, 0, 27,
- 27, 103, 299, 27, 0, 294, 319, 320, 322, 323,
- 324, 321, 180, 0, 0, 154, 0, 0, 0, 150,
- 94, 86, 88, 0, 297, 0, 157, 0, 0, 0,
- 28, 96, 102, 27, 156, 79, 0, 131, 0, 128,
- 105, 129, 89, 0, 151, 0, 0, 158, 132, 130,
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const yytype_uint16 yyprhs[] =
+{
+ 0, 0, 3, 4, 7, 9, 11, 13, 15, 17,
+ 19, 21, 22, 23, 31, 32, 33, 40, 42, 48,
+ 51, 54, 57, 58, 62, 64, 66, 71, 72, 73,
+ 74, 75, 77, 79, 81, 83, 85, 89, 90, 92,
+ 94, 97, 99, 101, 103, 105, 107, 109, 111, 113,
+ 115, 117, 119, 122, 124, 126, 128, 130, 132, 134,
+ 136, 138, 140, 142, 147, 148, 150, 153, 156, 158,
+ 161, 165, 167, 170, 173, 176, 179, 183, 184, 186,
+ 187, 189, 190, 192, 196, 198, 201, 202, 208, 213,
+ 214, 222, 223, 225, 228, 229, 234, 235, 241, 243,
+ 247, 249, 252, 253, 259, 263, 265, 274, 276, 279,
+ 280, 285, 286, 292, 293, 298, 299, 305, 306, 308,
+ 310, 313, 316, 319, 320, 322, 324, 327, 329, 331,
+ 333, 335, 339, 340, 344, 345, 351, 353, 357, 361,
+ 366, 369, 371, 373, 375, 377, 379, 382, 386, 389,
+ 393, 394, 396, 401, 402, 404, 407, 409, 413, 414,
+ 420, 421, 423, 424, 426, 429, 431, 433, 435, 436,
+ 440, 441, 446, 448, 449, 450, 458, 459, 460, 468,
+ 469, 470, 480, 481, 482, 490, 491, 492, 500, 503,
+ 507, 508, 512, 514, 515, 517, 520, 522, 524, 525,
+ 527, 530, 532, 534, 535, 537, 540, 542, 544, 545,
+ 548, 551, 555, 557, 562, 567, 569, 573, 576, 580,
+ 583, 585, 589, 592, 596, 599, 601, 603, 605, 609,
+ 613, 615, 617, 619, 621, 623, 625, 627, 629, 631,
+ 633, 635, 637, 639, 642, 645, 648, 651, 654, 657,
+ 660, 663, 666, 669, 672, 675, 678, 681, 684, 688,
+ 692, 695, 698, 701, 704, 706, 710, 713, 716, 719,
+ 720, 722, 725, 727, 731, 737, 740, 744, 749, 753,
+ 756, 763, 768, 774, 778, 783, 790, 795, 800, 806,
+ 810, 814, 815, 816, 824, 826, 830, 832, 833, 838,
+ 839, 843, 844, 845, 849, 852, 853, 855, 861, 866,
+ 867, 869, 870, 872, 876, 878, 879, 884, 885, 890,
+ 891, 895, 899, 903, 907, 911, 915, 916, 919, 920
};
-short yydgoto[] = { 93,
- 53, 54, 162, 64, 65, 85, 86, 87, 88, 163,
- 164, 165, 166, 167, 168, 69, 169, 48, 318, 319,
- 320, 365, 366, 321, 477, 302, 303, 304, 322, 170,
- 217, 171, 172, 173, 374, 229, 306, 307, 375, 4,
- 5, 6, 7, 8, 9, 10, 11, 26, 94, 92,
- 14, 71, 21, 12, 72, 337, 462, 430, 174, 22,
- 362, 438, 471, 406, 440, 444, 244, 434, 459, 247,
- 481, 196, 264, 339, 265, 340, 482, 486, 23, 107,
- 76, 24, 175, 460, 435, 456, 457, 474, 108, 109,
- 110, 150, 131, 123, 176, 124, 184, 260, 330, 125,
- 331, 126, 427, 127, 188, 333, 128, 190, 334, 256,
- 193, 261, 262, 263, 178, 179, 258, 259, 316, 219,
- 180, 181, 245, 376, 182, 315, 402, 377, 441, 416,
- 324, 199, 344, 270, 271, 395, 385, 329,
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int16 yyrhs[] =
+{
+ 80, 0, -1, -1, 80, 81, -1, 93, -1, 82,
+ -1, 90, -1, 92, -1, 91, -1, 83, -1, 86,
+ -1, -1, -1, 39, 7, 84, 57, 85, 89, 58,
+ -1, -1, -1, 39, 87, 57, 88, 89, 58, -1,
+ 80, -1, 39, 7, 59, 114, 60, -1, 40, 39,
+ -1, 40, 7, -1, 40, 36, -1, -1, 94, 148,
+ 60, -1, 7, -1, 96, -1, 7, 61, 97, 62,
+ -1, -1, -1, -1, -1, 105, -1, 107, -1, 106,
+ -1, 8, -1, 9, -1, 103, 108, 103, -1, -1,
+ 104, -1, 101, -1, 104, 101, -1, 10, -1, 11,
+ -1, 12, -1, 13, -1, 14, -1, 15, -1, 16,
+ -1, 17, -1, 116, -1, 114, -1, 109, -1, 109,
+ 110, -1, 110, -1, 18, -1, 19, -1, 20, -1,
+ 21, -1, 22, -1, 23, -1, 24, -1, 25, -1,
+ 26, -1, 38, 61, 97, 62, -1, -1, 111, -1,
+ 112, 28, -1, 112, 29, -1, 115, -1, 36, 115,
+ -1, 115, 36, 95, -1, 95, -1, 113, 7, -1,
+ 27, 7, -1, 30, 7, -1, 118, 120, -1, 121,
+ 63, 37, -1, -1, 121, -1, -1, 122, -1, -1,
+ 37, -1, 121, 63, 122, -1, 122, -1, 102, 125,
+ -1, -1, 102, 125, 59, 123, 99, -1, 102, 125,
+ 131, 125, -1, -1, 102, 125, 131, 125, 59, 124,
+ 99, -1, -1, 126, -1, 126, 141, -1, -1, 64,
+ 127, 98, 65, -1, -1, 126, 64, 128, 98, 65,
+ -1, 141, -1, 66, 126, 67, -1, 131, -1, 129,
+ 141, -1, -1, 129, 64, 130, 98, 65, -1, 66,
+ 129, 67, -1, 7, -1, 66, 117, 67, 142, 156,
+ 154, 210, 145, -1, 7, -1, 7, 136, -1, -1,
+ 7, 59, 134, 98, -1, -1, 7, 136, 59, 135,
+ 98, -1, -1, 64, 137, 98, 65, -1, -1, 136,
+ 64, 138, 98, 65, -1, -1, 140, -1, 141, -1,
+ 140, 141, -1, 68, 142, -1, 69, 142, -1, -1,
+ 143, -1, 144, -1, 143, 144, -1, 16, -1, 17,
+ -1, 60, -1, 146, -1, 59, 4, 60, -1, -1,
+ 57, 147, 58, -1, -1, 152, 57, 149, 162, 58,
+ -1, 151, -1, 151, 68, 7, -1, 151, 69, 7,
+ -1, 151, 66, 7, 67, -1, 111, 150, -1, 7,
+ -1, 110, -1, 107, -1, 105, -1, 106, -1, 113,
+ 115, -1, 113, 7, 95, -1, 151, 161, -1, 113,
+ 115, 161, -1, -1, 155, -1, 42, 66, 119, 67,
+ -1, -1, 157, -1, 70, 158, -1, 159, -1, 159,
+ 63, 158, -1, -1, 114, 66, 160, 98, 67, -1,
+ -1, 190, -1, -1, 163, -1, 163, 165, -1, 165,
+ -1, 194, -1, 44, -1, -1, 164, 166, 178, -1,
+ -1, 43, 167, 70, 183, -1, 45, -1, -1, -1,
+ 46, 168, 66, 214, 67, 169, 180, -1, -1, -1,
+ 47, 170, 66, 214, 67, 171, 180, -1, -1, -1,
+ 48, 172, 66, 6, 63, 6, 67, 173, 180, -1,
+ -1, -1, 49, 174, 66, 217, 67, 175, 180, -1,
+ -1, -1, 50, 176, 66, 218, 67, 177, 180, -1,
+ 43, 70, -1, 44, 70, 186, -1, -1, 70, 179,
+ 180, -1, 7, -1, -1, 181, -1, 181, 182, -1,
+ 182, -1, 198, -1, -1, 184, -1, 184, 185, -1,
+ 185, -1, 198, -1, -1, 187, -1, 187, 188, -1,
+ 188, -1, 198, -1, -1, 189, 60, -1, 70, 191,
+ -1, 191, 63, 193, -1, 193, -1, 7, 66, 7,
+ 67, -1, 7, 66, 110, 67, -1, 114, -1, 15,
+ 194, 114, -1, 15, 114, -1, 194, 15, 114, -1,
+ 194, 114, -1, 192, -1, 15, 194, 192, -1, 15,
+ 192, -1, 194, 15, 192, -1, 194, 192, -1, 32,
+ -1, 33, -1, 34, -1, 103, 7, 139, -1, 103,
+ 110, 139, -1, 71, -1, 72, -1, 68, -1, 73,
+ -1, 74, -1, 75, -1, 69, -1, 76, -1, 77,
+ -1, 78, -1, 59, -1, 61, -1, 62, -1, 71,
+ 59, -1, 72, 59, -1, 68, 59, -1, 73, 59,
+ -1, 74, 59, -1, 75, 59, -1, 69, 59, -1,
+ 76, 59, -1, 77, 59, -1, 78, 59, -1, 59,
+ 59, -1, 61, 59, -1, 62, 59, -1, 61, 61,
+ -1, 62, 62, -1, 61, 61, 59, -1, 62, 62,
+ 59, -1, 69, 69, -1, 76, 76, -1, 71, 71,
+ -1, 72, 72, -1, 63, -1, 72, 62, 68, -1,
+ 72, 62, -1, 66, 67, -1, 64, 65, -1, -1,
+ 15, -1, 108, 133, -1, 133, -1, 196, 77, 133,
+ -1, 104, 108, 103, 139, 133, -1, 104, 108, -1,
+ 108, 140, 133, -1, 108, 104, 139, 133, -1, 108,
+ 35, 195, -1, 35, 195, -1, 104, 108, 103, 139,
+ 35, 195, -1, 108, 140, 35, 195, -1, 108, 104,
+ 139, 35, 195, -1, 197, 132, 189, -1, 197, 205,
+ 60, 189, -1, 197, 205, 63, 201, 60, 189, -1,
+ 207, 210, 60, 189, -1, 40, 114, 60, 189, -1,
+ 40, 39, 114, 60, 189, -1, 39, 7, 57, -1,
+ 153, 60, 189, -1, -1, -1, 153, 57, 199, 58,
+ 200, 60, 189, -1, 202, -1, 201, 63, 202, -1,
+ 129, -1, -1, 7, 70, 203, 98, -1, -1, 70,
+ 204, 98, -1, -1, -1, 70, 206, 98, -1, 27,
+ 209, -1, -1, 63, -1, 7, 57, 211, 208, 58,
+ -1, 57, 211, 208, 58, -1, -1, 7, -1, -1,
+ 212, -1, 211, 63, 212, -1, 7, -1, -1, 7,
+ 59, 213, 100, -1, -1, 7, 7, 215, 216, -1,
+ -1, 51, 7, 216, -1, 52, 7, 216, -1, 56,
+ 7, 216, -1, 53, 7, 216, -1, 54, 7, 216,
+ -1, 55, 7, 216, -1, -1, 7, 217, -1, -1,
+ 7, 218, -1
};
-short yysindex[] = { 0,
- 70, -206, -111, 0, 0, 0, 0, 0, 0, 0,
- 0, -220, 41, 10, 0, 0, 0, 67, 912, -96,
- 152, 124, 91, 559, -81, 98, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 11, 0, 0, -54, 0, 0, 0, 0, -14,
- -3, 59, 354, 0, 0, 201, 61, 233, -54, 0,
- 0, 266, 0, 0, 61, 1186, 329, 0, 0, 206,
- 245, 0, 0, 0, 328, 0, 0, -83, 0, -54,
- 0, 0, 70, 287, 0, 348, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 295, 1186, 0, 0,
- 0, 438, 0, -66, 0, 354, -66, 0, 0, 303,
- 0, 0, 384, 406, 411, 457, 468, 480, 0, 0,
- -42, 434, 481, 0, 0, 0, 0, 0, 0, 1064,
- 265, 265, 291, 292, 306, 0, 506, 515, 0, 0,
- 0, 0, 353, 0, 0, 0, -71, 315, 467, 337,
- -48, 0, 0, 276, 1230, 0, 374, 0, 0, 0,
- 1098, 0, 0, 0, -26, 0, 0, 1064, 0, 436,
- 119, 375, 377, 568, 575, 545, 292, 604, 306, 607,
- 0, 1064, 1064, 0, 0, -30, 520, 389, 0, 0,
- 596, 393, 394, 0, 570, 624, 600, 177, 355, 379,
- 605, 606, 609, 22, 612, 613, 986, 1229, 0, 572,
- -81, 635, 13, 467, 349, 349, 0, 363, 0, -36,
- 0, 201, -53, 440, 1229, 441, 0, 0, 0, 0,
- 443, 1229, 0, 0, 204, 0, 649, 0, 0, 0,
- 463, 0, 0, 0, 0, 0, 0, 1064, 0, 0,
- 1064, 0, 0, 0, 0, 0, 0, 389, 664, 665,
- 0, 0, 0, 702, 0, 708, 0, 0, 0, 0,
- 0, 0, 0, 0, 626, 0, 0, 0, 0, 0,
- 0, 0, 0, 285, 285, 0, 667, 0, 0, 0,
- 0, 0, 349, 0, 0, 285, -201, 467, 0, 0,
- 0, 0, 285, 0, 599, 724, 0, 743, 742, 494,
- 0, 277, 1119, 0, 724, 0, -21, 0, 764, 1064,
- 1064, 746, 1064, 1064, 0, 0, 0, 719, 0, 0,
- 665, 0, 389, 693, 0, 0, 0, 0, 0, 0,
- 724, 0, 467, 0, 0, -38, 0, 0, 349, 784,
- 0, 0, 0, 277, -22, 178, 0, 1229, 0, 724,
- 798, 29, 0, 407, 0, 458, 0, 724, 601, 617,
- 622, 625, 646, 647, 0, 0, 0, 0, 0, 0,
- 0, 0, 786, 762, 0, 0, 0, 724, 0, 467,
- 0, 874, 881, 0, 0, 0, 65, 0, 0, 277,
- 0, 0, 0, 0, 385, 0, 0, 0, 0, -21,
- 764, 764, 764, 764, 764, 764, 1064, 0, 0, 0,
- 0, 0, -81, 657, 0, 861, 0, 0, 894, 0,
- 0, 0, 0, 0, 724, 0, 0, 0, 0, 0,
- 0, 0, 0, 724, 916, 0, 913, 948, 375, 0,
- 0, 0, 0, 889, 0, 933, 0, -81, 1229, 26,
- 0, 0, 0, 0, 0, 0, 991, 0, 799, 0,
- 0, 0, 0, 1015, 0, 936, 1004, 0, 0, 0,
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 807, 807, 808, 811, 813, 814, 815, 816, 819,
+ 820, 824, 825, 823, 832, 833, 832, 840, 843, 848,
+ 851, 852, 855, 855, 864, 865, 868, 880, 893, 902,
+ 905, 911, 912, 913, 914, 915, 918, 921, 922, 925,
+ 926, 929, 930, 931, 932, 935, 936, 939, 940, 943,
+ 944, 945, 948, 950, 953, 954, 955, 956, 957, 958,
+ 959, 960, 961, 964, 970, 971, 977, 978, 981, 982,
+ 986, 988, 992, 993, 994, 999, 1000, 1006, 1007, 1010,
+ 1011, 1014, 1015, 1021, 1024, 1027, 1030, 1029, 1033, 1038,
+ 1036, 1044, 1045, 1048, 1050, 1050, 1055, 1055, 1060, 1061,
+ 1064, 1065, 1067, 1067, 1072, 1075, 1078, 1090, 1091, 1093,
+ 1093, 1096, 1096, 1102, 1102, 1104, 1104, 1109, 1110, 1113,
+ 1114, 1117, 1118, 1125, 1126, 1129, 1130, 1134, 1135, 1138,
+ 1139, 1140, 1143, 1143, 1151, 1150, 1156, 1158, 1160, 1162,
+ 1166, 1170, 1171, 1172, 1173, 1174, 1178, 1183, 1191, 1195,
+ 1200, 1201, 1205, 1208, 1209, 1212, 1215, 1216, 1220, 1220,
+ 1225, 1226, 1229, 1230, 1233, 1234, 1238, 1239, 1243, 1243,
+ 1245, 1245, 1247, 1255, 1258, 1255, 1262, 1265, 1262, 1269,
+ 1271, 1269, 1276, 1277, 1276, 1282, 1283, 1282, 1290, 1292,
+ 1293, 1293, 1303, 1310, 1311, 1314, 1315, 1318, 1321, 1322,
+ 1325, 1326, 1330, 1333, 1334, 1337, 1338, 1341, 1344, 1345,
+ 1348, 1351, 1352, 1355, 1357, 1361, 1362, 1363, 1364, 1365,
+ 1366, 1367, 1368, 1369, 1370, 1373, 1374, 1375, 1378, 1379,
+ 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389,
+ 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399,
+ 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409,
+ 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1422,
+ 1423, 1426, 1429, 1436, 1443, 1451, 1453, 1457, 1462, 1464,
+ 1466, 1469, 1471, 1477, 1478, 1480, 1483, 1485, 1487, 1489,
+ 1492, 1495, 1498, 1494, 1503, 1504, 1507, 1508, 1508, 1510,
+ 1510, 1514, 1515, 1515, 1520, 1525, 1526, 1529, 1536, 1540,
+ 1541, 1544, 1545, 1546, 1549, 1550, 1550, 1555, 1554, 1591,
+ 1592, 1593, 1594, 1595, 1596, 1597, 1600, 1601, 1604, 1605
};
-short yyrindex[] = { 0,
- 330, 941, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 199, 943, 0, 0, 0, 0, 0, 373, 0,
- 0, 0, 0, 5, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 76, 0, 0, 327, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 40, 0, 0, 71, 0,
- 0, 0, 0, 0, 0, 940, 0, 0, 0, 31,
- 0, 0, 0, 0, 78, 0, 0, 0, 0, 82,
- 0, 0, -90, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 953, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 594,
- 0, 0, 0, 1062, 1068, 0, 0, 0, 0, 0,
- 0, 0, 113, 0, 0, 1032, 0, 0, 1140, 0,
- 0, 0, 0, 0, 126, 0, 0, 0, 0, 0,
- 199, 0, 0, 0, 0, 0, 0, 602, 0, 0,
- 504, 1065, 0, 0, 0, 0, 1062, 0, 1068, 0,
- 0, 911, 934, 0, 0, 516, 316, 33, 0, 0,
- 548, 618, 620, 0, 0, 0, 663, 1018, 1160, 1209,
- 1364, 1366, 1386, 1388, 1391, 1393, 0, 4, 0, 0,
- 0, 0, 1396, 1140, -18, -18, 0, 37, 0, 0,
- 0, 168, 80, 0, 191, 0, 0, 0, 0, 0,
- 0, 187, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 942, 0, 0,
- 988, 0, 0, 0, 0, 0, 0, 33, 49, 998,
- 0, 0, 0, 1398, 0, 1418, 0, 0, 0, 0,
- 0, 0, 0, 0, 1420, 0, 0, 0, 0, 0,
- 0, 0, 0, 1423, 1423, 0, 0, 0, 0, 0,
- 0, 0, -29, 0, 0, 360, 0, 1140, 0, 0,
- 0, 0, 37, 0, 0, 478, 0, 0, -37, 1084,
- 0, -27, 199, 0, 527, 0, 0, 0, 1085, 934,
- 934, 0, 934, 934, 0, 0, 0, 0, 0, 0,
- 998, 0, 1002, 0, 0, 0, 0, 0, 0, 0,
- 571, 0, 1140, 0, 0, 0, 0, 0, 298, 408,
- 0, 0, 0, 0, -23, 64, 0, 9, 0, 648,
- 477, 0, 0, 510, 0, 0, 0, 697, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 741, 0, 1140,
- 0, 0, 238, 0, 0, 0, 0, 0, 0, -34,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1085, 1085, 1085, 1085, 1085, 1085, 934, 0, 0, 0,
- 0, 0, 0, -2, 0, 0, 0, 0, -16, 0,
- 0, 0, 0, 0, 818, 0, 0, 0, 0, 0,
- 0, 0, 0, 867, 0, 0, 350, 0, 58, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 211, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "CHAR_VAL", "INT_VAL", "DOUBLE_VAL",
+ "STRING", "IDENTIFIER", "FRIEND", "TYPEDEF", "AUTO", "REGISTER",
+ "STATIC", "EXTERN", "INLINE", "VIRTUAL", "CONST", "VOLATILE", "CHAR",
+ "SHORT", "INT", "LONG", "SIGNED", "UNSIGNED", "FLOAT", "DOUBLE", "VOID",
+ "ENUM", "CLASS", "STRUCT", "UNION", "ASM", "PRIVATE", "PROTECTED",
+ "PUBLIC", "OPERATOR", "DBL_COLON", "TRIPLE_DOT", "TEMPLATE", "NAMESPACE",
+ "USING", "MUTABLE", "THROW", "SIGNALS", "SLOTS", "Q_OBJECT",
+ "Q_PROPERTY", "Q_OVERRIDE", "Q_CLASSINFO", "Q_ENUMS", "Q_SETS", "READ",
+ "WRITE", "STORED", "DESIGNABLE", "SCRIPTABLE", "RESET", "'{'", "'}'",
+ "'='", "';'", "'<'", "'>'", "','", "'['", "']'", "'('", "')'", "'*'",
+ "'&'", "':'", "'+'", "'-'", "'/'", "'%'", "'^'", "'|'", "'~'", "'!'",
+ "$accept", "declaration_seq", "declaration", "namespace_def",
+ "named_namespace_def", "$@1", "$@2", "unnamed_namespace_def", "$@3",
+ "$@4", "namespace_body", "namespace_alias_def", "using_directive",
+ "using_declaration", "class_def", "$@5", "class_name",
+ "template_class_name", "template_args", "const_expression",
+ "def_argument", "enumerator_expression", "decl_specifier",
+ "decl_specifiers", "decl_specs_opt", "decl_specs",
+ "storage_class_specifier", "fct_specifier", "type_specifier",
+ "type_name", "simple_type_names", "simple_type_name", "template_spec",
+ "opt_template_spec", "class_key", "complete_class_name",
+ "qualified_class_name", "elaborated_type_specifier",
+ "argument_declaration_list", "arg_declaration_list_opt",
+ "opt_exception_argument", "triple_dot_opt", "arg_declaration_list",
+ "argument_declaration", "$@6", "$@7", "abstract_decl_opt",
+ "abstract_decl", "$@8", "$@9", "declarator", "$@10", "dname", "fct_decl",
+ "fct_name", "$@11", "$@12", "array_decls", "$@13", "$@14",
+ "ptr_operators_opt", "ptr_operators", "ptr_operator",
+ "cv_qualifier_list_opt", "cv_qualifier_list", "cv_qualifier",
+ "fct_body_or_semicolon", "fct_body", "$@15", "class_specifier", "$@16",
+ "whatever", "class_head", "full_class_head", "nested_class_head",
+ "exception_spec_opt", "exception_spec", "ctor_initializer_opt",
+ "ctor_initializer", "mem_initializer_list", "mem_initializer", "$@17",
+ "opt_base_spec", "opt_obj_member_list", "obj_member_list",
+ "qt_access_specifier", "obj_member_area", "$@18", "$@19", "$@20", "$@21",
+ "$@22", "$@23", "$@24", "$@25", "$@26", "$@27", "$@28", "$@29",
+ "slot_area", "$@30", "opt_property_candidates",
+ "property_candidate_declarations", "property_candidate_declaration",
+ "opt_signal_declarations", "signal_declarations", "signal_declaration",
+ "opt_slot_declarations", "slot_declarations", "slot_declaration",
+ "opt_semicolons", "base_spec", "base_list", "qt_macro_name",
+ "base_specifier", "access_specifier", "operator_name", "opt_virtual",
+ "type_and_name", "signal_or_slot", "$@31", "$@32",
+ "member_declarator_list", "member_declarator", "$@33", "$@34",
+ "opt_bitfield", "$@35", "enum_specifier", "opt_komma", "enum_tail",
+ "opt_identifier", "enum_list", "enumerator", "$@36", "property", "$@37",
+ "prop_statements", "qt_enums", "qt_sets", 0
};
-short yygindex[] = { 1152,
- 347, 0, 1150, 930, 0, 0, 435, 1056, 449, 283,
- -135, 0, 57, -11, -25, 122, 0, 0, 0, 0,
- 0, 765, 810, -294, 0, -159, 0, 892, 0, -10,
- -44, -156, 1177, 1182, 830, 244, 1039, 301, 840, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 1114, 0,
- 0, 0, 0, 0, 1134, 231, 752, 0, 1207, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 768,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 780, 0, 0, 0, 1142,
- 0, 0, 0, 0, 0, 0, 1109, -186, 0, 0,
- 0, 0, 0, 0, 1067, 0, 0, 1063, 0, 0,
- 0, 0, 994, -82, 0, 1078, 0, 999, 274, -170,
- 0, 0, 0, 0, 0, 0, 0, 849, 0, 0,
- 0, 0, 931, 1005, 974, 0, 856, 0,
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
+ 305, 306, 307, 308, 309, 310, 311, 123, 125, 61,
+ 59, 60, 62, 44, 91, 93, 40, 41, 42, 38,
+ 58, 43, 45, 47, 37, 94, 124, 126, 33
};
-#define YYTABLESIZE 1510
-short yytable[] = { 68,
- 20, 226, 218, 77, 63, 225, 90, 228, 123, 90,
- 123, 123, 123, 90, 123, 149, 90, 84, 372, 122,
- 84, 122, 122, 122, 87, 122, 90, 87, 123, 123,
- 266, 123, 239, 90, 16, 235, 373, 89, 409, 122,
- 122, 37, 122, 37, 37, 37, 36, 37, 36, 36,
- 36, 198, 36, 299, 13, 115, 149, 177, 149, 223,
- 267, 123, 119, 135, 37, 405, 305, 218, 372, 36,
- 73, 18, 122, 194, 23, 47, 310, 23, 218, 23,
- 23, 23, 290, 23, 480, 218, 479, 353, 135, 23,
- 89, 138, 313, 123, 37, 177, 238, 23, 23, 36,
- 23, 25, 226, 195, 91, 437, 225, 91, 67, 257,
- 67, 67, 67, 23, 67, 23, 308, 23, 308, 68,
- 149, 68, 68, 68, 91, 68, 28, 159, 67, 67,
- 23, 67, 27, 23, 23, 222, 209, 355, 159, 68,
- 68, 55, 68, 386, 387, 291, 389, 390, 478, 15,
- 23, 218, 106, 23, 23, 411, 106, 310, 242, 236,
- 237, 67, 23, 50, 52, 50, 50, 50, 133, 50,
- 106, 106, 68, 313, 476, 257, 243, 80, 16, 66,
- 308, 17, 399, 50, 50, 117, 50, 368, 90, 197,
- 313, 21, 21, 67, 80, 297, 218, 323, 23, 403,
- 209, 21, 159, 218, 68, 71, 67, 237, 67, 71,
- 56, 218, 66, 59, 281, 226, 50, 237, 146, 225,
- 70, 231, 223, 67, 223, 23, 23, 76, 36, 431,
- 274, 123, 36, 90, 274, 75, 75, 280, 408, 371,
- 453, 67, 122, 218, 221, 112, 77, 327, 274, 274,
- 400, 78, 308, 77, 147, 148, 90, 78, 149, 123,
- 73, 123, 326, 90, 37, 73, 123, 84, 411, 36,
- 122, 66, 122, 295, 87, 37, 37, 37, 37, 37,
- 37, 37, 37, 37, 37, 37, 37, 37, 233, 408,
- 23, 91, 37, 37, 37, 37, 152, 116, 152, 36,
- 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
- 23, 236, 218, 226, 226, 323, 364, 225, 225, 79,
- 23, 66, 226, 413, 91, 116, 225, 95, 23, 23,
- 23, 67, 67, 67, 67, 67, 67, 67, 67, 67,
- 67, 67, 68, 68, 68, 68, 68, 68, 68, 68,
- 68, 68, 68, 72, 91, 122, 122, 72, 122, 67,
- 152, 67, 2, 3, 145, 23, 145, 363, 145, 111,
- 68, 116, 68, 23, 23, 23, 23, 23, 23, 23,
- 23, 23, 23, 23, 145, 145, 50, 50, 50, 50,
- 50, 50, 50, 50, 50, 50, 50, 283, 74, 117,
- 226, 23, 23, 117, 225, 57, 58, 455, 155, 122,
- 155, 121, 73, 194, 50, 282, 50, 117, 117, 129,
- 122, 97, 226, 286, 323, 442, 225, 139, 71, 71,
- 71, 71, 71, 71, 71, 71, 71, 71, 71, 284,
- 285, 140, 455, 195, 226, 141, 227, 36, 225, 145,
- 142, 36, 274, 273, 275, 276, 71, 23, 36, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 155, 310, 151, 417, 36, 76, 36, 36,
- 63, 63, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 36, 36, 36, 338, 143, 417, 152, 216,
- 36, 420, 36, 212, 208, 80, 206, 144, 207, 209,
- 204, 210, 309, 211, 104, 113, 419, 325, 104, 145,
- 104, 152, 118, 317, 106, 183, 202, 201, 203, 114,
- 82, 83, 84, 152, 67, 104, 223, 154, 155, 30,
- 31, 32, 33, 34, 35, 36, 37, 300, 134, 310,
- 186, 137, 187, 295, 369, 107, 106, 205, 122, 107,
- 213, 241, 300, 191, 224, 367, 189, 104, 295, 392,
- 393, 351, 192, 107, 107, 200, 72, 72, 72, 72,
- 72, 72, 72, 72, 72, 72, 72, 239, 251, 354,
- 214, 239, 215, 122, 348, 349, 62, 220, 60, 370,
- 61, 378, 289, 289, 72, 239, 239, 367, 249, 412,
- 155, 21, 21, 356, 80, 250, 63, 418, 300, 301,
- 117, 21, 81, 398, 154, 155, 30, 31, 32, 33,
- 34, 35, 36, 37, 232, 246, 436, 248, 401, 82,
- 83, 84, 268, 67, 253, 155, 443, 255, 117, 269,
- 412, 282, 282, 367, 64, 64, 272, 240, 418, 241,
- 279, 240, 277, 241, 278, 287, 288, 347, 36, 289,
- 464, 465, 292, 293, 466, 240, 240, 241, 241, 36,
- 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 36, 36, 445, 298, 296, 286, 286, 36, 132, 36,
- 312, 314, 231, 223, 484, 454, 231, 328, 343, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 197, 268,
- 231, 231, 332, 357, 342, 350, 198, 268, 154, 155,
- 30, 31, 32, 33, 34, 35, 36, 37, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 289, 289, 289, 289, 289, 289, 289, 289,
- 289, 289, 345, 289, 289, 289, 289, 289, 346, 289,
- 289, 289, 283, 283, 289, 289, 289, 289, 289, 289,
- 289, 289, 358, 359, 361, 360, 388, 282, 282, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 282, 282, 282, 282, 282, 282, 282, 282, 282, 282,
- 282, 391, 282, 282, 282, 282, 282, 397, 282, 282,
- 282, 285, 285, 282, 282, 282, 282, 282, 282, 282,
- 282, 286, 286, 286, 286, 286, 286, 286, 286, 286,
- 286, 286, 286, 286, 286, 286, 286, 286, 286, 286,
- 286, 286, 286, 286, 286, 414, 286, 286, 286, 286,
- 286, 421, 286, 286, 286, 287, 287, 286, 286, 286,
- 286, 286, 286, 286, 286, 63, 63, 422, 428, 197,
- 197, 197, 423, 63, 63, 424, 429, 198, 198, 198,
- 197, 197, 197, 197, 197, 197, 197, 197, 198, 198,
- 198, 198, 198, 198, 198, 198, 425, 426, 283, 283,
- 283, 283, 283, 283, 283, 283, 283, 283, 283, 283,
- 283, 283, 283, 283, 283, 283, 283, 283, 283, 283,
- 283, 283, 432, 283, 283, 283, 283, 283, 433, 283,
- 283, 283, 284, 284, 283, 283, 283, 283, 283, 283,
- 283, 283, 458, 461, 463, 467, 468, 285, 285, 285,
- 285, 285, 285, 285, 285, 285, 285, 285, 285, 285,
- 285, 285, 285, 285, 285, 285, 285, 285, 285, 285,
- 285, 472, 285, 285, 285, 285, 285, 469, 285, 285,
- 285, 292, 292, 285, 285, 285, 285, 285, 285, 285,
- 285, 287, 287, 287, 287, 287, 287, 287, 287, 287,
- 287, 287, 287, 287, 287, 287, 287, 287, 287, 287,
- 287, 287, 287, 287, 287, 473, 287, 287, 287, 287,
- 287, 485, 287, 287, 287, 202, 268, 287, 287, 287,
- 287, 287, 287, 287, 287, 154, 155, 30, 31, 32,
- 33, 34, 35, 36, 37, 488, 487, 235, 192, 268,
- 489, 235, 490, 13, 161, 10, 203, 268, 379, 380,
- 381, 382, 383, 384, 404, 235, 235, 162, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 284, 284, 284, 284, 284, 284, 284, 284,
- 284, 284, 325, 284, 284, 284, 284, 284, 327, 284,
- 284, 284, 193, 268, 284, 284, 284, 284, 284, 284,
- 284, 284, 304, 308, 80, 318, 305, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 292, 292, 292, 292, 292, 292, 292, 292, 292,
- 292, 1, 292, 292, 292, 292, 292, 269, 292, 292,
- 292, 19, 311, 292, 292, 292, 292, 292, 292, 292,
- 292, 136, 29, 407, 439, 30, 31, 32, 33, 34,
- 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 63, 63, 352, 49, 202, 202, 202, 229,
- 50, 415, 230, 229, 410, 120, 96, 202, 202, 202,
- 202, 202, 202, 202, 202, 63, 63, 229, 229, 192,
- 192, 192, 483, 63, 63, 51, 470, 203, 203, 203,
- 192, 192, 192, 192, 192, 192, 192, 192, 203, 203,
- 203, 203, 203, 203, 203, 203, 294, 475, 230, 130,
- 185, 254, 230, 252, 336, 240, 335, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 230, 230, 446, 63,
- 63, 394, 341, 193, 193, 193, 447, 448, 449, 450,
- 451, 452, 0, 0, 193, 193, 193, 193, 193, 193,
- 193, 193, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
- 45, 45, 45, 45, 45, 45, 396, 0, 0, 0,
- 0, 45, 0, 45, 153, 154, 155, 30, 31, 32,
- 33, 34, 156, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 157, 0, 0, 158, 0, 0,
- 0, 0, 159, 67, 0, 18, 160, 161, 66, 154,
- 155, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 43, 44, 45, 46, 234, 66,
- 0, 158, 0, 0, 0, 0, 0, 67, 0, 18,
- 38, 39, 40, 41, 42, 43, 44, 45, 46, 234,
- 36, 0, 158, 232, 0, 233, 0, 232, 67, 233,
- 18, 36, 36, 36, 36, 36, 36, 36, 36, 36,
- 0, 232, 232, 233, 233, 234, 0, 236, 0, 234,
- 237, 236, 238, 0, 237, 106, 238, 255, 0, 106,
- 0, 255, 0, 234, 234, 236, 236, 0, 237, 237,
- 238, 238, 0, 106, 106, 255, 255, 256, 0, 265,
- 0, 256, 116, 265, 0, 0, 116, 0, 0, 0,
- 0, 82, 83, 84, 0, 256, 256, 265, 265, 0,
- 116, 116, 98, 99, 100, 101, 102, 103, 104, 105,
- 154, 155, 30, 31, 32, 33, 34, 35, 36, 37,
- 0, 38, 39, 40, 41, 42, 43, 44, 45, 46,
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 79, 80, 80, 81, 81, 81, 81, 81, 82,
+ 82, 84, 85, 83, 87, 88, 86, 89, 90, 91,
+ 92, 92, 94, 93, 95, 95, 96, 97, 98, 99,
+ 100, 101, 101, 101, 101, 101, 102, 103, 103, 104,
+ 104, 105, 105, 105, 105, 106, 106, 107, 107, 108,
+ 108, 108, 109, 109, 110, 110, 110, 110, 110, 110,
+ 110, 110, 110, 111, 112, 112, 113, 113, 114, 114,
+ 115, 115, 116, 116, 116, 117, 117, 118, 118, 119,
+ 119, 120, 120, 121, 121, 122, 123, 122, 122, 124,
+ 122, 125, 125, 126, 127, 126, 128, 126, 126, 126,
+ 129, 129, 130, 129, 129, 131, 132, 133, 133, 134,
+ 133, 135, 133, 137, 136, 138, 136, 139, 139, 140,
+ 140, 141, 141, 142, 142, 143, 143, 144, 144, 145,
+ 145, 145, 147, 146, 149, 148, 148, 148, 148, 148,
+ 148, 150, 150, 150, 150, 150, 151, 151, 152, 153,
+ 154, 154, 155, 156, 156, 157, 158, 158, 160, 159,
+ 161, 161, 162, 162, 163, 163, 164, 164, 166, 165,
+ 167, 165, 165, 168, 169, 165, 170, 171, 165, 172,
+ 173, 165, 174, 175, 165, 176, 177, 165, 178, 178,
+ 179, 178, 178, 180, 180, 181, 181, 182, 183, 183,
+ 184, 184, 185, 186, 186, 187, 187, 188, 189, 189,
+ 190, 191, 191, 192, 192, 193, 193, 193, 193, 193,
+ 193, 193, 193, 193, 193, 194, 194, 194, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 195,
+ 195, 195, 195, 195, 195, 195, 195, 195, 195, 196,
+ 196, 197, 197, 197, 197, 197, 197, 197, 197, 197,
+ 197, 197, 197, 198, 198, 198, 198, 198, 198, 198,
+ 198, 199, 200, 198, 201, 201, 202, 203, 202, 204,
+ 202, 205, 206, 205, 207, 208, 208, 209, 209, 210,
+ 210, 211, 211, 211, 212, 213, 212, 215, 214, 216,
+ 216, 216, 216, 216, 216, 216, 217, 217, 218, 218
};
-short yycheck[] = { 25,
- 12, 38, 159, 41, 58, 42, 41, 164, 38, 44,
- 40, 41, 42, 41, 44, 58, 44, 41, 40, 38,
- 44, 40, 41, 42, 41, 44, 61, 44, 58, 59,
- 61, 61, 59, 61, 125, 171, 58, 63, 61, 58,
- 59, 38, 61, 40, 41, 42, 38, 44, 40, 41,
- 42, 123, 44, 224, 261, 81, 59, 140, 61, 261,
- 91, 91, 88, 59, 61, 360, 226, 224, 40, 61,
- 60, 292, 91, 61, 44, 19, 44, 38, 235, 40,
- 41, 42, 61, 44, 59, 242, 61, 289, 114, 59,
- 116, 117, 44, 123, 91, 178, 123, 58, 59, 91,
- 61, 61, 38, 91, 41, 41, 42, 44, 38, 192,
- 40, 41, 42, 38, 44, 40, 59, 42, 61, 38,
- 123, 40, 41, 42, 61, 44, 60, 123, 58, 59,
- 91, 61, 123, 58, 59, 161, 59, 308, 59, 58,
- 59, 20, 61, 330, 331, 124, 333, 334, 123, 261,
- 38, 308, 40, 123, 42, 91, 44, 125, 40, 171,
- 171, 91, 123, 38, 261, 40, 41, 42, 112, 44,
- 58, 59, 91, 125, 469, 258, 58, 261, 290, 261,
- 123, 293, 353, 58, 59, 269, 61, 323, 67, 261,
- 235, 282, 283, 123, 261, 221, 353, 242, 123, 359,
- 123, 292, 123, 360, 123, 38, 290, 218, 290, 42,
- 59, 368, 261, 123, 38, 38, 91, 228, 261, 42,
- 123, 165, 261, 290, 261, 58, 59, 41, 38, 400,
- 40, 261, 42, 261, 44, 290, 290, 61, 261, 261,
- 427, 290, 261, 400, 293, 40, 261, 44, 58, 59,
- 289, 41, 289, 291, 297, 298, 291, 261, 261, 289,
- 60, 291, 59, 291, 261, 60, 296, 291, 91, 261,
- 289, 261, 291, 217, 291, 272, 273, 274, 275, 276,
- 277, 278, 279, 280, 281, 282, 283, 284, 167, 261,
- 123, 59, 289, 290, 291, 292, 59, 261, 61, 291,
- 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
- 271, 323, 469, 38, 38, 360, 40, 42, 42, 261,
- 290, 261, 38, 368, 261, 289, 42, 62, 289, 290,
- 291, 261, 262, 263, 264, 265, 266, 267, 268, 269,
- 270, 271, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 38, 291, 58, 59, 42, 61, 289,
- 123, 291, 293, 294, 38, 290, 40, 91, 42, 41,
- 289, 44, 291, 261, 262, 263, 264, 265, 266, 267,
- 268, 269, 270, 271, 58, 59, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 43, 52, 40,
- 38, 289, 290, 44, 42, 282, 283, 433, 59, 62,
- 61, 125, 60, 61, 289, 61, 291, 58, 59, 125,
- 123, 75, 38, 45, 469, 41, 42, 125, 261, 262,
- 263, 264, 265, 266, 267, 268, 269, 270, 271, 61,
- 62, 58, 468, 91, 38, 40, 164, 261, 42, 123,
- 40, 261, 60, 61, 61, 62, 289, 290, 272, 273,
- 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 261, 123, 230, 41, 91, 290, 291, 292, 289,
- 282, 283, 272, 273, 274, 275, 276, 277, 278, 279,
- 280, 281, 282, 283, 284, 265, 40, 91, 261, 33,
- 290, 44, 292, 37, 38, 261, 40, 40, 42, 43,
- 44, 45, 230, 47, 38, 81, 59, 244, 42, 40,
- 44, 41, 88, 241, 76, 261, 60, 61, 62, 81,
- 286, 287, 288, 296, 290, 59, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 44, 114, 306,
- 260, 117, 261, 44, 324, 40, 108, 91, 261, 44,
- 94, 126, 59, 58, 289, 322, 261, 91, 59, 339,
- 340, 298, 58, 58, 59, 261, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 40, 44, 307,
- 124, 44, 126, 296, 294, 295, 38, 261, 40, 326,
- 42, 328, 125, 126, 289, 58, 59, 364, 41, 366,
- 261, 282, 283, 313, 261, 41, 58, 374, 270, 271,
- 261, 292, 269, 350, 262, 263, 264, 265, 266, 267,
- 268, 269, 270, 271, 261, 261, 406, 261, 356, 286,
- 287, 288, 123, 290, 41, 296, 416, 41, 289, 261,
- 407, 125, 126, 410, 282, 283, 61, 40, 415, 40,
- 61, 44, 93, 44, 41, 61, 61, 42, 261, 61,
- 440, 441, 61, 61, 444, 58, 59, 58, 59, 272,
- 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
- 283, 284, 419, 59, 123, 125, 126, 290, 261, 292,
- 261, 261, 40, 261, 474, 432, 44, 59, 44, 272,
- 273, 274, 275, 276, 277, 278, 279, 280, 125, 126,
- 58, 59, 260, 125, 61, 59, 125, 126, 262, 263,
- 264, 265, 266, 267, 268, 269, 270, 271, 261, 262,
- 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
- 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
- 283, 284, 61, 286, 287, 288, 289, 290, 61, 292,
- 293, 294, 125, 126, 297, 298, 299, 300, 301, 302,
- 303, 304, 59, 41, 291, 44, 41, 261, 262, 263,
- 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
- 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 93, 286, 287, 288, 289, 290, 125, 292, 293,
- 294, 125, 126, 297, 298, 299, 300, 301, 302, 303,
- 304, 261, 262, 263, 264, 265, 266, 267, 268, 269,
- 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
- 280, 281, 282, 283, 284, 58, 286, 287, 288, 289,
- 290, 261, 292, 293, 294, 125, 126, 297, 298, 299,
- 300, 301, 302, 303, 304, 282, 283, 261, 93, 286,
- 287, 288, 261, 282, 283, 261, 125, 286, 287, 288,
- 297, 298, 299, 300, 301, 302, 303, 304, 297, 298,
- 299, 300, 301, 302, 303, 304, 261, 261, 261, 262,
- 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
- 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
- 283, 284, 59, 286, 287, 288, 289, 290, 58, 292,
- 293, 294, 125, 126, 297, 298, 299, 300, 301, 302,
- 303, 304, 296, 93, 61, 40, 44, 261, 262, 263,
- 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
- 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 93, 286, 287, 288, 289, 290, 40, 292, 293,
- 294, 125, 126, 297, 298, 299, 300, 301, 302, 303,
- 304, 261, 262, 263, 264, 265, 266, 267, 268, 269,
- 270, 271, 272, 273, 274, 275, 276, 277, 278, 279,
- 280, 281, 282, 283, 284, 93, 286, 287, 288, 289,
- 290, 41, 292, 293, 294, 125, 126, 297, 298, 299,
- 300, 301, 302, 303, 304, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 41, 258, 40, 125, 126,
- 125, 44, 59, 123, 125, 123, 125, 126, 305, 306,
- 307, 308, 309, 310, 291, 58, 59, 125, 261, 262,
- 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
- 273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
- 283, 284, 41, 286, 287, 288, 289, 290, 41, 292,
- 293, 294, 125, 126, 297, 298, 299, 300, 301, 302,
- 303, 304, 125, 59, 41, 41, 125, 261, 262, 263,
- 264, 265, 266, 267, 268, 269, 270, 271, 272, 273,
- 274, 275, 276, 277, 278, 279, 280, 281, 282, 283,
- 284, 0, 286, 287, 288, 289, 290, 126, 292, 293,
- 294, 12, 233, 297, 298, 299, 300, 301, 302, 303,
- 304, 116, 261, 364, 410, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 282, 283, 303, 19, 286, 287, 288, 40,
- 19, 372, 164, 44, 365, 92, 73, 297, 298, 299,
- 300, 301, 302, 303, 304, 282, 283, 58, 59, 286,
- 287, 288, 471, 282, 283, 19, 459, 286, 287, 288,
- 297, 298, 299, 300, 301, 302, 303, 304, 297, 298,
- 299, 300, 301, 302, 303, 304, 261, 468, 40, 108,
- 142, 189, 44, 187, 261, 178, 258, 272, 273, 274,
- 275, 276, 277, 278, 279, 280, 58, 59, 420, 282,
- 283, 341, 268, 286, 287, 288, 421, 422, 423, 424,
- 425, 426, -1, -1, 297, 298, 299, 300, 301, 302,
- 303, 304, 261, 262, 263, 264, 265, 266, 267, 268,
- 269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
- 279, 280, 281, 282, 283, 284, 343, -1, -1, -1,
- -1, 290, -1, 292, 261, 262, 263, 264, 265, 266,
- 267, 268, 269, 270, 271, 272, 273, 274, 275, 276,
- 277, 278, 279, 280, 281, -1, -1, 284, -1, -1,
- -1, -1, 289, 290, -1, 292, 293, 294, 261, 262,
- 263, 264, 265, 266, 267, 268, 269, 270, 271, 272,
- 273, 274, 275, 276, 277, 278, 279, 280, 281, 261,
- -1, 284, -1, -1, -1, -1, -1, 290, -1, 292,
- 272, 273, 274, 275, 276, 277, 278, 279, 280, 281,
- 261, -1, 284, 40, -1, 40, -1, 44, 290, 44,
- 292, 272, 273, 274, 275, 276, 277, 278, 279, 280,
- -1, 58, 59, 58, 59, 40, -1, 40, -1, 44,
- 40, 44, 40, -1, 44, 40, 44, 40, -1, 44,
- -1, 44, -1, 58, 59, 58, 59, -1, 58, 59,
- 58, 59, -1, 58, 59, 58, 59, 40, -1, 40,
- -1, 44, 40, 44, -1, -1, 44, -1, -1, -1,
- -1, 286, 287, 288, -1, 58, 59, 58, 59, -1,
- 58, 59, 297, 298, 299, 300, 301, 302, 303, 304,
- 262, 263, 264, 265, 266, 267, 268, 269, 270, 271,
- -1, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 0, 2, 1, 1, 1, 1, 1, 1,
+ 1, 0, 0, 7, 0, 0, 6, 1, 5, 2,
+ 2, 2, 0, 3, 1, 1, 4, 0, 0, 0,
+ 0, 1, 1, 1, 1, 1, 3, 0, 1, 1,
+ 2, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 4, 0, 1, 2, 2, 1, 2,
+ 3, 1, 2, 2, 2, 2, 3, 0, 1, 0,
+ 1, 0, 1, 3, 1, 2, 0, 5, 4, 0,
+ 7, 0, 1, 2, 0, 4, 0, 5, 1, 3,
+ 1, 2, 0, 5, 3, 1, 8, 1, 2, 0,
+ 4, 0, 5, 0, 4, 0, 5, 0, 1, 1,
+ 2, 2, 2, 0, 1, 1, 2, 1, 1, 1,
+ 1, 3, 0, 3, 0, 5, 1, 3, 3, 4,
+ 2, 1, 1, 1, 1, 1, 2, 3, 2, 3,
+ 0, 1, 4, 0, 1, 2, 1, 3, 0, 5,
+ 0, 1, 0, 1, 2, 1, 1, 1, 0, 3,
+ 0, 4, 1, 0, 0, 7, 0, 0, 7, 0,
+ 0, 9, 0, 0, 7, 0, 0, 7, 2, 3,
+ 0, 3, 1, 0, 1, 2, 1, 1, 0, 1,
+ 2, 1, 1, 0, 1, 2, 1, 1, 0, 2,
+ 2, 3, 1, 4, 4, 1, 3, 2, 3, 2,
+ 1, 3, 2, 3, 2, 1, 1, 1, 3, 3,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 3, 3,
+ 2, 2, 2, 2, 1, 3, 2, 2, 2, 0,
+ 1, 2, 1, 3, 5, 2, 3, 4, 3, 2,
+ 6, 4, 5, 3, 4, 6, 4, 4, 5, 3,
+ 3, 0, 0, 7, 1, 3, 1, 0, 4, 0,
+ 3, 0, 0, 3, 2, 0, 1, 5, 4, 0,
+ 1, 0, 1, 3, 1, 0, 4, 0, 4, 0,
+ 3, 3, 3, 3, 3, 3, 0, 2, 0, 2
};
-#define YYFINAL 1
-#ifndef YYDEBUG
-#define YYDEBUG 0
-#endif
-#define YYMAXTOKEN 310
-#if YYDEBUG
-char *yyname[] = {
-"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,"CHAR_VAL","INT_VAL",
-"DOUBLE_VAL","STRING","IDENTIFIER","FRIEND","TYPEDEF","AUTO","REGISTER",
-"STATIC","EXTERN","INLINE","VIRTUAL","CONST","VOLATILE","CHAR","SHORT","INT",
-"LONG","SIGNED","UNSIGNED","FLOAT","DOUBLE","VOID","ENUM","CLASS","STRUCT",
-"UNION","ASM","PRIVATE","PROTECTED","PUBLIC","OPERATOR","DBL_COLON",
-"TRIPLE_DOT","TEMPLATE","NAMESPACE","USING","MUTABLE","THROW","SIGNALS","SLOTS",
-"Q_OBJECT","Q_PROPERTY","Q_OVERRIDE","Q_CLASSINFO","Q_ENUMS","Q_SETS","READ",
-"WRITE","STORED","DESIGNABLE","SCRIPTABLE","RESET",
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint16 yydefact[] =
+{
+ 2, 22, 1, 14, 0, 3, 5, 9, 10, 6,
+ 8, 7, 4, 64, 11, 0, 20, 21, 19, 0,
+ 65, 0, 0, 0, 136, 0, 0, 0, 15, 27,
+ 141, 41, 42, 43, 44, 45, 46, 47, 48, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 144, 145,
+ 143, 142, 140, 66, 67, 24, 71, 25, 146, 23,
+ 0, 0, 0, 0, 148, 161, 134, 24, 0, 0,
+ 68, 12, 2, 0, 27, 147, 0, 0, 137, 138,
+ 24, 0, 225, 226, 227, 215, 210, 220, 212, 0,
+ 162, 69, 18, 2, 22, 0, 63, 0, 70, 139,
+ 0, 217, 222, 0, 0, 0, 219, 224, 170, 167,
+ 172, 173, 176, 179, 182, 185, 0, 163, 168, 165,
+ 166, 0, 16, 26, 0, 0, 216, 221, 211, 218,
+ 223, 0, 0, 0, 0, 0, 0, 135, 164, 0,
+ 13, 213, 214, 198, 0, 0, 0, 326, 328, 192,
+ 0, 0, 190, 169, 24, 34, 35, 46, 0, 0,
+ 37, 0, 0, 39, 64, 31, 33, 32, 0, 51,
+ 53, 65, 0, 50, 49, 272, 0, 171, 199, 201,
+ 0, 301, 202, 309, 0, 0, 0, 0, 326, 0,
+ 328, 0, 188, 203, 193, 109, 113, 108, 73, 311,
+ 304, 74, 240, 241, 242, 264, 0, 0, 232, 236,
+ 230, 231, 233, 234, 235, 237, 238, 239, 0, 38,
+ 279, 0, 0, 0, 0, 40, 37, 0, 107, 37,
+ 123, 123, 117, 271, 0, 119, 52, 72, 160, 291,
+ 208, 200, 0, 37, 302, 208, 0, 310, 0, 317,
+ 174, 177, 0, 327, 183, 329, 186, 189, 204, 206,
+ 207, 191, 194, 196, 197, 28, 28, 111, 115, 311,
+ 314, 305, 312, 253, 254, 256, 255, 257, 268, 267,
+ 245, 249, 260, 243, 262, 244, 266, 263, 246, 247,
+ 248, 250, 261, 251, 252, 117, 117, 289, 0, 208,
+ 73, 117, 72, 278, 127, 128, 121, 124, 125, 122,
+ 0, 118, 37, 276, 120, 149, 0, 290, 273, 91,
+ 64, 0, 81, 78, 84, 28, 283, 208, 0, 208,
+ 319, 193, 193, 0, 193, 193, 205, 195, 110, 0,
+ 28, 28, 305, 315, 306, 0, 258, 259, 265, 228,
+ 229, 208, 287, 0, 126, 37, 277, 281, 292, 209,
+ 94, 0, 85, 92, 98, 37, 123, 82, 75, 37,
+ 303, 284, 105, 0, 299, 296, 100, 0, 294, 286,
+ 0, 0, 0, 0, 0, 0, 318, 175, 178, 180,
+ 184, 187, 114, 112, 0, 0, 30, 313, 308, 288,
+ 37, 274, 282, 0, 28, 0, 105, 86, 91, 96,
+ 93, 36, 153, 76, 83, 297, 0, 28, 102, 101,
+ 208, 0, 319, 319, 319, 319, 319, 319, 193, 116,
+ 307, 316, 280, 208, 0, 99, 29, 88, 28, 0,
+ 150, 154, 28, 104, 300, 28, 285, 295, 320, 321,
+ 323, 324, 325, 322, 181, 293, 95, 87, 89, 0,
+ 0, 155, 156, 0, 309, 151, 298, 0, 29, 97,
+ 158, 0, 37, 0, 103, 90, 28, 157, 0, 80,
+ 132, 0, 129, 106, 130, 0, 152, 0, 0, 159,
+ 133, 131
};
-char *yyrule[] = {
-"$accept : declaration_seq",
-"declaration_seq :",
-"declaration_seq : declaration_seq declaration",
-"declaration : class_def",
-"declaration : namespace_def",
-"declaration : namespace_alias_def",
-"declaration : using_declaration",
-"declaration : using_directive",
-"namespace_def : named_namespace_def",
-"namespace_def : unnamed_namespace_def",
-"$$1 :",
-"$$2 :",
-"named_namespace_def : NAMESPACE IDENTIFIER $$1 '{' $$2 namespace_body '}'",
-"$$3 :",
-"$$4 :",
-"unnamed_namespace_def : NAMESPACE $$3 '{' $$4 namespace_body '}'",
-"namespace_body : declaration_seq",
-"namespace_alias_def : NAMESPACE IDENTIFIER '=' complete_class_name ';'",
-"using_directive : USING NAMESPACE",
-"using_declaration : USING IDENTIFIER",
-"using_declaration : USING DBL_COLON",
-"$$5 :",
-"class_def : $$5 class_specifier ';'",
-"class_name : IDENTIFIER",
-"class_name : template_class_name",
-"template_class_name : IDENTIFIER '<' template_args '>'",
-"template_args :",
-"const_expression :",
-"def_argument :",
-"enumerator_expression :",
-"decl_specifier : storage_class_specifier",
-"decl_specifier : type_specifier",
-"decl_specifier : fct_specifier",
-"decl_specifier : FRIEND",
-"decl_specifier : TYPEDEF",
-"decl_specifiers : decl_specs_opt type_name decl_specs_opt",
-"decl_specs_opt :",
-"decl_specs_opt : decl_specs",
-"decl_specs : decl_specifier",
-"decl_specs : decl_specs decl_specifier",
-"storage_class_specifier : AUTO",
-"storage_class_specifier : REGISTER",
-"storage_class_specifier : STATIC",
-"storage_class_specifier : EXTERN",
-"fct_specifier : INLINE",
-"fct_specifier : VIRTUAL",
-"type_specifier : CONST",
-"type_specifier : VOLATILE",
-"type_name : elaborated_type_specifier",
-"type_name : complete_class_name",
-"type_name : simple_type_names",
-"simple_type_names : simple_type_names simple_type_name",
-"simple_type_names : simple_type_name",
-"simple_type_name : CHAR",
-"simple_type_name : SHORT",
-"simple_type_name : INT",
-"simple_type_name : LONG",
-"simple_type_name : SIGNED",
-"simple_type_name : UNSIGNED",
-"simple_type_name : FLOAT",
-"simple_type_name : DOUBLE",
-"simple_type_name : VOID",
-"template_spec : TEMPLATE '<' template_args '>'",
-"opt_template_spec :",
-"opt_template_spec : template_spec",
-"class_key : opt_template_spec CLASS",
-"class_key : opt_template_spec STRUCT",
-"complete_class_name : qualified_class_name",
-"complete_class_name : DBL_COLON qualified_class_name",
-"qualified_class_name : qualified_class_name DBL_COLON class_name",
-"qualified_class_name : class_name",
-"elaborated_type_specifier : class_key IDENTIFIER",
-"elaborated_type_specifier : ENUM IDENTIFIER",
-"elaborated_type_specifier : UNION IDENTIFIER",
-"argument_declaration_list : arg_declaration_list_opt triple_dot_opt",
-"argument_declaration_list : arg_declaration_list ',' TRIPLE_DOT",
-"arg_declaration_list_opt :",
-"arg_declaration_list_opt : arg_declaration_list",
-"opt_exception_argument :",
-"opt_exception_argument : argument_declaration",
-"triple_dot_opt :",
-"triple_dot_opt : TRIPLE_DOT",
-"arg_declaration_list : arg_declaration_list ',' argument_declaration",
-"arg_declaration_list : argument_declaration",
-"argument_declaration : decl_specifiers abstract_decl_opt",
-"$$6 :",
-"argument_declaration : decl_specifiers abstract_decl_opt '=' $$6 def_argument",
-"argument_declaration : decl_specifiers abstract_decl_opt dname abstract_decl_opt",
-"$$7 :",
-"argument_declaration : decl_specifiers abstract_decl_opt dname abstract_decl_opt '=' $$7 def_argument",
-"abstract_decl_opt :",
-"abstract_decl_opt : abstract_decl",
-"abstract_decl : abstract_decl ptr_operator",
-"$$8 :",
-"abstract_decl : '[' $$8 const_expression ']'",
-"$$9 :",
-"abstract_decl : abstract_decl '[' $$9 const_expression ']'",
-"abstract_decl : ptr_operator",
-"abstract_decl : '(' abstract_decl ')'",
-"declarator : dname",
-"declarator : declarator ptr_operator",
-"$$10 :",
-"declarator : declarator '[' $$10 const_expression ']'",
-"declarator : '(' declarator ')'",
-"dname : IDENTIFIER",
-"fct_decl : '(' argument_declaration_list ')' cv_qualifier_list_opt ctor_initializer_opt exception_spec_opt opt_identifier fct_body_or_semicolon",
-"fct_name : IDENTIFIER",
-"fct_name : IDENTIFIER array_decls",
-"$$11 :",
-"fct_name : IDENTIFIER '=' $$11 const_expression",
-"$$12 :",
-"fct_name : IDENTIFIER array_decls '=' $$12 const_expression",
-"$$13 :",
-"array_decls : '[' $$13 const_expression ']'",
-"$$14 :",
-"array_decls : array_decls '[' $$14 const_expression ']'",
-"ptr_operators_opt :",
-"ptr_operators_opt : ptr_operators",
-"ptr_operators : ptr_operator",
-"ptr_operators : ptr_operators ptr_operator",
-"ptr_operator : '*' cv_qualifier_list_opt",
-"ptr_operator : '&' cv_qualifier_list_opt",
-"cv_qualifier_list_opt :",
-"cv_qualifier_list_opt : cv_qualifier_list",
-"cv_qualifier_list : cv_qualifier",
-"cv_qualifier_list : cv_qualifier_list cv_qualifier",
-"cv_qualifier : CONST",
-"cv_qualifier : VOLATILE",
-"fct_body_or_semicolon : ';'",
-"fct_body_or_semicolon : fct_body",
-"fct_body_or_semicolon : '=' INT_VAL ';'",
-"$$15 :",
-"fct_body : '{' $$15 '}'",
-"$$16 :",
-"class_specifier : full_class_head '{' $$16 opt_obj_member_list '}'",
-"class_specifier : class_head",
-"class_specifier : class_head '*' IDENTIFIER",
-"class_specifier : class_head '&' IDENTIFIER",
-"class_specifier : class_head '(' IDENTIFIER ')'",
-"class_specifier : template_spec whatever",
-"whatever : IDENTIFIER",
-"whatever : simple_type_name",
-"whatever : type_specifier",
-"whatever : storage_class_specifier",
-"whatever : fct_specifier",
-"class_head : class_key qualified_class_name",
-"class_head : class_key IDENTIFIER class_name",
-"full_class_head : class_head opt_base_spec",
-"nested_class_head : class_key qualified_class_name opt_base_spec",
-"exception_spec_opt :",
-"exception_spec_opt : exception_spec",
-"exception_spec : THROW '(' opt_exception_argument ')'",
-"ctor_initializer_opt :",
-"ctor_initializer_opt : ctor_initializer",
-"ctor_initializer : ':' mem_initializer_list",
-"mem_initializer_list : mem_initializer",
-"mem_initializer_list : mem_initializer ',' mem_initializer_list",
-"$$17 :",
-"mem_initializer : complete_class_name '(' $$17 const_expression ')'",
-"opt_base_spec :",
-"opt_base_spec : base_spec",
-"opt_obj_member_list :",
-"opt_obj_member_list : obj_member_list",
-"obj_member_list : obj_member_list obj_member_area",
-"obj_member_list : obj_member_area",
-"qt_access_specifier : access_specifier",
-"qt_access_specifier : SLOTS",
-"$$18 :",
-"obj_member_area : qt_access_specifier $$18 slot_area",
-"$$19 :",
-"obj_member_area : SIGNALS $$19 ':' opt_signal_declarations",
-"obj_member_area : Q_OBJECT",
-"$$20 :",
-"$$21 :",
-"obj_member_area : Q_PROPERTY $$20 '(' property ')' $$21 opt_property_candidates",
-"$$22 :",
-"$$23 :",
-"obj_member_area : Q_OVERRIDE $$22 '(' property ')' $$23 opt_property_candidates",
-"$$24 :",
-"$$25 :",
-"obj_member_area : Q_CLASSINFO $$24 '(' STRING ',' STRING ')' $$25 opt_property_candidates",
-"$$26 :",
-"$$27 :",
-"obj_member_area : Q_ENUMS $$26 '(' qt_enums ')' $$27 opt_property_candidates",
-"$$28 :",
-"$$29 :",
-"obj_member_area : Q_SETS $$28 '(' qt_sets ')' $$29 opt_property_candidates",
-"slot_area : SIGNALS ':'",
-"slot_area : SLOTS ':' opt_slot_declarations",
-"$$30 :",
-"slot_area : ':' $$30 opt_property_candidates",
-"slot_area : IDENTIFIER",
-"opt_property_candidates :",
-"opt_property_candidates : property_candidate_declarations",
-"property_candidate_declarations : property_candidate_declarations property_candidate_declaration",
-"property_candidate_declarations : property_candidate_declaration",
-"property_candidate_declaration : signal_or_slot",
-"opt_signal_declarations :",
-"opt_signal_declarations : signal_declarations",
-"signal_declarations : signal_declarations signal_declaration",
-"signal_declarations : signal_declaration",
-"signal_declaration : signal_or_slot",
-"opt_slot_declarations :",
-"opt_slot_declarations : slot_declarations",
-"slot_declarations : slot_declarations slot_declaration",
-"slot_declarations : slot_declaration",
-"slot_declaration : signal_or_slot",
-"opt_semicolons :",
-"opt_semicolons : opt_semicolons ';'",
-"base_spec : ':' base_list",
-"base_list : base_list ',' base_specifier",
-"base_list : base_specifier",
-"qt_macro_name : IDENTIFIER '(' IDENTIFIER ')'",
-"qt_macro_name : IDENTIFIER '(' simple_type_name ')'",
-"base_specifier : complete_class_name",
-"base_specifier : VIRTUAL access_specifier complete_class_name",
-"base_specifier : VIRTUAL complete_class_name",
-"base_specifier : access_specifier VIRTUAL complete_class_name",
-"base_specifier : access_specifier complete_class_name",
-"base_specifier : qt_macro_name",
-"base_specifier : VIRTUAL access_specifier qt_macro_name",
-"base_specifier : VIRTUAL qt_macro_name",
-"base_specifier : access_specifier VIRTUAL qt_macro_name",
-"base_specifier : access_specifier qt_macro_name",
-"access_specifier : PRIVATE",
-"access_specifier : PROTECTED",
-"access_specifier : PUBLIC",
-"operator_name : decl_specs_opt IDENTIFIER ptr_operators_opt",
-"operator_name : decl_specs_opt simple_type_name ptr_operators_opt",
-"operator_name : '+'",
-"operator_name : '-'",
-"operator_name : '*'",
-"operator_name : '/'",
-"operator_name : '%'",
-"operator_name : '^'",
-"operator_name : '&'",
-"operator_name : '|'",
-"operator_name : '~'",
-"operator_name : '!'",
-"operator_name : '='",
-"operator_name : '<'",
-"operator_name : '>'",
-"operator_name : '+' '='",
-"operator_name : '-' '='",
-"operator_name : '*' '='",
-"operator_name : '/' '='",
-"operator_name : '%' '='",
-"operator_name : '^' '='",
-"operator_name : '&' '='",
-"operator_name : '|' '='",
-"operator_name : '~' '='",
-"operator_name : '!' '='",
-"operator_name : '=' '='",
-"operator_name : '<' '='",
-"operator_name : '>' '='",
-"operator_name : '<' '<'",
-"operator_name : '>' '>'",
-"operator_name : '<' '<' '='",
-"operator_name : '>' '>' '='",
-"operator_name : '&' '&'",
-"operator_name : '|' '|'",
-"operator_name : '+' '+'",
-"operator_name : '-' '-'",
-"operator_name : ','",
-"operator_name : '-' '>' '*'",
-"operator_name : '-' '>'",
-"operator_name : '(' ')'",
-"operator_name : '[' ']'",
-"opt_virtual :",
-"opt_virtual : VIRTUAL",
-"type_and_name : type_name fct_name",
-"type_and_name : fct_name",
-"type_and_name : opt_virtual '~' fct_name",
-"type_and_name : decl_specs type_name decl_specs_opt ptr_operators_opt fct_name",
-"type_and_name : decl_specs type_name",
-"type_and_name : type_name ptr_operators fct_name",
-"type_and_name : type_name decl_specs ptr_operators_opt fct_name",
-"type_and_name : type_name OPERATOR operator_name",
-"type_and_name : OPERATOR operator_name",
-"type_and_name : decl_specs type_name decl_specs_opt ptr_operators_opt OPERATOR operator_name",
-"type_and_name : type_name ptr_operators OPERATOR operator_name",
-"type_and_name : type_name decl_specs ptr_operators_opt OPERATOR operator_name",
-"signal_or_slot : type_and_name fct_decl opt_semicolons",
-"signal_or_slot : type_and_name opt_bitfield ';' opt_semicolons",
-"signal_or_slot : type_and_name opt_bitfield ',' member_declarator_list ';' opt_semicolons",
-"signal_or_slot : enum_specifier opt_identifier ';' opt_semicolons",
-"signal_or_slot : USING complete_class_name ';' opt_semicolons",
-"signal_or_slot : USING NAMESPACE complete_class_name ';' opt_semicolons",
-"signal_or_slot : NAMESPACE IDENTIFIER '{'",
-"signal_or_slot : nested_class_head ';' opt_semicolons",
-"$$31 :",
-"$$32 :",
-"signal_or_slot : nested_class_head '{' $$31 '}' $$32 ';' opt_semicolons",
-"member_declarator_list : member_declarator",
-"member_declarator_list : member_declarator_list ',' member_declarator",
-"member_declarator : declarator",
-"$$33 :",
-"member_declarator : IDENTIFIER ':' $$33 const_expression",
-"$$34 :",
-"member_declarator : ':' $$34 const_expression",
-"opt_bitfield :",
-"$$35 :",
-"opt_bitfield : ':' $$35 const_expression",
-"enum_specifier : ENUM enum_tail",
-"opt_komma :",
-"opt_komma : ','",
-"enum_tail : IDENTIFIER '{' enum_list opt_komma '}'",
-"enum_tail : '{' enum_list opt_komma '}'",
-"opt_identifier :",
-"opt_identifier : IDENTIFIER",
-"enum_list :",
-"enum_list : enumerator",
-"enum_list : enum_list ',' enumerator",
-"enumerator : IDENTIFIER",
-"$$36 :",
-"enumerator : IDENTIFIER '=' $$36 enumerator_expression",
-"$$37 :",
-"property : IDENTIFIER IDENTIFIER $$37 prop_statements",
-"prop_statements :",
-"prop_statements : READ IDENTIFIER prop_statements",
-"prop_statements : WRITE IDENTIFIER prop_statements",
-"prop_statements : RESET IDENTIFIER prop_statements",
-"prop_statements : STORED IDENTIFIER prop_statements",
-"prop_statements : DESIGNABLE IDENTIFIER prop_statements",
-"prop_statements : SCRIPTABLE IDENTIFIER prop_statements",
-"qt_enums :",
-"qt_enums : IDENTIFIER qt_enums",
-"qt_sets :",
-"qt_sets : IDENTIFIER qt_sets",
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 94, 5, 6, 7, 27, 93, 8, 15, 72,
+ 95, 9, 10, 11, 12, 13, 56, 57, 73, 338,
+ 457, 431, 163, 319, 218, 164, 165, 166, 167, 168,
+ 169, 170, 171, 21, 172, 173, 70, 174, 321, 322,
+ 478, 368, 323, 324, 436, 468, 362, 363, 404, 438,
+ 375, 445, 376, 245, 175, 265, 340, 197, 266, 341,
+ 310, 311, 235, 306, 307, 308, 483, 484, 487, 23,
+ 90, 52, 24, 25, 176, 464, 465, 440, 441, 461,
+ 462, 476, 64, 116, 117, 118, 119, 139, 131, 132,
+ 331, 133, 332, 134, 428, 135, 334, 136, 335, 153,
+ 194, 261, 262, 263, 177, 178, 179, 257, 258, 259,
+ 317, 65, 86, 87, 88, 89, 220, 180, 181, 264,
+ 316, 403, 377, 378, 442, 417, 246, 325, 183, 345,
+ 200, 248, 271, 272, 396, 185, 330, 386, 189, 191
};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -356
+static const yytype_int16 yypact[] =
+{
+ -356, 61, -356, 35, 83, -356, -356, -356, -356, -356,
+ -356, -356, -356, 12, 37, -9, -356, -356, -356, 21,
+ 469, 112, 100, 53, 118, 63, 36, 67, -356, -356,
+ -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
+ -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
+ -356, -356, -356, -356, -356, 9, -356, -356, 113, -356,
+ 153, 155, 207, 99, -356, -356, -356, 120, 231, 215,
+ 113, -356, -356, 218, -356, -356, 231, 209, -356, -356,
+ -22, 176, -356, -356, -356, -356, 244, -356, -356, 20,
+ 493, 113, -356, -356, -6, 247, -356, 253, -356, -356,
+ 489, -356, -356, 101, 99, 101, -356, -356, -356, -356,
+ -356, -356, -356, -356, -356, -356, 283, 493, -356, -356,
+ -356, 284, -356, -356, 276, 285, -356, -356, -356, -356,
+ -356, 281, 288, 289, 290, 292, 293, -356, -356, 23,
+ -356, -356, -356, 243, 364, 364, 366, 369, 372, -356,
+ 315, 316, -356, -356, 314, -356, -356, 306, 16, 380,
+ 156, 381, 87, -356, 385, -356, -356, -356, 277, 526,
+ -356, -356, 382, -356, -356, -356, 138, -356, 243, -356,
+ 337, 73, -356, 384, 409, 351, 352, 359, 369, 357,
+ 372, 358, -356, 243, 243, -356, -356, 46, 370, 419,
+ -356, -356, 379, 97, 164, -356, 374, 375, 388, 43,
+ -13, -21, 416, 418, 438, -31, 439, 440, 498, 451,
+ -356, 386, 36, 442, 434, -356, 287, 437, 91, 156,
+ 174, 174, 313, -356, 29, -356, -356, 68, -17, -356,
+ -356, -356, 494, 323, -356, -356, 214, -356, 443, -356,
+ -356, -356, 500, -356, -356, -356, -356, -356, 243, -356,
+ -356, -356, 243, -356, -356, -356, -356, -356, -356, 419,
+ 445, 465, -356, -356, -356, 470, -356, 471, -356, -356,
+ -356, -356, -356, -356, -356, -356, 432, -356, -356, -356,
+ -356, -356, -356, -356, -356, 137, 137, -356, 472, -356,
+ -356, 137, -356, -356, -356, -356, -356, 174, -356, -356,
+ 19, 137, 156, -356, -356, -356, 473, 474, -356, 135,
+ 410, 466, 516, 491, -356, -356, 474, -356, 22, -356,
+ 192, 243, 243, 468, 243, 243, -356, -356, -356, 490,
+ -356, -356, 465, -356, 419, 499, -356, -356, -356, -356,
+ -356, -356, 474, 25, -356, 156, -356, -356, -356, -356,
+ -356, 135, 10, 249, -356, 451, 174, -356, -356, 441,
+ -356, 474, 486, 8, -356, 280, -356, 256, -356, 474,
+ 551, 552, 553, 554, 555, 556, -356, -356, -356, -356,
+ -356, -356, -356, -356, 501, 506, -356, -356, -356, 474,
+ 156, -356, -356, 505, -356, 172, -356, -356, 135, -356,
+ -356, -356, 497, -356, -356, -356, 242, -356, -356, -356,
+ -356, 22, 192, 192, 192, 192, 192, 192, 243, -356,
+ -356, -356, -356, -356, 503, -356, -356, 510, -356, 36,
+ 528, -356, -356, -356, -356, -356, 474, -356, -356, -356,
+ -356, -356, -356, -356, -356, 474, -356, -356, -356, 507,
+ 508, -356, 512, 511, 384, -356, -356, 513, -356, -356,
+ -356, 36, 353, 117, -356, -356, -356, -356, 504, -356,
+ -356, 569, -356, -356, -356, 509, -356, 521, 520, -356,
+ -356, -356
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -356, 581, -356, -356, -356, -356, -356, -356, -356, -356,
+ 492, -356, -356, -356, -356, -356, 54, -356, 514, -260,
+ 114, -356, -133, -356, -223, -158, 563, 564, 566, -157,
+ -356, -16, 574, -356, -12, -26, -11, -356, -356, -356,
+ -356, -356, -356, -355, -356, -356, 181, 229, -356, -356,
+ 219, -356, 232, -356, -159, -356, -356, -356, -356, -356,
+ -180, 423, -216, -218, -356, 286, -356, -356, -356, -356,
+ -356, -356, -356, -356, -356, -356, -356, -356, -356, 124,
+ -356, -356, 360, -356, -356, -356, 479, -356, -356, -356,
+ -356, -356, -356, -356, -356, -356, -356, -356, -356, -356,
+ -356, -310, -356, 335, -356, -356, 421, -356, -356, 342,
+ -240, -356, -356, 132, 502, -41, -221, -356, -356, -131,
+ -356, -356, -356, 180, -356, -356, -356, -356, -356, 260,
+ -356, 139, 336, 263, -356, 459, -356, 47, 420, 422
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -276
+static const yytype_int16 yytable[] =
+{
+ 69, 22, 219, 301, 51, 326, 339, 226, 303, 233,
+ 232, 58, 182, 309, 414, 406, 67, 406, 314, 76,
+ 320, 387, 388, 198, 390, 391, 228, 80, 291, 372,
+ 149, 225, 228, 3, 4, 105, 228, 85, 285, 74,
+ 103, 286, 14, 67, 100, 292, 283, 182, 28, 120,
+ 19, 287, -17, 63, 355, 101, 68, 91, 284, 352,
+ 400, 2, 260, 106, 312, 370, 150, 151, 219, 407,
+ 74, 219, 68, 199, 373, 313, 120, 126, 85, 129,
+ 393, 394, 29, 318, 125, 219, 225, 371, 373, 379,
+ 16, 357, 374, 152, 67, 314, 26, 230, 231, 225,
+ 3, 4, 281, 364, -24, 267, 80, 55, 80, 75,
+ 268, 399, 282, 59, 81, 349, 350, 479, 454, 17,
+ 66, 353, 18, 68, 71, -24, 222, 260, -24, 74,
+ 98, 82, 83, 84, 402, 68, 223, 68, -24, 243,
+ 53, 54, 411, 244, 434, 364, 320, 410, 412, 76,
+ 195, 356, 227, 236, 219, 196, 274, 444, 275, 419,
+ 77, 238, 78, 365, 155, 156, 31, 32, 33, 34,
+ 35, 36, 37, 38, 480, -160, 481, 482, 459, 432,
+ 446, 74, 466, 80, 60, 467, 61, 62, 63, 410,
+ 304, 305, 364, 455, 401, 239, 298, 219, 240, 360,
+ 419, 361, 296, 230, 231, 230, 231, 219, 82, 83,
+ 84, 219, 68, 102, 79, 202, 485, 203, 204, 205,
+ 206, 107, 207, 276, 208, 209, 277, 210, 211, 212,
+ 213, 214, 215, 216, 217, 127, 409, 130, 67, 435,
+ 230, 231, 219, 380, 381, 382, 383, 384, 385, 320,
+ 154, 155, 156, 31, 32, 33, 34, 35, 157, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 158, -64, -64, 159, 327, 92, 99, 328, 160, 68,
+ 96, 19, 161, 162, 228, 155, 156, 31, 32, 33,
+ 34, 35, 36, 37, 38, 155, 156, 31, 32, 33,
+ 34, 35, 36, 37, 38, 122, 418, 104, 227, 443,
+ 230, 231, 229, 409, 219, 123, 420, 230, 231, 421,
+ -269, 155, 156, 31, 32, 33, 34, 35, 36, 37,
+ 38, 155, 156, 31, 32, 33, 34, 35, 36, 37,
+ 38, 137, 140, 141, 418, 230, 231, -275, 230, 231,
+ -275, 143, 142, -275, 144, 145, 146, -275, 147, 148,
+ -77, 155, 156, 31, 32, 33, 34, 35, 36, 37,
+ 38, 184, 187, 195, -107, 74, 188, -107, 196, 190,
+ -107, 230, 231, -270, -107, 192, 193, 201, 221, 237,
+ -77, 247, 67, 155, 156, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 224, 460, 242, 159, 249, 67, 250, 251,
+ -79, 68, 252, 19, 254, 256, 270, 269, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 224, 273, 278,
+ 159, 300, 279, 297, 302, 460, 68, 280, 19, 155,
+ 156, 31, 32, 33, 34, 35, 36, 37, 38, 155,
+ 156, 31, 32, 33, 34, 35, 36, 37, 38, 448,
+ 449, 450, 451, 452, 453, 288, 30, 289, 413, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 124, 290, 293, 294,
+ 348, 228, 299, 329, 343, 295, 333, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 82, 83, 84, 344, 346,
+ 347, 358, 351, 366, 359, 389, 108, 109, 110, 111,
+ 112, 113, 114, 115, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 367, 369, 392, 415, 398, 422, 423,
+ 424, 425, 426, 427, 430, 433, 429, 439, 456, 458,
+ 463, 486, 469, 488, 470, 471, 489, 472, 474, 490,
+ 491, 1, 475, 48, 49, 121, 50, 20, 97, 437,
+ 405, 234, 416, 354, 408, 477, 138, 337, 315, 241,
+ 336, 447, 395, 473, 186, 342, 128, 397, 253, 0,
+ 0, 0, 255
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 26, 13, 160, 226, 20, 245, 266, 164, 229, 168,
+ 168, 22, 143, 231, 369, 7, 7, 7, 234, 36,
+ 243, 331, 332, 7, 334, 335, 7, 7, 59, 7,
+ 7, 164, 7, 39, 40, 15, 7, 63, 59, 61,
+ 81, 62, 7, 7, 66, 76, 59, 178, 57, 90,
+ 38, 72, 58, 70, 35, 81, 36, 68, 71, 299,
+ 35, 0, 193, 89, 35, 325, 43, 44, 226, 59,
+ 61, 229, 36, 57, 66, 234, 117, 103, 104, 105,
+ 340, 341, 61, 242, 100, 243, 219, 327, 66, 329,
+ 7, 312, 70, 70, 7, 311, 59, 68, 69, 232,
+ 39, 40, 59, 319, 36, 59, 7, 7, 7, 55,
+ 64, 351, 69, 60, 15, 295, 296, 472, 428, 36,
+ 57, 301, 39, 36, 57, 57, 39, 258, 60, 61,
+ 76, 32, 33, 34, 355, 36, 162, 36, 70, 66,
+ 28, 29, 365, 70, 404, 361, 369, 363, 366, 36,
+ 59, 310, 164, 169, 312, 64, 59, 417, 61, 375,
+ 7, 172, 7, 320, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 57, 57, 59, 60, 438, 400,
+ 420, 61, 442, 7, 66, 445, 68, 69, 70, 405,
+ 16, 17, 408, 433, 353, 57, 222, 355, 60, 64,
+ 416, 66, 218, 68, 69, 68, 69, 365, 32, 33,
+ 34, 369, 36, 81, 7, 59, 476, 61, 62, 63,
+ 64, 89, 66, 59, 68, 69, 62, 71, 72, 73,
+ 74, 75, 76, 77, 78, 103, 64, 105, 7, 67,
+ 68, 69, 400, 51, 52, 53, 54, 55, 56, 472,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 60, 60, 67, 63, 35, 36,
+ 62, 38, 39, 40, 7, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 8, 9, 10, 11, 12,
+ 13, 14, 15, 16, 17, 58, 64, 63, 320, 67,
+ 68, 69, 35, 64, 472, 62, 60, 68, 69, 63,
+ 77, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 58, 58, 67, 64, 68, 69, 60, 68, 69,
+ 63, 70, 67, 66, 66, 66, 66, 70, 66, 66,
+ 37, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 7, 6, 59, 60, 61, 7, 63, 64, 7,
+ 66, 68, 69, 77, 70, 70, 70, 7, 7, 7,
+ 67, 7, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 439, 77, 30, 7, 7, 67, 67,
+ 67, 36, 63, 38, 67, 67, 7, 57, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 59, 65,
+ 30, 7, 67, 57, 7, 471, 36, 59, 38, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 422,
+ 423, 424, 425, 426, 427, 59, 7, 59, 37, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 7, 59, 59, 59,
+ 68, 7, 60, 60, 59, 7, 6, 18, 19, 20,
+ 21, 22, 23, 24, 25, 26, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 32, 33, 34, 63, 59,
+ 59, 58, 60, 67, 60, 67, 43, 44, 45, 46,
+ 47, 48, 49, 50, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 37, 63, 65, 70, 58, 7, 7,
+ 7, 7, 7, 7, 58, 60, 65, 70, 65, 59,
+ 42, 67, 65, 4, 66, 63, 67, 66, 65, 58,
+ 60, 0, 468, 20, 20, 93, 20, 13, 74, 408,
+ 361, 168, 373, 307, 362, 471, 117, 262, 238, 178,
+ 258, 421, 342, 464, 145, 269, 104, 344, 188, -1,
+ -1, -1, 190
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 80, 0, 39, 40, 81, 82, 83, 86, 90,
+ 91, 92, 93, 94, 7, 87, 7, 36, 39, 38,
+ 111, 112, 113, 148, 151, 152, 59, 84, 57, 61,
+ 7, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 23, 24, 25, 26, 105, 106,
+ 107, 110, 150, 28, 29, 7, 95, 96, 115, 60,
+ 66, 68, 69, 70, 161, 190, 57, 7, 36, 114,
+ 115, 57, 88, 97, 61, 95, 36, 7, 7, 7,
+ 7, 15, 32, 33, 34, 114, 191, 192, 193, 194,
+ 149, 115, 60, 85, 80, 89, 62, 97, 95, 67,
+ 66, 114, 192, 194, 63, 15, 114, 192, 43, 44,
+ 45, 46, 47, 48, 49, 50, 162, 163, 164, 165,
+ 194, 89, 58, 62, 7, 110, 114, 192, 193, 114,
+ 192, 167, 168, 170, 172, 174, 176, 58, 165, 166,
+ 58, 67, 67, 70, 66, 66, 66, 66, 66, 7,
+ 43, 44, 70, 178, 7, 8, 9, 15, 27, 30,
+ 35, 39, 40, 101, 104, 105, 106, 107, 108, 109,
+ 110, 111, 113, 114, 116, 133, 153, 183, 184, 185,
+ 196, 197, 198, 207, 7, 214, 214, 6, 7, 217,
+ 7, 218, 70, 70, 179, 59, 64, 136, 7, 57,
+ 209, 7, 59, 61, 62, 63, 64, 66, 68, 69,
+ 71, 72, 73, 74, 75, 76, 77, 78, 103, 104,
+ 195, 7, 39, 114, 27, 101, 108, 113, 7, 35,
+ 68, 69, 104, 133, 140, 141, 110, 7, 115, 57,
+ 60, 185, 77, 66, 70, 132, 205, 7, 210, 7,
+ 67, 67, 63, 217, 67, 218, 67, 186, 187, 188,
+ 198, 180, 181, 182, 198, 134, 137, 59, 64, 57,
+ 7, 211, 212, 59, 59, 61, 59, 62, 65, 67,
+ 59, 59, 69, 59, 71, 59, 62, 72, 59, 59,
+ 59, 59, 76, 59, 59, 7, 110, 57, 114, 60,
+ 7, 103, 7, 195, 16, 17, 142, 143, 144, 142,
+ 139, 140, 35, 133, 141, 161, 199, 189, 133, 102,
+ 103, 117, 118, 121, 122, 206, 189, 60, 63, 60,
+ 215, 169, 171, 6, 175, 177, 188, 182, 98, 98,
+ 135, 138, 211, 59, 63, 208, 59, 59, 68, 139,
+ 139, 60, 189, 139, 144, 35, 133, 195, 58, 60,
+ 64, 66, 125, 126, 141, 108, 67, 37, 120, 63,
+ 98, 189, 7, 66, 70, 129, 131, 201, 202, 189,
+ 51, 52, 53, 54, 55, 56, 216, 180, 180, 67,
+ 180, 180, 65, 98, 98, 208, 213, 212, 58, 189,
+ 35, 133, 195, 200, 127, 126, 7, 59, 131, 64,
+ 141, 103, 142, 37, 122, 70, 129, 204, 64, 141,
+ 60, 63, 7, 7, 7, 7, 7, 7, 173, 65,
+ 58, 100, 195, 60, 98, 67, 123, 125, 128, 70,
+ 156, 157, 203, 67, 98, 130, 189, 202, 216, 216,
+ 216, 216, 216, 216, 180, 189, 65, 99, 59, 98,
+ 114, 158, 159, 42, 154, 155, 98, 98, 124, 65,
+ 66, 63, 66, 210, 65, 99, 160, 158, 119, 122,
+ 57, 59, 60, 145, 146, 98, 67, 147, 4, 67,
+ 58, 60
+};
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK (1); \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (YYID (0))
+
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
#endif
-#ifdef YYSTACKSIZE
-#undef YYMAXDEPTH
-#define YYMAXDEPTH YYSTACKSIZE
+{
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
#else
-#ifdef YYMAXDEPTH
-#define YYSTACKSIZE YYMAXDEPTH
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
-#define YYSTACKSIZE 500
-#define YYMAXDEPTH 500
+static void
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+ YYSTYPE *yyvsp;
+ int yyrule;
#endif
+{
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
int yydebug;
-int yynerrs;
-int yyerrflag;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+ const char *yystr;
+#endif
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+#endif
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+ int yyn = yypact[yystate];
+
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
+ {
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
+ }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ YYUSE (yyvaluep);
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+/* Prevent warnings from -Wmissing-prototypes. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+/* The lookahead symbol. */
int yychar;
-short *yyssp;
-YYSTYPE *yyvsp;
-YYSTYPE yyval;
+
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-short yyss[YYSTACKSIZE];
-YYSTYPE yyvs[YYSTACKSIZE];
-#define yystacksize YYSTACKSIZE
-#line 1606 "moc.y"
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to lookahead token. */
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a lookahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ *++yyvsp = yylval;
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 11:
+
+/* Line 1455 of yacc.c */
+#line 824 "moc.y"
+ { enterNameSpace((yyvsp[(2) - (2)].string)); }
+ break;
+
+ case 12:
+
+/* Line 1455 of yacc.c */
+#line 825 "moc.y"
+ { BEGIN IN_NAMESPACE; }
+ break;
+
+ case 13:
+
+/* Line 1455 of yacc.c */
+#line 827 "moc.y"
+ { leaveNameSpace();
+ selectOutsideClassState();
+ }
+ break;
+
+ case 14:
+
+/* Line 1455 of yacc.c */
+#line 832 "moc.y"
+ { enterNameSpace(); }
+ break;
+
+ case 15:
+
+/* Line 1455 of yacc.c */
+#line 833 "moc.y"
+ { BEGIN IN_NAMESPACE; }
+ break;
+
+ case 16:
+
+/* Line 1455 of yacc.c */
+#line 835 "moc.y"
+ { leaveNameSpace();
+ selectOutsideClassState();
+ }
+ break;
+
+ case 18:
+
+/* Line 1455 of yacc.c */
+#line 844 "moc.y"
+ { selectOutsideClassState(); }
+ break;
+
+ case 19:
+
+/* Line 1455 of yacc.c */
+#line 848 "moc.y"
+ { selectOutsideClassState(); }
+ break;
+
+ case 20:
+
+/* Line 1455 of yacc.c */
+#line 851 "moc.y"
+ { selectOutsideClassState(); }
+ break;
+
+ case 21:
+
+/* Line 1455 of yacc.c */
+#line 852 "moc.y"
+ { selectOutsideClassState(); }
+ break;
+
+ case 22:
+
+/* Line 1455 of yacc.c */
+#line 855 "moc.y"
+ { initClass(); }
+ break;
+
+ case 23:
+
+/* Line 1455 of yacc.c */
+#line 856 "moc.y"
+ { generateClass();
+ registerClassInNamespace();
+ selectOutsideClassState(); }
+ break;
+
+ case 24:
+
+/* Line 1455 of yacc.c */
+#line 864 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 25:
+
+/* Line 1455 of yacc.c */
+#line 865 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 26:
+
+/* Line 1455 of yacc.c */
+#line 869 "moc.y"
+ { g->tmpExpression = rmWS( g->tmpExpression );
+ (yyval.string) = stradd( (yyvsp[(1) - (4)].string), "<",
+ g->tmpExpression, ">" ); }
+ break;
+
+ case 27:
+
+/* Line 1455 of yacc.c */
+#line 880 "moc.y"
+ { initExpression();
+ templLevel = 1;
+ BEGIN IN_TEMPL_ARGS; }
+ break;
+
+ case 28:
+
+/* Line 1455 of yacc.c */
+#line 893 "moc.y"
+ { initExpression();
+ BEGIN IN_EXPR; }
+ break;
+
+ case 29:
+
+/* Line 1455 of yacc.c */
+#line 902 "moc.y"
+ { BEGIN IN_DEF_ARG; }
+ break;
+
+ case 30:
+
+/* Line 1455 of yacc.c */
+#line 905 "moc.y"
+ { initExpression();
+ BEGIN IN_ENUM; }
+ break;
+
+ case 31:
+
+/* Line 1455 of yacc.c */
+#line 911 "moc.y"
+ { (yyval.string) = ""; }
+ break;
+
+ case 32:
+
+/* Line 1455 of yacc.c */
+#line 912 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 33:
+
+/* Line 1455 of yacc.c */
+#line 913 "moc.y"
+ { (yyval.string) = ""; }
+ break;
+
+ case 34:
+
+/* Line 1455 of yacc.c */
+#line 914 "moc.y"
+ { skipFunc = TRUE; (yyval.string) = ""; }
+ break;
+
+ case 35:
+
+/* Line 1455 of yacc.c */
+#line 915 "moc.y"
+ { skipFunc = TRUE; (yyval.string) = ""; }
+ break;
+
+ case 36:
+
+/* Line 1455 of yacc.c */
+#line 919 "moc.y"
+ { (yyval.string) = straddSpc((yyvsp[(1) - (3)].string),(yyvsp[(2) - (3)].string),(yyvsp[(3) - (3)].string)); }
+ break;
+
+ case 37:
+
+/* Line 1455 of yacc.c */
+#line 921 "moc.y"
+ { (yyval.string) = ""; }
+ break;
+
+ case 38:
+
+/* Line 1455 of yacc.c */
+#line 922 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 39:
+
+/* Line 1455 of yacc.c */
+#line 925 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 40:
+
+/* Line 1455 of yacc.c */
+#line 926 "moc.y"
+ { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); }
+ break;
+
+ case 43:
+
+/* Line 1455 of yacc.c */
+#line 931 "moc.y"
+ { skipFunc = TRUE; }
+ break;
+
+ case 45:
+
+/* Line 1455 of yacc.c */
+#line 935 "moc.y"
+ { }
+ break;
+
+ case 46:
+
+/* Line 1455 of yacc.c */
+#line 936 "moc.y"
+ { }
+ break;
+
+ case 47:
+
+/* Line 1455 of yacc.c */
+#line 939 "moc.y"
+ { (yyval.string) = "const"; }
+ break;
+
+ case 48:
+
+/* Line 1455 of yacc.c */
+#line 940 "moc.y"
+ { (yyval.string) = "volatile"; }
+ break;
+
+ case 49:
+
+/* Line 1455 of yacc.c */
+#line 943 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 50:
+
+/* Line 1455 of yacc.c */
+#line 944 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 51:
+
+/* Line 1455 of yacc.c */
+#line 945 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 52:
+
+/* Line 1455 of yacc.c */
+#line 949 "moc.y"
+ { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); }
+ break;
+
+ case 53:
+
+/* Line 1455 of yacc.c */
+#line 950 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 54:
+
+/* Line 1455 of yacc.c */
+#line 953 "moc.y"
+ { (yyval.string) = "char"; }
+ break;
+
+ case 55:
+
+/* Line 1455 of yacc.c */
+#line 954 "moc.y"
+ { (yyval.string) = "short"; }
+ break;
+
+ case 56:
+
+/* Line 1455 of yacc.c */
+#line 955 "moc.y"
+ { (yyval.string) = "int"; }
+ break;
+
+ case 57:
+
+/* Line 1455 of yacc.c */
+#line 956 "moc.y"
+ { (yyval.string) = "long"; }
+ break;
+
+ case 58:
+
+/* Line 1455 of yacc.c */
+#line 957 "moc.y"
+ { (yyval.string) = "signed"; }
+ break;
+
+ case 59:
+
+/* Line 1455 of yacc.c */
+#line 958 "moc.y"
+ { (yyval.string) = "unsigned"; }
+ break;
+
+ case 60:
+
+/* Line 1455 of yacc.c */
+#line 959 "moc.y"
+ { (yyval.string) = "float"; }
+ break;
+
+ case 61:
+
+/* Line 1455 of yacc.c */
+#line 960 "moc.y"
+ { (yyval.string) = "double"; }
+ break;
+
+ case 62:
+
+/* Line 1455 of yacc.c */
+#line 961 "moc.y"
+ { (yyval.string) = "void"; }
+ break;
+
+ case 63:
+
+/* Line 1455 of yacc.c */
+#line 965 "moc.y"
+ { g->tmpExpression = rmWS( g->tmpExpression );
+ (yyval.string) = stradd( "template<",
+ g->tmpExpression, ">" ); }
+ break;
+
+ case 65:
+
+/* Line 1455 of yacc.c */
+#line 971 "moc.y"
+ { templateClassOld = templateClass;
+ templateClass = TRUE;
+ }
+ break;
+
+ case 66:
+
+/* Line 1455 of yacc.c */
+#line 977 "moc.y"
+ { (yyval.string) = "class"; }
+ break;
+
+ case 67:
+
+/* Line 1455 of yacc.c */
+#line 978 "moc.y"
+ { (yyval.string) = "struct"; }
+ break;
+
+ case 68:
+
+/* Line 1455 of yacc.c */
+#line 981 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 69:
+
+/* Line 1455 of yacc.c */
+#line 983 "moc.y"
+ { (yyval.string) = stradd( "::", (yyvsp[(2) - (2)].string) ); }
+ break;
+
+ case 70:
+
+/* Line 1455 of yacc.c */
+#line 987 "moc.y"
+ { (yyval.string) = stradd( (yyvsp[(1) - (3)].string), "::", (yyvsp[(3) - (3)].string) );}
+ break;
+
+ case 71:
+
+/* Line 1455 of yacc.c */
+#line 988 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 72:
+
+/* Line 1455 of yacc.c */
+#line 992 "moc.y"
+ { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); }
+ break;
+
+ case 73:
+
+/* Line 1455 of yacc.c */
+#line 993 "moc.y"
+ { (yyval.string) = stradd("enum ",(yyvsp[(2) - (2)].string)); }
+ break;
+
+ case 74:
+
+/* Line 1455 of yacc.c */
+#line 994 "moc.y"
+ { (yyval.string) = stradd("union ",(yyvsp[(2) - (2)].string)); }
+ break;
+
+ case 75:
+
+/* Line 1455 of yacc.c */
+#line 999 "moc.y"
+ { (yyval.arg_list) = (yyvsp[(1) - (2)].arg_list);}
+ break;
+
+ case 76:
+
+/* Line 1455 of yacc.c */
+#line 1000 "moc.y"
+ { (yyval.arg_list) = (yyvsp[(1) - (3)].arg_list);
+ func_warn("Ellipsis not supported"
+ " in signals and slots.\n"
+ "Ellipsis argument ignored."); }
+ break;
+
+ case 77:
+
+/* Line 1455 of yacc.c */
+#line 1006 "moc.y"
+ { (yyval.arg_list) = tmpArgList; }
+ break;
+
+ case 78:
+
+/* Line 1455 of yacc.c */
+#line 1007 "moc.y"
+ { (yyval.arg_list) = (yyvsp[(1) - (1)].arg_list); }
+ break;
+
+ case 79:
+
+/* Line 1455 of yacc.c */
+#line 1010 "moc.y"
+ { (yyval.arg) = 0; }
+ break;
+
+ case 82:
+
+/* Line 1455 of yacc.c */
+#line 1015 "moc.y"
+ { func_warn("Ellipsis not supported"
+ " in signals and slots.\n"
+ "Ellipsis argument ignored."); }
+ break;
+
+ case 83:
+
+/* Line 1455 of yacc.c */
+#line 1023 "moc.y"
+ { (yyval.arg_list) = addArg((yyvsp[(3) - (3)].arg)); }
+ break;
+
+ case 84:
+
+/* Line 1455 of yacc.c */
+#line 1024 "moc.y"
+ { (yyval.arg_list) = addArg((yyvsp[(1) - (1)].arg)); }
+ break;
+
+ case 85:
+
+/* Line 1455 of yacc.c */
+#line 1028 "moc.y"
+ { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)),""); }
+ break;
+
+ case 86:
+
+/* Line 1455 of yacc.c */
+#line 1030 "moc.y"
+ { expLevel = 1; }
+ break;
+
+ case 87:
+
+/* Line 1455 of yacc.c */
+#line 1032 "moc.y"
+ { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (5)].string),(yyvsp[(2) - (5)].string)),"", 0, TRUE ); }
+ break;
+
+ case 88:
+
+/* Line 1455 of yacc.c */
+#line 1035 "moc.y"
+ { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (4)].string),(yyvsp[(2) - (4)].string)),(yyvsp[(4) - (4)].string), (yyvsp[(3) - (4)].string)); }
+ break;
+
+ case 89:
+
+/* Line 1455 of yacc.c */
+#line 1038 "moc.y"
+ { expLevel = 1; }
+ break;
+
+ case 90:
+
+/* Line 1455 of yacc.c */
+#line 1040 "moc.y"
+ { (yyval.arg) = new Argument(straddSpc((yyvsp[(1) - (7)].string),(yyvsp[(2) - (7)].string)),(yyvsp[(4) - (7)].string), (yyvsp[(3) - (7)].string), TRUE); }
+ break;
+
+ case 91:
+
+/* Line 1455 of yacc.c */
+#line 1044 "moc.y"
+ { (yyval.string) = ""; }
+ break;
+
+ case 92:
+
+/* Line 1455 of yacc.c */
+#line 1045 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 93:
+
+/* Line 1455 of yacc.c */
+#line 1049 "moc.y"
+ { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); }
+ break;
+
+ case 94:
+
+/* Line 1455 of yacc.c */
+#line 1050 "moc.y"
+ { expLevel = 1; }
+ break;
+
+ case 95:
+
+/* Line 1455 of yacc.c */
+#line 1052 "moc.y"
+ { (yyval.string) = stradd( "[",
+ g->tmpExpression =
+ g->tmpExpression.stripWhiteSpace(), "]" ); }
+ break;
+
+ case 96:
+
+/* Line 1455 of yacc.c */
+#line 1055 "moc.y"
+ { expLevel = 1; }
+ break;
+
+ case 97:
+
+/* Line 1455 of yacc.c */
+#line 1057 "moc.y"
+ { (yyval.string) = stradd( (yyvsp[(1) - (5)].string),"[",
+ g->tmpExpression =
+ g->tmpExpression.stripWhiteSpace(),"]" ); }
+ break;
+
+ case 98:
+
+/* Line 1455 of yacc.c */
+#line 1060 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 99:
+
+/* Line 1455 of yacc.c */
+#line 1061 "moc.y"
+ { (yyval.string) = (yyvsp[(2) - (3)].string); }
+ break;
+
+ case 100:
+
+/* Line 1455 of yacc.c */
+#line 1064 "moc.y"
+ { (yyval.string) = ""; }
+ break;
+
+ case 101:
+
+/* Line 1455 of yacc.c */
+#line 1066 "moc.y"
+ { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string));}
+ break;
+
+ case 102:
+
+/* Line 1455 of yacc.c */
+#line 1067 "moc.y"
+ { expLevel = 1; }
+ break;
+
+ case 103:
+
+/* Line 1455 of yacc.c */
+#line 1069 "moc.y"
+ { (yyval.string) = stradd( (yyvsp[(1) - (5)].string),"[",
+ g->tmpExpression =
+ g->tmpExpression.stripWhiteSpace(),"]" ); }
+ break;
+
+ case 104:
+
+/* Line 1455 of yacc.c */
+#line 1072 "moc.y"
+ { (yyval.string) = (yyvsp[(2) - (3)].string); }
+ break;
+
+ case 106:
+
+/* Line 1455 of yacc.c */
+#line 1086 "moc.y"
+ { tmpFunc->args = (yyvsp[(2) - (8)].arg_list);
+ tmpFunc->qualifier = (yyvsp[(4) - (8)].string); }
+ break;
+
+ case 108:
+
+/* Line 1455 of yacc.c */
+#line 1092 "moc.y"
+ { func_warn("Variable as signal or slot."); }
+ break;
+
+ case 109:
+
+/* Line 1455 of yacc.c */
+#line 1093 "moc.y"
+ { expLevel=0; }
+ break;
+
+ case 110:
+
+/* Line 1455 of yacc.c */
+#line 1095 "moc.y"
+ { skipFunc = TRUE; }
+ break;
+
+ case 111:
+
+/* Line 1455 of yacc.c */
+#line 1096 "moc.y"
+ { expLevel=0; }
+ break;
+
+ case 112:
+
+/* Line 1455 of yacc.c */
+#line 1098 "moc.y"
+ { skipFunc = TRUE; }
+ break;
+
+ case 113:
+
+/* Line 1455 of yacc.c */
+#line 1102 "moc.y"
+ { expLevel = 1; }
+ break;
+
+ case 115:
+
+/* Line 1455 of yacc.c */
+#line 1104 "moc.y"
+ { expLevel = 1; }
+ break;
+
+ case 117:
+
+/* Line 1455 of yacc.c */
+#line 1109 "moc.y"
+ { (yyval.string) = ""; }
+ break;
+
+ case 118:
+
+/* Line 1455 of yacc.c */
+#line 1110 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 119:
+
+/* Line 1455 of yacc.c */
+#line 1113 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 120:
+
+/* Line 1455 of yacc.c */
+#line 1114 "moc.y"
+ { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string));}
+ break;
+
+ case 121:
+
+/* Line 1455 of yacc.c */
+#line 1117 "moc.y"
+ { (yyval.string) = straddSpc("*",(yyvsp[(2) - (2)].string));}
+ break;
+
+ case 122:
+
+/* Line 1455 of yacc.c */
+#line 1118 "moc.y"
+ { (yyval.string) = stradd("&",(yyvsp[(2) - (2)].string));}
+ break;
+
+ case 123:
+
+/* Line 1455 of yacc.c */
+#line 1125 "moc.y"
+ { (yyval.string) = ""; }
+ break;
+
+ case 124:
+
+/* Line 1455 of yacc.c */
+#line 1126 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 125:
+
+/* Line 1455 of yacc.c */
+#line 1129 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 126:
+
+/* Line 1455 of yacc.c */
+#line 1131 "moc.y"
+ { (yyval.string) = straddSpc((yyvsp[(1) - (2)].string),(yyvsp[(2) - (2)].string)); }
+ break;
+
+ case 127:
+
+/* Line 1455 of yacc.c */
+#line 1134 "moc.y"
+ { (yyval.string) = "const"; }
+ break;
+
+ case 128:
+
+/* Line 1455 of yacc.c */
+#line 1135 "moc.y"
+ { (yyval.string) = "volatile"; }
+ break;
+
+ case 132:
+
+/* Line 1455 of yacc.c */
+#line 1143 "moc.y"
+ { BEGIN IN_FCT; fctLevel = 1;}
+ break;
+
+ case 133:
+
+/* Line 1455 of yacc.c */
+#line 1144 "moc.y"
+ { BEGIN QT_DEF; }
+ break;
+
+ case 134:
+
+/* Line 1455 of yacc.c */
+#line 1151 "moc.y"
+ { BEGIN IN_CLASS;
+ classPLevel = 1;
+ }
+ break;
+
+ case 135:
+
+/* Line 1455 of yacc.c */
+#line 1155 "moc.y"
+ { BEGIN QT_DEF; }
+ break;
+
+ case 136:
+
+/* Line 1455 of yacc.c */
+#line 1156 "moc.y"
+ { BEGIN QT_DEF; /* -- " -- */
+ skipClass = TRUE; }
+ break;
+
+ case 137:
+
+/* Line 1455 of yacc.c */
+#line 1158 "moc.y"
+ { BEGIN QT_DEF; /* -- " -- */
+ skipClass = TRUE; }
+ break;
+
+ case 138:
+
+/* Line 1455 of yacc.c */
+#line 1160 "moc.y"
+ { BEGIN QT_DEF; /* -- " -- */
+ skipClass = TRUE; }
+ break;
+
+ case 139:
+
+/* Line 1455 of yacc.c */
+#line 1164 "moc.y"
+ { BEGIN QT_DEF; /* catch ';' */
+ skipClass = TRUE; }
+ break;
+
+ case 140:
+
+/* Line 1455 of yacc.c */
+#line 1166 "moc.y"
+ { skipClass = TRUE;
+ BEGIN GIMME_SEMICOLON; }
+ break;
+
+ case 144:
+
+/* Line 1455 of yacc.c */
+#line 1173 "moc.y"
+ { (yyval.string) = ""; }
+ break;
+
+ case 146:
+
+/* Line 1455 of yacc.c */
+#line 1179 "moc.y"
+ { g->className = (yyvsp[(2) - (2)].string);
+ if ( g->className == "QObject" )
+ Q_OBJECTdetected = TRUE;
+ }
+ break;
+
+ case 147:
+
+/* Line 1455 of yacc.c */
+#line 1185 "moc.y"
+ { g->className = (yyvsp[(3) - (3)].string);
+ if ( g->className == "QObject" )
+ Q_OBJECTdetected = TRUE;
+ }
+ break;
+
+ case 148:
+
+/* Line 1455 of yacc.c */
+#line 1192 "moc.y"
+ { g->superClassName = (yyvsp[(2) - (2)].string); }
+ break;
+
+ case 149:
+
+/* Line 1455 of yacc.c */
+#line 1197 "moc.y"
+ { templateClass = templateClassOld; }
+ break;
+
+ case 158:
+
+/* Line 1455 of yacc.c */
+#line 1220 "moc.y"
+ { expLevel = 1; }
+ break;
+
+ case 160:
+
+/* Line 1455 of yacc.c */
+#line 1225 "moc.y"
+ { (yyval.string) = 0; }
+ break;
+
+ case 161:
+
+/* Line 1455 of yacc.c */
+#line 1226 "moc.y"
+ { (yyval.string) = (yyvsp[(1) - (1)].string); }
+ break;
+
+ case 166:
+
+/* Line 1455 of yacc.c */
+#line 1238 "moc.y"
+ { tmpAccess = (yyvsp[(1) - (1)].access); }
+ break;
+
+ case 167:
+
+/* Line 1455 of yacc.c */
+#line 1239 "moc.y"
+ { moc_err( "Missing access specifier"
+ " before \"slots:\"." ); }
+ break;
+
+ case 168:
+
+/* Line 1455 of yacc.c */
+#line 1243 "moc.y"
+ { BEGIN QT_DEF; }
+ break;
+
+ case 170:
+
+/* Line 1455 of yacc.c */
+#line 1245 "moc.y"
+ { BEGIN QT_DEF; }
+ break;
+
+ case 172:
+
+/* Line 1455 of yacc.c */
+#line 1247 "moc.y"
+ {
+ if ( tmpAccess )
+ moc_warn("Q_OBJECT is not in the private"
+ " section of the class.\n"
+ "Q_OBJECT is a macro that resets"
+ " access permission to \"private\".");
+ Q_OBJECTdetected = TRUE;
+ }
+ break;
+
+ case 173:
+
+/* Line 1455 of yacc.c */
+#line 1255 "moc.y"
+ { tmpYYStart = YY_START;
+ tmpPropOverride = FALSE;
+ BEGIN IN_PROPERTY; }
+ break;
+
+ case 174:
+
+/* Line 1455 of yacc.c */
+#line 1258 "moc.y"
+ {
+ BEGIN tmpYYStart;
+ }
+ break;
+
+ case 176:
+
+/* Line 1455 of yacc.c */
+#line 1262 "moc.y"
+ { tmpYYStart = YY_START;
+ tmpPropOverride = TRUE;
+ BEGIN IN_PROPERTY; }
+ break;
+
+ case 177:
+
+/* Line 1455 of yacc.c */
+#line 1265 "moc.y"
+ {
+ BEGIN tmpYYStart;
+ }
+ break;
+
+ case 179:
+
+/* Line 1455 of yacc.c */
+#line 1269 "moc.y"
+ { tmpYYStart = YY_START; BEGIN IN_CLASSINFO; }
+ break;
+
+ case 180:
+
+/* Line 1455 of yacc.c */
+#line 1271 "moc.y"
+ {
+ g->infos.append( new ClassInfo( (yyvsp[(4) - (7)].string), (yyvsp[(6) - (7)].string) ) );
+ BEGIN tmpYYStart;
+ }
+ break;
+
+ case 182:
+
+/* Line 1455 of yacc.c */
+#line 1276 "moc.y"
+ { tmpYYStart = YY_START; BEGIN IN_PROPERTY; }
+ break;
+
+ case 183:
+
+/* Line 1455 of yacc.c */
+#line 1277 "moc.y"
+ {
+ Q_PROPERTYdetected = TRUE;
+ BEGIN tmpYYStart;
+ }
+ break;
+
+ case 185:
+
+/* Line 1455 of yacc.c */
+#line 1282 "moc.y"
+ { tmpYYStart = YY_START; BEGIN IN_PROPERTY; }
+ break;
+
+ case 186:
+
+/* Line 1455 of yacc.c */
+#line 1283 "moc.y"
+ {
+ Q_PROPERTYdetected = TRUE;
+ BEGIN tmpYYStart;
+ }
+ break;
+
+ case 188:
+
+/* Line 1455 of yacc.c */
+#line 1290 "moc.y"
+ { moc_err( "Signals cannot "
+ "have access specifiers" ); }
+ break;
+
+ case 190:
+
+/* Line 1455 of yacc.c */
+#line 1293 "moc.y"
+ { if ( tmpAccess == Public && Q_PROPERTYdetected )
+ BEGIN QT_DEF;
+ else
+ BEGIN IN_CLASS;
+ suppress_func_warn = TRUE;
+ }
+ break;
+
+ case 191:
+
+/* Line 1455 of yacc.c */
+#line 1300 "moc.y"
+ {
+ suppress_func_warn = FALSE;
+ }
+ break;
+
+ case 192:
+
+/* Line 1455 of yacc.c */
+#line 1303 "moc.y"
+ { BEGIN IN_CLASS;
+ if ( classPLevel != 1 )
+ moc_warn( "unexpected access"
+ "specifier" );
+ }
+ break;
+
+ case 197:
+
+/* Line 1455 of yacc.c */
+#line 1318 "moc.y"
+ { addMember( PropertyCandidateMember ); }
+ break;
+
+ case 202:
+
+/* Line 1455 of yacc.c */
+#line 1330 "moc.y"
+ { addMember( SignalMember ); }
+ break;
+
+ case 207:
+
+/* Line 1455 of yacc.c */
+#line 1341 "moc.y"
+ { addMember( SlotMember ); }
+ break;
+
+ case 210:
+
+/* Line 1455 of yacc.c */
+#line 1348 "moc.y"
+ { (yyval.string)=(yyvsp[(2) - (2)].string); }
+ break;
+
+ case 211:
+
+/* Line 1455 of yacc.c */
+#line 1351 "moc.y"
+ { g->multipleSuperClasses.append( (yyvsp[(3) - (3)].string) ); }
+ break;
+
+ case 213:
+
+/* Line 1455 of yacc.c */
+#line 1356 "moc.y"
+ { (yyval.string) = stradd( (yyvsp[(1) - (4)].string), "(", (yyvsp[(3) - (4)].string), ")" ); }
+ break;
+
+ case 214:
+
+/* Line 1455 of yacc.c */
+#line 1358 "moc.y"
+ { (yyval.string) = stradd( (yyvsp[(1) - (4)].string), "(", (yyvsp[(3) - (4)].string), ")" ); }
+ break;
+
+ case 215:
+
+/* Line 1455 of yacc.c */
+#line 1361 "moc.y"
+ {(yyval.string)=(yyvsp[(1) - (1)].string);}
+ break;
+
+ case 216:
+
+/* Line 1455 of yacc.c */
+#line 1362 "moc.y"
+ {(yyval.string)=(yyvsp[(3) - (3)].string);}
+ break;
+
+ case 217:
+
+/* Line 1455 of yacc.c */
+#line 1363 "moc.y"
+ {(yyval.string)=(yyvsp[(2) - (2)].string);}
+ break;
+
+ case 218:
+
+/* Line 1455 of yacc.c */
+#line 1364 "moc.y"
+ {(yyval.string)=(yyvsp[(3) - (3)].string);}
+ break;
+
+ case 219:
+
+/* Line 1455 of yacc.c */
+#line 1365 "moc.y"
+ {(yyval.string)=(yyvsp[(2) - (2)].string);}
+ break;
+
+ case 220:
+
+/* Line 1455 of yacc.c */
+#line 1366 "moc.y"
+ {(yyval.string)=(yyvsp[(1) - (1)].string);}
+ break;
+
+ case 221:
+
+/* Line 1455 of yacc.c */
+#line 1367 "moc.y"
+ {(yyval.string)=(yyvsp[(3) - (3)].string);}
+ break;
+
+ case 222:
+
+/* Line 1455 of yacc.c */
+#line 1368 "moc.y"
+ {(yyval.string)=(yyvsp[(2) - (2)].string);}
+ break;
+
+ case 223:
+
+/* Line 1455 of yacc.c */
+#line 1369 "moc.y"
+ {(yyval.string)=(yyvsp[(3) - (3)].string);}
+ break;
+
+ case 224:
+
+/* Line 1455 of yacc.c */
+#line 1370 "moc.y"
+ {(yyval.string)=(yyvsp[(2) - (2)].string);}
+ break;
+
+ case 225:
+
+/* Line 1455 of yacc.c */
+#line 1373 "moc.y"
+ { (yyval.access)=Private; }
+ break;
+
+ case 226:
+
+/* Line 1455 of yacc.c */
+#line 1374 "moc.y"
+ { (yyval.access)=Protected; }
+ break;
+
+ case 227:
+
+/* Line 1455 of yacc.c */
+#line 1375 "moc.y"
+ { (yyval.access)=Public; }
+ break;
+
+ case 228:
+
+/* Line 1455 of yacc.c */
+#line 1378 "moc.y"
+ { }
+ break;
+
+ case 229:
+
+/* Line 1455 of yacc.c */
+#line 1379 "moc.y"
+ { }
+ break;
+
+ case 271:
+
+/* Line 1455 of yacc.c */
+#line 1427 "moc.y"
+ { tmpFunc->type = (yyvsp[(1) - (2)].string);
+ tmpFunc->name = (yyvsp[(2) - (2)].string); }
+ break;
+
+ case 272:
+
+/* Line 1455 of yacc.c */
+#line 1430 "moc.y"
+ { tmpFunc->type = "int";
+ tmpFunc->name = (yyvsp[(1) - (1)].string);
+ if ( tmpFunc->name == g->className )
+ func_warn( "Constructors cannot be"
+ " signals or slots.");
+ }
+ break;
+
+ case 273:
+
+/* Line 1455 of yacc.c */
+#line 1437 "moc.y"
+ { tmpFunc->type = "void";
+ tmpFunc->name = "~";
+ tmpFunc->name += (yyvsp[(3) - (3)].string);
+ func_warn( "Destructors cannot be"
+ " signals or slots.");
+ }
+ break;
+
+ case 274:
+
+/* Line 1455 of yacc.c */
+#line 1445 "moc.y"
+ {
+ char *tmp =
+ straddSpc((yyvsp[(1) - (5)].string),(yyvsp[(2) - (5)].string),(yyvsp[(3) - (5)].string),(yyvsp[(4) - (5)].string));
+ tmpFunc->type = rmWS(tmp);
+ delete [] tmp;
+ tmpFunc->name = (yyvsp[(5) - (5)].string); }
+ break;
+
+ case 275:
+
+/* Line 1455 of yacc.c */
+#line 1452 "moc.y"
+ { skipFunc = TRUE; }
+ break;
+
+ case 276:
+
+/* Line 1455 of yacc.c */
+#line 1454 "moc.y"
+ { tmpFunc->type =
+ straddSpc((yyvsp[(1) - (3)].string),(yyvsp[(2) - (3)].string));
+ tmpFunc->name = (yyvsp[(3) - (3)].string); }
+ break;
+
+ case 277:
+
+/* Line 1455 of yacc.c */
+#line 1459 "moc.y"
+ { tmpFunc->type =
+ straddSpc((yyvsp[(1) - (4)].string),(yyvsp[(2) - (4)].string),(yyvsp[(3) - (4)].string));
+ tmpFunc->name = (yyvsp[(4) - (4)].string); }
+ break;
+
+ case 278:
+
+/* Line 1455 of yacc.c */
+#line 1463 "moc.y"
+ { operatorError(); }
+ break;
+
+ case 279:
+
+/* Line 1455 of yacc.c */
+#line 1465 "moc.y"
+ { operatorError(); }
+ break;
+
+ case 280:
+
+/* Line 1455 of yacc.c */
+#line 1468 "moc.y"
+ { operatorError(); }
+ break;
+
+ case 281:
+
+/* Line 1455 of yacc.c */
+#line 1470 "moc.y"
+ { operatorError(); }
+ break;
+
+ case 282:
+
+/* Line 1455 of yacc.c */
+#line 1473 "moc.y"
+ { operatorError(); }
+ break;
+
+ case 284:
+
+/* Line 1455 of yacc.c */
+#line 1479 "moc.y"
+ { func_warn("Unexpected variable declaration."); }
+ break;
+
+ case 285:
+
+/* Line 1455 of yacc.c */
+#line 1482 "moc.y"
+ { func_warn("Unexpected variable declaration."); }
+ break;
+
+ case 286:
+
+/* Line 1455 of yacc.c */
+#line 1484 "moc.y"
+ { func_warn("Unexpected enum declaration."); }
+ break;
+
+ case 287:
+
+/* Line 1455 of yacc.c */
+#line 1486 "moc.y"
+ { func_warn("Unexpected using declaration."); }
+ break;
+
+ case 288:
+
+/* Line 1455 of yacc.c */
+#line 1488 "moc.y"
+ { func_warn("Unexpected using declaration."); }
+ break;
+
+ case 289:
+
+/* Line 1455 of yacc.c */
+#line 1490 "moc.y"
+ { classPLevel++;
+ moc_err("Unexpected namespace declaration."); }
+ break;
+
+ case 290:
+
+/* Line 1455 of yacc.c */
+#line 1493 "moc.y"
+ { func_warn("Unexpected class declaration.");}
+ break;
+
+ case 291:
+
+/* Line 1455 of yacc.c */
+#line 1495 "moc.y"
+ { func_warn("Unexpected class declaration.");
+ BEGIN IN_FCT; fctLevel=1;
+ }
+ break;
+
+ case 292:
+
+/* Line 1455 of yacc.c */
+#line 1498 "moc.y"
+ { BEGIN QT_DEF; }
+ break;
+
+ case 296:
+
+/* Line 1455 of yacc.c */
+#line 1507 "moc.y"
+ { }
+ break;
+
+ case 297:
+
+/* Line 1455 of yacc.c */
+#line 1508 "moc.y"
+ { expLevel = 0; }
+ break;
+
+ case 299:
+
+/* Line 1455 of yacc.c */
+#line 1510 "moc.y"
+ { expLevel = 0; }
+ break;
+
+ case 302:
+
+/* Line 1455 of yacc.c */
+#line 1515 "moc.y"
+ { expLevel = 0; }
+ break;
+
+ case 307:
+
+/* Line 1455 of yacc.c */
+#line 1530 "moc.y"
+ { BEGIN QT_DEF;
+ if ( tmpAccess == Public) {
+ tmpEnum->name = (yyvsp[(1) - (5)].string);
+ addEnum();
+ }
+ }
+ break;
+
+ case 308:
+
+/* Line 1455 of yacc.c */
+#line 1537 "moc.y"
+ { tmpEnum->clear();}
+ break;
+
+ case 310:
+
+/* Line 1455 of yacc.c */
+#line 1541 "moc.y"
+ { }
+ break;
+
+ case 314:
+
+/* Line 1455 of yacc.c */
+#line 1549 "moc.y"
+ { if ( tmpAccess == Public) tmpEnum->append( (yyvsp[(1) - (1)].string) ); }
+ break;
+
+ case 315:
+
+/* Line 1455 of yacc.c */
+#line 1550 "moc.y"
+ { enumLevel=0; }
+ break;
+
+ case 316:
+
+/* Line 1455 of yacc.c */
+#line 1551 "moc.y"
+ { if ( tmpAccess == Public) tmpEnum->append( (yyvsp[(1) - (4)].string) ); }
+ break;
+
+ case 317:
+
+/* Line 1455 of yacc.c */
+#line 1555 "moc.y"
+ {
+ g->propWrite = "";
+ g->propRead = "";
+ g->propOverride = tmpPropOverride;
+ g->propReset = "";
+ if ( g->propOverride ) {
+ g->propStored = "";
+ g->propDesignable = "";
+ g->propScriptable = "";
+ } else {
+ g->propStored = "true";
+ g->propDesignable = "true";
+ g->propScriptable = "true";
+ }
+ }
+ break;
+
+ case 318:
+
+/* Line 1455 of yacc.c */
+#line 1571 "moc.y"
+ {
+ if ( g->propRead.isEmpty() && !g->propOverride )
+ moc_err( "A property must at least feature a read method." );
+ checkPropertyName( (yyvsp[(2) - (4)].string) );
+ Q_PROPERTYdetected = TRUE;
+ // Avoid duplicates
+ for( QPtrListIterator<Property> lit( g->props ); lit.current(); ++lit ) {
+ if ( lit.current()->name == (yyvsp[(2) - (4)].string) ) {
+ if ( displayWarnings )
+ moc_err( "Property '%s' defined twice.",
+ (const char*)lit.current()->name );
+ }
+ }
+ g->props.append( new Property( lineNo, (yyvsp[(1) - (4)].string), (yyvsp[(2) - (4)].string),
+ g->propWrite, g->propRead, g->propReset,
+ g->propStored, g->propDesignable,
+ g->propScriptable, g->propOverride ) );
+ }
+ break;
+
+ case 320:
+
+/* Line 1455 of yacc.c */
+#line 1592 "moc.y"
+ { g->propRead = (yyvsp[(2) - (3)].string); }
+ break;
+
+ case 321:
+
+/* Line 1455 of yacc.c */
+#line 1593 "moc.y"
+ { g->propWrite = (yyvsp[(2) - (3)].string); }
+ break;
+
+ case 322:
+
+/* Line 1455 of yacc.c */
+#line 1594 "moc.y"
+ { g->propReset = (yyvsp[(2) - (3)].string); }
+ break;
+
+ case 323:
+
+/* Line 1455 of yacc.c */
+#line 1595 "moc.y"
+ { g->propStored = (yyvsp[(2) - (3)].string); }
+ break;
+
+ case 324:
+
+/* Line 1455 of yacc.c */
+#line 1596 "moc.y"
+ { g->propDesignable = (yyvsp[(2) - (3)].string); }
+ break;
+
+ case 325:
+
+/* Line 1455 of yacc.c */
+#line 1597 "moc.y"
+ { g->propScriptable = (yyvsp[(2) - (3)].string); }
+ break;
+
+ case 326:
+
+/* Line 1455 of yacc.c */
+#line 1600 "moc.y"
+ { }
+ break;
+
+ case 327:
+
+/* Line 1455 of yacc.c */
+#line 1601 "moc.y"
+ { g->qtEnums.append( (yyvsp[(1) - (2)].string) ); }
+ break;
+
+ case 328:
+
+/* Line 1455 of yacc.c */
+#line 1604 "moc.y"
+ { }
+ break;
+
+ case 329:
+
+/* Line 1455 of yacc.c */
+#line 1605 "moc.y"
+ { g->qtSets.append( (yyvsp[(1) - (2)].string) ); }
+ break;
+
+
+
+/* Line 1455 of yacc.c */
+#line 4222 "moc_yacc"
+ default: break;
+ }
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+ {
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
+ }
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse lookahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse lookahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ *++yyvsp = yylval;
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
+}
+
+
+
+/* Line 1675 of yacc.c */
+#line 1608 "moc.y"
+
#ifndef YYBISON
# if defined(Q_OS_WIN32)
@@ -2872,8 +5659,7 @@ void generateClass() // generate C++ source code for a class
{
const char *hdr1 = "/****************************************************************************\n"
"** %s meta object code from reading C++ file '%s'\n**\n";
- const char *hdr2 = "** Created: %s\n"
- "** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $)\n**\n";
+ const char *hdr2 = "** Created: %s\n";
const char *hdr3 = "** WARNING! All changes made in this file will be lost!\n";
const char *hdr4 = "*****************************************************************************/\n\n";
int i;
@@ -3233,6 +6019,7 @@ void generateClass() // generate C++ source code for a class
offset++;
}
}
+ fprintf( out, " o[%d].isLastObject = true;\n", f->args->count() + 0 );
fprintf( out, " activate_signal( clist, o );\n" );
// get return values from inOut parameters
@@ -3645,1170 +6432,4 @@ void checkPropertyName( const char* ident )
return;
}
}
-#line 3649 "y.tab.c"
-#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 10:
-#line 821 "moc.y"
-{ enterNameSpace(yyvsp[0].string); }
-break;
-case 11:
-#line 822 "moc.y"
-{ BEGIN IN_NAMESPACE; }
-break;
-case 12:
-#line 824 "moc.y"
-{ leaveNameSpace();
- selectOutsideClassState();
- }
-break;
-case 13:
-#line 829 "moc.y"
-{ enterNameSpace(); }
-break;
-case 14:
-#line 830 "moc.y"
-{ BEGIN IN_NAMESPACE; }
-break;
-case 15:
-#line 832 "moc.y"
-{ leaveNameSpace();
- selectOutsideClassState();
- }
-break;
-case 17:
-#line 841 "moc.y"
-{ selectOutsideClassState(); }
-break;
-case 18:
-#line 845 "moc.y"
-{ selectOutsideClassState(); }
-break;
-case 19:
-#line 848 "moc.y"
-{ selectOutsideClassState(); }
-break;
-case 20:
-#line 849 "moc.y"
-{ selectOutsideClassState(); }
-break;
-case 21:
-#line 852 "moc.y"
-{ initClass(); }
-break;
-case 22:
-#line 853 "moc.y"
-{ generateClass();
- registerClassInNamespace();
- selectOutsideClassState(); }
-break;
-case 23:
-#line 861 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 24:
-#line 862 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 25:
-#line 866 "moc.y"
-{ g->tmpExpression = rmWS( g->tmpExpression );
- yyval.string = stradd( yyvsp[-3].string, "<",
- g->tmpExpression, ">" ); }
-break;
-case 26:
-#line 877 "moc.y"
-{ initExpression();
- templLevel = 1;
- BEGIN IN_TEMPL_ARGS; }
-break;
-case 27:
-#line 890 "moc.y"
-{ initExpression();
- BEGIN IN_EXPR; }
-break;
-case 28:
-#line 899 "moc.y"
-{ BEGIN IN_DEF_ARG; }
-break;
-case 29:
-#line 902 "moc.y"
-{ initExpression();
- BEGIN IN_ENUM; }
-break;
-case 30:
-#line 908 "moc.y"
-{ yyval.string = ""; }
-break;
-case 31:
-#line 909 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 32:
-#line 910 "moc.y"
-{ yyval.string = ""; }
-break;
-case 33:
-#line 911 "moc.y"
-{ skipFunc = TRUE; yyval.string = ""; }
-break;
-case 34:
-#line 912 "moc.y"
-{ skipFunc = TRUE; yyval.string = ""; }
-break;
-case 35:
-#line 916 "moc.y"
-{ yyval.string = straddSpc(yyvsp[-2].string,yyvsp[-1].string,yyvsp[0].string); }
-break;
-case 36:
-#line 918 "moc.y"
-{ yyval.string = ""; }
-break;
-case 37:
-#line 919 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 38:
-#line 922 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 39:
-#line 923 "moc.y"
-{ yyval.string = straddSpc(yyvsp[-1].string,yyvsp[0].string); }
-break;
-case 42:
-#line 928 "moc.y"
-{ skipFunc = TRUE; }
-break;
-case 44:
-#line 932 "moc.y"
-{ }
-break;
-case 45:
-#line 933 "moc.y"
-{ }
-break;
-case 46:
-#line 936 "moc.y"
-{ yyval.string = "const"; }
-break;
-case 47:
-#line 937 "moc.y"
-{ yyval.string = "volatile"; }
-break;
-case 48:
-#line 940 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 49:
-#line 941 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 50:
-#line 942 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 51:
-#line 946 "moc.y"
-{ yyval.string = straddSpc(yyvsp[-1].string,yyvsp[0].string); }
-break;
-case 52:
-#line 947 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 53:
-#line 950 "moc.y"
-{ yyval.string = "char"; }
-break;
-case 54:
-#line 951 "moc.y"
-{ yyval.string = "short"; }
-break;
-case 55:
-#line 952 "moc.y"
-{ yyval.string = "int"; }
-break;
-case 56:
-#line 953 "moc.y"
-{ yyval.string = "long"; }
-break;
-case 57:
-#line 954 "moc.y"
-{ yyval.string = "signed"; }
-break;
-case 58:
-#line 955 "moc.y"
-{ yyval.string = "unsigned"; }
-break;
-case 59:
-#line 956 "moc.y"
-{ yyval.string = "float"; }
-break;
-case 60:
-#line 957 "moc.y"
-{ yyval.string = "double"; }
-break;
-case 61:
-#line 958 "moc.y"
-{ yyval.string = "void"; }
-break;
-case 62:
-#line 962 "moc.y"
-{ g->tmpExpression = rmWS( g->tmpExpression );
- yyval.string = stradd( "template<",
- g->tmpExpression, ">" ); }
-break;
-case 64:
-#line 968 "moc.y"
-{ templateClassOld = templateClass;
- templateClass = TRUE;
- }
-break;
-case 65:
-#line 974 "moc.y"
-{ yyval.string = "class"; }
-break;
-case 66:
-#line 975 "moc.y"
-{ yyval.string = "struct"; }
-break;
-case 67:
-#line 978 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 68:
-#line 980 "moc.y"
-{ yyval.string = stradd( "::", yyvsp[0].string ); }
-break;
-case 69:
-#line 984 "moc.y"
-{ yyval.string = stradd( yyvsp[-2].string, "::", yyvsp[0].string );}
-break;
-case 70:
-#line 985 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 71:
-#line 989 "moc.y"
-{ yyval.string = straddSpc(yyvsp[-1].string,yyvsp[0].string); }
-break;
-case 72:
-#line 990 "moc.y"
-{ yyval.string = stradd("enum ",yyvsp[0].string); }
-break;
-case 73:
-#line 991 "moc.y"
-{ yyval.string = stradd("union ",yyvsp[0].string); }
-break;
-case 74:
-#line 996 "moc.y"
-{ yyval.arg_list = yyvsp[-1].arg_list;}
-break;
-case 75:
-#line 997 "moc.y"
-{ yyval.arg_list = yyvsp[-2].arg_list;
- func_warn("Ellipsis not supported"
- " in signals and slots.\n"
- "Ellipsis argument ignored."); }
-break;
-case 76:
-#line 1003 "moc.y"
-{ yyval.arg_list = tmpArgList; }
-break;
-case 77:
-#line 1004 "moc.y"
-{ yyval.arg_list = yyvsp[0].arg_list; }
-break;
-case 78:
-#line 1007 "moc.y"
-{ yyval.arg = 0; }
-break;
-case 81:
-#line 1012 "moc.y"
-{ func_warn("Ellipsis not supported"
- " in signals and slots.\n"
- "Ellipsis argument ignored."); }
-break;
-case 82:
-#line 1020 "moc.y"
-{ yyval.arg_list = addArg(yyvsp[0].arg); }
-break;
-case 83:
-#line 1021 "moc.y"
-{ yyval.arg_list = addArg(yyvsp[0].arg); }
-break;
-case 84:
-#line 1025 "moc.y"
-{ yyval.arg = new Argument(straddSpc(yyvsp[-1].string,yyvsp[0].string),""); }
-break;
-case 85:
-#line 1027 "moc.y"
-{ expLevel = 1; }
-break;
-case 86:
-#line 1029 "moc.y"
-{ yyval.arg = new Argument(straddSpc(yyvsp[-4].string,yyvsp[-3].string),"", 0, TRUE ); }
-break;
-case 87:
-#line 1032 "moc.y"
-{ yyval.arg = new Argument(straddSpc(yyvsp[-3].string,yyvsp[-2].string),yyvsp[0].string, yyvsp[-1].string); }
-break;
-case 88:
-#line 1035 "moc.y"
-{ expLevel = 1; }
-break;
-case 89:
-#line 1037 "moc.y"
-{ yyval.arg = new Argument(straddSpc(yyvsp[-6].string,yyvsp[-5].string),yyvsp[-3].string, yyvsp[-4].string, TRUE); }
-break;
-case 90:
-#line 1041 "moc.y"
-{ yyval.string = ""; }
-break;
-case 91:
-#line 1042 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 92:
-#line 1046 "moc.y"
-{ yyval.string = straddSpc(yyvsp[-1].string,yyvsp[0].string); }
-break;
-case 93:
-#line 1047 "moc.y"
-{ expLevel = 1; }
-break;
-case 94:
-#line 1049 "moc.y"
-{ yyval.string = stradd( "[",
- g->tmpExpression =
- g->tmpExpression.stripWhiteSpace(), "]" ); }
-break;
-case 95:
-#line 1052 "moc.y"
-{ expLevel = 1; }
-break;
-case 96:
-#line 1054 "moc.y"
-{ yyval.string = stradd( yyvsp[-4].string,"[",
- g->tmpExpression =
- g->tmpExpression.stripWhiteSpace(),"]" ); }
-break;
-case 97:
-#line 1057 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 98:
-#line 1058 "moc.y"
-{ yyval.string = yyvsp[-1].string; }
-break;
-case 99:
-#line 1061 "moc.y"
-{ yyval.string = ""; }
-break;
-case 100:
-#line 1063 "moc.y"
-{ yyval.string = straddSpc(yyvsp[-1].string,yyvsp[0].string);}
-break;
-case 101:
-#line 1064 "moc.y"
-{ expLevel = 1; }
-break;
-case 102:
-#line 1066 "moc.y"
-{ yyval.string = stradd( yyvsp[-4].string,"[",
- g->tmpExpression =
- g->tmpExpression.stripWhiteSpace(),"]" ); }
-break;
-case 103:
-#line 1069 "moc.y"
-{ yyval.string = yyvsp[-1].string; }
-break;
-case 105:
-#line 1083 "moc.y"
-{ tmpFunc->args = yyvsp[-6].arg_list;
- tmpFunc->qualifier = yyvsp[-4].string; }
-break;
-case 107:
-#line 1089 "moc.y"
-{ func_warn("Variable as signal or slot."); }
-break;
-case 108:
-#line 1090 "moc.y"
-{ expLevel=0; }
-break;
-case 109:
-#line 1092 "moc.y"
-{ skipFunc = TRUE; }
-break;
-case 110:
-#line 1093 "moc.y"
-{ expLevel=0; }
-break;
-case 111:
-#line 1095 "moc.y"
-{ skipFunc = TRUE; }
-break;
-case 112:
-#line 1099 "moc.y"
-{ expLevel = 1; }
-break;
-case 114:
-#line 1101 "moc.y"
-{ expLevel = 1; }
-break;
-case 116:
-#line 1106 "moc.y"
-{ yyval.string = ""; }
-break;
-case 117:
-#line 1107 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 118:
-#line 1110 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 119:
-#line 1111 "moc.y"
-{ yyval.string = straddSpc(yyvsp[-1].string,yyvsp[0].string);}
-break;
-case 120:
-#line 1114 "moc.y"
-{ yyval.string = straddSpc("*",yyvsp[0].string);}
-break;
-case 121:
-#line 1115 "moc.y"
-{ yyval.string = stradd("&",yyvsp[0].string);}
-break;
-case 122:
-#line 1122 "moc.y"
-{ yyval.string = ""; }
-break;
-case 123:
-#line 1123 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 124:
-#line 1126 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 125:
-#line 1128 "moc.y"
-{ yyval.string = straddSpc(yyvsp[-1].string,yyvsp[0].string); }
-break;
-case 126:
-#line 1131 "moc.y"
-{ yyval.string = "const"; }
-break;
-case 127:
-#line 1132 "moc.y"
-{ yyval.string = "volatile"; }
-break;
-case 131:
-#line 1140 "moc.y"
-{ BEGIN IN_FCT; fctLevel = 1;}
-break;
-case 132:
-#line 1141 "moc.y"
-{ BEGIN QT_DEF; }
-break;
-case 133:
-#line 1148 "moc.y"
-{ BEGIN IN_CLASS;
- classPLevel = 1;
- }
-break;
-case 134:
-#line 1152 "moc.y"
-{ BEGIN QT_DEF; }
-break;
-case 135:
-#line 1153 "moc.y"
-{ BEGIN QT_DEF; /* -- " -- */
- skipClass = TRUE; }
-break;
-case 136:
-#line 1155 "moc.y"
-{ BEGIN QT_DEF; /* -- " -- */
- skipClass = TRUE; }
-break;
-case 137:
-#line 1157 "moc.y"
-{ BEGIN QT_DEF; /* -- " -- */
- skipClass = TRUE; }
-break;
-case 138:
-#line 1161 "moc.y"
-{ BEGIN QT_DEF; /* catch ';' */
- skipClass = TRUE; }
-break;
-case 139:
-#line 1163 "moc.y"
-{ skipClass = TRUE;
- BEGIN GIMME_SEMICOLON; }
-break;
-case 143:
-#line 1170 "moc.y"
-{ yyval.string = ""; }
-break;
-case 145:
-#line 1176 "moc.y"
-{ g->className = yyvsp[0].string;
- if ( g->className == "QObject" )
- Q_OBJECTdetected = TRUE;
- }
-break;
-case 146:
-#line 1182 "moc.y"
-{ g->className = yyvsp[0].string;
- if ( g->className == "QObject" )
- Q_OBJECTdetected = TRUE;
- }
-break;
-case 147:
-#line 1189 "moc.y"
-{ g->superClassName = yyvsp[0].string; }
-break;
-case 148:
-#line 1194 "moc.y"
-{ templateClass = templateClassOld; }
-break;
-case 157:
-#line 1217 "moc.y"
-{ expLevel = 1; }
-break;
-case 159:
-#line 1222 "moc.y"
-{ yyval.string = 0; }
-break;
-case 160:
-#line 1223 "moc.y"
-{ yyval.string = yyvsp[0].string; }
-break;
-case 165:
-#line 1235 "moc.y"
-{ tmpAccess = yyvsp[0].access; }
-break;
-case 166:
-#line 1236 "moc.y"
-{ moc_err( "Missing access specifier"
- " before \"slots:\"." ); }
-break;
-case 167:
-#line 1240 "moc.y"
-{ BEGIN QT_DEF; }
-break;
-case 169:
-#line 1242 "moc.y"
-{ BEGIN QT_DEF; }
-break;
-case 171:
-#line 1244 "moc.y"
-{
- if ( tmpAccess )
- moc_warn("Q_OBJECT is not in the private"
- " section of the class.\n"
- "Q_OBJECT is a macro that resets"
- " access permission to \"private\".");
- Q_OBJECTdetected = TRUE;
- }
-break;
-case 172:
-#line 1252 "moc.y"
-{ tmpYYStart = YY_START;
- tmpPropOverride = FALSE;
- BEGIN IN_PROPERTY; }
-break;
-case 173:
-#line 1255 "moc.y"
-{
- BEGIN tmpYYStart;
- }
-break;
-case 175:
-#line 1259 "moc.y"
-{ tmpYYStart = YY_START;
- tmpPropOverride = TRUE;
- BEGIN IN_PROPERTY; }
-break;
-case 176:
-#line 1262 "moc.y"
-{
- BEGIN tmpYYStart;
- }
-break;
-case 178:
-#line 1266 "moc.y"
-{ tmpYYStart = YY_START; BEGIN IN_CLASSINFO; }
-break;
-case 179:
-#line 1268 "moc.y"
-{
- g->infos.append( new ClassInfo( yyvsp[-3].string, yyvsp[-1].string ) );
- BEGIN tmpYYStart;
- }
-break;
-case 181:
-#line 1273 "moc.y"
-{ tmpYYStart = YY_START; BEGIN IN_PROPERTY; }
-break;
-case 182:
-#line 1274 "moc.y"
-{
- Q_PROPERTYdetected = TRUE;
- BEGIN tmpYYStart;
- }
-break;
-case 184:
-#line 1279 "moc.y"
-{ tmpYYStart = YY_START; BEGIN IN_PROPERTY; }
-break;
-case 185:
-#line 1280 "moc.y"
-{
- Q_PROPERTYdetected = TRUE;
- BEGIN tmpYYStart;
- }
-break;
-case 187:
-#line 1287 "moc.y"
-{ moc_err( "Signals cannot "
- "have access specifiers" ); }
-break;
-case 189:
-#line 1290 "moc.y"
-{ if ( tmpAccess == Public && Q_PROPERTYdetected )
- BEGIN QT_DEF;
- else
- BEGIN IN_CLASS;
- suppress_func_warn = TRUE;
- }
-break;
-case 190:
-#line 1297 "moc.y"
-{
- suppress_func_warn = FALSE;
- }
-break;
-case 191:
-#line 1300 "moc.y"
-{ BEGIN IN_CLASS;
- if ( classPLevel != 1 )
- moc_warn( "unexpected access"
- "specifier" );
- }
-break;
-case 196:
-#line 1315 "moc.y"
-{ addMember( PropertyCandidateMember ); }
-break;
-case 201:
-#line 1327 "moc.y"
-{ addMember( SignalMember ); }
-break;
-case 206:
-#line 1338 "moc.y"
-{ addMember( SlotMember ); }
-break;
-case 209:
-#line 1345 "moc.y"
-{ yyval.string=yyvsp[0].string; }
-break;
-case 210:
-#line 1348 "moc.y"
-{ g->multipleSuperClasses.append( yyvsp[0].string ); }
-break;
-case 212:
-#line 1353 "moc.y"
-{ yyval.string = stradd( yyvsp[-3].string, "(", yyvsp[-1].string, ")" ); }
-break;
-case 213:
-#line 1355 "moc.y"
-{ yyval.string = stradd( yyvsp[-3].string, "(", yyvsp[-1].string, ")" ); }
-break;
-case 214:
-#line 1358 "moc.y"
-{yyval.string=yyvsp[0].string;}
-break;
-case 215:
-#line 1359 "moc.y"
-{yyval.string=yyvsp[0].string;}
-break;
-case 216:
-#line 1360 "moc.y"
-{yyval.string=yyvsp[0].string;}
-break;
-case 217:
-#line 1361 "moc.y"
-{yyval.string=yyvsp[0].string;}
-break;
-case 218:
-#line 1362 "moc.y"
-{yyval.string=yyvsp[0].string;}
-break;
-case 219:
-#line 1363 "moc.y"
-{yyval.string=yyvsp[0].string;}
-break;
-case 220:
-#line 1364 "moc.y"
-{yyval.string=yyvsp[0].string;}
-break;
-case 221:
-#line 1365 "moc.y"
-{yyval.string=yyvsp[0].string;}
-break;
-case 222:
-#line 1366 "moc.y"
-{yyval.string=yyvsp[0].string;}
-break;
-case 223:
-#line 1367 "moc.y"
-{yyval.string=yyvsp[0].string;}
-break;
-case 224:
-#line 1370 "moc.y"
-{ yyval.access=Private; }
-break;
-case 225:
-#line 1371 "moc.y"
-{ yyval.access=Protected; }
-break;
-case 226:
-#line 1372 "moc.y"
-{ yyval.access=Public; }
-break;
-case 227:
-#line 1375 "moc.y"
-{ }
-break;
-case 228:
-#line 1376 "moc.y"
-{ }
-break;
-case 270:
-#line 1424 "moc.y"
-{ tmpFunc->type = yyvsp[-1].string;
- tmpFunc->name = yyvsp[0].string; }
-break;
-case 271:
-#line 1427 "moc.y"
-{ tmpFunc->type = "int";
- tmpFunc->name = yyvsp[0].string;
- if ( tmpFunc->name == g->className )
- func_warn( "Constructors cannot be"
- " signals or slots.");
- }
-break;
-case 272:
-#line 1434 "moc.y"
-{ tmpFunc->type = "void";
- tmpFunc->name = "~";
- tmpFunc->name += yyvsp[0].string;
- func_warn( "Destructors cannot be"
- " signals or slots.");
- }
-break;
-case 273:
-#line 1442 "moc.y"
-{
- char *tmp =
- straddSpc(yyvsp[-4].string,yyvsp[-3].string,yyvsp[-2].string,yyvsp[-1].string);
- tmpFunc->type = rmWS(tmp);
- delete [] tmp;
- tmpFunc->name = yyvsp[0].string; }
-break;
-case 274:
-#line 1449 "moc.y"
-{ skipFunc = TRUE; }
-break;
-case 275:
-#line 1451 "moc.y"
-{ tmpFunc->type =
- straddSpc(yyvsp[-2].string,yyvsp[-1].string);
- tmpFunc->name = yyvsp[0].string; }
-break;
-case 276:
-#line 1456 "moc.y"
-{ tmpFunc->type =
- straddSpc(yyvsp[-3].string,yyvsp[-2].string,yyvsp[-1].string);
- tmpFunc->name = yyvsp[0].string; }
-break;
-case 277:
-#line 1460 "moc.y"
-{ operatorError(); }
-break;
-case 278:
-#line 1462 "moc.y"
-{ operatorError(); }
-break;
-case 279:
-#line 1465 "moc.y"
-{ operatorError(); }
-break;
-case 280:
-#line 1467 "moc.y"
-{ operatorError(); }
-break;
-case 281:
-#line 1470 "moc.y"
-{ operatorError(); }
-break;
-case 283:
-#line 1476 "moc.y"
-{ func_warn("Unexpected variable declaration."); }
-break;
-case 284:
-#line 1479 "moc.y"
-{ func_warn("Unexpected variable declaration."); }
-break;
-case 285:
-#line 1481 "moc.y"
-{ func_warn("Unexpected enum declaration."); }
-break;
-case 286:
-#line 1483 "moc.y"
-{ func_warn("Unexpected using declaration."); }
-break;
-case 287:
-#line 1485 "moc.y"
-{ func_warn("Unexpected using declaration."); }
-break;
-case 288:
-#line 1487 "moc.y"
-{ classPLevel++;
- moc_err("Unexpected namespace declaration."); }
-break;
-case 289:
-#line 1490 "moc.y"
-{ func_warn("Unexpected class declaration.");}
-break;
-case 290:
-#line 1492 "moc.y"
-{ func_warn("Unexpected class declaration.");
- BEGIN IN_FCT; fctLevel=1;
- }
-break;
-case 291:
-#line 1495 "moc.y"
-{ BEGIN QT_DEF; }
-break;
-case 295:
-#line 1504 "moc.y"
-{ }
-break;
-case 296:
-#line 1505 "moc.y"
-{ expLevel = 0; }
-break;
-case 298:
-#line 1507 "moc.y"
-{ expLevel = 0; }
-break;
-case 301:
-#line 1512 "moc.y"
-{ expLevel = 0; }
-break;
-case 306:
-#line 1527 "moc.y"
-{ BEGIN QT_DEF;
- if ( tmpAccess == Public) {
- tmpEnum->name = yyvsp[-4].string;
- addEnum();
- }
- }
-break;
-case 307:
-#line 1534 "moc.y"
-{ tmpEnum->clear();}
-break;
-case 309:
-#line 1538 "moc.y"
-{ }
-break;
-case 313:
-#line 1546 "moc.y"
-{ if ( tmpAccess == Public) tmpEnum->append( yyvsp[0].string ); }
-break;
-case 314:
-#line 1547 "moc.y"
-{ enumLevel=0; }
-break;
-case 315:
-#line 1548 "moc.y"
-{ if ( tmpAccess == Public) tmpEnum->append( yyvsp[-3].string ); }
-break;
-case 316:
-#line 1552 "moc.y"
-{
- g->propWrite = "";
- g->propRead = "";
- g->propOverride = tmpPropOverride;
- g->propReset = "";
- if ( g->propOverride ) {
- g->propStored = "";
- g->propDesignable = "";
- g->propScriptable = "";
- } else {
- g->propStored = "true";
- g->propDesignable = "true";
- g->propScriptable = "true";
- }
- }
-break;
-case 317:
-#line 1568 "moc.y"
-{
- if ( g->propRead.isEmpty() && !g->propOverride )
- moc_err( "A property must at least feature a read method." );
- checkPropertyName( yyvsp[-2].string );
- Q_PROPERTYdetected = TRUE;
- /* Avoid duplicates*/
- for( QPtrListIterator<Property> lit( g->props ); lit.current(); ++lit ) {
- if ( lit.current()->name == yyvsp[-2].string ) {
- if ( displayWarnings )
- moc_err( "Property '%s' defined twice.",
- (const char*)lit.current()->name );
- }
- }
- g->props.append( new Property( lineNo, yyvsp[-3].string, yyvsp[-2].string,
- g->propWrite, g->propRead, g->propReset,
- g->propStored, g->propDesignable,
- g->propScriptable, g->propOverride ) );
- }
-break;
-case 319:
-#line 1589 "moc.y"
-{ g->propRead = yyvsp[-1].string; }
-break;
-case 320:
-#line 1590 "moc.y"
-{ g->propWrite = yyvsp[-1].string; }
-break;
-case 321:
-#line 1591 "moc.y"
-{ g->propReset = yyvsp[-1].string; }
-break;
-case 322:
-#line 1592 "moc.y"
-{ g->propStored = yyvsp[-1].string; }
-break;
-case 323:
-#line 1593 "moc.y"
-{ g->propDesignable = yyvsp[-1].string; }
-break;
-case 324:
-#line 1594 "moc.y"
-{ g->propScriptable = yyvsp[-1].string; }
-break;
-case 325:
-#line 1597 "moc.y"
-{ }
-break;
-case 326:
-#line 1598 "moc.y"
-{ g->qtEnums.append( yyvsp[-1].string ); }
-break;
-case 327:
-#line 1601 "moc.y"
-{ }
-break;
-case 328:
-#line 1602 "moc.y"
-{ g->qtSets.append( yyvsp[-1].string ); }
-break;
-#line 4759 "y.tab.c"
- }
- 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/src/moc/moc_yacc.h b/src/moc/moc_yacc.h
index b4ea312..83a0b03 100644
--- a/src/moc/moc_yacc.h
+++ b/src/moc/moc_yacc.h
@@ -1,58 +1,166 @@
-#define CHAR_VAL 257
-#define INT_VAL 258
-#define DOUBLE_VAL 259
-#define STRING 260
-#define IDENTIFIER 261
-#define FRIEND 262
-#define TYPEDEF 263
-#define AUTO 264
-#define REGISTER 265
-#define STATIC 266
-#define EXTERN 267
-#define INLINE 268
-#define VIRTUAL 269
-#define CONST 270
-#define VOLATILE 271
-#define CHAR 272
-#define SHORT 273
-#define INT 274
-#define LONG 275
-#define SIGNED 276
-#define UNSIGNED 277
-#define FLOAT 278
-#define DOUBLE 279
-#define VOID 280
-#define ENUM 281
-#define CLASS 282
-#define STRUCT 283
-#define UNION 284
-#define ASM 285
-#define PRIVATE 286
-#define PROTECTED 287
-#define PUBLIC 288
-#define OPERATOR 289
-#define DBL_COLON 290
-#define TRIPLE_DOT 291
-#define TEMPLATE 292
-#define NAMESPACE 293
-#define USING 294
-#define MUTABLE 295
-#define THROW 296
-#define SIGNALS 297
-#define SLOTS 298
-#define Q_OBJECT 299
-#define Q_PROPERTY 300
-#define Q_OVERRIDE 301
-#define Q_CLASSINFO 302
-#define Q_ENUMS 303
-#define Q_SETS 304
-#define READ 305
-#define WRITE 306
-#define STORED 307
-#define DESIGNABLE 308
-#define SCRIPTABLE 309
-#define RESET 310
-typedef union {
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
+
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ CHAR_VAL = 258,
+ INT_VAL = 259,
+ DOUBLE_VAL = 260,
+ STRING = 261,
+ IDENTIFIER = 262,
+ FRIEND = 263,
+ TYPEDEF = 264,
+ AUTO = 265,
+ REGISTER = 266,
+ STATIC = 267,
+ EXTERN = 268,
+ INLINE = 269,
+ VIRTUAL = 270,
+ CONST = 271,
+ VOLATILE = 272,
+ CHAR = 273,
+ SHORT = 274,
+ INT = 275,
+ LONG = 276,
+ SIGNED = 277,
+ UNSIGNED = 278,
+ FLOAT = 279,
+ DOUBLE = 280,
+ VOID = 281,
+ ENUM = 282,
+ CLASS = 283,
+ STRUCT = 284,
+ UNION = 285,
+ ASM = 286,
+ PRIVATE = 287,
+ PROTECTED = 288,
+ PUBLIC = 289,
+ OPERATOR = 290,
+ DBL_COLON = 291,
+ TRIPLE_DOT = 292,
+ TEMPLATE = 293,
+ NAMESPACE = 294,
+ USING = 295,
+ MUTABLE = 296,
+ THROW = 297,
+ SIGNALS = 298,
+ SLOTS = 299,
+ Q_OBJECT = 300,
+ Q_PROPERTY = 301,
+ Q_OVERRIDE = 302,
+ Q_CLASSINFO = 303,
+ Q_ENUMS = 304,
+ Q_SETS = 305,
+ READ = 306,
+ WRITE = 307,
+ STORED = 308,
+ DESIGNABLE = 309,
+ SCRIPTABLE = 310,
+ RESET = 311
+ };
+#endif
+/* Tokens. */
+#define CHAR_VAL 258
+#define INT_VAL 259
+#define DOUBLE_VAL 260
+#define STRING 261
+#define IDENTIFIER 262
+#define FRIEND 263
+#define TYPEDEF 264
+#define AUTO 265
+#define REGISTER 266
+#define STATIC 267
+#define EXTERN 268
+#define INLINE 269
+#define VIRTUAL 270
+#define CONST 271
+#define VOLATILE 272
+#define CHAR 273
+#define SHORT 274
+#define INT 275
+#define LONG 276
+#define SIGNED 277
+#define UNSIGNED 278
+#define FLOAT 279
+#define DOUBLE 280
+#define VOID 281
+#define ENUM 282
+#define CLASS 283
+#define STRUCT 284
+#define UNION 285
+#define ASM 286
+#define PRIVATE 287
+#define PROTECTED 288
+#define PUBLIC 289
+#define OPERATOR 290
+#define DBL_COLON 291
+#define TRIPLE_DOT 292
+#define TEMPLATE 293
+#define NAMESPACE 294
+#define USING 295
+#define MUTABLE 296
+#define THROW 297
+#define SIGNALS 298
+#define SLOTS 299
+#define Q_OBJECT 300
+#define Q_PROPERTY 301
+#define Q_OVERRIDE 302
+#define Q_CLASSINFO 303
+#define Q_ENUMS 304
+#define Q_SETS 305
+#define READ 306
+#define WRITE 307
+#define STORED 308
+#define DESIGNABLE 309
+#define SCRIPTABLE 310
+#define RESET 311
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 1676 of yacc.c */
+#line 692 "moc.y"
+
char char_val;
int int_val;
double double_val;
@@ -61,5 +169,17 @@ typedef union {
Function *function;
ArgList *arg_list;
Argument *arg;
+
+
+
+/* Line 1676 of yacc.c */
+#line 177 "moc_yacc.h"
} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+#endif
+
extern YYSTYPE yylval;
+
+
diff --git a/src/tools/qmutex_unix.cpp b/src/tools/qmutex_unix.cpp
index 7f14e6a..fe60ac3 100644
--- a/src/tools/qmutex_unix.cpp
+++ b/src/tools/qmutex_unix.cpp
@@ -74,7 +74,6 @@ typedef pthread_mutex_t Q_MUTEX_T;
#include <errno.h>
#include <string.h>
-
// Private class declarations
class QRealMutexPrivate : public QMutexPrivate {
diff --git a/src/tools/qthreadinstance_p.h b/src/tools/qthreadinstance_p.h
index 72611b1..7580b25 100644
--- a/src/tools/qthreadinstance_p.h
+++ b/src/tools/qthreadinstance_p.h
@@ -62,8 +62,12 @@
#include <pthread.h>
#endif
+class QThread;
+class QEventLoop;
+
class QThreadInstance {
public:
+ static void setCurrentThread(QThread *thread);
static QThreadInstance *current();
void init(unsigned int stackSize);
@@ -95,6 +99,8 @@ public:
static unsigned int __stdcall start( void * );
static void finish( QThreadInstance * );
#endif // Q_OS_WIN32
+
+ QEventLoop* eventLoop;
};
#endif // QT_THREAD_SUPPORT
diff --git a/src/tools/qucom.cpp b/src/tools/qucom.cpp
index f210318..c48e166 100644
--- a/src/tools/qucom.cpp
+++ b/src/tools/qucom.cpp
@@ -39,6 +39,9 @@
**********************************************************************/
#include "qucom_p.h"
+#include "qucomextra_p.h"
+
+#include "qvariant.h"
// Standard types
@@ -545,3 +548,24 @@ void QUType_QString::clear( QUObject *o )
delete (QString*)o->payload.ptr;
o->payload.ptr = 0;
}
+
+QUObject* QUObject::deepCopy(QUObject* newLocation) {
+ QUObject* ret;
+ if (newLocation) {
+ ret = new(newLocation) QUObject(*this);
+ }
+ else {
+ ret = new QUObject(*this);
+ }
+ // Any type that has a clear() method must be copied here!
+ if (*(type->uuid()) == TID_QUType_charstar) {
+ static_QUType_charstar.set( ret, (const char *)static_QUType_charstar.get(this), true );
+ }
+ if (*(type->uuid()) == TID_QUType_QString) {
+ static_QUType_QString.set( ret, (QString)static_QUType_QString.get(this) );
+ }
+ if (*(type->uuid()) == TID_QUType_QVariant) {
+ static_QUType_QVariant.set( ret, (QVariant)static_QUType_QVariant.get(this) );
+ }
+ return ret;
+}
diff --git a/src/tools/qucom_p.h b/src/tools/qucom_p.h
index 6410ceb..3ade5d4 100644
--- a/src/tools/qucom_p.h
+++ b/src/tools/qucom_p.h
@@ -127,7 +127,7 @@ extern Q_EXPORT QUType_Null static_QUType_Null;
struct Q_EXPORT QUObject
{
public: // scary MSVC bug makes this necessary
- QUObject() : type( &static_QUType_Null ) {}
+ QUObject() : type( &static_QUType_Null ), isLastObject(false) {}
~QUObject() { type->clear( this ); }
QUType *type;
@@ -184,6 +184,8 @@ public: // scary MSVC bug makes this necessary
} payload;
+ QUObject* deepCopy(QUObject*);
+ bool isLastObject;
};