summaryrefslogtreecommitdiff
path: root/idlc/source/parser.y
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 02:49:55 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-20 02:49:55 +0000
commitb95a34f5e3ab460df66a1f0b650066a590cabc64 (patch)
tree7e08eabfbe3e7b25b465a13aa206d5146f9bbe28 /idlc/source/parser.y
parentf36192c25f0979fb7d2983af584af5190085ef19 (diff)
INTEGRATION: CWS warnings01 (1.11.14); FILE MERGED
2006/05/24 00:10:44 sb 1.11.14.8: RESYNC: (1.13-1.14); FILE MERGED 2006/04/07 20:59:41 sb 1.11.14.7: RESYNC: (1.12-1.13); FILE MERGED 2005/11/21 16:28:40 sb 1.11.14.6: #i53898# Made code warning-free. 2005/11/02 15:58:45 sb 1.11.14.5: #i53898# Fixed warning-suppression in flex/bison generated code. 2005/09/23 00:06:47 sb 1.11.14.4: RESYNC: (1.11-1.12); FILE MERGED 2005/09/13 13:29:00 sb 1.11.14.3: #i53898# Fixed handling of integral literals. 2005/09/05 12:26:09 sb 1.11.14.2: #i53898# Made code warning-free. 2005/08/29 14:14:26 sb 1.11.14.1: #i53898# Made code warning-free.
Diffstat (limited to 'idlc/source/parser.y')
-rw-r--r--idlc/source/parser.y29
1 files changed, 19 insertions, 10 deletions
diff --git a/idlc/source/parser.y b/idlc/source/parser.y
index 8a7d8cb6e8a5..256d97dbeacb 100644
--- a/idlc/source/parser.y
+++ b/idlc/source/parser.y
@@ -4,9 +4,9 @@
*
* $RCSfile: parser.y,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: hr $ $Date: 2006-04-19 13:46:28 $
+ * last change: $Author: hr $ $Date: 2006-06-20 03:49:55 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -145,7 +145,7 @@ using namespace ::rtl;
#define YYERROR_VERBOSE 1
extern int yylex(void);
-void yyerror(char *);
+void yyerror(char const *);
void checkIdentifier(::rtl::OString* id)
{
@@ -287,6 +287,15 @@ bool includes(AstDeclaration const * type1, AstDeclaration const * type2) {
return false;
}
+// Suppress any warnings from generated code:
+#if defined __GNUC__
+#pragma GCC system_header
+#elif defined __SUNPRO_CC
+#pragma disable_warn
+#elif defined _MSC_VER
+#pragma warning(push, 1)
+#pragma warning(disable: 4701 4706)
+#endif
%}
/*
* Declare the type of values in the grammar
@@ -306,6 +315,7 @@ bool includes(AstDeclaration const * type1, AstDeclaration const * type2) {
sal_Char* strval; /* sal_Char* value */
sal_Bool bval; /* sal_Boolean* value */
sal_Int64 ival; /* sal_Int64 value */
+ sal_uInt64 uval; /* sal_uInt64 value */
sal_uInt32 ulval; /* sal_uInt32 value */
double dval; /* double value */
float fval; /* float value */
@@ -386,6 +396,7 @@ bool includes(AstDeclaration const * type1, AstDeclaration const * type2) {
%token <strval> IDL_SCOPESEPARATOR
%token <ival> IDL_INTEGER_LITERAL
+%token <uval> IDL_INTEGER_ULITERAL
%token <dval> IDL_FLOATING_PT_LITERAL
/*
@@ -1016,7 +1027,6 @@ operation :
AstInterface * pScope = static_cast< AstInterface * >(
idlc()->scopes()->top());
AstOperation* pOp = NULL;
- AstType* pType = NULL;
/*
* Create a node representing an operation on an interface
@@ -1141,7 +1151,6 @@ parameter :
AstOperation * pScope = static_cast< AstOperation * >(
idlc()->scopes()->top());
AstParameter* pParam = NULL;
- AstType* pType = NULL;
/*
* Create a node representing an argument to an operation
@@ -1347,7 +1356,6 @@ const_dcl :
AstScope* pScope = idlc()->scopes()->topNonNull();
AstConstant* pConstant = NULL;
- AstDeclaration* pExists = NULL;
if ( $9 && pScope )
{
@@ -1517,6 +1525,10 @@ literal :
{
$$ = new AstExpression($1);
}
+ | IDL_INTEGER_ULITERAL
+ {
+ $$ = new AstExpression($1);
+ }
| IDL_FLOATING_PT_LITERAL
{
$$ = new AstExpression($1);
@@ -1553,7 +1565,6 @@ const_type :
| scoped_name
{
AstScope* pScope = idlc()->scopes()->topNonNull();
- AstBaseType* pBaseType = NULL;
AstDeclaration const * type = 0;
/*
@@ -2855,7 +2866,6 @@ enum_type :
AstScope* pScope = idlc()->scopes()->topNonNull();
AstEnum* pEnum = NULL;
- AstDeclaration* pDecl = NULL;
/*
* Create a node representing an enum and add it to its
@@ -3005,7 +3015,6 @@ union_type :
AstScope* pScope = idlc()->scopes()->topNonNull();
AstUnion* pUnion = NULL;
- AstDeclaration* pDecl = NULL;
/*
* Create a node representing a union. Add it to its enclosing
@@ -3287,7 +3296,7 @@ identifier:
/*
* Report an error situation discovered in a production
*/
-void yyerror(char *errmsg)
+void yyerror(char const *errmsg)
{
idlc()->error()->syntaxError(idlc()->getParseState(), idlc()->getLineNumber(), errmsg);
idlc()->setParseState(PS_NoState);