Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/xmlpatterns/parser/querytransformparser.ypp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5454**
    5555** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    56 ** Contact: Qt Software Information (qt-info@nokia.com)
     56** All rights reserved.
     57** Contact: Nokia Corporation (qt-info@nokia.com)
    5758**
    5859** This file is part of the QtXmlPatterns module of the Qt Toolkit.
     
    7374** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    7475**
    75 ** In addition, as a special exception, Nokia gives you certain
    76 ** additional rights. These rights are described in the Nokia Qt LGPL
    77 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    78 ** package.
     76** In addition, as a special exception, Nokia gives you certain additional
     77** rights.  These rights are described in the Nokia Qt LGPL Exception
     78** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    7979**
    8080** GNU General Public License Usage
     
    8686** met: http://www.gnu.org/copyleft/gpl.html.
    8787**
    88 ** If you are unsure which license is appropriate for your use, please
    89 ** contact the sales department at qt-sales@nokia.com.
     88** If you have questions regarding the use of this file, please contact
     89** Nokia at qt-info@nokia.com.
    9090** $QT_END_LICENSE$
    9191**
     
    228228
    229229/**
     230 * @internal
     231 * @relates QXmlQuery
     232 */
     233typedef QFlags<QXmlQuery::QueryLanguage> QueryLanguages;
     234
     235/**
    230236 * @short Flags invalid expressions and declarations in the currently
    231237 * parsed language.
    232238 *
    233  * Since this grammar is used for several languages: XQuery 1.0, XSL-T 2.0 and
    234  * XPath 2.0 inside XSL-T, it is the union of all the constructs in these
     239 * Since this grammar is used for several languages: XQuery 1.0, XSL-T 2.0, and
     240 * XPath 2.0 inside XSL-T, and field and selector patterns in W3C XML Schema's
     241 * identity constraints, it is the union of all the constructs in these
    235242 * languages. However, when dealing with each language individually, we
    236243 * regularly need to disallow some expressions, such as direct element
     
    243250 * used for internal purposes.
    244251 *
    245  * Hence, this function is called from each expression and declaration which is
    246  * unavailable in XPath.
     252 * Hence, this function is called from each expression and declaration with @p
     253 * allowedLanguages stating what languages it is allowed in.
    247254 *
    248255 * If @p isInternal is @c true, no error is raised. Otherwise, if the current
    249  * language is not XQuery, an error is raised.
     256 * language is not in @p allowedLanguages, an error is raised.
    250257 */
    251 static void disallowedConstruct(const ParserContext *const parseInfo,
    252                                 const YYLTYPE &sourceLocator,
    253                                 const bool isInternal = false)
     258static void allowedIn(const QueryLanguages allowedLanguages,
     259                      const ParserContext *const parseInfo,
     260                      const YYLTYPE &sourceLocator,
     261                      const bool isInternal = false)
    254262{
    255     if(!isInternal && parseInfo->languageAccent != QXmlQuery::XQuery10)
    256     {
    257         parseInfo->staticContext->error(QtXmlPatterns::tr("A construct was encountered which only is allowed in XQuery."),
     263    /* We treat XPath 2.0 as a subset of XSL-T 2.0, so if XPath 2.0 is allowed
     264     * and XSL-T is the language, it's ok. */
     265    if(!isInternal &&
     266       (!allowedLanguages.testFlag(parseInfo->languageAccent) && !(allowedLanguages.testFlag(QXmlQuery::XPath20) && parseInfo->languageAccent == QXmlQuery::XSLT20)))
     267    {
     268
     269        QString langName;
     270
     271        switch(parseInfo->languageAccent)
     272        {
     273            case QXmlQuery::XPath20:
     274                langName = QLatin1String("XPath 2.0");
     275                break;
     276            case QXmlQuery::XSLT20:
     277                langName = QLatin1String("XSL-T 2.0");
     278                break;
     279            case QXmlQuery::XQuery10:
     280                langName = QLatin1String("XQuery 1.0");
     281                break;
     282            case QXmlQuery::XmlSchema11IdentityConstraintSelector:
     283                langName = QtXmlPatterns::tr("W3C XML Schema identity constraint selector");
     284                break;
     285            case QXmlQuery::XmlSchema11IdentityConstraintField:
     286                langName = QtXmlPatterns::tr("W3C XML Schema identity constraint field");
     287                break;
     288        }
     289
     290        parseInfo->staticContext->error(QtXmlPatterns::tr("A construct was encountered "
     291                                                          "which is disallowed in the current language(%1).").arg(langName),
    258292                                        ReportContext::XPST0003,
    259293                                        fromYYLTYPE(sourceLocator, parseInfo));
     
    837871                                const YYLTYPE &location)
    838872{
    839     parseInfo->staticContext->error(QtXmlPatterns::tr("No variable by name %1 exists")
     873    parseInfo->staticContext->error(QtXmlPatterns::tr("No variable with name %1 exists")
    840874                                       .arg(formatKeyword(parseInfo->staticContext->namePool(), variableName)),
    841875                                    ReportContext::XPST0008, fromYYLTYPE(location, parseInfo));
     
    15611595| Prolog DefaultNamespaceDecl
    15621596    {
    1563         disallowedConstruct(parseInfo, @$);
     1597        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    15641598        if(parseInfo->hasSecondPrologPart)
    15651599            parseInfo->staticContext->error(QtXmlPatterns::tr("A default namespace declaration must occur before function, "
     
    15801614| Prolog Import
    15811615    {
    1582         disallowedConstruct(parseInfo, @$);
     1616        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    15831617        if(parseInfo->hasSecondPrologPart)
    15841618            parseInfo->staticContext->error(QtXmlPatterns::tr("Module imports must occur before function, "
     
    15981632| Prolog OptionDecl
    15991633    {
    1600         disallowedConstruct(parseInfo, @$);
     1634        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    16011635        parseInfo->hasSecondPrologPart = true;
    16021636    }
     
    17061740        if(val->hasError())
    17071741        {
    1708             parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must of type %2, which %3 isn't.")
     1742            parseInfo->staticContext->error(QtXmlPatterns::tr("The value of attribute %1 must be of type %2, which %3 isn't.")
    17091743                                                             .arg(formatKeyword(QLatin1String("priority")),
    17101744                                                                  formatType(parseInfo->staticContext->namePool(), BuiltinTypes::xsDecimal),
     
    17311765| DefaultCollationDecl
    17321766    {
    1733         disallowedConstruct(parseInfo, @$);
     1767        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    17341768    }
    17351769| BaseURIDecl
    17361770| ConstructionDecl
    17371771    {
    1738         disallowedConstruct(parseInfo, @$);
     1772        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    17391773    }
    17401774| OrderingModeDecl
    17411775    {
    1742         disallowedConstruct(parseInfo, @$);
     1776        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    17431777    }
    17441778| EmptyOrderDecl
    17451779    {
    1746         disallowedConstruct(parseInfo, @$);
     1780        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    17471781    }
    17481782| CopyNamespacesDecl
     
    17561790    {
    17571791        if(!$6)
    1758             disallowedConstruct(parseInfo, @$);
     1792            allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    17591793
    17601794        if($3 == QLatin1String("xmlns"))
     
    18681902OrderingModeDecl: DECLARE ORDERING OrderingMode Separator                           /* [14] */
    18691903    {
    1870         disallowedConstruct(parseInfo, @$);
     1904        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    18711905        if(parseInfo->hasDeclaration(ParserContext::OrderingModeDecl))
    18721906        {
     
    19651999BaseURIDecl: DECLARE BASEURI IsInternal URILiteral Separator                        /* [20] */
    19662000    {
    1967         disallowedConstruct(parseInfo, @$, $3);
     2001        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20), parseInfo, @$, $3);
    19682002        if(parseInfo->hasDeclaration(ParserContext::BaseURIDecl))
    19692003        {
     
    20272061         VariableValue OptionalDefaultValue Separator                               /* [24] */
    20282062    {
    2029         disallowedConstruct(parseInfo, @$, $3);
     2063        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $3);
    20302064        if(variableByName($5, parseInfo))
    20312065        {
     
    21272161    {
    21282162        if(!$3)
    2129             disallowedConstruct(parseInfo, @$, $3);
     2163            allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $3);
    21302164
    21312165        /* If FunctionBody is null, it is 'external', otherwise the value is the body. */
     
    26972731           LetTail                                                                  /* [36] */
    26982732    {
    2699         disallowedConstruct(parseInfo, @$, $2);
     2733        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    27002734
    27012735        Q_ASSERT(parseInfo->variables.top()->name == $4);
     
    28362870                        SomeQuantificationTail                                      /* [X] */
    28372871    {
     2872        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    28382873        $$ = create(new QuantifiedExpression($<enums.slot>8,
    28392874                                             QuantifiedExpression::Some, $<expr>6, $9), @$, parseInfo);
     
    28642899                         EveryQuantificationTail                                    /* [X] */
    28652900    {
     2901        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    28662902        $$ = create(new QuantifiedExpression($<enums.slot>8,
    28672903                                             QuantifiedExpression::Every, $<expr>6, $9), @$, parseInfo);
     
    29172953                CaseClause                                                          /* [43] */
    29182954    {
    2919         disallowedConstruct(parseInfo, @$);
     2955        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    29202956        parseInfo->typeswitchSource.pop();
    29212957        $$ = $6;
     
    29773013IfExpr: IF LPAREN Expr RPAREN THEN ExprSingle ELSE ExprSingle                       /* [45] */
    29783014    {
     3015        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    29793016        $$ = create(new IfThenClause($3, $6, $8), @$, parseInfo);
    29803017    }
     
    29833020| OrExpr OR AndExpr
    29843021    {
     3022        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    29853023        $$ = create(new OrExpression($1, $3), @$, parseInfo);
    29863024    }
     
    29893027| AndExpr AND ComparisonExpr
    29903028    {
     3029        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    29913030        $$ = create(new AndExpression($1, $3), @$, parseInfo);
    29923031    }
     
    30003039| AdditiveExpr TO AdditiveExpr
    30013040    {
     3041        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30023042        $$ = create(new RangeExpression($1, $3), @$, parseInfo);
    30033043    }
     
    30063046| AdditiveExpr AdditiveOperator MultiplicativeExpr
    30073047    {
     3048        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30083049        $$ = create(new ArithmeticExpression($1, $2, $3), @$, parseInfo);
    30093050    }
     
    30153056| MultiplicativeExpr MultiplyOperator UnionExpr
    30163057    {
     3058        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30173059        $$ = create(new ArithmeticExpression($1, $2, $3), @$, parseInfo);
    30183060    }
     
    30263068| UnionExpr UnionOperator IntersectExceptExpr
    30273069    {
     3070        allowedIn(QueryLanguages(QXmlQuery::XQuery10
     3071                                 | QXmlQuery::XPath20
     3072                                 | QXmlQuery::XmlSchema11IdentityConstraintField
     3073                                 | QXmlQuery::XmlSchema11IdentityConstraintSelector),
     3074                  parseInfo, @$);
    30283075        $$ = create(new CombineNodes($1, CombineNodes::Union, $3), @$, parseInfo);
    30293076    }
     
    30323079| IntersectExceptExpr IntersectOperator InstanceOfExpr
    30333080    {
     3081        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30343082        $$ = create(new CombineNodes($1, $2, $3), @$, parseInfo);
    30353083    }
     
    30503098| TreatExpr INSTANCE OF SequenceType
    30513099    {
     3100        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30523101        $$ = create(new InstanceOf($1,
    3053         SequenceType::Ptr($4)), @$, parseInfo);
     3102                    SequenceType::Ptr($4)), @$, parseInfo);
    30543103    }
    30553104
     
    30573106| CastableExpr TREAT AS SequenceType
    30583107    {
     3108        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30593109        $$ = create(new TreatAs($1, $4), @$, parseInfo);
    30603110    }
     
    30633113| CastExpr CASTABLE AS SingleType
    30643114    {
     3115        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30653116        $$ = create(new CastableAs($1, $4), @$, parseInfo);
    30663117    }
     
    30693120| UnaryExpr CAST AS SingleType
    30703121    {
     3122        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30713123        $$ = create(new CastAs($1, $4), @$, parseInfo);
    30723124    }
     
    30753127| UnaryOperator UnaryExpr
    30763128    {
     3129        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30773130        $$ = create(new UnaryExpression($1, $2, parseInfo->staticContext), @$, parseInfo);
    30783131    }
     
    30933146GeneralComp: RangeExpr GeneralComparisonOperator RangeExpr                          /* [60] */
    30943147    {
     3148        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    30953149        $$ = create(new GeneralComparison($1, $2, $3, parseInfo->isBackwardsCompat.top()), @$, parseInfo);
    30963150    }
     
    31263180ValidateExpr: ValidationMode EnclosedExpr                                           /* [63] */
    31273181    {
    3128         disallowedConstruct(parseInfo, @$);
     3182        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    31293183        parseInfo->staticContext->error(QtXmlPatterns::tr("The Schema Validation Feature is not supported. "
    31303184                                                          "Hence, %1-expressions may not be used.")
     
    31443198ExtensionExpr: Pragmas EnclosedOptionalExpr                                         /* [65] */
    31453199    {
     3200        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    31463201        /* We don't support any pragmas, so we only do the
    31473202         * necessary validation and use the fallback expression. */
     
    31723227Pragma: PRAGMA_START PragmaName PragmaContents PRAGMA_END                           /* [66] */
    31733228    {
    3174         disallowedConstruct(parseInfo, @$);
     3229        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    31753230    }
    31763231
     
    32423297| BASEURI StringLiteral CURLY_LBRACE Expr CURLY_RBRACE                              /* [X] */
    32433298{
     3299    allowedIn(QXmlQuery::XSLT20, parseInfo, @$);
    32443300    Q_ASSERT(!$2.isEmpty());
    32453301    $$ = create(new StaticBaseURIStore($2, $4), @$, parseInfo);
     
    32483304| DECLARE NAMESPACE NCNAME G_EQ STRING_LITERAL CURLY_LBRACE                         /* [X] */
    32493305    {
     3306        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20), parseInfo, @$);
    32503307        parseInfo->resolvers.push(parseInfo->staticContext->namespaceBindings());
    32513308        const NamespaceResolver::Ptr resolver(new DelegatingNamespaceResolver(parseInfo->staticContext->namespaceBindings()));
     
    34503507        else
    34513508            $$ = $1;
     3509
     3510        switch($1)
     3511        {
     3512            case QXmlNodeModelIndex::AxisAttribute:
     3513            {
     3514                allowedIn(QueryLanguages(  QXmlQuery::XPath20
     3515                                         | QXmlQuery::XQuery10
     3516                                         | QXmlQuery::XmlSchema11IdentityConstraintField
     3517                                         | QXmlQuery::XSLT20),
     3518                          parseInfo, @$);
     3519                break;
     3520            }
     3521            case QXmlNodeModelIndex::AxisChild:
     3522            {
     3523                allowedIn(QueryLanguages(  QXmlQuery::XPath20
     3524                                         | QXmlQuery::XQuery10
     3525                                         | QXmlQuery::XmlSchema11IdentityConstraintField
     3526                                         | QXmlQuery::XmlSchema11IdentityConstraintSelector
     3527                                         | QXmlQuery::XSLT20),
     3528                          parseInfo, @$);
     3529                break;
     3530            }
     3531            default:
     3532            {
     3533                allowedIn(QueryLanguages(  QXmlQuery::XPath20
     3534                                         | QXmlQuery::XQuery10
     3535                                         | QXmlQuery::XSLT20),
     3536                          parseInfo, @$);
     3537            }
     3538        }
    34523539    }
    34533540
     
    34713558                   NodeTest                                                         /* [72] */
    34723559    {
     3560        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XSLT20 | QXmlQuery::XmlSchema11IdentityConstraintField), parseInfo, @$);
    34733561        $$ = create(new AxisStep(QXmlNodeModelIndex::AxisAttribute, $3), @$, parseInfo);
    34743562
     
    35003588NodeTest: NameTest                                                                  /* [78] */
    35013589| KindTest
     3590    {
     3591        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
     3592    }
    35023593
    35033594NameTest: ElementName                                                               /* [79] */
     
    35223613| ANY_PREFIX
    35233614    {
     3615        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35243616        const QXmlName::LocalNameCode c = parseInfo->staticContext->namePool()->allocateLocalName($1);
    35253617        $$ = LocalNameTest::create(parseInfo->nodeTestSource, c);
     
    35293621| FilterExpr LBRACKET Expr RBRACKET
    35303622    {
     3623        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35313624        $$ = create(GenericPredicate::create($1, $3, parseInfo->staticContext, fromYYLTYPE(@4, parseInfo)), @$, parseInfo);
    35323625    }
     
    35573650NumericLiteral: XPATH2_NUMBER                                                       /* [86] */
    35583651    {
     3652        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35593653        $$ = createNumericLiteral<Double>($1, @$, parseInfo);
    35603654    }
    35613655| NUMBER
    35623656    {
     3657        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35633658        $$ = createNumericLiteral<Numeric>($1, @$, parseInfo);
    35643659    }
     
    35663661VarRef: DOLLAR VarName                                                              /* [87] */
    35673662    {
     3663        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35683664        $$ = resolveVariable($2, @$, parseInfo, false);
    35693665    }
     
    35813677ParenthesizedExpr: LPAREN Expr RPAREN                                               /* [89] */
    35823678    {
     3679        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35833680        $$ = $2;
    35843681    }
    35853682| LPAREN RPAREN
    35863683    {
     3684        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    35873685        $$ = create(new EmptySequence, @$, parseInfo);
    35883686    }
     
    36003698FunctionCallExpr: FunctionName LPAREN FunctionArguments RPAREN                      /* [93] */
    36013699    {
     3700        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
    36023701        if(XPathHelper::isReservedNamespace($1.namespaceURI()) || $1.namespaceURI() == StandardNamespaces::InternalXSLT)
    36033702        { /* We got a call to a builtin function. */
     
    36423741Constructor: DirectConstructor                                                      /* [94] */
    36433742    {
    3644         disallowedConstruct(parseInfo, @$);
     3743        allowedIn(QXmlQuery::XQuery10, parseInfo, @$);
    36453744    }
    36463745| ComputedConstructor
     3746/* The reason we cannot call alloweIn() as the action for ComputedConstructor,
     3747 * is that we use the computed constructors for XSL-T, and therefore generate
     3748 * INTERNAL tokens. */
    36473749
    36483750DirectConstructor: DirElemConstructor                                               /* [95] */
     
    40764178CompDocConstructor: DOCUMENT IsInternal EnclosedExpr                                /* [110] */
    40774179    {
    4078         disallowedConstruct(parseInfo, @$, $2);
     4180        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    40794181
    40804182        $$ = create(new DocumentConstructor($3), @$, parseInfo);
     
    40894191    {
    40904192        Q_ASSERT(5);
    4091         disallowedConstruct(parseInfo, @$, $2);
     4193        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    40924194
    40934195        Expression::Ptr effExpr;
     
    41344236                     EnclosedOptionalExpr                                           /* [113] */
    41354237    {
    4136         disallowedConstruct(parseInfo, @$, $2);
     4238        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    41374239
    41384240        const Expression::Ptr name(create(new AttributeNameValidator($3), @$, parseInfo));
     
    41514253CompCommentConstructor: COMMENT IsInternal EnclosedExpr                           /* [115] */
    41524254    {
    4153         disallowedConstruct(parseInfo, @$, $2);
     4255        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    41544256
    41554257        $$ = create(new CommentConstructor(createSimpleContent($3, @$, parseInfo)), @$, parseInfo);
     
    41584260CompPIConstructor: PROCESSING_INSTRUCTION CompPIName EnclosedOptionalExpr           /* [116] */
    41594261    {
    4160         disallowedConstruct(parseInfo, @$, $2);
     4262        allowedIn(QXmlQuery::XQuery10, parseInfo, @$, $2);
    41614263
    41624264        if($3)
     
    45184620
    45194621StringLiteral: STRING_LITERAL                                                       /* [144] */
     4622    {
     4623        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
     4624    }
    45204625| XPATH2_STRING_LITERAL
     4626    {
     4627        allowedIn(QueryLanguages(QXmlQuery::XQuery10 | QXmlQuery::XPath20), parseInfo, @$);
     4628    }
    45214629
    45224630QName: QNAME                                                      /* [154] */
Note: See TracChangeset for help on using the changeset viewer.