[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kdom/xpath/parser
From:       Frans Englich <frans.englich () telia ! com>
Date:       2006-06-06 17:30:02
Message-ID: 1149615002.030547.8199.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 548867 by englich:

Eh, align the grammar with the latest changes, and use Bison 2.3.


 M  +11 -12    XPathParser.cpp  
 M  +1 -1      XPathParser.h  
 M  +10 -10    XPathParser.ypp  


--- trunk/kdenonbeta/kdom/xpath/parser/XPathParser.cpp #548866:548867
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 2.2.  */
+/* A Bison parser, made by GNU Bison 2.3.  */
 
 /* Skeleton implementation for Bison's Yacc-like parsers in C
 
@@ -47,7 +47,7 @@
 #define YYBISON 1
 
 /* Bison version.  */
-#define YYBISON_VERSION "2.2"
+#define YYBISON_VERSION "2.3"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -1684,13 +1684,13 @@
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, const YYSTYPE * const yyvaluep, \
ParserContext *const parseInfo) +yy_symbol_value_print (FILE *yyoutput, int yytype, \
YYSTYPE const * const yyvaluep, ParserContext *const parseInfo)  #else
 static void
 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parseInfo)
     FILE *yyoutput;
     int yytype;
-    const YYSTYPE * const yyvaluep;
+    YYSTYPE const * const yyvaluep;
     ParserContext *const parseInfo;
 #endif
 {
@@ -1718,13 +1718,13 @@
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_symbol_print (FILE *yyoutput, int yytype, const YYSTYPE * const yyvaluep, \
ParserContext *const parseInfo) +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE \
const * const yyvaluep, ParserContext *const parseInfo)  #else
 static void
 yy_symbol_print (yyoutput, yytype, yyvaluep, parseInfo)
     FILE *yyoutput;
     int yytype;
-    const YYSTYPE * const yyvaluep;
+    YYSTYPE const * const yyvaluep;
     ParserContext *const parseInfo;
 #endif
 {
@@ -1773,14 +1773,12 @@
 #if (defined __STDC__ || defined __C99__FUNC__ \
      || defined __cplusplus || defined _MSC_VER)
 static void
-yy_reduce_print (YYSTYPE *yyvsp,
-		   int yyrule, ParserContext *const parseInfo)
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule, ParserContext *const parseInfo)
 #else
 static void
 yy_reduce_print (yyvsp, yyrule, parseInfo)
     YYSTYPE *yyvsp;
-
-		   int yyrule;
+    int yyrule;
     ParserContext *const parseInfo;
 #endif
 {
@@ -3939,7 +3937,7 @@
 
 
 /* Line 1267 of yacc.c.  */
-#line 3943 "XPathParser.tab.cpp"
+#line 3941 "XPathParser.tab.cpp"
       default: break;
     }
   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -4148,7 +4146,8 @@
   if (yymsg != yymsgbuf)
     YYSTACK_FREE (yymsg);
 #endif
-  return yyresult;
+  /* Make sure YYID is used.  */
+  return YYID (yyresult);
 }
 
 
--- trunk/kdenonbeta/kdom/xpath/parser/XPathParser.h #548866:548867
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 2.2.  */
+/* A Bison parser, made by GNU Bison 2.3.  */
 
 /* Skeleton interface for Bison's Yacc-like parsers in C
 
--- trunk/kdenonbeta/kdom/xpath/parser/XPathParser.ypp #548866:548867
@@ -77,7 +77,7 @@
 #define YYMALLOC malloc
 #define YYFREE free
 
-using namespace KXPATH;
+using namespace Patternist;
 
 /**
  * "Macro that you define with #define in the Bison declarations
@@ -108,7 +108,7 @@
 
 inline static int XPathlex(YYSTYPE *lexVal, const ParserContext *const parseInfo)
 {
-#ifdef KXPATH_DEBUG_PARSER
+#ifdef Patternist_DEBUG_PARSER
     /**
      * "External integer variable set to zero by default. If yydebug
      *  is given a nonzero value, the parser will output information on
@@ -258,7 +258,7 @@
 
 /* This grammar shouldn't be compiled with anything older than Bison 2.2. This
  * '%require' directive was introduced in Bison 2.2. */
-%require "2.2"
+%require "2.3"
 
 /* We'd like to be reentrant */
 %pure_parser
@@ -608,7 +608,7 @@
                                                             "or xmlns prefix"),
                                                        ReportContext::XQST0070);
         }
-        else if($4 == NS_XML)
+        else if($4 == CommonNamespaces::XML)
         {
             parseInfo->staticContext->issueStaticError(i18n("No prefix can be \
declared that binds the "  "namespace "
@@ -1676,11 +1676,11 @@
 
 SingleType: AtomicType                                                              \
/* [117] */  {
-        $$ = makeGenericSequenceType($1, Cardinality::exactlyOne);
+        $$ = makeGenericSequenceType($1, Cardinality::exactlyOne());
     }
 | AtomicType QUESTION
     {
-        $$ = makeGenericSequenceType($1, Cardinality::zeroOrOne);
+        $$ = makeGenericSequenceType($1, Cardinality::zeroOrOne());
     }
 
 TypeDeclaration: /* empty */                                                        \
/* [118] */ @@ -1702,10 +1702,10 @@
         $$ = CommonSequenceTypes::Empty;
     }
 
-OccurrenceIndicator: /* empty */    {$$ = Cardinality::exactlyOne;}                 \
                /* [120] */
-| PLUS                              {$$ = Cardinality::oneOrMore;}
-| STAR                              {$$ = Cardinality::zeroOrMore;}
-| QUESTION                          {$$ = Cardinality::zeroOrOne;}
+OccurrenceIndicator: /* empty */    {$$ = Cardinality::exactlyOne();}                \
/* [120] */ +| PLUS                              {$$ = Cardinality::oneOrMore();}
+| STAR                              {$$ = Cardinality::zeroOrMore();}
+| QUESTION                          {$$ = Cardinality::zeroOrOne();}
 
 ItemType: AtomicType                                                                \
/* [121] */  {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic