Fixed compile error

This commit is contained in:
Gianpaolo Palma gianpaolopalma 2008-02-21 13:04:10 +00:00
parent 8d7231929c
commit a625f49357
6 changed files with 29 additions and 11 deletions

View File

@ -24,7 +24,10 @@
/****************************************************************************
History
$Log$
Revision 1.1 2008/02/20 22:01:59 gianpaolopalma
Revision 1.2 2008/02/21 13:04:09 gianpaolopalma
Fixed compile error
Revision 1.1 2008/02/20 22:02:00 gianpaolopalma
First working version of Vrml to X3D translator
*****************************************************************************/
@ -741,9 +744,9 @@ void Parser::NodeBodyElement(QDomElement& parent, bool flag) {
}
void Parser::ScriptBodyElement() {
QString str;
QString str; QDomElement elem;
if (StartOf(6)) {
NodeBodyElement(QDomElement(), false);
NodeBodyElement(elem, false);
} else if (la->kind == 26 || la->kind == 27) {
if (la->kind == 26) {
Get();
@ -777,7 +780,7 @@ void Parser::ScriptBodyElement() {
FieldType(str);
InitializeOnlyId(str);
if (StartOf(8)) {
FieldValue(QDomElement(), "", false);
FieldValue(elem, "", false);
} else if (la->kind == 39) {
Get();
InitializeOnlyId(str);
@ -1132,7 +1135,7 @@ void Errors::SynErr(int line, int col, int n) {
break;
}
wchar_t str[100];
swprintf(str, L"-- line %d col %d: %ls\n", line, col, s);
coco_swprintf(str, 100, L"-- line %d col %d: %ls\n", line, col, s);
stringError = coco_string_create_append(stringError, str);
coco_string_delete(s);
count++;
@ -1140,7 +1143,7 @@ void Errors::SynErr(int line, int col, int n) {
void Errors::Error(int line, int col, const wchar_t *s) {
wchar_t str[100];
swprintf(str, L"-- line %d col %d: %ls\n", line, col, s);
coco_swprintf(str, 100, L"-- line %d col %d: %ls\n", line, col, s);
stringError = coco_string_create_append(stringError, str);
count++;
}

View File

@ -52,6 +52,9 @@ Coco/R itself) does not fall under the GNU General Public License.
/****************************************************************************
History
$Log$
Revision 1.2 2008/02/21 13:04:09 gianpaolopalma
Fixed compile error
Revision 1.1 2008/02/20 22:02:00 gianpaolopalma
First working version of Vrml to X3D translator
@ -171,6 +174,9 @@ Coco/R itself) does not fall under the GNU General Public License.
/****************************************************************************
History
$Log$
Revision 1.2 2008/02/21 13:04:09 gianpaolopalma
Fixed compile error
Revision 1.1 2008/02/20 22:02:00 gianpaolopalma
First working version of Vrml to X3D translator
@ -294,7 +300,7 @@ void Errors::SynErr(int line, int col, int n) {
break;
}
wchar_t str[100];
swprintf(str, L"-- line %d col %d: %ls\n", line, col, s);
coco_swprintf(str, 100, L"-- line %d col %d: %ls\n", line, col, s);
stringError = coco_string_create_append(stringError, str);
coco_string_delete(s);
count++;
@ -302,7 +308,7 @@ void Errors::SynErr(int line, int col, int n) {
void Errors::Error(int line, int col, const wchar_t *s) {
wchar_t str[100];
swprintf(str, L"-- line %d col %d: %ls\n", line, col, s);
coco_swprintf(str, 100, L"-- line %d col %d: %ls\n", line, col, s);
stringError = coco_string_create_append(stringError, str);
count++;
}

View File

@ -24,6 +24,9 @@
/****************************************************************************
History
$Log$
Revision 1.2 2008/02/21 13:04:09 gianpaolopalma
Fixed compile error
Revision 1.1 2008/02/20 22:02:00 gianpaolopalma
First working version of Vrml to X3D translator

View File

@ -24,6 +24,9 @@
/****************************************************************************
History
$Log$
Revision 1.2 2008/02/21 13:04:10 gianpaolopalma
Fixed compile error
Revision 1.1 2008/02/20 22:02:00 gianpaolopalma
First working version of Vrml to X3D translator

View File

@ -24,6 +24,9 @@
/****************************************************************************
History
$Log$
Revision 1.2 2008/02/21 13:04:10 gianpaolopalma
Fixed compile error
Revision 1.1 2008/02/20 22:02:00 gianpaolopalma
First working version of Vrml to X3D translator

View File

@ -355,11 +355,11 @@ ScriptBody
}.
ScriptBodyElement (.QString str;.)
= NodeBodyElement<QDomElement(), false>
ScriptBodyElement (.QString str; QDomElement elem;.)
= NodeBodyElement<elem, false>
|("inputOnly" | "eventIn") FieldType<str> InputOnlyId<str> ["IS" InputOnlyId<str>]
|("outputOnly" | "eventOut") FieldType<str> OutputOnlyId<str> ["IS" OutputOnlyId<str>]
|("initializeOnly" | "field") FieldType<str> InitializeOnlyId<str> (FieldValue<QDomElement(), "", false> | "IS" InitializeOnlyId<str>)
|("initializeOnly" | "field") FieldType<str> InitializeOnlyId<str> (FieldValue<elem, "", false> | "IS" InitializeOnlyId<str>)
|("inputOutput" | "exposedField") FieldType<str> InputOutputId<str> "IS" InputOutputId<str>.