| 1 | /* |
| 2 | * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
| 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
| 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 18 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 19 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 20 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 21 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
| 26 | #ifndef RegexInterpreter_h |
| 27 | #define RegexInterpreter_hcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexInterpreter.h:27:9`! |
| 28 | |
| 29 | #include <wtf/Platform.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h`/ |
| 30 | |
| 31 | #if ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(YARR) |
| 32 | |
| 33 | #include <wtf/unicode/Unicode.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/unicode/Unicode.h`/ |
| 34 | #include "RegexParser.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexParser.h`/ |
| 35 | #include "RegexPattern.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/yarr/RegexPattern.h`/ |
| 36 | |
| 37 | namespace JSCcxx . . $ `<built-in>:463:9`! { namespace Yarrcxx . . $ QTJSC/Yarr/ { |
| 38 | |
| 39 | class ByteDisjunctioncxx . . $ QTJSC/Yarr/ByteDisjunction#; |
| 40 | |
| 41 | struct ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# { |
| 42 | enum Typecxx . . $ QTJSC/Yarr/ByteTerm#Type# { |
| 43 | TypeBodyAlternativeBegincxx . . $ QTJSC/Yarr/ByteTerm#TypeBodyAlternativeBegin., |
| 44 | TypeBodyAlternativeDisjunctioncxx . . $ QTJSC/Yarr/ByteTerm#TypeBodyAlternativeDisjunction., |
| 45 | TypeBodyAlternativeEndcxx . . $ QTJSC/Yarr/ByteTerm#TypeBodyAlternativeEnd., |
| 46 | TypeAlternativeBegincxx . . $ QTJSC/Yarr/ByteTerm#TypeAlternativeBegin., |
| 47 | TypeAlternativeDisjunctioncxx . . $ QTJSC/Yarr/ByteTerm#TypeAlternativeDisjunction., |
| 48 | TypeAlternativeEndcxx . . $ QTJSC/Yarr/ByteTerm#TypeAlternativeEnd., |
| 49 | TypeSubpatternBegincxx . . $ QTJSC/Yarr/ByteTerm#TypeSubpatternBegin., |
| 50 | TypeSubpatternEndcxx . . $ QTJSC/Yarr/ByteTerm#TypeSubpatternEnd., |
| 51 | TypeAssertionBOLcxx . . $ QTJSC/Yarr/ByteTerm#TypeAssertionBOL., |
| 52 | TypeAssertionEOLcxx . . $ QTJSC/Yarr/ByteTerm#TypeAssertionEOL., |
| 53 | TypeAssertionWordBoundarycxx . . $ QTJSC/Yarr/ByteTerm#TypeAssertionWordBoundary., |
| 54 | TypePatternCharacterOncecxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCharacterOnce., |
| 55 | TypePatternCharacterFixedcxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCharacterFixed., |
| 56 | TypePatternCharacterGreedycxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCharacterGreedy., |
| 57 | TypePatternCharacterNonGreedycxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCharacterNonGreedy., |
| 58 | TypePatternCasedCharacterOncecxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCasedCharacterOnce., |
| 59 | TypePatternCasedCharacterFixedcxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCasedCharacterFixed., |
| 60 | TypePatternCasedCharacterGreedycxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCasedCharacterGreedy., |
| 61 | TypePatternCasedCharacterNonGreedycxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCasedCharacterNonGreedy., |
| 62 | TypeCharacterClasscxx . . $ QTJSC/Yarr/ByteTerm#TypeCharacterClass., |
| 63 | TypeBackReferencecxx . . $ QTJSC/Yarr/ByteTerm#TypeBackReference., |
| 64 | TypeParenthesesSubpatterncxx . . $ QTJSC/Yarr/ByteTerm#TypeParenthesesSubpattern., |
| 65 | TypeParenthesesSubpatternOnceBegincxx . . $ QTJSC/Yarr/ByteTerm#TypeParenthesesSubpatternOnceBegin., |
| 66 | TypeParenthesesSubpatternOnceEndcxx . . $ QTJSC/Yarr/ByteTerm#TypeParenthesesSubpatternOnceEnd., |
| 67 | TypeParentheticalAssertionBegincxx . . $ QTJSC/Yarr/ByteTerm#TypeParentheticalAssertionBegin., |
| 68 | TypeParentheticalAssertionEndcxx . . $ QTJSC/Yarr/ByteTerm#TypeParentheticalAssertionEnd., |
| 69 | TypeCheckInputcxx . . $ QTJSC/Yarr/ByteTerm#TypeCheckInput., |
| 70 | } typecxx . . $ QTJSC/Yarr/ByteTerm#type.; |
| 71 | bool invertOrCapturecxx . . $ QTJSC/Yarr/ByteTerm#invertOrCapture.; |
| 72 | unioncxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0# { |
| 73 | structcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1# { |
| 74 | unioncxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2# { |
| 75 | UCharcxx . . $ UChar# patternCharactercxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#patternCharacter.; |
| 76 | structcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#$anonymous_type_3# { |
| 77 | UCharcxx . . $ UChar# locxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#$anonymous_type_3#lo.; |
| 78 | UCharcxx . . $ UChar# hicxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#$anonymous_type_3#hi.; |
| 79 | } casedCharactercxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#casedCharacter.; |
| 80 | CharacterClasscxx . . $ QTJSC/Yarr/CharacterClass#* characterClasscxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#characterClass.; |
| 81 | unsigned subpatternIdcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#subpatternId.; |
| 82 | }; |
| 83 | unioncxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_4# { |
| 84 | ByteDisjunctioncxx . . $ QTJSC/Yarr/ByteDisjunction#* parenthesesDisjunctioncxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_4#parenthesesDisjunction.; |
| 85 | unsigned parenthesesWidthcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_4#parenthesesWidth.; |
| 86 | }; |
| 87 | QuantifierTypecxx . . $ QTJSC/Yarr/QuantifierType# quantityTypecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityType.; |
| 88 | unsigned quantityCountcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityCount.; |
| 89 | } atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom.; |
| 90 | structcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5# { |
| 91 | int nextcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#next.; |
| 92 | int endcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#end.; |
| 93 | } alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative.; |
| 94 | unsigned checkInputCountcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#checkInputCount.; |
| 95 | }; |
| 96 | unsigned frameLocationcxx . . $ QTJSC/Yarr/ByteTerm#frameLocation.; |
| 97 | int inputPositioncxx . . $ QTJSC/Yarr/ByteTerm#inputPosition.; |
| 98 | |
| 99 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(c706ab68f2102f85).(UCharcxx . . $ UChar# ch, int inputPos, unsigned frameLocation, unsigned quantityCount, QuantifierTypecxx . . $ QTJSC/Yarr/QuantifierType# quantityType) |
| 100 | : frameLocationcxx . . $ QTJSC/Yarr/ByteTerm#frameLocation.(frameLocation) |
| 101 | { |
| 102 | switch (quantityType) { |
| 103 | case QuantifierFixedCountcxx . . $ QTJSC/Yarr/QuantifierFixedCount.: |
| 104 | typecxx . . $ QTJSC/Yarr/ByteTerm#type. = (quantityCount == 1) ? ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#::TypePatternCharacterOncecxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCharacterOnce. : ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#::TypePatternCharacterFixedcxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCharacterFixed.; |
| 105 | break; |
| 106 | case QuantifierGreedycxx . . $ QTJSC/Yarr/QuantifierGreedy.: |
| 107 | typecxx . . $ QTJSC/Yarr/ByteTerm#type. = ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#::TypePatternCharacterGreedycxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCharacterGreedy.; |
| 108 | break; |
| 109 | case QuantifierNonGreedycxx . . $ QTJSC/Yarr/QuantifierNonGreedy.: |
| 110 | typecxx . . $ QTJSC/Yarr/ByteTerm#type. = ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#::TypePatternCharacterNonGreedycxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCharacterNonGreedy.; |
| 111 | break; |
| 112 | } |
| 113 | |
| 114 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..patternCharactercxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#patternCharacter. = ch; |
| 115 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityTypecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityType. = quantityType; |
| 116 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityCountcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityCount. = quantityCount; |
| 117 | inputPositioncxx . . $ QTJSC/Yarr/ByteTerm#inputPosition. = inputPos; |
| 118 | } |
| 119 | |
| 120 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(9232a60c7cb6eba1).(UCharcxx . . $ UChar# lo, UCharcxx . . $ UChar# hi, int inputPos, unsigned frameLocation, unsigned quantityCount, QuantifierTypecxx . . $ QTJSC/Yarr/QuantifierType# quantityType) |
| 121 | : frameLocationcxx . . $ QTJSC/Yarr/ByteTerm#frameLocation.(frameLocation) |
| 122 | { |
| 123 | switch (quantityType) { |
| 124 | case QuantifierFixedCountcxx . . $ QTJSC/Yarr/QuantifierFixedCount.: |
| 125 | typecxx . . $ QTJSC/Yarr/ByteTerm#type. = (quantityCount == 1) ? ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#::TypePatternCasedCharacterOncecxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCasedCharacterOnce. : ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#::TypePatternCasedCharacterFixedcxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCasedCharacterFixed.; |
| 126 | break; |
| 127 | case QuantifierGreedycxx . . $ QTJSC/Yarr/QuantifierGreedy.: |
| 128 | typecxx . . $ QTJSC/Yarr/ByteTerm#type. = ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#::TypePatternCasedCharacterGreedycxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCasedCharacterGreedy.; |
| 129 | break; |
| 130 | case QuantifierNonGreedycxx . . $ QTJSC/Yarr/QuantifierNonGreedy.: |
| 131 | typecxx . . $ QTJSC/Yarr/ByteTerm#type. = ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#::TypePatternCasedCharacterNonGreedycxx . . $ QTJSC/Yarr/ByteTerm#TypePatternCasedCharacterNonGreedy.; |
| 132 | break; |
| 133 | } |
| 134 | |
| 135 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..casedCharactercxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#casedCharacter..locxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#$anonymous_type_3#lo. = lo; |
| 136 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..casedCharactercxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#casedCharacter..hicxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#$anonymous_type_3#hi. = hi; |
| 137 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityTypecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityType. = quantityType; |
| 138 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityCountcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityCount. = quantityCount; |
| 139 | inputPositioncxx . . $ QTJSC/Yarr/ByteTerm#inputPosition. = inputPos; |
| 140 | } |
| 141 | |
| 142 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(9e3a5daa0991ec4).(CharacterClasscxx . . $ QTJSC/Yarr/CharacterClass#* characterClass, bool invert, int inputPos) |
| 143 | : typecxx . . $ QTJSC/Yarr/ByteTerm#type.(ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#::TypeCharacterClasscxx . . $ QTJSC/Yarr/ByteTerm#TypeCharacterClass.) |
| 144 | , invertOrCapturecxx . . $ QTJSC/Yarr/ByteTerm#invertOrCapture.(invert) |
| 145 | { |
| 146 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..characterClasscxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#characterClass. = characterClass; |
| 147 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityTypecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityType. = QuantifierFixedCountcxx . . $ QTJSC/Yarr/QuantifierFixedCount.; |
| 148 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityCountcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityCount. = 1; |
| 149 | inputPositioncxx . . $ QTJSC/Yarr/ByteTerm#inputPosition. = inputPos; |
| 150 | } |
| 151 | |
| 152 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(58ec429312fcdc80).(Typecxx . . $ QTJSC/Yarr/ByteTerm#Type# type, unsigned subpatternId, ByteDisjunctioncxx . . $ QTJSC/Yarr/ByteDisjunction#* parenthesesInfo, bool invertOrCapture, int inputPos) |
| 153 | : typecxx . . $ QTJSC/Yarr/ByteTerm#type.(type) |
| 154 | , invertOrCapturecxx . . $ QTJSC/Yarr/ByteTerm#invertOrCapture.(invertOrCapture) |
| 155 | { |
| 156 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..subpatternIdcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#subpatternId. = subpatternId; |
| 157 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..parenthesesDisjunctioncxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_4#parenthesesDisjunction. = parenthesesInfo; |
| 158 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityTypecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityType. = QuantifierFixedCountcxx . . $ QTJSC/Yarr/QuantifierFixedCount.; |
| 159 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityCountcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityCount. = 1; |
| 160 | inputPositioncxx . . $ QTJSC/Yarr/ByteTerm#inputPosition. = inputPos; |
| 161 | } |
| 162 | |
| 163 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(Typecxx . . $ QTJSC/Yarr/ByteTerm#Type# type, bool invert = false) |
| 164 | : typecxx . . $ QTJSC/Yarr/ByteTerm#type.(type) |
| 165 | , invertOrCapturecxx . . $ QTJSC/Yarr/ByteTerm#invertOrCapture.(invert) |
| 166 | { |
| 167 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityTypecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityType. = QuantifierFixedCountcxx . . $ QTJSC/Yarr/QuantifierFixedCount.; |
| 168 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityCountcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityCount. = 1; |
| 169 | } |
| 170 | |
| 171 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(8855f21d2236050d).(Typecxx . . $ QTJSC/Yarr/ByteTerm#Type# type, unsigned subpatternId, bool invertOrCapture, int inputPos) |
| 172 | : typecxx . . $ QTJSC/Yarr/ByteTerm#type.(type) |
| 173 | , invertOrCapturecxx . . $ QTJSC/Yarr/ByteTerm#invertOrCapture.(invertOrCapture) |
| 174 | { |
| 175 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..subpatternIdcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#$anonymous_type_2#subpatternId. = subpatternId; |
| 176 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityTypecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityType. = QuantifierFixedCountcxx . . $ QTJSC/Yarr/QuantifierFixedCount.; |
| 177 | atomcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#atom..quantityCountcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_1#quantityCount. = 1; |
| 178 | inputPositioncxx . . $ QTJSC/Yarr/ByteTerm#inputPosition. = inputPos; |
| 179 | } |
| 180 | |
| 181 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# BOLcxx . . $ QTJSC/Yarr/ByteTerm#BOL(61e3619b4b1a13cc).(int inputPos) |
| 182 | { |
| 183 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# termcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeAssertionBOLcxx . . $ QTJSC/Yarr/ByteTerm#TypeAssertionBOL.); |
| 184 | term.inputPositioncxx . . $ QTJSC/Yarr/ByteTerm#inputPosition. = inputPos; |
| 185 | return term; |
| 186 | } |
| 187 | |
| 188 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# CheckInputcxx . . $ QTJSC/Yarr/ByteTerm#CheckInput(5bd2f9ded3ceb12c).(unsigned count) |
| 189 | { |
| 190 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# termcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeCheckInputcxx . . $ QTJSC/Yarr/ByteTerm#TypeCheckInput.); |
| 191 | term.checkInputCountcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#checkInputCount. = count; |
| 192 | return term; |
| 193 | } |
| 194 | |
| 195 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# EOLcxx . . $ QTJSC/Yarr/ByteTerm#EOL(61e3619b4b1a13cc).(int inputPos) |
| 196 | { |
| 197 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# termcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeAssertionEOLcxx . . $ QTJSC/Yarr/ByteTerm#TypeAssertionEOL.); |
| 198 | term.inputPositioncxx . . $ QTJSC/Yarr/ByteTerm#inputPosition. = inputPos; |
| 199 | return term; |
| 200 | } |
| 201 | |
| 202 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# WordBoundarycxx . . $ QTJSC/Yarr/ByteTerm#WordBoundary(17a487a268d1456a).(bool invert, int inputPos) |
| 203 | { |
| 204 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# termcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeAssertionWordBoundarycxx . . $ QTJSC/Yarr/ByteTerm#TypeAssertionWordBoundary., invert); |
| 205 | term.inputPositioncxx . . $ QTJSC/Yarr/ByteTerm#inputPosition. = inputPos; |
| 206 | return term; |
| 207 | } |
| 208 | |
| 209 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# BackReferencecxx . . $ QTJSC/Yarr/ByteTerm#BackReference(8c55a2c3cf164b74).(unsigned subpatternId, int inputPos) |
| 210 | { |
| 211 | return ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(8855f21d2236050d).(TypeBackReferencecxx . . $ QTJSC/Yarr/ByteTerm#TypeBackReference., subpatternId, false, inputPos); |
| 212 | } |
| 213 | |
| 214 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# BodyAlternativeBegincxx . . $ QTJSC/Yarr/ByteTerm#BodyAlternativeBegin(b2793b3685d9b704).() |
| 215 | { |
| 216 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# termcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeBodyAlternativeBegincxx . . $ QTJSC/Yarr/ByteTerm#TypeBodyAlternativeBegin.); |
| 217 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..nextcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#next. = 0; |
| 218 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..endcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#end. = 0; |
| 219 | return term; |
| 220 | } |
| 221 | |
| 222 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# BodyAlternativeDisjunctioncxx . . $ QTJSC/Yarr/ByteTerm#BodyAlternativeDisjunction(b2793b3685d9b704).() |
| 223 | { |
| 224 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# termcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeBodyAlternativeDisjunctioncxx . . $ QTJSC/Yarr/ByteTerm#TypeBodyAlternativeDisjunction.); |
| 225 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..nextcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#next. = 0; |
| 226 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..endcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#end. = 0; |
| 227 | return term; |
| 228 | } |
| 229 | |
| 230 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# BodyAlternativeEndcxx . . $ QTJSC/Yarr/ByteTerm#BodyAlternativeEnd(b2793b3685d9b704).() |
| 231 | { |
| 232 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# termcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeBodyAlternativeEndcxx . . $ QTJSC/Yarr/ByteTerm#TypeBodyAlternativeEnd.); |
| 233 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..nextcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#next. = 0; |
| 234 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..endcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#end. = 0; |
| 235 | return term; |
| 236 | } |
| 237 | |
| 238 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# AlternativeBegincxx . . $ QTJSC/Yarr/ByteTerm#AlternativeBegin(b2793b3685d9b704).() |
| 239 | { |
| 240 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# termcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeAlternativeBegincxx . . $ QTJSC/Yarr/ByteTerm#TypeAlternativeBegin.); |
| 241 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..nextcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#next. = 0; |
| 242 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..endcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#end. = 0; |
| 243 | return term; |
| 244 | } |
| 245 | |
| 246 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# AlternativeDisjunctioncxx . . $ QTJSC/Yarr/ByteTerm#AlternativeDisjunction(b2793b3685d9b704).() |
| 247 | { |
| 248 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# termcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeAlternativeDisjunctioncxx . . $ QTJSC/Yarr/ByteTerm#TypeAlternativeDisjunction.); |
| 249 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..nextcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#next. = 0; |
| 250 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..endcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#end. = 0; |
| 251 | return term; |
| 252 | } |
| 253 | |
| 254 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# AlternativeEndcxx . . $ QTJSC/Yarr/ByteTerm#AlternativeEnd(b2793b3685d9b704).() |
| 255 | { |
| 256 | ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# termcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeAlternativeEndcxx . . $ QTJSC/Yarr/ByteTerm#TypeAlternativeEnd.); |
| 257 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..nextcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#next. = 0; |
| 258 | term.alternativecxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#alternative..endcxx . . $ QTJSC/Yarr/ByteTerm#$anonymous_type_0#$anonymous_type_5#end. = 0; |
| 259 | return term; |
| 260 | } |
| 261 | |
| 262 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# SubpatternBegincxx . . $ QTJSC/Yarr/ByteTerm#SubpatternBegin(b2793b3685d9b704).() |
| 263 | { |
| 264 | return ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#ByteTerm(e44a3ecae12a5bd3).(TypeSubpatternBegincxx . . $ QTJSC/Yarr/ByteTerm#TypeSubpatternBegin.); |
| 265 | } |
| 266 | |
| 267 | static ByteTermcxx . . $ QTJSC/Yarr/ByteTerm# SubpatternEndcxx . . $ QTJSC/Yarr/ByteTerm#SubpatternEnd(b2793b3685d9b704).() |
| 268 | { |
| 269 | return ByteTermcxx . . $ QTJSC/Yarr/ByteTerm#(TypeSubpatternEndcxx . . $ QTJSC/Yarr/ByteTerm#TypeSubpatternEnd.); |
| 270 | } |
| 271 | |
| 272 | bool invertcxx . . $ QTJSC/Yarr/ByteTerm#invert(c9857a73d68e59ba).() |
| 273 | { |
| 274 | return invertOrCapturecxx . . $ QTJSC/Yarr/ByteTerm#invertOrCapture.; |
| 275 | } |
| 276 | |
| 277 | bool capturecxx . . $ QTJSC/Yarr/ByteTerm#capture(c9857a73d68e59ba).() |
| 278 | { |
| 279 | return invertOrCapturecxx . . $ QTJSC/Yarr/ByteTerm#invertOrCapture.; |
| 280 | } |
| 281 | }; |
| 282 | |
| 283 | class ByteDisjunctioncxx . . $ QTJSC/Yarr/ByteDisjunction# : public FastAllocBasecxx . . $ FastAllocBase# { |
| 284 | public: |
| 285 | ByteDisjunctioncxx . . $ QTJSC/Yarr/ByteDisjunction#ByteDisjunction(b4d55b1286ff73e8).(unsigned numSubpatterns, unsigned frameSize) |
| 286 | : m_numSubpatternscxx . . $ QTJSC/Yarr/ByteDisjunction#m_numSubpatterns.(numSubpatterns) |
| 287 | , m_frameSizecxx . . $ QTJSC/Yarr/ByteDisjunction#m_frameSize.(frameSize) |
| 288 | { |
| 289 | } |
| 290 | |
| 291 | Vector<ByteTerm> termscxx . . $ QTJSC/Yarr/ByteDisjunction#terms.; |
| 292 | unsigned m_numSubpatternscxx . . $ QTJSC/Yarr/ByteDisjunction#m_numSubpatterns.; |
| 293 | unsigned m_frameSizecxx . . $ QTJSC/Yarr/ByteDisjunction#m_frameSize.; |
| 294 | }; |
| 295 | |
| 296 | struct BytecodePatterncxx . . $ QTJSC/Yarr/BytecodePattern# : FastAllocBasecxx . . $ FastAllocBase# { |
| 297 | BytecodePatterncxx . . $ QTJSC/Yarr/BytecodePattern#BytecodePattern(5e3c825a460488d8).(ByteDisjunctioncxx . . $ QTJSC/Yarr/ByteDisjunction#* body, Vector<ByteDisjunction*> allParenthesesInfo, RegexPatterncxx . . $ QTJSC/Yarr/RegexPattern#& pattern) |
| 298 | : m_body(body) |
| 299 | , m_ignoreCasecxx . . $ QTJSC/Yarr/BytecodePattern#m_ignoreCase.(pattern.m_ignoreCasecxx . . $ QTJSC/Yarr/RegexPattern#m_ignoreCase.) |
| 300 | , m_multilinecxx . . $ QTJSC/Yarr/BytecodePattern#m_multiline.(pattern.m_multilinecxx . . $ QTJSC/Yarr/RegexPattern#m_multiline.) |
| 301 | { |
| 302 | newlineCharacterClasscxx . . $ QTJSC/Yarr/BytecodePattern#newlineCharacterClass. = pattern.newlineCharacterClasscxx . . $ QTJSC/Yarr/RegexPattern#newlineCharacterClass(fd2c3252af01ae8b).(); |
| 303 | wordcharCharacterClasscxx . . $ QTJSC/Yarr/BytecodePattern#wordcharCharacterClass. = pattern.wordcharCharacterClasscxx . . $ QTJSC/Yarr/RegexPattern#wordcharCharacterClass(fd2c3252af01ae8b).(); |
| 304 | |
| 305 | m_allParenthesesInfo.append(allParenthesesInfo); |
| 306 | m_userCharacterClasses.append(pattern.m_userCharacterClasses); |
| 307 | // 'Steal' the RegexPattern's CharacterClasses! We clear its |
| 308 | // array, so that it won't delete them on destruction. We'll |
| 309 | // take responsibility for that. |
| 310 | pattern.m_userCharacterClasses.clear(); |
| 311 | } |
| 312 | |
| 313 | ~cxx . . $ QTJSC/Yarr/BytecodePattern#`~BytecodePattern`(49f6e7a06ebc5aa8).BytecodePatterncxx . . $ QTJSC/Yarr/BytecodePattern#() |
| 314 | { |
| 315 | deleteAllValues(m_allParenthesesInfo); |
| 316 | deleteAllValues(m_userCharacterClasses); |
| 317 | } |
| 318 | |
| 319 | OwnPtrcxx . . $ OwnPtr#<ByteDisjunctioncxx . . $ QTJSC/Yarr/ByteDisjunction#> m_bodycxx . . $ QTJSC/Yarr/BytecodePattern#m_body.; |
| 320 | bool m_ignoreCasecxx . . $ QTJSC/Yarr/BytecodePattern#m_ignoreCase.; |
| 321 | bool m_multilinecxx . . $ QTJSC/Yarr/BytecodePattern#m_multiline.; |
| 322 | |
| 323 | CharacterClasscxx . . $ QTJSC/Yarr/CharacterClass#* newlineCharacterClasscxx . . $ QTJSC/Yarr/BytecodePattern#newlineCharacterClass.; |
| 324 | CharacterClasscxx . . $ QTJSC/Yarr/CharacterClass#* wordcharCharacterClasscxx . . $ QTJSC/Yarr/BytecodePattern#wordcharCharacterClass.; |
| 325 | private: |
| 326 | Vector<ByteDisjunction*> m_allParenthesesInfocxx . . $ QTJSC/Yarr/BytecodePattern#m_allParenthesesInfo.; |
| 327 | Vector<CharacterClass*> m_userCharacterClassescxx . . $ QTJSC/Yarr/BytecodePattern#m_userCharacterClasses.; |
| 328 | }; |
| 329 | |
| 330 | BytecodePatterncxx . . $ QTJSC/Yarr/BytecodePattern#* byteCompileRegexcxx . . $ QTJSC/Yarr/byteCompileRegex(2a11e44c6d26179f).(const UStringcxx . . $ QTJSC/UString#& pattern, unsigned& numSubpatterns, const char*& error, bool ignoreCase = false, bool multiline = false); |
| 331 | int interpretRegexcxx . . $ QTJSC/Yarr/interpretRegex(ae0016d597b821a6).(BytecodePatterncxx . . $ QTJSC/Yarr/BytecodePattern#* v_regex, const UCharcxx . . $ UChar#* input, unsigned start, unsigned length, int* output); |
| 332 | |
| 333 | } } // namespace JSC::Yarr |
| 334 | |
| 335 | #endif |
| 336 | |
| 337 | #endif // RegexInterpreter_h |