merge patched into master
[serna.git] / debian / patches / 0004-Fix-som-bison-errors.patch
1 From 2d05c51c94750a953721564408edee602388c779 Mon Sep 17 00:00:00 2001
2 From: Joachim Breitner <mail@joachim-breitner.de>
3 Date: Mon, 9 Nov 2009 12:20:57 +0100
4 Subject: Fix som bison errors
5
6 ---
7  sfworks/xpath/impl3/xpathParser.y |   16 ++++++++--------
8  sfworks/xslt/impl/xsltParser.y    |   16 ++++++++--------
9  2 files changed, 16 insertions(+), 16 deletions(-)
10
11 diff --git a/sfworks/xpath/impl3/xpathParser.y b/sfworks/xpath/impl3/xpathParser.y
12 index a6adc6a..9f3c218 100644
13 --- a/sfworks/xpath/impl3/xpathParser.y
14 +++ b/sfworks/xpath/impl3/xpathParser.y
15 @@ -196,7 +196,7 @@ abbreviatedStep: '.'
16  
17  axisExpr:       AXISNAME OPDCOLON nodeTest   
18                      {
19 -                        ExprImplPtr ep = NEW_EXPR(AxisExpr::make($1.asString(),
20 +                        ExprImplPtr ep = NEW_EXPR(AxisExpr::make($<asString()>1,
21                              static_cast<Xpath::NodeTestExpr*>($<expr>3)));
22                          if (ep.isNull()) {
23                              throw Xpath::Exception(XpathMessages::parserBadAxis);
24 @@ -236,7 +236,7 @@ nodeTest:       nameTest
25                  | NTEST_PI   '(' LITERAL ')'
26                      {
27                          $<expr>$ = 
28 -                            NEW_EXPR(PiNodeTestExpr::make($3.asString()));
29 +                            NEW_EXPR(PiNodeTestExpr::make($<asString()>3));
30                      }
31                  | NTEST_PI '(' ')' 
32                      {
33 @@ -250,19 +250,19 @@ nameTest:       '*'
34                      }
35                  | NCNAME ':' '*'  
36                      { 
37 -                        $<qname>$ = NEW_QNAME(new PQname("*", $1.asString()));
38 +                        $<qname>$ = NEW_QNAME(new PQname("*", $<asString()>1));
39                      }
40                  | qname            
41                  ;    
42  
43  qname:          NCNAME  
44                      {
45 -                        $<qname>$ = NEW_QNAME(new PQname($1.asString()));
46 +                        $<qname>$ = NEW_QNAME(new PQname($<asString()>1));
47                      }
48                  | NCNAME ':' NCNAME  
49                      {
50                          $<qname>$ = 
51 -                            NEW_QNAME(new PQname($3.asString(), $1.asString()));
52 +                            NEW_QNAME(new PQname($<asString()>3, $<asString()>1));
53                      }
54                  ;
55  
56 @@ -283,7 +283,7 @@ primaryExpr:    variableReference
57                  | LITERAL
58                      {
59                          $<expr>$ = NEW_EXPR(new ConstExpr
60 -                            (new StringValue($1.asString()))); 
61 +                            (new StringValue($<asString()>1))); 
62                      }
63                  | TNUMBER  
64                      {
65 @@ -303,11 +303,11 @@ functionCall:   FUNCTIONNAME '(' functionArgumentList ')'
66                      {
67                          ExprImplPtr av = $<expr>3;
68                          FunctionExpr* res = FUNC_FACTORY->makeFunction
69 -                            ($1.asString(), av.isNull() ? 0 :
70 +                            ($<asString()>1, av.isNull() ? 0 :
71                                  static_cast<FunctionArgExpr*>(av.pointer()),
72                                  ((ParserArgs*)pargs)->nsResolver);
73                          if (0 == res) {
74 -                           throw Xpath::Exception(XpathMessages::parserUknFunc, $1.asString());
75 +                           throw Xpath::Exception(XpathMessages::parserUknFunc, $<asString()>1);
76                          }
77                          $<expr>$ = NEW_EXPR(res);
78                      }
79 diff --git a/sfworks/xslt/impl/xsltParser.y b/sfworks/xslt/impl/xsltParser.y
80 index d3a0d50..0330e8b 100644
81 --- a/sfworks/xslt/impl/xsltParser.y
82 +++ b/sfworks/xslt/impl/xsltParser.y
83 @@ -155,7 +155,7 @@ locationPathPattern: XT_OPSLASH
84  idKeyFunc:     XT_IDFUNC '(' XT_LITERAL ')'
85                     {
86                         Xpath::ExprImplPtr e = new Xpath::ConstExpr
87 -                           (new Xpath::StringValue($3.asString()));
88 +                           (new Xpath::StringValue($<asString()>3));
89                         $<expr>$ = NEW_EXPR(PARGS(funcFactory)->makeFunction
90                              ("id", (new Xpath::FunctionArgExpr(e, 0)), 
91                              PARGS(nsResolver)));
92 @@ -163,9 +163,9 @@ idKeyFunc:     XT_IDFUNC '(' XT_LITERAL ')'
93                 | XT_KEYFUNC '(' XT_LITERAL ',' XT_LITERAL ')'
94                     {
95                         Xpath::ExprImplPtr e = new Xpath::ConstExpr
96 -                           (new Xpath::StringValue($3.asString()));
97 +                           (new Xpath::StringValue($<asString()>3));
98                         Xpath::ExprImplPtr e1 = new Xpath::ConstExpr
99 -                           (new Xpath::StringValue($5.asString()));
100 +                           (new Xpath::StringValue($<asString()>5));
101                         $<expr>$ = NEW_EXPR(PARGS(funcFactory)->
102                              makeFunction("key", new Xpath::FunctionArgExpr
103                                  (e, (new Xpath::FunctionArgExpr(e1, 0))), 
104 @@ -233,7 +233,7 @@ axisPredPair:   axisExpr predicate
105  axisExpr:      XT_AXISNAME XT_OPDCOLON nodeTest
106                     {    
107                          Xpath::ExprImplPtr ae = NEW_EXPR 
108 -                            (Xpath::AxisExpr::make($1.asString(), 
109 +                            (Xpath::AxisExpr::make($<asString()>1, 
110                                  static_cast<Xpath::NodeTestExpr*>($<expr>3)));
111                          if (ae.isNull()) {
112                              xpp_error("Invalid axis name");
113 @@ -290,7 +290,7 @@ nodeTest:       nameTest
114                  | XT_NTEST_PI   '(' XT_LITERAL ')'
115                      {
116                          $<expr>$ = 
117 -                          NEW_EXPR(Xpath::PiNodeTestExpr::make($3.asString()));
118 +                          NEW_EXPR(Xpath::PiNodeTestExpr::make($<asString()>3));
119                      }
120                  | XT_NTEST_PI   '(' ')'
121                      {
122 @@ -305,19 +305,19 @@ nameTest:       '*'
123                      }
124                  | XT_NCNAME ':' '*'  
125                      { 
126 -                        $<qname>$ = NEW_QNAME(new PQname("*", $1.asString()));
127 +                        $<qname>$ = NEW_QNAME(new PQname("*", $<asString()>1));
128                      }
129                  | qname            
130                  ;    
131  
132  qname:          XT_NCNAME  
133                      {
134 -                        $<qname>$ = NEW_QNAME(new PQname($1.asString()));
135 +                        $<qname>$ = NEW_QNAME(new PQname($<asString()>1));
136                      }
137                  | XT_NCNAME ':' XT_NCNAME  
138                      {
139                          $<qname>$ = 
140 -                            NEW_QNAME(new PQname($3.asString(), $1.asString()));
141 +                            NEW_QNAME(new PQname($<asString()>3, $<asString()>1));
142                      }
143                  ;
144  %%
145 -- 
146 1.6.6
147