diff options
Diffstat (limited to '')
-rw-r--r-- | docs/sqlglot/tokens.html | 4513 |
1 files changed, 2490 insertions, 2023 deletions
diff --git a/docs/sqlglot/tokens.html b/docs/sqlglot/tokens.html index 32e0646..83da273 100644 --- a/docs/sqlglot/tokens.html +++ b/docs/sqlglot/tokens.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="generator" content="pdoc 13.1.1"/> + <meta name="generator" content="pdoc 14.0.0"/> <title>sqlglot.tokens API documentation</title> <style>/*! * Bootstrap Reboot v5.0.0 (https://getbootstrap.com/) * Copyright 2011-2021 The Bootstrap Authors * Copyright 2011-2021 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) */*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-bs-original-title],abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#0a58ca}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em;direction:ltr;unicode-bidi:bidi-override}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}</style> @@ -406,6 +406,9 @@ <a class="variable" href="#TokenType.UNIQUEIDENTIFIER">UNIQUEIDENTIFIER</a> </li> <li> + <a class="variable" href="#TokenType.USERDEFINED">USERDEFINED</a> + </li> + <li> <a class="variable" href="#TokenType.MONEY">MONEY</a> </li> <li> @@ -583,6 +586,9 @@ <a class="variable" href="#TokenType.FOR">FOR</a> </li> <li> + <a class="variable" href="#TokenType.FORCE">FORCE</a> + </li> + <li> <a class="variable" href="#TokenType.FOREIGN_KEY">FOREIGN_KEY</a> </li> <li> @@ -619,6 +625,9 @@ <a class="variable" href="#TokenType.IF">IF</a> </li> <li> + <a class="variable" href="#TokenType.IGNORE">IGNORE</a> + </li> + <li> <a class="variable" href="#TokenType.ILIKE">ILIKE</a> </li> <li> @@ -927,6 +936,27 @@ <li> <a class="function" href="#Token.var">var</a> </li> + <li> + <a class="variable" href="#Token.token_type">token_type</a> + </li> + <li> + <a class="variable" href="#Token.text">text</a> + </li> + <li> + <a class="variable" href="#Token.line">line</a> + </li> + <li> + <a class="variable" href="#Token.col">col</a> + </li> + <li> + <a class="variable" href="#Token.start">start</a> + </li> + <li> + <a class="variable" href="#Token.end">end</a> + </li> + <li> + <a class="variable" href="#Token.comments">comments</a> + </li> </ul> </li> @@ -934,6 +964,60 @@ <a class="class" href="#Tokenizer">Tokenizer</a> <ul class="memberlist"> <li> + <a class="variable" href="#Tokenizer.SINGLE_TOKENS">SINGLE_TOKENS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.BIT_STRINGS">BIT_STRINGS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.BYTE_STRINGS">BYTE_STRINGS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.HEX_STRINGS">HEX_STRINGS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.RAW_STRINGS">RAW_STRINGS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.IDENTIFIERS">IDENTIFIERS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.IDENTIFIER_ESCAPES">IDENTIFIER_ESCAPES</a> + </li> + <li> + <a class="variable" href="#Tokenizer.QUOTES">QUOTES</a> + </li> + <li> + <a class="variable" href="#Tokenizer.STRING_ESCAPES">STRING_ESCAPES</a> + </li> + <li> + <a class="variable" href="#Tokenizer.VAR_SINGLE_TOKENS">VAR_SINGLE_TOKENS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.IDENTIFIERS_CAN_START_WITH_DIGIT">IDENTIFIERS_CAN_START_WITH_DIGIT</a> + </li> + <li> + <a class="variable" href="#Tokenizer.KEYWORDS">KEYWORDS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.WHITE_SPACE">WHITE_SPACE</a> + </li> + <li> + <a class="variable" href="#Tokenizer.COMMANDS">COMMANDS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.COMMAND_PREFIX_TOKENS">COMMAND_PREFIX_TOKENS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.NUMERIC_LITERALS">NUMERIC_LITERALS</a> + </li> + <li> + <a class="variable" href="#Tokenizer.ENCODE">ENCODE</a> + </li> + <li> + <a class="variable" href="#Tokenizer.COMMENTS">COMMENTS</a> + </li> + <li> <a class="function" href="#Tokenizer.reset">reset</a> </li> <li> @@ -942,6 +1026,15 @@ <li> <a class="function" href="#Tokenizer.peek">peek</a> </li> + <li> + <a class="variable" href="#Tokenizer.size">size</a> + </li> + <li> + <a class="variable" href="#Tokenizer.sql">sql</a> + </li> + <li> + <a class="variable" href="#Tokenizer.tokens">tokens</a> + </li> </ul> </li> @@ -974,7 +1067,7 @@ </span><span id="L-4"><a href="#L-4"><span class="linenos"> 4</span></a><span class="kn">from</span> <span class="nn">enum</span> <span class="kn">import</span> <span class="n">auto</span> </span><span id="L-5"><a href="#L-5"><span class="linenos"> 5</span></a> </span><span id="L-6"><a href="#L-6"><span class="linenos"> 6</span></a><span class="kn">from</span> <span class="nn">sqlglot.helper</span> <span class="kn">import</span> <span class="n">AutoName</span> -</span><span id="L-7"><a href="#L-7"><span class="linenos"> 7</span></a><span class="kn">from</span> <span class="nn">sqlglot.trie</span> <span class="kn">import</span> <span class="n">in_trie</span><span class="p">,</span> <span class="n">new_trie</span> +</span><span id="L-7"><a href="#L-7"><span class="linenos"> 7</span></a><span class="kn">from</span> <span class="nn">sqlglot.trie</span> <span class="kn">import</span> <span class="n">TrieResult</span><span class="p">,</span> <span class="n">in_trie</span><span class="p">,</span> <span class="n">new_trie</span> </span><span id="L-8"><a href="#L-8"><span class="linenos"> 8</span></a> </span><span id="L-9"><a href="#L-9"><span class="linenos"> 9</span></a> </span><span id="L-10"><a href="#L-10"><span class="linenos"> 10</span></a><span class="k">class</span> <span class="nc">TokenType</span><span class="p">(</span><span class="n">AutoName</span><span class="p">):</span> @@ -1107,1019 +1200,1023 @@ </span><span id="L-137"><a href="#L-137"><span class="linenos"> 137</span></a> <span class="n">BIGSERIAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> </span><span id="L-138"><a href="#L-138"><span class="linenos"> 138</span></a> <span class="n">XML</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> </span><span id="L-139"><a href="#L-139"><span class="linenos"> 139</span></a> <span class="n">UNIQUEIDENTIFIER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-140"><a href="#L-140"><span class="linenos"> 140</span></a> <span class="n">MONEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-141"><a href="#L-141"><span class="linenos"> 141</span></a> <span class="n">SMALLMONEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-142"><a href="#L-142"><span class="linenos"> 142</span></a> <span class="n">ROWVERSION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-143"><a href="#L-143"><span class="linenos"> 143</span></a> <span class="n">IMAGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-144"><a href="#L-144"><span class="linenos"> 144</span></a> <span class="n">VARIANT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-145"><a href="#L-145"><span class="linenos"> 145</span></a> <span class="n">OBJECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-146"><a href="#L-146"><span class="linenos"> 146</span></a> <span class="n">INET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-147"><a href="#L-147"><span class="linenos"> 147</span></a> <span class="n">ENUM</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-148"><a href="#L-148"><span class="linenos"> 148</span></a> -</span><span id="L-149"><a href="#L-149"><span class="linenos"> 149</span></a> <span class="c1"># keywords</span> -</span><span id="L-150"><a href="#L-150"><span class="linenos"> 150</span></a> <span class="n">ALIAS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-151"><a href="#L-151"><span class="linenos"> 151</span></a> <span class="n">ALTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-152"><a href="#L-152"><span class="linenos"> 152</span></a> <span class="n">ALWAYS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-153"><a href="#L-153"><span class="linenos"> 153</span></a> <span class="n">ALL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-154"><a href="#L-154"><span class="linenos"> 154</span></a> <span class="n">ANTI</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-155"><a href="#L-155"><span class="linenos"> 155</span></a> <span class="n">ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-156"><a href="#L-156"><span class="linenos"> 156</span></a> <span class="n">APPLY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-157"><a href="#L-157"><span class="linenos"> 157</span></a> <span class="n">ARRAY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-158"><a href="#L-158"><span class="linenos"> 158</span></a> <span class="n">ASC</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-159"><a href="#L-159"><span class="linenos"> 159</span></a> <span class="n">ASOF</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-160"><a href="#L-160"><span class="linenos"> 160</span></a> <span class="n">AUTO_INCREMENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-161"><a href="#L-161"><span class="linenos"> 161</span></a> <span class="n">BEGIN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-162"><a href="#L-162"><span class="linenos"> 162</span></a> <span class="n">BETWEEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-163"><a href="#L-163"><span class="linenos"> 163</span></a> <span class="n">CACHE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-164"><a href="#L-164"><span class="linenos"> 164</span></a> <span class="n">CASE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-165"><a href="#L-165"><span class="linenos"> 165</span></a> <span class="n">CHARACTER_SET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-166"><a href="#L-166"><span class="linenos"> 166</span></a> <span class="n">CLUSTER_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-167"><a href="#L-167"><span class="linenos"> 167</span></a> <span class="n">COLLATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-168"><a href="#L-168"><span class="linenos"> 168</span></a> <span class="n">COMMAND</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-169"><a href="#L-169"><span class="linenos"> 169</span></a> <span class="n">COMMENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-170"><a href="#L-170"><span class="linenos"> 170</span></a> <span class="n">COMMIT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-171"><a href="#L-171"><span class="linenos"> 171</span></a> <span class="n">CONSTRAINT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-172"><a href="#L-172"><span class="linenos"> 172</span></a> <span class="n">CREATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-173"><a href="#L-173"><span class="linenos"> 173</span></a> <span class="n">CROSS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-174"><a href="#L-174"><span class="linenos"> 174</span></a> <span class="n">CUBE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-175"><a href="#L-175"><span class="linenos"> 175</span></a> <span class="n">CURRENT_DATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-176"><a href="#L-176"><span class="linenos"> 176</span></a> <span class="n">CURRENT_DATETIME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-177"><a href="#L-177"><span class="linenos"> 177</span></a> <span class="n">CURRENT_TIME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-178"><a href="#L-178"><span class="linenos"> 178</span></a> <span class="n">CURRENT_TIMESTAMP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-179"><a href="#L-179"><span class="linenos"> 179</span></a> <span class="n">CURRENT_USER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-180"><a href="#L-180"><span class="linenos"> 180</span></a> <span class="n">DEFAULT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-181"><a href="#L-181"><span class="linenos"> 181</span></a> <span class="n">DELETE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-182"><a href="#L-182"><span class="linenos"> 182</span></a> <span class="n">DESC</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-183"><a href="#L-183"><span class="linenos"> 183</span></a> <span class="n">DESCRIBE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-184"><a href="#L-184"><span class="linenos"> 184</span></a> <span class="n">DICTIONARY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-185"><a href="#L-185"><span class="linenos"> 185</span></a> <span class="n">DISTINCT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-186"><a href="#L-186"><span class="linenos"> 186</span></a> <span class="n">DISTRIBUTE_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-187"><a href="#L-187"><span class="linenos"> 187</span></a> <span class="n">DIV</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-188"><a href="#L-188"><span class="linenos"> 188</span></a> <span class="n">DROP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-189"><a href="#L-189"><span class="linenos"> 189</span></a> <span class="n">ELSE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-190"><a href="#L-190"><span class="linenos"> 190</span></a> <span class="n">END</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-191"><a href="#L-191"><span class="linenos"> 191</span></a> <span class="n">ESCAPE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-192"><a href="#L-192"><span class="linenos"> 192</span></a> <span class="n">EXCEPT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-193"><a href="#L-193"><span class="linenos"> 193</span></a> <span class="n">EXECUTE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-194"><a href="#L-194"><span class="linenos"> 194</span></a> <span class="n">EXISTS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-195"><a href="#L-195"><span class="linenos"> 195</span></a> <span class="n">FALSE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-196"><a href="#L-196"><span class="linenos"> 196</span></a> <span class="n">FETCH</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-197"><a href="#L-197"><span class="linenos"> 197</span></a> <span class="n">FILTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-198"><a href="#L-198"><span class="linenos"> 198</span></a> <span class="n">FINAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-199"><a href="#L-199"><span class="linenos"> 199</span></a> <span class="n">FIRST</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-200"><a href="#L-200"><span class="linenos"> 200</span></a> <span class="n">FOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-201"><a href="#L-201"><span class="linenos"> 201</span></a> <span class="n">FOREIGN_KEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-202"><a href="#L-202"><span class="linenos"> 202</span></a> <span class="n">FORMAT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-203"><a href="#L-203"><span class="linenos"> 203</span></a> <span class="n">FROM</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-204"><a href="#L-204"><span class="linenos"> 204</span></a> <span class="n">FULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-205"><a href="#L-205"><span class="linenos"> 205</span></a> <span class="n">FUNCTION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-206"><a href="#L-206"><span class="linenos"> 206</span></a> <span class="n">GLOB</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-207"><a href="#L-207"><span class="linenos"> 207</span></a> <span class="n">GLOBAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-208"><a href="#L-208"><span class="linenos"> 208</span></a> <span class="n">GROUP_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-209"><a href="#L-209"><span class="linenos"> 209</span></a> <span class="n">GROUPING_SETS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-210"><a href="#L-210"><span class="linenos"> 210</span></a> <span class="n">HAVING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-211"><a href="#L-211"><span class="linenos"> 211</span></a> <span class="n">HINT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-212"><a href="#L-212"><span class="linenos"> 212</span></a> <span class="n">IF</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-213"><a href="#L-213"><span class="linenos"> 213</span></a> <span class="n">ILIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-214"><a href="#L-214"><span class="linenos"> 214</span></a> <span class="n">ILIKE_ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-215"><a href="#L-215"><span class="linenos"> 215</span></a> <span class="n">IN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-216"><a href="#L-216"><span class="linenos"> 216</span></a> <span class="n">INDEX</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-217"><a href="#L-217"><span class="linenos"> 217</span></a> <span class="n">INNER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-218"><a href="#L-218"><span class="linenos"> 218</span></a> <span class="n">INSERT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-219"><a href="#L-219"><span class="linenos"> 219</span></a> <span class="n">INTERSECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-220"><a href="#L-220"><span class="linenos"> 220</span></a> <span class="n">INTERVAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-221"><a href="#L-221"><span class="linenos"> 221</span></a> <span class="n">INTO</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-222"><a href="#L-222"><span class="linenos"> 222</span></a> <span class="n">INTRODUCER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-223"><a href="#L-223"><span class="linenos"> 223</span></a> <span class="n">IRLIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-224"><a href="#L-224"><span class="linenos"> 224</span></a> <span class="n">IS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-225"><a href="#L-225"><span class="linenos"> 225</span></a> <span class="n">ISNULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-226"><a href="#L-226"><span class="linenos"> 226</span></a> <span class="n">JOIN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-227"><a href="#L-227"><span class="linenos"> 227</span></a> <span class="n">JOIN_MARKER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-228"><a href="#L-228"><span class="linenos"> 228</span></a> <span class="n">KEEP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-229"><a href="#L-229"><span class="linenos"> 229</span></a> <span class="n">LANGUAGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-230"><a href="#L-230"><span class="linenos"> 230</span></a> <span class="n">LATERAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-231"><a href="#L-231"><span class="linenos"> 231</span></a> <span class="n">LEFT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-232"><a href="#L-232"><span class="linenos"> 232</span></a> <span class="n">LIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-233"><a href="#L-233"><span class="linenos"> 233</span></a> <span class="n">LIKE_ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-234"><a href="#L-234"><span class="linenos"> 234</span></a> <span class="n">LIMIT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-235"><a href="#L-235"><span class="linenos"> 235</span></a> <span class="n">LOAD</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-236"><a href="#L-236"><span class="linenos"> 236</span></a> <span class="n">LOCK</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-237"><a href="#L-237"><span class="linenos"> 237</span></a> <span class="n">MAP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-238"><a href="#L-238"><span class="linenos"> 238</span></a> <span class="n">MATCH_RECOGNIZE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-239"><a href="#L-239"><span class="linenos"> 239</span></a> <span class="n">MERGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-240"><a href="#L-240"><span class="linenos"> 240</span></a> <span class="n">MOD</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-241"><a href="#L-241"><span class="linenos"> 241</span></a> <span class="n">NATURAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-242"><a href="#L-242"><span class="linenos"> 242</span></a> <span class="n">NEXT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-243"><a href="#L-243"><span class="linenos"> 243</span></a> <span class="n">NEXT_VALUE_FOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-244"><a href="#L-244"><span class="linenos"> 244</span></a> <span class="n">NOTNULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-245"><a href="#L-245"><span class="linenos"> 245</span></a> <span class="n">NULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-246"><a href="#L-246"><span class="linenos"> 246</span></a> <span class="n">OFFSET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-247"><a href="#L-247"><span class="linenos"> 247</span></a> <span class="n">ON</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-248"><a href="#L-248"><span class="linenos"> 248</span></a> <span class="n">ORDER_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-249"><a href="#L-249"><span class="linenos"> 249</span></a> <span class="n">ORDERED</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-250"><a href="#L-250"><span class="linenos"> 250</span></a> <span class="n">ORDINALITY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-251"><a href="#L-251"><span class="linenos"> 251</span></a> <span class="n">OUTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-252"><a href="#L-252"><span class="linenos"> 252</span></a> <span class="n">OVER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-253"><a href="#L-253"><span class="linenos"> 253</span></a> <span class="n">OVERLAPS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-254"><a href="#L-254"><span class="linenos"> 254</span></a> <span class="n">OVERWRITE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-255"><a href="#L-255"><span class="linenos"> 255</span></a> <span class="n">PARTITION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-256"><a href="#L-256"><span class="linenos"> 256</span></a> <span class="n">PARTITION_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-257"><a href="#L-257"><span class="linenos"> 257</span></a> <span class="n">PERCENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-258"><a href="#L-258"><span class="linenos"> 258</span></a> <span class="n">PIVOT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-259"><a href="#L-259"><span class="linenos"> 259</span></a> <span class="n">PLACEHOLDER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-260"><a href="#L-260"><span class="linenos"> 260</span></a> <span class="n">PRAGMA</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-261"><a href="#L-261"><span class="linenos"> 261</span></a> <span class="n">PRIMARY_KEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-262"><a href="#L-262"><span class="linenos"> 262</span></a> <span class="n">PROCEDURE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-263"><a href="#L-263"><span class="linenos"> 263</span></a> <span class="n">PROPERTIES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-264"><a href="#L-264"><span class="linenos"> 264</span></a> <span class="n">PSEUDO_TYPE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-265"><a href="#L-265"><span class="linenos"> 265</span></a> <span class="n">QUALIFY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-266"><a href="#L-266"><span class="linenos"> 266</span></a> <span class="n">QUOTE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-267"><a href="#L-267"><span class="linenos"> 267</span></a> <span class="n">RANGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-268"><a href="#L-268"><span class="linenos"> 268</span></a> <span class="n">RECURSIVE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-269"><a href="#L-269"><span class="linenos"> 269</span></a> <span class="n">REPLACE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-270"><a href="#L-270"><span class="linenos"> 270</span></a> <span class="n">RETURNING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-271"><a href="#L-271"><span class="linenos"> 271</span></a> <span class="n">REFERENCES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-272"><a href="#L-272"><span class="linenos"> 272</span></a> <span class="n">RIGHT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-273"><a href="#L-273"><span class="linenos"> 273</span></a> <span class="n">RLIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-274"><a href="#L-274"><span class="linenos"> 274</span></a> <span class="n">ROLLBACK</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-275"><a href="#L-275"><span class="linenos"> 275</span></a> <span class="n">ROLLUP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-276"><a href="#L-276"><span class="linenos"> 276</span></a> <span class="n">ROW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-277"><a href="#L-277"><span class="linenos"> 277</span></a> <span class="n">ROWS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-278"><a href="#L-278"><span class="linenos"> 278</span></a> <span class="n">SELECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-279"><a href="#L-279"><span class="linenos"> 279</span></a> <span class="n">SEMI</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-280"><a href="#L-280"><span class="linenos"> 280</span></a> <span class="n">SEPARATOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-281"><a href="#L-281"><span class="linenos"> 281</span></a> <span class="n">SERDE_PROPERTIES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-282"><a href="#L-282"><span class="linenos"> 282</span></a> <span class="n">SET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-283"><a href="#L-283"><span class="linenos"> 283</span></a> <span class="n">SETTINGS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-284"><a href="#L-284"><span class="linenos"> 284</span></a> <span class="n">SHOW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-285"><a href="#L-285"><span class="linenos"> 285</span></a> <span class="n">SIMILAR_TO</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-286"><a href="#L-286"><span class="linenos"> 286</span></a> <span class="n">SOME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-287"><a href="#L-287"><span class="linenos"> 287</span></a> <span class="n">SORT_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-288"><a href="#L-288"><span class="linenos"> 288</span></a> <span class="n">STRUCT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-289"><a href="#L-289"><span class="linenos"> 289</span></a> <span class="n">TABLE_SAMPLE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-290"><a href="#L-290"><span class="linenos"> 290</span></a> <span class="n">TEMPORARY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-291"><a href="#L-291"><span class="linenos"> 291</span></a> <span class="n">TOP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-292"><a href="#L-292"><span class="linenos"> 292</span></a> <span class="n">THEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-293"><a href="#L-293"><span class="linenos"> 293</span></a> <span class="n">TRUE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-294"><a href="#L-294"><span class="linenos"> 294</span></a> <span class="n">UNCACHE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-295"><a href="#L-295"><span class="linenos"> 295</span></a> <span class="n">UNION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-296"><a href="#L-296"><span class="linenos"> 296</span></a> <span class="n">UNNEST</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-297"><a href="#L-297"><span class="linenos"> 297</span></a> <span class="n">UNPIVOT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-298"><a href="#L-298"><span class="linenos"> 298</span></a> <span class="n">UPDATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-299"><a href="#L-299"><span class="linenos"> 299</span></a> <span class="n">USE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-300"><a href="#L-300"><span class="linenos"> 300</span></a> <span class="n">USING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-301"><a href="#L-301"><span class="linenos"> 301</span></a> <span class="n">VALUES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-302"><a href="#L-302"><span class="linenos"> 302</span></a> <span class="n">VIEW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-303"><a href="#L-303"><span class="linenos"> 303</span></a> <span class="n">VOLATILE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-304"><a href="#L-304"><span class="linenos"> 304</span></a> <span class="n">WHEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-305"><a href="#L-305"><span class="linenos"> 305</span></a> <span class="n">WHERE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-306"><a href="#L-306"><span class="linenos"> 306</span></a> <span class="n">WINDOW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-307"><a href="#L-307"><span class="linenos"> 307</span></a> <span class="n">WITH</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-308"><a href="#L-308"><span class="linenos"> 308</span></a> <span class="n">UNIQUE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="L-309"><a href="#L-309"><span class="linenos"> 309</span></a> -</span><span id="L-310"><a href="#L-310"><span class="linenos"> 310</span></a> -</span><span id="L-311"><a href="#L-311"><span class="linenos"> 311</span></a><span class="k">class</span> <span class="nc">Token</span><span class="p">:</span> -</span><span id="L-312"><a href="#L-312"><span class="linenos"> 312</span></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"token_type"</span><span class="p">,</span> <span class="s2">"text"</span><span class="p">,</span> <span class="s2">"line"</span><span class="p">,</span> <span class="s2">"col"</span><span class="p">,</span> <span class="s2">"start"</span><span class="p">,</span> <span class="s2">"end"</span><span class="p">,</span> <span class="s2">"comments"</span><span class="p">)</span> +</span><span id="L-140"><a href="#L-140"><span class="linenos"> 140</span></a> <span class="n">USERDEFINED</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-141"><a href="#L-141"><span class="linenos"> 141</span></a> <span class="n">MONEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-142"><a href="#L-142"><span class="linenos"> 142</span></a> <span class="n">SMALLMONEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-143"><a href="#L-143"><span class="linenos"> 143</span></a> <span class="n">ROWVERSION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-144"><a href="#L-144"><span class="linenos"> 144</span></a> <span class="n">IMAGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-145"><a href="#L-145"><span class="linenos"> 145</span></a> <span class="n">VARIANT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-146"><a href="#L-146"><span class="linenos"> 146</span></a> <span class="n">OBJECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-147"><a href="#L-147"><span class="linenos"> 147</span></a> <span class="n">INET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-148"><a href="#L-148"><span class="linenos"> 148</span></a> <span class="n">ENUM</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-149"><a href="#L-149"><span class="linenos"> 149</span></a> +</span><span id="L-150"><a href="#L-150"><span class="linenos"> 150</span></a> <span class="c1"># keywords</span> +</span><span id="L-151"><a href="#L-151"><span class="linenos"> 151</span></a> <span class="n">ALIAS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-152"><a href="#L-152"><span class="linenos"> 152</span></a> <span class="n">ALTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-153"><a href="#L-153"><span class="linenos"> 153</span></a> <span class="n">ALWAYS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-154"><a href="#L-154"><span class="linenos"> 154</span></a> <span class="n">ALL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-155"><a href="#L-155"><span class="linenos"> 155</span></a> <span class="n">ANTI</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-156"><a href="#L-156"><span class="linenos"> 156</span></a> <span class="n">ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-157"><a href="#L-157"><span class="linenos"> 157</span></a> <span class="n">APPLY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-158"><a href="#L-158"><span class="linenos"> 158</span></a> <span class="n">ARRAY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-159"><a href="#L-159"><span class="linenos"> 159</span></a> <span class="n">ASC</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-160"><a href="#L-160"><span class="linenos"> 160</span></a> <span class="n">ASOF</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-161"><a href="#L-161"><span class="linenos"> 161</span></a> <span class="n">AUTO_INCREMENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-162"><a href="#L-162"><span class="linenos"> 162</span></a> <span class="n">BEGIN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-163"><a href="#L-163"><span class="linenos"> 163</span></a> <span class="n">BETWEEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-164"><a href="#L-164"><span class="linenos"> 164</span></a> <span class="n">CACHE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-165"><a href="#L-165"><span class="linenos"> 165</span></a> <span class="n">CASE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-166"><a href="#L-166"><span class="linenos"> 166</span></a> <span class="n">CHARACTER_SET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-167"><a href="#L-167"><span class="linenos"> 167</span></a> <span class="n">CLUSTER_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-168"><a href="#L-168"><span class="linenos"> 168</span></a> <span class="n">COLLATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-169"><a href="#L-169"><span class="linenos"> 169</span></a> <span class="n">COMMAND</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-170"><a href="#L-170"><span class="linenos"> 170</span></a> <span class="n">COMMENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-171"><a href="#L-171"><span class="linenos"> 171</span></a> <span class="n">COMMIT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-172"><a href="#L-172"><span class="linenos"> 172</span></a> <span class="n">CONSTRAINT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-173"><a href="#L-173"><span class="linenos"> 173</span></a> <span class="n">CREATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-174"><a href="#L-174"><span class="linenos"> 174</span></a> <span class="n">CROSS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-175"><a href="#L-175"><span class="linenos"> 175</span></a> <span class="n">CUBE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-176"><a href="#L-176"><span class="linenos"> 176</span></a> <span class="n">CURRENT_DATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-177"><a href="#L-177"><span class="linenos"> 177</span></a> <span class="n">CURRENT_DATETIME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-178"><a href="#L-178"><span class="linenos"> 178</span></a> <span class="n">CURRENT_TIME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-179"><a href="#L-179"><span class="linenos"> 179</span></a> <span class="n">CURRENT_TIMESTAMP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-180"><a href="#L-180"><span class="linenos"> 180</span></a> <span class="n">CURRENT_USER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-181"><a href="#L-181"><span class="linenos"> 181</span></a> <span class="n">DEFAULT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-182"><a href="#L-182"><span class="linenos"> 182</span></a> <span class="n">DELETE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-183"><a href="#L-183"><span class="linenos"> 183</span></a> <span class="n">DESC</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-184"><a href="#L-184"><span class="linenos"> 184</span></a> <span class="n">DESCRIBE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-185"><a href="#L-185"><span class="linenos"> 185</span></a> <span class="n">DICTIONARY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-186"><a href="#L-186"><span class="linenos"> 186</span></a> <span class="n">DISTINCT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-187"><a href="#L-187"><span class="linenos"> 187</span></a> <span class="n">DISTRIBUTE_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-188"><a href="#L-188"><span class="linenos"> 188</span></a> <span class="n">DIV</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-189"><a href="#L-189"><span class="linenos"> 189</span></a> <span class="n">DROP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-190"><a href="#L-190"><span class="linenos"> 190</span></a> <span class="n">ELSE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-191"><a href="#L-191"><span class="linenos"> 191</span></a> <span class="n">END</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-192"><a href="#L-192"><span class="linenos"> 192</span></a> <span class="n">ESCAPE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-193"><a href="#L-193"><span class="linenos"> 193</span></a> <span class="n">EXCEPT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-194"><a href="#L-194"><span class="linenos"> 194</span></a> <span class="n">EXECUTE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-195"><a href="#L-195"><span class="linenos"> 195</span></a> <span class="n">EXISTS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-196"><a href="#L-196"><span class="linenos"> 196</span></a> <span class="n">FALSE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-197"><a href="#L-197"><span class="linenos"> 197</span></a> <span class="n">FETCH</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-198"><a href="#L-198"><span class="linenos"> 198</span></a> <span class="n">FILTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-199"><a href="#L-199"><span class="linenos"> 199</span></a> <span class="n">FINAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-200"><a href="#L-200"><span class="linenos"> 200</span></a> <span class="n">FIRST</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-201"><a href="#L-201"><span class="linenos"> 201</span></a> <span class="n">FOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-202"><a href="#L-202"><span class="linenos"> 202</span></a> <span class="n">FORCE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-203"><a href="#L-203"><span class="linenos"> 203</span></a> <span class="n">FOREIGN_KEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-204"><a href="#L-204"><span class="linenos"> 204</span></a> <span class="n">FORMAT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-205"><a href="#L-205"><span class="linenos"> 205</span></a> <span class="n">FROM</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-206"><a href="#L-206"><span class="linenos"> 206</span></a> <span class="n">FULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-207"><a href="#L-207"><span class="linenos"> 207</span></a> <span class="n">FUNCTION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-208"><a href="#L-208"><span class="linenos"> 208</span></a> <span class="n">GLOB</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-209"><a href="#L-209"><span class="linenos"> 209</span></a> <span class="n">GLOBAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-210"><a href="#L-210"><span class="linenos"> 210</span></a> <span class="n">GROUP_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-211"><a href="#L-211"><span class="linenos"> 211</span></a> <span class="n">GROUPING_SETS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-212"><a href="#L-212"><span class="linenos"> 212</span></a> <span class="n">HAVING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-213"><a href="#L-213"><span class="linenos"> 213</span></a> <span class="n">HINT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-214"><a href="#L-214"><span class="linenos"> 214</span></a> <span class="n">IF</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-215"><a href="#L-215"><span class="linenos"> 215</span></a> <span class="n">IGNORE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-216"><a href="#L-216"><span class="linenos"> 216</span></a> <span class="n">ILIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-217"><a href="#L-217"><span class="linenos"> 217</span></a> <span class="n">ILIKE_ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-218"><a href="#L-218"><span class="linenos"> 218</span></a> <span class="n">IN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-219"><a href="#L-219"><span class="linenos"> 219</span></a> <span class="n">INDEX</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-220"><a href="#L-220"><span class="linenos"> 220</span></a> <span class="n">INNER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-221"><a href="#L-221"><span class="linenos"> 221</span></a> <span class="n">INSERT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-222"><a href="#L-222"><span class="linenos"> 222</span></a> <span class="n">INTERSECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-223"><a href="#L-223"><span class="linenos"> 223</span></a> <span class="n">INTERVAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-224"><a href="#L-224"><span class="linenos"> 224</span></a> <span class="n">INTO</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-225"><a href="#L-225"><span class="linenos"> 225</span></a> <span class="n">INTRODUCER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-226"><a href="#L-226"><span class="linenos"> 226</span></a> <span class="n">IRLIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-227"><a href="#L-227"><span class="linenos"> 227</span></a> <span class="n">IS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-228"><a href="#L-228"><span class="linenos"> 228</span></a> <span class="n">ISNULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-229"><a href="#L-229"><span class="linenos"> 229</span></a> <span class="n">JOIN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-230"><a href="#L-230"><span class="linenos"> 230</span></a> <span class="n">JOIN_MARKER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-231"><a href="#L-231"><span class="linenos"> 231</span></a> <span class="n">KEEP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-232"><a href="#L-232"><span class="linenos"> 232</span></a> <span class="n">LANGUAGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-233"><a href="#L-233"><span class="linenos"> 233</span></a> <span class="n">LATERAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-234"><a href="#L-234"><span class="linenos"> 234</span></a> <span class="n">LEFT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-235"><a href="#L-235"><span class="linenos"> 235</span></a> <span class="n">LIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-236"><a href="#L-236"><span class="linenos"> 236</span></a> <span class="n">LIKE_ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-237"><a href="#L-237"><span class="linenos"> 237</span></a> <span class="n">LIMIT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-238"><a href="#L-238"><span class="linenos"> 238</span></a> <span class="n">LOAD</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-239"><a href="#L-239"><span class="linenos"> 239</span></a> <span class="n">LOCK</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-240"><a href="#L-240"><span class="linenos"> 240</span></a> <span class="n">MAP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-241"><a href="#L-241"><span class="linenos"> 241</span></a> <span class="n">MATCH_RECOGNIZE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-242"><a href="#L-242"><span class="linenos"> 242</span></a> <span class="n">MERGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-243"><a href="#L-243"><span class="linenos"> 243</span></a> <span class="n">MOD</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-244"><a href="#L-244"><span class="linenos"> 244</span></a> <span class="n">NATURAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-245"><a href="#L-245"><span class="linenos"> 245</span></a> <span class="n">NEXT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-246"><a href="#L-246"><span class="linenos"> 246</span></a> <span class="n">NEXT_VALUE_FOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-247"><a href="#L-247"><span class="linenos"> 247</span></a> <span class="n">NOTNULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-248"><a href="#L-248"><span class="linenos"> 248</span></a> <span class="n">NULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-249"><a href="#L-249"><span class="linenos"> 249</span></a> <span class="n">OFFSET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-250"><a href="#L-250"><span class="linenos"> 250</span></a> <span class="n">ON</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-251"><a href="#L-251"><span class="linenos"> 251</span></a> <span class="n">ORDER_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-252"><a href="#L-252"><span class="linenos"> 252</span></a> <span class="n">ORDERED</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-253"><a href="#L-253"><span class="linenos"> 253</span></a> <span class="n">ORDINALITY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-254"><a href="#L-254"><span class="linenos"> 254</span></a> <span class="n">OUTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-255"><a href="#L-255"><span class="linenos"> 255</span></a> <span class="n">OVER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-256"><a href="#L-256"><span class="linenos"> 256</span></a> <span class="n">OVERLAPS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-257"><a href="#L-257"><span class="linenos"> 257</span></a> <span class="n">OVERWRITE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-258"><a href="#L-258"><span class="linenos"> 258</span></a> <span class="n">PARTITION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-259"><a href="#L-259"><span class="linenos"> 259</span></a> <span class="n">PARTITION_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-260"><a href="#L-260"><span class="linenos"> 260</span></a> <span class="n">PERCENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-261"><a href="#L-261"><span class="linenos"> 261</span></a> <span class="n">PIVOT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-262"><a href="#L-262"><span class="linenos"> 262</span></a> <span class="n">PLACEHOLDER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-263"><a href="#L-263"><span class="linenos"> 263</span></a> <span class="n">PRAGMA</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-264"><a href="#L-264"><span class="linenos"> 264</span></a> <span class="n">PRIMARY_KEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-265"><a href="#L-265"><span class="linenos"> 265</span></a> <span class="n">PROCEDURE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-266"><a href="#L-266"><span class="linenos"> 266</span></a> <span class="n">PROPERTIES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-267"><a href="#L-267"><span class="linenos"> 267</span></a> <span class="n">PSEUDO_TYPE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-268"><a href="#L-268"><span class="linenos"> 268</span></a> <span class="n">QUALIFY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-269"><a href="#L-269"><span class="linenos"> 269</span></a> <span class="n">QUOTE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-270"><a href="#L-270"><span class="linenos"> 270</span></a> <span class="n">RANGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-271"><a href="#L-271"><span class="linenos"> 271</span></a> <span class="n">RECURSIVE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-272"><a href="#L-272"><span class="linenos"> 272</span></a> <span class="n">REPLACE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-273"><a href="#L-273"><span class="linenos"> 273</span></a> <span class="n">RETURNING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-274"><a href="#L-274"><span class="linenos"> 274</span></a> <span class="n">REFERENCES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-275"><a href="#L-275"><span class="linenos"> 275</span></a> <span class="n">RIGHT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-276"><a href="#L-276"><span class="linenos"> 276</span></a> <span class="n">RLIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-277"><a href="#L-277"><span class="linenos"> 277</span></a> <span class="n">ROLLBACK</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-278"><a href="#L-278"><span class="linenos"> 278</span></a> <span class="n">ROLLUP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-279"><a href="#L-279"><span class="linenos"> 279</span></a> <span class="n">ROW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-280"><a href="#L-280"><span class="linenos"> 280</span></a> <span class="n">ROWS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-281"><a href="#L-281"><span class="linenos"> 281</span></a> <span class="n">SELECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-282"><a href="#L-282"><span class="linenos"> 282</span></a> <span class="n">SEMI</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-283"><a href="#L-283"><span class="linenos"> 283</span></a> <span class="n">SEPARATOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-284"><a href="#L-284"><span class="linenos"> 284</span></a> <span class="n">SERDE_PROPERTIES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-285"><a href="#L-285"><span class="linenos"> 285</span></a> <span class="n">SET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-286"><a href="#L-286"><span class="linenos"> 286</span></a> <span class="n">SETTINGS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-287"><a href="#L-287"><span class="linenos"> 287</span></a> <span class="n">SHOW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-288"><a href="#L-288"><span class="linenos"> 288</span></a> <span class="n">SIMILAR_TO</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-289"><a href="#L-289"><span class="linenos"> 289</span></a> <span class="n">SOME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-290"><a href="#L-290"><span class="linenos"> 290</span></a> <span class="n">SORT_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-291"><a href="#L-291"><span class="linenos"> 291</span></a> <span class="n">STRUCT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-292"><a href="#L-292"><span class="linenos"> 292</span></a> <span class="n">TABLE_SAMPLE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-293"><a href="#L-293"><span class="linenos"> 293</span></a> <span class="n">TEMPORARY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-294"><a href="#L-294"><span class="linenos"> 294</span></a> <span class="n">TOP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-295"><a href="#L-295"><span class="linenos"> 295</span></a> <span class="n">THEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-296"><a href="#L-296"><span class="linenos"> 296</span></a> <span class="n">TRUE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-297"><a href="#L-297"><span class="linenos"> 297</span></a> <span class="n">UNCACHE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-298"><a href="#L-298"><span class="linenos"> 298</span></a> <span class="n">UNION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-299"><a href="#L-299"><span class="linenos"> 299</span></a> <span class="n">UNNEST</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-300"><a href="#L-300"><span class="linenos"> 300</span></a> <span class="n">UNPIVOT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-301"><a href="#L-301"><span class="linenos"> 301</span></a> <span class="n">UPDATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-302"><a href="#L-302"><span class="linenos"> 302</span></a> <span class="n">USE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-303"><a href="#L-303"><span class="linenos"> 303</span></a> <span class="n">USING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-304"><a href="#L-304"><span class="linenos"> 304</span></a> <span class="n">VALUES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-305"><a href="#L-305"><span class="linenos"> 305</span></a> <span class="n">VIEW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-306"><a href="#L-306"><span class="linenos"> 306</span></a> <span class="n">VOLATILE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-307"><a href="#L-307"><span class="linenos"> 307</span></a> <span class="n">WHEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-308"><a href="#L-308"><span class="linenos"> 308</span></a> <span class="n">WHERE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-309"><a href="#L-309"><span class="linenos"> 309</span></a> <span class="n">WINDOW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-310"><a href="#L-310"><span class="linenos"> 310</span></a> <span class="n">WITH</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-311"><a href="#L-311"><span class="linenos"> 311</span></a> <span class="n">UNIQUE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="L-312"><a href="#L-312"><span class="linenos"> 312</span></a> </span><span id="L-313"><a href="#L-313"><span class="linenos"> 313</span></a> -</span><span id="L-314"><a href="#L-314"><span class="linenos"> 314</span></a> <span class="nd">@classmethod</span> -</span><span id="L-315"><a href="#L-315"><span class="linenos"> 315</span></a> <span class="k">def</span> <span class="nf">number</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">number</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="L-316"><a href="#L-316"><span class="linenos"> 316</span></a><span class="w"> </span><span class="sd">"""Returns a NUMBER token with `number` as its text."""</span> -</span><span id="L-317"><a href="#L-317"><span class="linenos"> 317</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">number</span><span class="p">))</span> -</span><span id="L-318"><a href="#L-318"><span class="linenos"> 318</span></a> -</span><span id="L-319"><a href="#L-319"><span class="linenos"> 319</span></a> <span class="nd">@classmethod</span> -</span><span id="L-320"><a href="#L-320"><span class="linenos"> 320</span></a> <span class="k">def</span> <span class="nf">string</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">string</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="L-321"><a href="#L-321"><span class="linenos"> 321</span></a><span class="w"> </span><span class="sd">"""Returns a STRING token with `string` as its text."""</span> -</span><span id="L-322"><a href="#L-322"><span class="linenos"> 322</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span><span class="p">,</span> <span class="n">string</span><span class="p">)</span> -</span><span id="L-323"><a href="#L-323"><span class="linenos"> 323</span></a> -</span><span id="L-324"><a href="#L-324"><span class="linenos"> 324</span></a> <span class="nd">@classmethod</span> -</span><span id="L-325"><a href="#L-325"><span class="linenos"> 325</span></a> <span class="k">def</span> <span class="nf">identifier</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">identifier</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="L-326"><a href="#L-326"><span class="linenos"> 326</span></a><span class="w"> </span><span class="sd">"""Returns an IDENTIFIER token with `identifier` as its text."""</span> -</span><span id="L-327"><a href="#L-327"><span class="linenos"> 327</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> <span class="n">identifier</span><span class="p">)</span> -</span><span id="L-328"><a href="#L-328"><span class="linenos"> 328</span></a> -</span><span id="L-329"><a href="#L-329"><span class="linenos"> 329</span></a> <span class="nd">@classmethod</span> -</span><span id="L-330"><a href="#L-330"><span class="linenos"> 330</span></a> <span class="k">def</span> <span class="nf">var</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">var</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="L-331"><a href="#L-331"><span class="linenos"> 331</span></a><span class="w"> </span><span class="sd">"""Returns an VAR token with `var` as its text."""</span> -</span><span id="L-332"><a href="#L-332"><span class="linenos"> 332</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">,</span> <span class="n">var</span><span class="p">)</span> -</span><span id="L-333"><a href="#L-333"><span class="linenos"> 333</span></a> -</span><span id="L-334"><a href="#L-334"><span class="linenos"> 334</span></a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span> -</span><span id="L-335"><a href="#L-335"><span class="linenos"> 335</span></a> <span class="bp">self</span><span class="p">,</span> -</span><span id="L-336"><a href="#L-336"><span class="linenos"> 336</span></a> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> -</span><span id="L-337"><a href="#L-337"><span class="linenos"> 337</span></a> <span class="n">text</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> -</span><span id="L-338"><a href="#L-338"><span class="linenos"> 338</span></a> <span class="n">line</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> -</span><span id="L-339"><a href="#L-339"><span class="linenos"> 339</span></a> <span class="n">col</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> -</span><span id="L-340"><a href="#L-340"><span class="linenos"> 340</span></a> <span class="n">start</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> -</span><span id="L-341"><a href="#L-341"><span class="linenos"> 341</span></a> <span class="n">end</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> -</span><span id="L-342"><a href="#L-342"><span class="linenos"> 342</span></a> <span class="n">comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span> -</span><span id="L-343"><a href="#L-343"><span class="linenos"> 343</span></a> <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-344"><a href="#L-344"><span class="linenos"> 344</span></a><span class="w"> </span><span class="sd">"""Token initializer.</span> -</span><span id="L-345"><a href="#L-345"><span class="linenos"> 345</span></a> -</span><span id="L-346"><a href="#L-346"><span class="linenos"> 346</span></a><span class="sd"> Args:</span> -</span><span id="L-347"><a href="#L-347"><span class="linenos"> 347</span></a><span class="sd"> token_type: The TokenType Enum.</span> -</span><span id="L-348"><a href="#L-348"><span class="linenos"> 348</span></a><span class="sd"> text: The text of the token.</span> -</span><span id="L-349"><a href="#L-349"><span class="linenos"> 349</span></a><span class="sd"> line: The line that the token ends on.</span> -</span><span id="L-350"><a href="#L-350"><span class="linenos"> 350</span></a><span class="sd"> col: The column that the token ends on.</span> -</span><span id="L-351"><a href="#L-351"><span class="linenos"> 351</span></a><span class="sd"> start: The start index of the token.</span> -</span><span id="L-352"><a href="#L-352"><span class="linenos"> 352</span></a><span class="sd"> end: The ending index of the token.</span> -</span><span id="L-353"><a href="#L-353"><span class="linenos"> 353</span></a><span class="sd"> comments: The comments to attach to the token.</span> -</span><span id="L-354"><a href="#L-354"><span class="linenos"> 354</span></a><span class="sd"> """</span> -</span><span id="L-355"><a href="#L-355"><span class="linenos"> 355</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">token_type</span> <span class="o">=</span> <span class="n">token_type</span> -</span><span id="L-356"><a href="#L-356"><span class="linenos"> 356</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">text</span> <span class="o">=</span> <span class="n">text</span> -</span><span id="L-357"><a href="#L-357"><span class="linenos"> 357</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">line</span> <span class="o">=</span> <span class="n">line</span> -</span><span id="L-358"><a href="#L-358"><span class="linenos"> 358</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">col</span> <span class="o">=</span> <span class="n">col</span> -</span><span id="L-359"><a href="#L-359"><span class="linenos"> 359</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">start</span> <span class="o">=</span> <span class="n">start</span> -</span><span id="L-360"><a href="#L-360"><span class="linenos"> 360</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">end</span> <span class="o">=</span> <span class="n">end</span> -</span><span id="L-361"><a href="#L-361"><span class="linenos"> 361</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">comments</span> <span class="o">=</span> <span class="n">comments</span> -</span><span id="L-362"><a href="#L-362"><span class="linenos"> 362</span></a> -</span><span id="L-363"><a href="#L-363"><span class="linenos"> 363</span></a> <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-364"><a href="#L-364"><span class="linenos"> 364</span></a> <span class="n">attributes</span> <span class="o">=</span> <span class="s2">", "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">k</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__slots__</span><span class="p">)</span> -</span><span id="L-365"><a href="#L-365"><span class="linenos"> 365</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"<Token </span><span class="si">{</span><span class="n">attributes</span><span class="si">}</span><span class="s2">>"</span> -</span><span id="L-366"><a href="#L-366"><span class="linenos"> 366</span></a> -</span><span id="L-367"><a href="#L-367"><span class="linenos"> 367</span></a> -</span><span id="L-368"><a href="#L-368"><span class="linenos"> 368</span></a><span class="k">class</span> <span class="nc">_Tokenizer</span><span class="p">(</span><span class="nb">type</span><span class="p">):</span> -</span><span id="L-369"><a href="#L-369"><span class="linenos"> 369</span></a> <span class="k">def</span> <span class="fm">__new__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">clsname</span><span class="p">,</span> <span class="n">bases</span><span class="p">,</span> <span class="n">attrs</span><span class="p">):</span> -</span><span id="L-370"><a href="#L-370"><span class="linenos"> 370</span></a> <span class="n">klass</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__new__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">clsname</span><span class="p">,</span> <span class="n">bases</span><span class="p">,</span> <span class="n">attrs</span><span class="p">)</span> -</span><span id="L-371"><a href="#L-371"><span class="linenos"> 371</span></a> -</span><span id="L-372"><a href="#L-372"><span class="linenos"> 372</span></a> <span class="k">def</span> <span class="nf">_convert_quotes</span><span class="p">(</span><span class="n">arr</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]])</span> <span class="o">-></span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]:</span> -</span><span id="L-373"><a href="#L-373"><span class="linenos"> 373</span></a> <span class="k">return</span> <span class="nb">dict</span><span class="p">(</span> -</span><span id="L-374"><a href="#L-374"><span class="linenos"> 374</span></a> <span class="p">(</span><span class="n">item</span><span class="p">,</span> <span class="n">item</span><span class="p">)</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">item</span><span class="p">,</span> <span class="nb">str</span><span class="p">)</span> <span class="k">else</span> <span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">item</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">arr</span> -</span><span id="L-375"><a href="#L-375"><span class="linenos"> 375</span></a> <span class="p">)</span> -</span><span id="L-376"><a href="#L-376"><span class="linenos"> 376</span></a> -</span><span id="L-377"><a href="#L-377"><span class="linenos"> 377</span></a> <span class="k">def</span> <span class="nf">_quotes_to_format</span><span class="p">(</span> -</span><span id="L-378"><a href="#L-378"><span class="linenos"> 378</span></a> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> <span class="n">arr</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> -</span><span id="L-379"><a href="#L-379"><span class="linenos"> 379</span></a> <span class="p">)</span> <span class="o">-></span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">TokenType</span><span class="p">]]:</span> -</span><span id="L-380"><a href="#L-380"><span class="linenos"> 380</span></a> <span class="k">return</span> <span class="p">{</span><span class="n">k</span><span class="p">:</span> <span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="n">token_type</span><span class="p">)</span> <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">_convert_quotes</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span><span class="o">.</span><span class="n">items</span><span class="p">()}</span> -</span><span id="L-381"><a href="#L-381"><span class="linenos"> 381</span></a> -</span><span id="L-382"><a href="#L-382"><span class="linenos"> 382</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_QUOTES</span> <span class="o">=</span> <span class="n">_convert_quotes</span><span class="p">(</span><span class="n">klass</span><span class="o">.</span><span class="n">QUOTES</span><span class="p">)</span> -</span><span id="L-383"><a href="#L-383"><span class="linenos"> 383</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_IDENTIFIERS</span> <span class="o">=</span> <span class="n">_convert_quotes</span><span class="p">(</span><span class="n">klass</span><span class="o">.</span><span class="n">IDENTIFIERS</span><span class="p">)</span> +</span><span id="L-314"><a href="#L-314"><span class="linenos"> 314</span></a><span class="k">class</span> <span class="nc">Token</span><span class="p">:</span> +</span><span id="L-315"><a href="#L-315"><span class="linenos"> 315</span></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"token_type"</span><span class="p">,</span> <span class="s2">"text"</span><span class="p">,</span> <span class="s2">"line"</span><span class="p">,</span> <span class="s2">"col"</span><span class="p">,</span> <span class="s2">"start"</span><span class="p">,</span> <span class="s2">"end"</span><span class="p">,</span> <span class="s2">"comments"</span><span class="p">)</span> +</span><span id="L-316"><a href="#L-316"><span class="linenos"> 316</span></a> +</span><span id="L-317"><a href="#L-317"><span class="linenos"> 317</span></a> <span class="nd">@classmethod</span> +</span><span id="L-318"><a href="#L-318"><span class="linenos"> 318</span></a> <span class="k">def</span> <span class="nf">number</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">number</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="L-319"><a href="#L-319"><span class="linenos"> 319</span></a><span class="w"> </span><span class="sd">"""Returns a NUMBER token with `number` as its text."""</span> +</span><span id="L-320"><a href="#L-320"><span class="linenos"> 320</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">number</span><span class="p">))</span> +</span><span id="L-321"><a href="#L-321"><span class="linenos"> 321</span></a> +</span><span id="L-322"><a href="#L-322"><span class="linenos"> 322</span></a> <span class="nd">@classmethod</span> +</span><span id="L-323"><a href="#L-323"><span class="linenos"> 323</span></a> <span class="k">def</span> <span class="nf">string</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">string</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="L-324"><a href="#L-324"><span class="linenos"> 324</span></a><span class="w"> </span><span class="sd">"""Returns a STRING token with `string` as its text."""</span> +</span><span id="L-325"><a href="#L-325"><span class="linenos"> 325</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span><span class="p">,</span> <span class="n">string</span><span class="p">)</span> +</span><span id="L-326"><a href="#L-326"><span class="linenos"> 326</span></a> +</span><span id="L-327"><a href="#L-327"><span class="linenos"> 327</span></a> <span class="nd">@classmethod</span> +</span><span id="L-328"><a href="#L-328"><span class="linenos"> 328</span></a> <span class="k">def</span> <span class="nf">identifier</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">identifier</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="L-329"><a href="#L-329"><span class="linenos"> 329</span></a><span class="w"> </span><span class="sd">"""Returns an IDENTIFIER token with `identifier` as its text."""</span> +</span><span id="L-330"><a href="#L-330"><span class="linenos"> 330</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> <span class="n">identifier</span><span class="p">)</span> +</span><span id="L-331"><a href="#L-331"><span class="linenos"> 331</span></a> +</span><span id="L-332"><a href="#L-332"><span class="linenos"> 332</span></a> <span class="nd">@classmethod</span> +</span><span id="L-333"><a href="#L-333"><span class="linenos"> 333</span></a> <span class="k">def</span> <span class="nf">var</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">var</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="L-334"><a href="#L-334"><span class="linenos"> 334</span></a><span class="w"> </span><span class="sd">"""Returns an VAR token with `var` as its text."""</span> +</span><span id="L-335"><a href="#L-335"><span class="linenos"> 335</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">,</span> <span class="n">var</span><span class="p">)</span> +</span><span id="L-336"><a href="#L-336"><span class="linenos"> 336</span></a> +</span><span id="L-337"><a href="#L-337"><span class="linenos"> 337</span></a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span> +</span><span id="L-338"><a href="#L-338"><span class="linenos"> 338</span></a> <span class="bp">self</span><span class="p">,</span> +</span><span id="L-339"><a href="#L-339"><span class="linenos"> 339</span></a> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> +</span><span id="L-340"><a href="#L-340"><span class="linenos"> 340</span></a> <span class="n">text</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> +</span><span id="L-341"><a href="#L-341"><span class="linenos"> 341</span></a> <span class="n">line</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> +</span><span id="L-342"><a href="#L-342"><span class="linenos"> 342</span></a> <span class="n">col</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> +</span><span id="L-343"><a href="#L-343"><span class="linenos"> 343</span></a> <span class="n">start</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> +</span><span id="L-344"><a href="#L-344"><span class="linenos"> 344</span></a> <span class="n">end</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> +</span><span id="L-345"><a href="#L-345"><span class="linenos"> 345</span></a> <span class="n">comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span> +</span><span id="L-346"><a href="#L-346"><span class="linenos"> 346</span></a> <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-347"><a href="#L-347"><span class="linenos"> 347</span></a><span class="w"> </span><span class="sd">"""Token initializer.</span> +</span><span id="L-348"><a href="#L-348"><span class="linenos"> 348</span></a> +</span><span id="L-349"><a href="#L-349"><span class="linenos"> 349</span></a><span class="sd"> Args:</span> +</span><span id="L-350"><a href="#L-350"><span class="linenos"> 350</span></a><span class="sd"> token_type: The TokenType Enum.</span> +</span><span id="L-351"><a href="#L-351"><span class="linenos"> 351</span></a><span class="sd"> text: The text of the token.</span> +</span><span id="L-352"><a href="#L-352"><span class="linenos"> 352</span></a><span class="sd"> line: The line that the token ends on.</span> +</span><span id="L-353"><a href="#L-353"><span class="linenos"> 353</span></a><span class="sd"> col: The column that the token ends on.</span> +</span><span id="L-354"><a href="#L-354"><span class="linenos"> 354</span></a><span class="sd"> start: The start index of the token.</span> +</span><span id="L-355"><a href="#L-355"><span class="linenos"> 355</span></a><span class="sd"> end: The ending index of the token.</span> +</span><span id="L-356"><a href="#L-356"><span class="linenos"> 356</span></a><span class="sd"> comments: The comments to attach to the token.</span> +</span><span id="L-357"><a href="#L-357"><span class="linenos"> 357</span></a><span class="sd"> """</span> +</span><span id="L-358"><a href="#L-358"><span class="linenos"> 358</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">token_type</span> <span class="o">=</span> <span class="n">token_type</span> +</span><span id="L-359"><a href="#L-359"><span class="linenos"> 359</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">text</span> <span class="o">=</span> <span class="n">text</span> +</span><span id="L-360"><a href="#L-360"><span class="linenos"> 360</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">line</span> <span class="o">=</span> <span class="n">line</span> +</span><span id="L-361"><a href="#L-361"><span class="linenos"> 361</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">col</span> <span class="o">=</span> <span class="n">col</span> +</span><span id="L-362"><a href="#L-362"><span class="linenos"> 362</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">start</span> <span class="o">=</span> <span class="n">start</span> +</span><span id="L-363"><a href="#L-363"><span class="linenos"> 363</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">end</span> <span class="o">=</span> <span class="n">end</span> +</span><span id="L-364"><a href="#L-364"><span class="linenos"> 364</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">comments</span> <span class="o">=</span> <span class="n">comments</span> +</span><span id="L-365"><a href="#L-365"><span class="linenos"> 365</span></a> +</span><span id="L-366"><a href="#L-366"><span class="linenos"> 366</span></a> <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-367"><a href="#L-367"><span class="linenos"> 367</span></a> <span class="n">attributes</span> <span class="o">=</span> <span class="s2">", "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">k</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__slots__</span><span class="p">)</span> +</span><span id="L-368"><a href="#L-368"><span class="linenos"> 368</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"<Token </span><span class="si">{</span><span class="n">attributes</span><span class="si">}</span><span class="s2">>"</span> +</span><span id="L-369"><a href="#L-369"><span class="linenos"> 369</span></a> +</span><span id="L-370"><a href="#L-370"><span class="linenos"> 370</span></a> +</span><span id="L-371"><a href="#L-371"><span class="linenos"> 371</span></a><span class="k">class</span> <span class="nc">_Tokenizer</span><span class="p">(</span><span class="nb">type</span><span class="p">):</span> +</span><span id="L-372"><a href="#L-372"><span class="linenos"> 372</span></a> <span class="k">def</span> <span class="fm">__new__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">clsname</span><span class="p">,</span> <span class="n">bases</span><span class="p">,</span> <span class="n">attrs</span><span class="p">):</span> +</span><span id="L-373"><a href="#L-373"><span class="linenos"> 373</span></a> <span class="n">klass</span> <span class="o">=</span> <span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__new__</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">clsname</span><span class="p">,</span> <span class="n">bases</span><span class="p">,</span> <span class="n">attrs</span><span class="p">)</span> +</span><span id="L-374"><a href="#L-374"><span class="linenos"> 374</span></a> +</span><span id="L-375"><a href="#L-375"><span class="linenos"> 375</span></a> <span class="k">def</span> <span class="nf">_convert_quotes</span><span class="p">(</span><span class="n">arr</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]])</span> <span class="o">-></span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]:</span> +</span><span id="L-376"><a href="#L-376"><span class="linenos"> 376</span></a> <span class="k">return</span> <span class="nb">dict</span><span class="p">(</span> +</span><span id="L-377"><a href="#L-377"><span class="linenos"> 377</span></a> <span class="p">(</span><span class="n">item</span><span class="p">,</span> <span class="n">item</span><span class="p">)</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">item</span><span class="p">,</span> <span class="nb">str</span><span class="p">)</span> <span class="k">else</span> <span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">item</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">arr</span> +</span><span id="L-378"><a href="#L-378"><span class="linenos"> 378</span></a> <span class="p">)</span> +</span><span id="L-379"><a href="#L-379"><span class="linenos"> 379</span></a> +</span><span id="L-380"><a href="#L-380"><span class="linenos"> 380</span></a> <span class="k">def</span> <span class="nf">_quotes_to_format</span><span class="p">(</span> +</span><span id="L-381"><a href="#L-381"><span class="linenos"> 381</span></a> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> <span class="n">arr</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> +</span><span id="L-382"><a href="#L-382"><span class="linenos"> 382</span></a> <span class="p">)</span> <span class="o">-></span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">TokenType</span><span class="p">]]:</span> +</span><span id="L-383"><a href="#L-383"><span class="linenos"> 383</span></a> <span class="k">return</span> <span class="p">{</span><span class="n">k</span><span class="p">:</span> <span class="p">(</span><span class="n">v</span><span class="p">,</span> <span class="n">token_type</span><span class="p">)</span> <span class="k">for</span> <span class="n">k</span><span class="p">,</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">_convert_quotes</span><span class="p">(</span><span class="n">arr</span><span class="p">)</span><span class="o">.</span><span class="n">items</span><span class="p">()}</span> </span><span id="L-384"><a href="#L-384"><span class="linenos"> 384</span></a> -</span><span id="L-385"><a href="#L-385"><span class="linenos"> 385</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="L-386"><a href="#L-386"><span class="linenos"> 386</span></a> <span class="o">**</span><span class="p">{</span> -</span><span id="L-387"><a href="#L-387"><span class="linenos"> 387</span></a> <span class="n">p</span> <span class="o">+</span> <span class="n">s</span><span class="p">:</span> <span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NATIONAL_STRING</span><span class="p">)</span> -</span><span id="L-388"><a href="#L-388"><span class="linenos"> 388</span></a> <span class="k">for</span> <span class="n">s</span><span class="p">,</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">klass</span><span class="o">.</span><span class="n">_QUOTES</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> -</span><span id="L-389"><a href="#L-389"><span class="linenos"> 389</span></a> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"n"</span><span class="p">,</span> <span class="s2">"N"</span><span class="p">)</span> -</span><span id="L-390"><a href="#L-390"><span class="linenos"> 390</span></a> <span class="p">},</span> -</span><span id="L-391"><a href="#L-391"><span class="linenos"> 391</span></a> <span class="o">**</span><span class="n">_quotes_to_format</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BIT_STRING</span><span class="p">,</span> <span class="n">klass</span><span class="o">.</span><span class="n">BIT_STRINGS</span><span class="p">),</span> -</span><span id="L-392"><a href="#L-392"><span class="linenos"> 392</span></a> <span class="o">**</span><span class="n">_quotes_to_format</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BYTE_STRING</span><span class="p">,</span> <span class="n">klass</span><span class="o">.</span><span class="n">BYTE_STRINGS</span><span class="p">),</span> -</span><span id="L-393"><a href="#L-393"><span class="linenos"> 393</span></a> <span class="o">**</span><span class="n">_quotes_to_format</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">HEX_STRING</span><span class="p">,</span> <span class="n">klass</span><span class="o">.</span><span class="n">HEX_STRINGS</span><span class="p">),</span> -</span><span id="L-394"><a href="#L-394"><span class="linenos"> 394</span></a> <span class="o">**</span><span class="n">_quotes_to_format</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">RAW_STRING</span><span class="p">,</span> <span class="n">klass</span><span class="o">.</span><span class="n">RAW_STRINGS</span><span class="p">),</span> -</span><span id="L-395"><a href="#L-395"><span class="linenos"> 395</span></a> <span class="p">}</span> -</span><span id="L-396"><a href="#L-396"><span class="linenos"> 396</span></a> -</span><span id="L-397"><a href="#L-397"><span class="linenos"> 397</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_STRING_ESCAPES</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">klass</span><span class="o">.</span><span class="n">STRING_ESCAPES</span><span class="p">)</span> -</span><span id="L-398"><a href="#L-398"><span class="linenos"> 398</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_IDENTIFIER_ESCAPES</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">klass</span><span class="o">.</span><span class="n">IDENTIFIER_ESCAPES</span><span class="p">)</span> -</span><span id="L-399"><a href="#L-399"><span class="linenos"> 399</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_COMMENTS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="L-400"><a href="#L-400"><span class="linenos"> 400</span></a> <span class="o">**</span><span class="nb">dict</span><span class="p">(</span> -</span><span id="L-401"><a href="#L-401"><span class="linenos"> 401</span></a> <span class="p">(</span><span class="n">comment</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">comment</span><span class="p">,</span> <span class="nb">str</span><span class="p">)</span> <span class="k">else</span> <span class="p">(</span><span class="n">comment</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">comment</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> -</span><span id="L-402"><a href="#L-402"><span class="linenos"> 402</span></a> <span class="k">for</span> <span class="n">comment</span> <span class="ow">in</span> <span class="n">klass</span><span class="o">.</span><span class="n">COMMENTS</span> -</span><span id="L-403"><a href="#L-403"><span class="linenos"> 403</span></a> <span class="p">),</span> -</span><span id="L-404"><a href="#L-404"><span class="linenos"> 404</span></a> <span class="s2">"{#"</span><span class="p">:</span> <span class="s2">"#}"</span><span class="p">,</span> <span class="c1"># Ensure Jinja comments are tokenized correctly in all dialects</span> -</span><span id="L-405"><a href="#L-405"><span class="linenos"> 405</span></a> <span class="p">}</span> -</span><span id="L-406"><a href="#L-406"><span class="linenos"> 406</span></a> -</span><span id="L-407"><a href="#L-407"><span class="linenos"> 407</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_KEYWORD_TRIE</span> <span class="o">=</span> <span class="n">new_trie</span><span class="p">(</span> -</span><span id="L-408"><a href="#L-408"><span class="linenos"> 408</span></a> <span class="n">key</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> -</span><span id="L-409"><a href="#L-409"><span class="linenos"> 409</span></a> <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="p">(</span> -</span><span id="L-410"><a href="#L-410"><span class="linenos"> 410</span></a> <span class="o">*</span><span class="n">klass</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">,</span> -</span><span id="L-411"><a href="#L-411"><span class="linenos"> 411</span></a> <span class="o">*</span><span class="n">klass</span><span class="o">.</span><span class="n">_COMMENTS</span><span class="p">,</span> -</span><span id="L-412"><a href="#L-412"><span class="linenos"> 412</span></a> <span class="o">*</span><span class="n">klass</span><span class="o">.</span><span class="n">_QUOTES</span><span class="p">,</span> -</span><span id="L-413"><a href="#L-413"><span class="linenos"> 413</span></a> <span class="o">*</span><span class="n">klass</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span><span class="p">,</span> -</span><span id="L-414"><a href="#L-414"><span class="linenos"> 414</span></a> <span class="p">)</span> -</span><span id="L-415"><a href="#L-415"><span class="linenos"> 415</span></a> <span class="k">if</span> <span class="s2">" "</span> <span class="ow">in</span> <span class="n">key</span> <span class="ow">or</span> <span class="nb">any</span><span class="p">(</span><span class="n">single</span> <span class="ow">in</span> <span class="n">key</span> <span class="k">for</span> <span class="n">single</span> <span class="ow">in</span> <span class="n">klass</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">)</span> -</span><span id="L-416"><a href="#L-416"><span class="linenos"> 416</span></a> <span class="p">)</span> -</span><span id="L-417"><a href="#L-417"><span class="linenos"> 417</span></a> -</span><span id="L-418"><a href="#L-418"><span class="linenos"> 418</span></a> <span class="k">return</span> <span class="n">klass</span> -</span><span id="L-419"><a href="#L-419"><span class="linenos"> 419</span></a> +</span><span id="L-385"><a href="#L-385"><span class="linenos"> 385</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_QUOTES</span> <span class="o">=</span> <span class="n">_convert_quotes</span><span class="p">(</span><span class="n">klass</span><span class="o">.</span><span class="n">QUOTES</span><span class="p">)</span> +</span><span id="L-386"><a href="#L-386"><span class="linenos"> 386</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_IDENTIFIERS</span> <span class="o">=</span> <span class="n">_convert_quotes</span><span class="p">(</span><span class="n">klass</span><span class="o">.</span><span class="n">IDENTIFIERS</span><span class="p">)</span> +</span><span id="L-387"><a href="#L-387"><span class="linenos"> 387</span></a> +</span><span id="L-388"><a href="#L-388"><span class="linenos"> 388</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="L-389"><a href="#L-389"><span class="linenos"> 389</span></a> <span class="o">**</span><span class="p">{</span> +</span><span id="L-390"><a href="#L-390"><span class="linenos"> 390</span></a> <span class="n">p</span> <span class="o">+</span> <span class="n">s</span><span class="p">:</span> <span class="p">(</span><span class="n">e</span><span class="p">,</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NATIONAL_STRING</span><span class="p">)</span> +</span><span id="L-391"><a href="#L-391"><span class="linenos"> 391</span></a> <span class="k">for</span> <span class="n">s</span><span class="p">,</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">klass</span><span class="o">.</span><span class="n">_QUOTES</span><span class="o">.</span><span class="n">items</span><span class="p">()</span> +</span><span id="L-392"><a href="#L-392"><span class="linenos"> 392</span></a> <span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"n"</span><span class="p">,</span> <span class="s2">"N"</span><span class="p">)</span> +</span><span id="L-393"><a href="#L-393"><span class="linenos"> 393</span></a> <span class="p">},</span> +</span><span id="L-394"><a href="#L-394"><span class="linenos"> 394</span></a> <span class="o">**</span><span class="n">_quotes_to_format</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BIT_STRING</span><span class="p">,</span> <span class="n">klass</span><span class="o">.</span><span class="n">BIT_STRINGS</span><span class="p">),</span> +</span><span id="L-395"><a href="#L-395"><span class="linenos"> 395</span></a> <span class="o">**</span><span class="n">_quotes_to_format</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BYTE_STRING</span><span class="p">,</span> <span class="n">klass</span><span class="o">.</span><span class="n">BYTE_STRINGS</span><span class="p">),</span> +</span><span id="L-396"><a href="#L-396"><span class="linenos"> 396</span></a> <span class="o">**</span><span class="n">_quotes_to_format</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">HEX_STRING</span><span class="p">,</span> <span class="n">klass</span><span class="o">.</span><span class="n">HEX_STRINGS</span><span class="p">),</span> +</span><span id="L-397"><a href="#L-397"><span class="linenos"> 397</span></a> <span class="o">**</span><span class="n">_quotes_to_format</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">RAW_STRING</span><span class="p">,</span> <span class="n">klass</span><span class="o">.</span><span class="n">RAW_STRINGS</span><span class="p">),</span> +</span><span id="L-398"><a href="#L-398"><span class="linenos"> 398</span></a> <span class="p">}</span> +</span><span id="L-399"><a href="#L-399"><span class="linenos"> 399</span></a> +</span><span id="L-400"><a href="#L-400"><span class="linenos"> 400</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_STRING_ESCAPES</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">klass</span><span class="o">.</span><span class="n">STRING_ESCAPES</span><span class="p">)</span> +</span><span id="L-401"><a href="#L-401"><span class="linenos"> 401</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_IDENTIFIER_ESCAPES</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">klass</span><span class="o">.</span><span class="n">IDENTIFIER_ESCAPES</span><span class="p">)</span> +</span><span id="L-402"><a href="#L-402"><span class="linenos"> 402</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_COMMENTS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="L-403"><a href="#L-403"><span class="linenos"> 403</span></a> <span class="o">**</span><span class="nb">dict</span><span class="p">(</span> +</span><span id="L-404"><a href="#L-404"><span class="linenos"> 404</span></a> <span class="p">(</span><span class="n">comment</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">comment</span><span class="p">,</span> <span class="nb">str</span><span class="p">)</span> <span class="k">else</span> <span class="p">(</span><span class="n">comment</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">comment</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span> +</span><span id="L-405"><a href="#L-405"><span class="linenos"> 405</span></a> <span class="k">for</span> <span class="n">comment</span> <span class="ow">in</span> <span class="n">klass</span><span class="o">.</span><span class="n">COMMENTS</span> +</span><span id="L-406"><a href="#L-406"><span class="linenos"> 406</span></a> <span class="p">),</span> +</span><span id="L-407"><a href="#L-407"><span class="linenos"> 407</span></a> <span class="s2">"{#"</span><span class="p">:</span> <span class="s2">"#}"</span><span class="p">,</span> <span class="c1"># Ensure Jinja comments are tokenized correctly in all dialects</span> +</span><span id="L-408"><a href="#L-408"><span class="linenos"> 408</span></a> <span class="p">}</span> +</span><span id="L-409"><a href="#L-409"><span class="linenos"> 409</span></a> +</span><span id="L-410"><a href="#L-410"><span class="linenos"> 410</span></a> <span class="n">klass</span><span class="o">.</span><span class="n">_KEYWORD_TRIE</span> <span class="o">=</span> <span class="n">new_trie</span><span class="p">(</span> +</span><span id="L-411"><a href="#L-411"><span class="linenos"> 411</span></a> <span class="n">key</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> +</span><span id="L-412"><a href="#L-412"><span class="linenos"> 412</span></a> <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="p">(</span> +</span><span id="L-413"><a href="#L-413"><span class="linenos"> 413</span></a> <span class="o">*</span><span class="n">klass</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">,</span> +</span><span id="L-414"><a href="#L-414"><span class="linenos"> 414</span></a> <span class="o">*</span><span class="n">klass</span><span class="o">.</span><span class="n">_COMMENTS</span><span class="p">,</span> +</span><span id="L-415"><a href="#L-415"><span class="linenos"> 415</span></a> <span class="o">*</span><span class="n">klass</span><span class="o">.</span><span class="n">_QUOTES</span><span class="p">,</span> +</span><span id="L-416"><a href="#L-416"><span class="linenos"> 416</span></a> <span class="o">*</span><span class="n">klass</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span><span class="p">,</span> +</span><span id="L-417"><a href="#L-417"><span class="linenos"> 417</span></a> <span class="p">)</span> +</span><span id="L-418"><a href="#L-418"><span class="linenos"> 418</span></a> <span class="k">if</span> <span class="s2">" "</span> <span class="ow">in</span> <span class="n">key</span> <span class="ow">or</span> <span class="nb">any</span><span class="p">(</span><span class="n">single</span> <span class="ow">in</span> <span class="n">key</span> <span class="k">for</span> <span class="n">single</span> <span class="ow">in</span> <span class="n">klass</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">)</span> +</span><span id="L-419"><a href="#L-419"><span class="linenos"> 419</span></a> <span class="p">)</span> </span><span id="L-420"><a href="#L-420"><span class="linenos"> 420</span></a> -</span><span id="L-421"><a href="#L-421"><span class="linenos"> 421</span></a><span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">metaclass</span><span class="o">=</span><span class="n">_Tokenizer</span><span class="p">):</span> -</span><span id="L-422"><a href="#L-422"><span class="linenos"> 422</span></a> <span class="n">SINGLE_TOKENS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="L-423"><a href="#L-423"><span class="linenos"> 423</span></a> <span class="s2">"("</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_PAREN</span><span class="p">,</span> -</span><span id="L-424"><a href="#L-424"><span class="linenos"> 424</span></a> <span class="s2">")"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_PAREN</span><span class="p">,</span> -</span><span id="L-425"><a href="#L-425"><span class="linenos"> 425</span></a> <span class="s2">"["</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACKET</span><span class="p">,</span> -</span><span id="L-426"><a href="#L-426"><span class="linenos"> 426</span></a> <span class="s2">"]"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_BRACKET</span><span class="p">,</span> -</span><span id="L-427"><a href="#L-427"><span class="linenos"> 427</span></a> <span class="s2">"{"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACE</span><span class="p">,</span> -</span><span id="L-428"><a href="#L-428"><span class="linenos"> 428</span></a> <span class="s2">"}"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_BRACE</span><span class="p">,</span> -</span><span id="L-429"><a href="#L-429"><span class="linenos"> 429</span></a> <span class="s2">"&"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AMP</span><span class="p">,</span> -</span><span id="L-430"><a href="#L-430"><span class="linenos"> 430</span></a> <span class="s2">"^"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CARET</span><span class="p">,</span> -</span><span id="L-431"><a href="#L-431"><span class="linenos"> 431</span></a> <span class="s2">":"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLON</span><span class="p">,</span> -</span><span id="L-432"><a href="#L-432"><span class="linenos"> 432</span></a> <span class="s2">","</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMA</span><span class="p">,</span> -</span><span id="L-433"><a href="#L-433"><span class="linenos"> 433</span></a> <span class="s2">"."</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOT</span><span class="p">,</span> -</span><span id="L-434"><a href="#L-434"><span class="linenos"> 434</span></a> <span class="s2">"-"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DASH</span><span class="p">,</span> -</span><span id="L-435"><a href="#L-435"><span class="linenos"> 435</span></a> <span class="s2">"="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EQ</span><span class="p">,</span> -</span><span id="L-436"><a href="#L-436"><span class="linenos"> 436</span></a> <span class="s2">">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GT</span><span class="p">,</span> -</span><span id="L-437"><a href="#L-437"><span class="linenos"> 437</span></a> <span class="s2">"<"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LT</span><span class="p">,</span> -</span><span id="L-438"><a href="#L-438"><span class="linenos"> 438</span></a> <span class="s2">"%"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MOD</span><span class="p">,</span> -</span><span id="L-439"><a href="#L-439"><span class="linenos"> 439</span></a> <span class="s2">"!"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOT</span><span class="p">,</span> -</span><span id="L-440"><a href="#L-440"><span class="linenos"> 440</span></a> <span class="s2">"|"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span> -</span><span id="L-441"><a href="#L-441"><span class="linenos"> 441</span></a> <span class="s2">"+"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PLUS</span><span class="p">,</span> -</span><span id="L-442"><a href="#L-442"><span class="linenos"> 442</span></a> <span class="s2">";"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMICOLON</span><span class="p">,</span> -</span><span id="L-443"><a href="#L-443"><span class="linenos"> 443</span></a> <span class="s2">"/"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SLASH</span><span class="p">,</span> -</span><span id="L-444"><a href="#L-444"><span class="linenos"> 444</span></a> <span class="s2">"</span><span class="se">\\</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BACKSLASH</span><span class="p">,</span> -</span><span id="L-445"><a href="#L-445"><span class="linenos"> 445</span></a> <span class="s2">"*"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STAR</span><span class="p">,</span> -</span><span id="L-446"><a href="#L-446"><span class="linenos"> 446</span></a> <span class="s2">"~"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TILDA</span><span class="p">,</span> -</span><span id="L-447"><a href="#L-447"><span class="linenos"> 447</span></a> <span class="s2">"?"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PLACEHOLDER</span><span class="p">,</span> -</span><span id="L-448"><a href="#L-448"><span class="linenos"> 448</span></a> <span class="s2">"@"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">,</span> -</span><span id="L-449"><a href="#L-449"><span class="linenos"> 449</span></a> <span class="c1"># used for breaking a var like x'y' but nothing else</span> -</span><span id="L-450"><a href="#L-450"><span class="linenos"> 450</span></a> <span class="c1"># the token type doesn't matter</span> -</span><span id="L-451"><a href="#L-451"><span class="linenos"> 451</span></a> <span class="s2">"'"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">QUOTE</span><span class="p">,</span> -</span><span id="L-452"><a href="#L-452"><span class="linenos"> 452</span></a> <span class="s2">"`"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> -</span><span id="L-453"><a href="#L-453"><span class="linenos"> 453</span></a> <span class="s1">'"'</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> -</span><span id="L-454"><a href="#L-454"><span class="linenos"> 454</span></a> <span class="s2">"#"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HASH</span><span class="p">,</span> -</span><span id="L-455"><a href="#L-455"><span class="linenos"> 455</span></a> <span class="p">}</span> -</span><span id="L-456"><a href="#L-456"><span class="linenos"> 456</span></a> -</span><span id="L-457"><a href="#L-457"><span class="linenos"> 457</span></a> <span class="n">BIT_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="L-458"><a href="#L-458"><span class="linenos"> 458</span></a> <span class="n">BYTE_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="L-459"><a href="#L-459"><span class="linenos"> 459</span></a> <span class="n">HEX_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="L-460"><a href="#L-460"><span class="linenos"> 460</span></a> <span class="n">RAW_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="L-461"><a href="#L-461"><span class="linenos"> 461</span></a> <span class="n">IDENTIFIERS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'"'</span><span class="p">]</span> -</span><span id="L-462"><a href="#L-462"><span class="linenos"> 462</span></a> <span class="n">IDENTIFIER_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'"'</span><span class="p">]</span> -</span><span id="L-463"><a href="#L-463"><span class="linenos"> 463</span></a> <span class="n">QUOTES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">|</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"'"</span><span class="p">]</span> -</span><span id="L-464"><a href="#L-464"><span class="linenos"> 464</span></a> <span class="n">STRING_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"'"</span><span class="p">]</span> -</span><span id="L-465"><a href="#L-465"><span class="linenos"> 465</span></a> <span class="n">VAR_SINGLE_TOKENS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> -</span><span id="L-466"><a href="#L-466"><span class="linenos"> 466</span></a> -</span><span id="L-467"><a href="#L-467"><span class="linenos"> 467</span></a> <span class="c1"># Autofilled</span> -</span><span id="L-468"><a href="#L-468"><span class="linenos"> 468</span></a> <span class="n">IDENTIFIERS_CAN_START_WITH_DIGIT</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="L-421"><a href="#L-421"><span class="linenos"> 421</span></a> <span class="k">return</span> <span class="n">klass</span> +</span><span id="L-422"><a href="#L-422"><span class="linenos"> 422</span></a> +</span><span id="L-423"><a href="#L-423"><span class="linenos"> 423</span></a> +</span><span id="L-424"><a href="#L-424"><span class="linenos"> 424</span></a><span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">metaclass</span><span class="o">=</span><span class="n">_Tokenizer</span><span class="p">):</span> +</span><span id="L-425"><a href="#L-425"><span class="linenos"> 425</span></a> <span class="n">SINGLE_TOKENS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="L-426"><a href="#L-426"><span class="linenos"> 426</span></a> <span class="s2">"("</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_PAREN</span><span class="p">,</span> +</span><span id="L-427"><a href="#L-427"><span class="linenos"> 427</span></a> <span class="s2">")"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_PAREN</span><span class="p">,</span> +</span><span id="L-428"><a href="#L-428"><span class="linenos"> 428</span></a> <span class="s2">"["</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACKET</span><span class="p">,</span> +</span><span id="L-429"><a href="#L-429"><span class="linenos"> 429</span></a> <span class="s2">"]"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_BRACKET</span><span class="p">,</span> +</span><span id="L-430"><a href="#L-430"><span class="linenos"> 430</span></a> <span class="s2">"{"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACE</span><span class="p">,</span> +</span><span id="L-431"><a href="#L-431"><span class="linenos"> 431</span></a> <span class="s2">"}"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_BRACE</span><span class="p">,</span> +</span><span id="L-432"><a href="#L-432"><span class="linenos"> 432</span></a> <span class="s2">"&"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AMP</span><span class="p">,</span> +</span><span id="L-433"><a href="#L-433"><span class="linenos"> 433</span></a> <span class="s2">"^"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CARET</span><span class="p">,</span> +</span><span id="L-434"><a href="#L-434"><span class="linenos"> 434</span></a> <span class="s2">":"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLON</span><span class="p">,</span> +</span><span id="L-435"><a href="#L-435"><span class="linenos"> 435</span></a> <span class="s2">","</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMA</span><span class="p">,</span> +</span><span id="L-436"><a href="#L-436"><span class="linenos"> 436</span></a> <span class="s2">"."</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOT</span><span class="p">,</span> +</span><span id="L-437"><a href="#L-437"><span class="linenos"> 437</span></a> <span class="s2">"-"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DASH</span><span class="p">,</span> +</span><span id="L-438"><a href="#L-438"><span class="linenos"> 438</span></a> <span class="s2">"="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EQ</span><span class="p">,</span> +</span><span id="L-439"><a href="#L-439"><span class="linenos"> 439</span></a> <span class="s2">">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GT</span><span class="p">,</span> +</span><span id="L-440"><a href="#L-440"><span class="linenos"> 440</span></a> <span class="s2">"<"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LT</span><span class="p">,</span> +</span><span id="L-441"><a href="#L-441"><span class="linenos"> 441</span></a> <span class="s2">"%"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MOD</span><span class="p">,</span> +</span><span id="L-442"><a href="#L-442"><span class="linenos"> 442</span></a> <span class="s2">"!"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOT</span><span class="p">,</span> +</span><span id="L-443"><a href="#L-443"><span class="linenos"> 443</span></a> <span class="s2">"|"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span> +</span><span id="L-444"><a href="#L-444"><span class="linenos"> 444</span></a> <span class="s2">"+"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PLUS</span><span class="p">,</span> +</span><span id="L-445"><a href="#L-445"><span class="linenos"> 445</span></a> <span class="s2">";"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMICOLON</span><span class="p">,</span> +</span><span id="L-446"><a href="#L-446"><span class="linenos"> 446</span></a> <span class="s2">"/"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SLASH</span><span class="p">,</span> +</span><span id="L-447"><a href="#L-447"><span class="linenos"> 447</span></a> <span class="s2">"</span><span class="se">\\</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BACKSLASH</span><span class="p">,</span> +</span><span id="L-448"><a href="#L-448"><span class="linenos"> 448</span></a> <span class="s2">"*"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STAR</span><span class="p">,</span> +</span><span id="L-449"><a href="#L-449"><span class="linenos"> 449</span></a> <span class="s2">"~"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TILDA</span><span class="p">,</span> +</span><span id="L-450"><a href="#L-450"><span class="linenos"> 450</span></a> <span class="s2">"?"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PLACEHOLDER</span><span class="p">,</span> +</span><span id="L-451"><a href="#L-451"><span class="linenos"> 451</span></a> <span class="s2">"@"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">,</span> +</span><span id="L-452"><a href="#L-452"><span class="linenos"> 452</span></a> <span class="c1"># used for breaking a var like x'y' but nothing else</span> +</span><span id="L-453"><a href="#L-453"><span class="linenos"> 453</span></a> <span class="c1"># the token type doesn't matter</span> +</span><span id="L-454"><a href="#L-454"><span class="linenos"> 454</span></a> <span class="s2">"'"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">QUOTE</span><span class="p">,</span> +</span><span id="L-455"><a href="#L-455"><span class="linenos"> 455</span></a> <span class="s2">"`"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> +</span><span id="L-456"><a href="#L-456"><span class="linenos"> 456</span></a> <span class="s1">'"'</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> +</span><span id="L-457"><a href="#L-457"><span class="linenos"> 457</span></a> <span class="s2">"#"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HASH</span><span class="p">,</span> +</span><span id="L-458"><a href="#L-458"><span class="linenos"> 458</span></a> <span class="p">}</span> +</span><span id="L-459"><a href="#L-459"><span class="linenos"> 459</span></a> +</span><span id="L-460"><a href="#L-460"><span class="linenos"> 460</span></a> <span class="n">BIT_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="L-461"><a href="#L-461"><span class="linenos"> 461</span></a> <span class="n">BYTE_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="L-462"><a href="#L-462"><span class="linenos"> 462</span></a> <span class="n">HEX_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="L-463"><a href="#L-463"><span class="linenos"> 463</span></a> <span class="n">RAW_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="L-464"><a href="#L-464"><span class="linenos"> 464</span></a> <span class="n">IDENTIFIERS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'"'</span><span class="p">]</span> +</span><span id="L-465"><a href="#L-465"><span class="linenos"> 465</span></a> <span class="n">IDENTIFIER_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'"'</span><span class="p">]</span> +</span><span id="L-466"><a href="#L-466"><span class="linenos"> 466</span></a> <span class="n">QUOTES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">|</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"'"</span><span class="p">]</span> +</span><span id="L-467"><a href="#L-467"><span class="linenos"> 467</span></a> <span class="n">STRING_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"'"</span><span class="p">]</span> +</span><span id="L-468"><a href="#L-468"><span class="linenos"> 468</span></a> <span class="n">VAR_SINGLE_TOKENS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> </span><span id="L-469"><a href="#L-469"><span class="linenos"> 469</span></a> -</span><span id="L-470"><a href="#L-470"><span class="linenos"> 470</span></a> <span class="n">_COMMENTS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="L-471"><a href="#L-471"><span class="linenos"> 471</span></a> <span class="n">_FORMAT_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">TokenType</span><span class="p">]]</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="L-472"><a href="#L-472"><span class="linenos"> 472</span></a> <span class="n">_IDENTIFIERS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="L-473"><a href="#L-473"><span class="linenos"> 473</span></a> <span class="n">_IDENTIFIER_ESCAPES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> -</span><span id="L-474"><a href="#L-474"><span class="linenos"> 474</span></a> <span class="n">_QUOTES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="L-475"><a href="#L-475"><span class="linenos"> 475</span></a> <span class="n">_STRING_ESCAPES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> -</span><span id="L-476"><a href="#L-476"><span class="linenos"> 476</span></a> <span class="n">_KEYWORD_TRIE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="L-477"><a href="#L-477"><span class="linenos"> 477</span></a> -</span><span id="L-478"><a href="#L-478"><span class="linenos"> 478</span></a> <span class="n">KEYWORDS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">TokenType</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="L-479"><a href="#L-479"><span class="linenos"> 479</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="se">{{</span><span class="s2">%</span><span class="si">{</span><span class="n">postfix</span><span class="si">}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_START</span> <span class="k">for</span> <span class="n">postfix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> -</span><span id="L-480"><a href="#L-480"><span class="linenos"> 480</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="s2">%</span><span class="se">}}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_END</span> <span class="k">for</span> <span class="n">prefix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> -</span><span id="L-481"><a href="#L-481"><span class="linenos"> 481</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="se">{{{{</span><span class="si">{</span><span class="n">postfix</span><span class="si">}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_START</span> <span class="k">for</span> <span class="n">postfix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> -</span><span id="L-482"><a href="#L-482"><span class="linenos"> 482</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="se">}}}}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_END</span> <span class="k">for</span> <span class="n">prefix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> -</span><span id="L-483"><a href="#L-483"><span class="linenos"> 483</span></a> <span class="s2">"/*+"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HINT</span><span class="p">,</span> -</span><span id="L-484"><a href="#L-484"><span class="linenos"> 484</span></a> <span class="s2">"=="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EQ</span><span class="p">,</span> -</span><span id="L-485"><a href="#L-485"><span class="linenos"> 485</span></a> <span class="s2">"::"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DCOLON</span><span class="p">,</span> -</span><span id="L-486"><a href="#L-486"><span class="linenos"> 486</span></a> <span class="s2">"||"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DPIPE</span><span class="p">,</span> -</span><span id="L-487"><a href="#L-487"><span class="linenos"> 487</span></a> <span class="s2">">="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GTE</span><span class="p">,</span> -</span><span id="L-488"><a href="#L-488"><span class="linenos"> 488</span></a> <span class="s2">"<="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LTE</span><span class="p">,</span> -</span><span id="L-489"><a href="#L-489"><span class="linenos"> 489</span></a> <span class="s2">"<>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEQ</span><span class="p">,</span> -</span><span id="L-490"><a href="#L-490"><span class="linenos"> 490</span></a> <span class="s2">"!="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEQ</span><span class="p">,</span> -</span><span id="L-491"><a href="#L-491"><span class="linenos"> 491</span></a> <span class="s2">"<=>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULLSAFE_EQ</span><span class="p">,</span> -</span><span id="L-492"><a href="#L-492"><span class="linenos"> 492</span></a> <span class="s2">"->"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ARROW</span><span class="p">,</span> -</span><span id="L-493"><a href="#L-493"><span class="linenos"> 493</span></a> <span class="s2">"->>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DARROW</span><span class="p">,</span> -</span><span id="L-494"><a href="#L-494"><span class="linenos"> 494</span></a> <span class="s2">"=>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FARROW</span><span class="p">,</span> -</span><span id="L-495"><a href="#L-495"><span class="linenos"> 495</span></a> <span class="s2">"#>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HASH_ARROW</span><span class="p">,</span> -</span><span id="L-496"><a href="#L-496"><span class="linenos"> 496</span></a> <span class="s2">"#>>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DHASH_ARROW</span><span class="p">,</span> -</span><span id="L-497"><a href="#L-497"><span class="linenos"> 497</span></a> <span class="s2">"<->"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LR_ARROW</span><span class="p">,</span> -</span><span id="L-498"><a href="#L-498"><span class="linenos"> 498</span></a> <span class="s2">"&&"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DAMP</span><span class="p">,</span> -</span><span id="L-499"><a href="#L-499"><span class="linenos"> 499</span></a> <span class="s2">"ALL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALL</span><span class="p">,</span> -</span><span id="L-500"><a href="#L-500"><span class="linenos"> 500</span></a> <span class="s2">"ALWAYS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALWAYS</span><span class="p">,</span> -</span><span id="L-501"><a href="#L-501"><span class="linenos"> 501</span></a> <span class="s2">"AND"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AND</span><span class="p">,</span> -</span><span id="L-502"><a href="#L-502"><span class="linenos"> 502</span></a> <span class="s2">"ANTI"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANTI</span><span class="p">,</span> -</span><span id="L-503"><a href="#L-503"><span class="linenos"> 503</span></a> <span class="s2">"ANY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANY</span><span class="p">,</span> -</span><span id="L-504"><a href="#L-504"><span class="linenos"> 504</span></a> <span class="s2">"ASC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ASC</span><span class="p">,</span> -</span><span id="L-505"><a href="#L-505"><span class="linenos"> 505</span></a> <span class="s2">"AS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALIAS</span><span class="p">,</span> -</span><span id="L-506"><a href="#L-506"><span class="linenos"> 506</span></a> <span class="s2">"ASOF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ASOF</span><span class="p">,</span> -</span><span id="L-507"><a href="#L-507"><span class="linenos"> 507</span></a> <span class="s2">"AUTOINCREMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AUTO_INCREMENT</span><span class="p">,</span> -</span><span id="L-508"><a href="#L-508"><span class="linenos"> 508</span></a> <span class="s2">"AUTO_INCREMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AUTO_INCREMENT</span><span class="p">,</span> -</span><span id="L-509"><a href="#L-509"><span class="linenos"> 509</span></a> <span class="s2">"BEGIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BEGIN</span><span class="p">,</span> -</span><span id="L-510"><a href="#L-510"><span class="linenos"> 510</span></a> <span class="s2">"BETWEEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BETWEEN</span><span class="p">,</span> -</span><span id="L-511"><a href="#L-511"><span class="linenos"> 511</span></a> <span class="s2">"CACHE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CACHE</span><span class="p">,</span> -</span><span id="L-512"><a href="#L-512"><span class="linenos"> 512</span></a> <span class="s2">"UNCACHE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNCACHE</span><span class="p">,</span> -</span><span id="L-513"><a href="#L-513"><span class="linenos"> 513</span></a> <span class="s2">"CASE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CASE</span><span class="p">,</span> -</span><span id="L-514"><a href="#L-514"><span class="linenos"> 514</span></a> <span class="s2">"CHARACTER SET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHARACTER_SET</span><span class="p">,</span> -</span><span id="L-515"><a href="#L-515"><span class="linenos"> 515</span></a> <span class="s2">"CLUSTER BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CLUSTER_BY</span><span class="p">,</span> -</span><span id="L-516"><a href="#L-516"><span class="linenos"> 516</span></a> <span class="s2">"COLLATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLLATE</span><span class="p">,</span> -</span><span id="L-517"><a href="#L-517"><span class="linenos"> 517</span></a> <span class="s2">"COLUMN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLUMN</span><span class="p">,</span> -</span><span id="L-518"><a href="#L-518"><span class="linenos"> 518</span></a> <span class="s2">"COMMIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMIT</span><span class="p">,</span> -</span><span id="L-519"><a href="#L-519"><span class="linenos"> 519</span></a> <span class="s2">"CONSTRAINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CONSTRAINT</span><span class="p">,</span> -</span><span id="L-520"><a href="#L-520"><span class="linenos"> 520</span></a> <span class="s2">"CREATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CREATE</span><span class="p">,</span> -</span><span id="L-521"><a href="#L-521"><span class="linenos"> 521</span></a> <span class="s2">"CROSS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CROSS</span><span class="p">,</span> -</span><span id="L-522"><a href="#L-522"><span class="linenos"> 522</span></a> <span class="s2">"CUBE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CUBE</span><span class="p">,</span> -</span><span id="L-523"><a href="#L-523"><span class="linenos"> 523</span></a> <span class="s2">"CURRENT_DATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_DATE</span><span class="p">,</span> -</span><span id="L-524"><a href="#L-524"><span class="linenos"> 524</span></a> <span class="s2">"CURRENT_TIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_TIME</span><span class="p">,</span> -</span><span id="L-525"><a href="#L-525"><span class="linenos"> 525</span></a> <span class="s2">"CURRENT_TIMESTAMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_TIMESTAMP</span><span class="p">,</span> -</span><span id="L-526"><a href="#L-526"><span class="linenos"> 526</span></a> <span class="s2">"CURRENT_USER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_USER</span><span class="p">,</span> -</span><span id="L-527"><a href="#L-527"><span class="linenos"> 527</span></a> <span class="s2">"DATABASE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATABASE</span><span class="p">,</span> -</span><span id="L-528"><a href="#L-528"><span class="linenos"> 528</span></a> <span class="s2">"DEFAULT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DEFAULT</span><span class="p">,</span> -</span><span id="L-529"><a href="#L-529"><span class="linenos"> 529</span></a> <span class="s2">"DELETE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DELETE</span><span class="p">,</span> -</span><span id="L-530"><a href="#L-530"><span class="linenos"> 530</span></a> <span class="s2">"DESC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DESC</span><span class="p">,</span> -</span><span id="L-531"><a href="#L-531"><span class="linenos"> 531</span></a> <span class="s2">"DESCRIBE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DESCRIBE</span><span class="p">,</span> -</span><span id="L-532"><a href="#L-532"><span class="linenos"> 532</span></a> <span class="s2">"DISTINCT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DISTINCT</span><span class="p">,</span> -</span><span id="L-533"><a href="#L-533"><span class="linenos"> 533</span></a> <span class="s2">"DISTRIBUTE BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DISTRIBUTE_BY</span><span class="p">,</span> -</span><span id="L-534"><a href="#L-534"><span class="linenos"> 534</span></a> <span class="s2">"DIV"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DIV</span><span class="p">,</span> -</span><span id="L-535"><a href="#L-535"><span class="linenos"> 535</span></a> <span class="s2">"DROP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DROP</span><span class="p">,</span> -</span><span id="L-536"><a href="#L-536"><span class="linenos"> 536</span></a> <span class="s2">"ELSE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ELSE</span><span class="p">,</span> -</span><span id="L-537"><a href="#L-537"><span class="linenos"> 537</span></a> <span class="s2">"END"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">END</span><span class="p">,</span> -</span><span id="L-538"><a href="#L-538"><span class="linenos"> 538</span></a> <span class="s2">"ESCAPE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ESCAPE</span><span class="p">,</span> -</span><span id="L-539"><a href="#L-539"><span class="linenos"> 539</span></a> <span class="s2">"EXCEPT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXCEPT</span><span class="p">,</span> -</span><span id="L-540"><a href="#L-540"><span class="linenos"> 540</span></a> <span class="s2">"EXECUTE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXECUTE</span><span class="p">,</span> -</span><span id="L-541"><a href="#L-541"><span class="linenos"> 541</span></a> <span class="s2">"EXISTS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXISTS</span><span class="p">,</span> -</span><span id="L-542"><a href="#L-542"><span class="linenos"> 542</span></a> <span class="s2">"FALSE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FALSE</span><span class="p">,</span> -</span><span id="L-543"><a href="#L-543"><span class="linenos"> 543</span></a> <span class="s2">"FETCH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FETCH</span><span class="p">,</span> -</span><span id="L-544"><a href="#L-544"><span class="linenos"> 544</span></a> <span class="s2">"FILTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FILTER</span><span class="p">,</span> -</span><span id="L-545"><a href="#L-545"><span class="linenos"> 545</span></a> <span class="s2">"FIRST"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FIRST</span><span class="p">,</span> -</span><span id="L-546"><a href="#L-546"><span class="linenos"> 546</span></a> <span class="s2">"FULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FULL</span><span class="p">,</span> -</span><span id="L-547"><a href="#L-547"><span class="linenos"> 547</span></a> <span class="s2">"FUNCTION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FUNCTION</span><span class="p">,</span> -</span><span id="L-548"><a href="#L-548"><span class="linenos"> 548</span></a> <span class="s2">"FOR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FOR</span><span class="p">,</span> -</span><span id="L-549"><a href="#L-549"><span class="linenos"> 549</span></a> <span class="s2">"FOREIGN KEY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FOREIGN_KEY</span><span class="p">,</span> -</span><span id="L-550"><a href="#L-550"><span class="linenos"> 550</span></a> <span class="s2">"FORMAT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FORMAT</span><span class="p">,</span> -</span><span id="L-551"><a href="#L-551"><span class="linenos"> 551</span></a> <span class="s2">"FROM"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FROM</span><span class="p">,</span> -</span><span id="L-552"><a href="#L-552"><span class="linenos"> 552</span></a> <span class="s2">"GEOGRAPHY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GEOGRAPHY</span><span class="p">,</span> -</span><span id="L-553"><a href="#L-553"><span class="linenos"> 553</span></a> <span class="s2">"GEOMETRY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GEOMETRY</span><span class="p">,</span> -</span><span id="L-554"><a href="#L-554"><span class="linenos"> 554</span></a> <span class="s2">"GLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GLOB</span><span class="p">,</span> -</span><span id="L-555"><a href="#L-555"><span class="linenos"> 555</span></a> <span class="s2">"GROUP BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GROUP_BY</span><span class="p">,</span> -</span><span id="L-556"><a href="#L-556"><span class="linenos"> 556</span></a> <span class="s2">"GROUPING SETS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GROUPING_SETS</span><span class="p">,</span> -</span><span id="L-557"><a href="#L-557"><span class="linenos"> 557</span></a> <span class="s2">"HAVING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HAVING</span><span class="p">,</span> -</span><span id="L-558"><a href="#L-558"><span class="linenos"> 558</span></a> <span class="s2">"IF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IF</span><span class="p">,</span> -</span><span id="L-559"><a href="#L-559"><span class="linenos"> 559</span></a> <span class="s2">"ILIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ILIKE</span><span class="p">,</span> -</span><span id="L-560"><a href="#L-560"><span class="linenos"> 560</span></a> <span class="s2">"IN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IN</span><span class="p">,</span> -</span><span id="L-561"><a href="#L-561"><span class="linenos"> 561</span></a> <span class="s2">"INDEX"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INDEX</span><span class="p">,</span> -</span><span id="L-562"><a href="#L-562"><span class="linenos"> 562</span></a> <span class="s2">"INET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INET</span><span class="p">,</span> -</span><span id="L-563"><a href="#L-563"><span class="linenos"> 563</span></a> <span class="s2">"INNER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INNER</span><span class="p">,</span> -</span><span id="L-564"><a href="#L-564"><span class="linenos"> 564</span></a> <span class="s2">"INSERT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INSERT</span><span class="p">,</span> -</span><span id="L-565"><a href="#L-565"><span class="linenos"> 565</span></a> <span class="s2">"INTERVAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTERVAL</span><span class="p">,</span> -</span><span id="L-566"><a href="#L-566"><span class="linenos"> 566</span></a> <span class="s2">"INTERSECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTERSECT</span><span class="p">,</span> -</span><span id="L-567"><a href="#L-567"><span class="linenos"> 567</span></a> <span class="s2">"INTO"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTO</span><span class="p">,</span> -</span><span id="L-568"><a href="#L-568"><span class="linenos"> 568</span></a> <span class="s2">"IS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IS</span><span class="p">,</span> -</span><span id="L-569"><a href="#L-569"><span class="linenos"> 569</span></a> <span class="s2">"ISNULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ISNULL</span><span class="p">,</span> -</span><span id="L-570"><a href="#L-570"><span class="linenos"> 570</span></a> <span class="s2">"JOIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">JOIN</span><span class="p">,</span> -</span><span id="L-571"><a href="#L-571"><span class="linenos"> 571</span></a> <span class="s2">"KEEP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">KEEP</span><span class="p">,</span> -</span><span id="L-572"><a href="#L-572"><span class="linenos"> 572</span></a> <span class="s2">"LATERAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LATERAL</span><span class="p">,</span> -</span><span id="L-573"><a href="#L-573"><span class="linenos"> 573</span></a> <span class="s2">"LEFT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LEFT</span><span class="p">,</span> -</span><span id="L-574"><a href="#L-574"><span class="linenos"> 574</span></a> <span class="s2">"LIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LIKE</span><span class="p">,</span> -</span><span id="L-575"><a href="#L-575"><span class="linenos"> 575</span></a> <span class="s2">"LIMIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LIMIT</span><span class="p">,</span> -</span><span id="L-576"><a href="#L-576"><span class="linenos"> 576</span></a> <span class="s2">"LOAD"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LOAD</span><span class="p">,</span> -</span><span id="L-577"><a href="#L-577"><span class="linenos"> 577</span></a> <span class="s2">"LOCK"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LOCK</span><span class="p">,</span> -</span><span id="L-578"><a href="#L-578"><span class="linenos"> 578</span></a> <span class="s2">"MERGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MERGE</span><span class="p">,</span> -</span><span id="L-579"><a href="#L-579"><span class="linenos"> 579</span></a> <span class="s2">"NATURAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NATURAL</span><span class="p">,</span> -</span><span id="L-580"><a href="#L-580"><span class="linenos"> 580</span></a> <span class="s2">"NEXT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEXT</span><span class="p">,</span> -</span><span id="L-581"><a href="#L-581"><span class="linenos"> 581</span></a> <span class="s2">"NEXT VALUE FOR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEXT_VALUE_FOR</span><span class="p">,</span> -</span><span id="L-582"><a href="#L-582"><span class="linenos"> 582</span></a> <span class="s2">"NOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOT</span><span class="p">,</span> -</span><span id="L-583"><a href="#L-583"><span class="linenos"> 583</span></a> <span class="s2">"NOTNULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOTNULL</span><span class="p">,</span> -</span><span id="L-584"><a href="#L-584"><span class="linenos"> 584</span></a> <span class="s2">"NULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULL</span><span class="p">,</span> -</span><span id="L-585"><a href="#L-585"><span class="linenos"> 585</span></a> <span class="s2">"OBJECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OBJECT</span><span class="p">,</span> -</span><span id="L-586"><a href="#L-586"><span class="linenos"> 586</span></a> <span class="s2">"OFFSET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OFFSET</span><span class="p">,</span> -</span><span id="L-587"><a href="#L-587"><span class="linenos"> 587</span></a> <span class="s2">"ON"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ON</span><span class="p">,</span> -</span><span id="L-588"><a href="#L-588"><span class="linenos"> 588</span></a> <span class="s2">"OR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OR</span><span class="p">,</span> -</span><span id="L-589"><a href="#L-589"><span class="linenos"> 589</span></a> <span class="s2">"ORDER BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ORDER_BY</span><span class="p">,</span> -</span><span id="L-590"><a href="#L-590"><span class="linenos"> 590</span></a> <span class="s2">"ORDINALITY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ORDINALITY</span><span class="p">,</span> -</span><span id="L-591"><a href="#L-591"><span class="linenos"> 591</span></a> <span class="s2">"OUTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OUTER</span><span class="p">,</span> -</span><span id="L-592"><a href="#L-592"><span class="linenos"> 592</span></a> <span class="s2">"OVER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVER</span><span class="p">,</span> -</span><span id="L-593"><a href="#L-593"><span class="linenos"> 593</span></a> <span class="s2">"OVERLAPS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVERLAPS</span><span class="p">,</span> -</span><span id="L-594"><a href="#L-594"><span class="linenos"> 594</span></a> <span class="s2">"OVERWRITE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVERWRITE</span><span class="p">,</span> -</span><span id="L-595"><a href="#L-595"><span class="linenos"> 595</span></a> <span class="s2">"PARTITION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION</span><span class="p">,</span> -</span><span id="L-596"><a href="#L-596"><span class="linenos"> 596</span></a> <span class="s2">"PARTITION BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> -</span><span id="L-597"><a href="#L-597"><span class="linenos"> 597</span></a> <span class="s2">"PARTITIONED BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> -</span><span id="L-598"><a href="#L-598"><span class="linenos"> 598</span></a> <span class="s2">"PARTITIONED_BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> -</span><span id="L-599"><a href="#L-599"><span class="linenos"> 599</span></a> <span class="s2">"PERCENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PERCENT</span><span class="p">,</span> -</span><span id="L-600"><a href="#L-600"><span class="linenos"> 600</span></a> <span class="s2">"PIVOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIVOT</span><span class="p">,</span> -</span><span id="L-601"><a href="#L-601"><span class="linenos"> 601</span></a> <span class="s2">"PRAGMA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PRAGMA</span><span class="p">,</span> -</span><span id="L-602"><a href="#L-602"><span class="linenos"> 602</span></a> <span class="s2">"PRIMARY KEY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PRIMARY_KEY</span><span class="p">,</span> -</span><span id="L-603"><a href="#L-603"><span class="linenos"> 603</span></a> <span class="s2">"PROCEDURE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PROCEDURE</span><span class="p">,</span> -</span><span id="L-604"><a href="#L-604"><span class="linenos"> 604</span></a> <span class="s2">"QUALIFY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">QUALIFY</span><span class="p">,</span> -</span><span id="L-605"><a href="#L-605"><span class="linenos"> 605</span></a> <span class="s2">"RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RANGE</span><span class="p">,</span> -</span><span id="L-606"><a href="#L-606"><span class="linenos"> 606</span></a> <span class="s2">"RECURSIVE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RECURSIVE</span><span class="p">,</span> -</span><span id="L-607"><a href="#L-607"><span class="linenos"> 607</span></a> <span class="s2">"REGEXP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RLIKE</span><span class="p">,</span> -</span><span id="L-608"><a href="#L-608"><span class="linenos"> 608</span></a> <span class="s2">"REPLACE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REPLACE</span><span class="p">,</span> -</span><span id="L-609"><a href="#L-609"><span class="linenos"> 609</span></a> <span class="s2">"RETURNING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RETURNING</span><span class="p">,</span> -</span><span id="L-610"><a href="#L-610"><span class="linenos"> 610</span></a> <span class="s2">"REFERENCES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REFERENCES</span><span class="p">,</span> -</span><span id="L-611"><a href="#L-611"><span class="linenos"> 611</span></a> <span class="s2">"RIGHT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RIGHT</span><span class="p">,</span> -</span><span id="L-612"><a href="#L-612"><span class="linenos"> 612</span></a> <span class="s2">"RLIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RLIKE</span><span class="p">,</span> -</span><span id="L-613"><a href="#L-613"><span class="linenos"> 613</span></a> <span class="s2">"ROLLBACK"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROLLBACK</span><span class="p">,</span> -</span><span id="L-614"><a href="#L-614"><span class="linenos"> 614</span></a> <span class="s2">"ROLLUP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROLLUP</span><span class="p">,</span> -</span><span id="L-615"><a href="#L-615"><span class="linenos"> 615</span></a> <span class="s2">"ROW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROW</span><span class="p">,</span> -</span><span id="L-616"><a href="#L-616"><span class="linenos"> 616</span></a> <span class="s2">"ROWS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROWS</span><span class="p">,</span> -</span><span id="L-617"><a href="#L-617"><span class="linenos"> 617</span></a> <span class="s2">"SCHEMA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SCHEMA</span><span class="p">,</span> -</span><span id="L-618"><a href="#L-618"><span class="linenos"> 618</span></a> <span class="s2">"SELECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SELECT</span><span class="p">,</span> -</span><span id="L-619"><a href="#L-619"><span class="linenos"> 619</span></a> <span class="s2">"SEMI"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMI</span><span class="p">,</span> -</span><span id="L-620"><a href="#L-620"><span class="linenos"> 620</span></a> <span class="s2">"SET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SET</span><span class="p">,</span> -</span><span id="L-621"><a href="#L-621"><span class="linenos"> 621</span></a> <span class="s2">"SETTINGS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SETTINGS</span><span class="p">,</span> -</span><span id="L-622"><a href="#L-622"><span class="linenos"> 622</span></a> <span class="s2">"SHOW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SHOW</span><span class="p">,</span> -</span><span id="L-623"><a href="#L-623"><span class="linenos"> 623</span></a> <span class="s2">"SIMILAR TO"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SIMILAR_TO</span><span class="p">,</span> -</span><span id="L-624"><a href="#L-624"><span class="linenos"> 624</span></a> <span class="s2">"SOME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SOME</span><span class="p">,</span> -</span><span id="L-625"><a href="#L-625"><span class="linenos"> 625</span></a> <span class="s2">"SORT BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SORT_BY</span><span class="p">,</span> -</span><span id="L-626"><a href="#L-626"><span class="linenos"> 626</span></a> <span class="s2">"TABLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TABLE</span><span class="p">,</span> -</span><span id="L-627"><a href="#L-627"><span class="linenos"> 627</span></a> <span class="s2">"TABLESAMPLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TABLE_SAMPLE</span><span class="p">,</span> -</span><span id="L-628"><a href="#L-628"><span class="linenos"> 628</span></a> <span class="s2">"TEMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEMPORARY</span><span class="p">,</span> -</span><span id="L-629"><a href="#L-629"><span class="linenos"> 629</span></a> <span class="s2">"TEMPORARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEMPORARY</span><span class="p">,</span> -</span><span id="L-630"><a href="#L-630"><span class="linenos"> 630</span></a> <span class="s2">"THEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">THEN</span><span class="p">,</span> -</span><span id="L-631"><a href="#L-631"><span class="linenos"> 631</span></a> <span class="s2">"TRUE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TRUE</span><span class="p">,</span> -</span><span id="L-632"><a href="#L-632"><span class="linenos"> 632</span></a> <span class="s2">"UNION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNION</span><span class="p">,</span> -</span><span id="L-633"><a href="#L-633"><span class="linenos"> 633</span></a> <span class="s2">"UNNEST"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNNEST</span><span class="p">,</span> -</span><span id="L-634"><a href="#L-634"><span class="linenos"> 634</span></a> <span class="s2">"UNPIVOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNPIVOT</span><span class="p">,</span> -</span><span id="L-635"><a href="#L-635"><span class="linenos"> 635</span></a> <span class="s2">"UPDATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UPDATE</span><span class="p">,</span> -</span><span id="L-636"><a href="#L-636"><span class="linenos"> 636</span></a> <span class="s2">"USE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USE</span><span class="p">,</span> -</span><span id="L-637"><a href="#L-637"><span class="linenos"> 637</span></a> <span class="s2">"USING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USING</span><span class="p">,</span> -</span><span id="L-638"><a href="#L-638"><span class="linenos"> 638</span></a> <span class="s2">"UUID"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UUID</span><span class="p">,</span> -</span><span id="L-639"><a href="#L-639"><span class="linenos"> 639</span></a> <span class="s2">"VALUES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VALUES</span><span class="p">,</span> -</span><span id="L-640"><a href="#L-640"><span class="linenos"> 640</span></a> <span class="s2">"VIEW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VIEW</span><span class="p">,</span> -</span><span id="L-641"><a href="#L-641"><span class="linenos"> 641</span></a> <span class="s2">"VOLATILE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VOLATILE</span><span class="p">,</span> -</span><span id="L-642"><a href="#L-642"><span class="linenos"> 642</span></a> <span class="s2">"WHEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WHEN</span><span class="p">,</span> -</span><span id="L-643"><a href="#L-643"><span class="linenos"> 643</span></a> <span class="s2">"WHERE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WHERE</span><span class="p">,</span> -</span><span id="L-644"><a href="#L-644"><span class="linenos"> 644</span></a> <span class="s2">"WINDOW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WINDOW</span><span class="p">,</span> -</span><span id="L-645"><a href="#L-645"><span class="linenos"> 645</span></a> <span class="s2">"WITH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WITH</span><span class="p">,</span> -</span><span id="L-646"><a href="#L-646"><span class="linenos"> 646</span></a> <span class="s2">"APPLY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">APPLY</span><span class="p">,</span> -</span><span id="L-647"><a href="#L-647"><span class="linenos"> 647</span></a> <span class="s2">"ARRAY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ARRAY</span><span class="p">,</span> -</span><span id="L-648"><a href="#L-648"><span class="linenos"> 648</span></a> <span class="s2">"BIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span> -</span><span id="L-649"><a href="#L-649"><span class="linenos"> 649</span></a> <span class="s2">"BOOL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span> -</span><span id="L-650"><a href="#L-650"><span class="linenos"> 650</span></a> <span class="s2">"BOOLEAN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span> -</span><span id="L-651"><a href="#L-651"><span class="linenos"> 651</span></a> <span class="s2">"BYTE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TINYINT</span><span class="p">,</span> -</span><span id="L-652"><a href="#L-652"><span class="linenos"> 652</span></a> <span class="s2">"TINYINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TINYINT</span><span class="p">,</span> -</span><span id="L-653"><a href="#L-653"><span class="linenos"> 653</span></a> <span class="s2">"SHORT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> -</span><span id="L-654"><a href="#L-654"><span class="linenos"> 654</span></a> <span class="s2">"SMALLINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> -</span><span id="L-655"><a href="#L-655"><span class="linenos"> 655</span></a> <span class="s2">"INT2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> -</span><span id="L-656"><a href="#L-656"><span class="linenos"> 656</span></a> <span class="s2">"INTEGER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> -</span><span id="L-657"><a href="#L-657"><span class="linenos"> 657</span></a> <span class="s2">"INT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> -</span><span id="L-658"><a href="#L-658"><span class="linenos"> 658</span></a> <span class="s2">"INT4"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> -</span><span id="L-659"><a href="#L-659"><span class="linenos"> 659</span></a> <span class="s2">"LONG"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> -</span><span id="L-660"><a href="#L-660"><span class="linenos"> 660</span></a> <span class="s2">"BIGINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> -</span><span id="L-661"><a href="#L-661"><span class="linenos"> 661</span></a> <span class="s2">"INT8"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> -</span><span id="L-662"><a href="#L-662"><span class="linenos"> 662</span></a> <span class="s2">"DEC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> -</span><span id="L-663"><a href="#L-663"><span class="linenos"> 663</span></a> <span class="s2">"DECIMAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> -</span><span id="L-664"><a href="#L-664"><span class="linenos"> 664</span></a> <span class="s2">"BIGDECIMAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGDECIMAL</span><span class="p">,</span> -</span><span id="L-665"><a href="#L-665"><span class="linenos"> 665</span></a> <span class="s2">"BIGNUMERIC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGDECIMAL</span><span class="p">,</span> -</span><span id="L-666"><a href="#L-666"><span class="linenos"> 666</span></a> <span class="s2">"MAP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MAP</span><span class="p">,</span> -</span><span id="L-667"><a href="#L-667"><span class="linenos"> 667</span></a> <span class="s2">"NULLABLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULLABLE</span><span class="p">,</span> -</span><span id="L-668"><a href="#L-668"><span class="linenos"> 668</span></a> <span class="s2">"NUMBER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> -</span><span id="L-669"><a href="#L-669"><span class="linenos"> 669</span></a> <span class="s2">"NUMERIC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> -</span><span id="L-670"><a href="#L-670"><span class="linenos"> 670</span></a> <span class="s2">"FIXED"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> -</span><span id="L-671"><a href="#L-671"><span class="linenos"> 671</span></a> <span class="s2">"REAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> -</span><span id="L-672"><a href="#L-672"><span class="linenos"> 672</span></a> <span class="s2">"FLOAT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> -</span><span id="L-673"><a href="#L-673"><span class="linenos"> 673</span></a> <span class="s2">"FLOAT4"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> -</span><span id="L-674"><a href="#L-674"><span class="linenos"> 674</span></a> <span class="s2">"FLOAT8"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> -</span><span id="L-675"><a href="#L-675"><span class="linenos"> 675</span></a> <span class="s2">"DOUBLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> -</span><span id="L-676"><a href="#L-676"><span class="linenos"> 676</span></a> <span class="s2">"DOUBLE PRECISION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> -</span><span id="L-677"><a href="#L-677"><span class="linenos"> 677</span></a> <span class="s2">"JSON"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">JSON</span><span class="p">,</span> -</span><span id="L-678"><a href="#L-678"><span class="linenos"> 678</span></a> <span class="s2">"CHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHAR</span><span class="p">,</span> -</span><span id="L-679"><a href="#L-679"><span class="linenos"> 679</span></a> <span class="s2">"CHARACTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHAR</span><span class="p">,</span> -</span><span id="L-680"><a href="#L-680"><span class="linenos"> 680</span></a> <span class="s2">"NCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NCHAR</span><span class="p">,</span> -</span><span id="L-681"><a href="#L-681"><span class="linenos"> 681</span></a> <span class="s2">"VARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span> -</span><span id="L-682"><a href="#L-682"><span class="linenos"> 682</span></a> <span class="s2">"VARCHAR2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span> -</span><span id="L-683"><a href="#L-683"><span class="linenos"> 683</span></a> <span class="s2">"NVARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NVARCHAR</span><span class="p">,</span> -</span><span id="L-684"><a href="#L-684"><span class="linenos"> 684</span></a> <span class="s2">"NVARCHAR2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NVARCHAR</span><span class="p">,</span> -</span><span id="L-685"><a href="#L-685"><span class="linenos"> 685</span></a> <span class="s2">"STR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> -</span><span id="L-686"><a href="#L-686"><span class="linenos"> 686</span></a> <span class="s2">"STRING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> -</span><span id="L-687"><a href="#L-687"><span class="linenos"> 687</span></a> <span class="s2">"TEXT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> -</span><span id="L-688"><a href="#L-688"><span class="linenos"> 688</span></a> <span class="s2">"CLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> -</span><span id="L-689"><a href="#L-689"><span class="linenos"> 689</span></a> <span class="s2">"LONGVARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> -</span><span id="L-690"><a href="#L-690"><span class="linenos"> 690</span></a> <span class="s2">"BINARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BINARY</span><span class="p">,</span> -</span><span id="L-691"><a href="#L-691"><span class="linenos"> 691</span></a> <span class="s2">"BLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> -</span><span id="L-692"><a href="#L-692"><span class="linenos"> 692</span></a> <span class="s2">"BYTEA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> -</span><span id="L-693"><a href="#L-693"><span class="linenos"> 693</span></a> <span class="s2">"VARBINARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> -</span><span id="L-694"><a href="#L-694"><span class="linenos"> 694</span></a> <span class="s2">"TIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIME</span><span class="p">,</span> -</span><span id="L-695"><a href="#L-695"><span class="linenos"> 695</span></a> <span class="s2">"TIMESTAMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> -</span><span id="L-696"><a href="#L-696"><span class="linenos"> 696</span></a> <span class="s2">"TIMESTAMPTZ"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMPTZ</span><span class="p">,</span> -</span><span id="L-697"><a href="#L-697"><span class="linenos"> 697</span></a> <span class="s2">"TIMESTAMPLTZ"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMPLTZ</span><span class="p">,</span> -</span><span id="L-698"><a href="#L-698"><span class="linenos"> 698</span></a> <span class="s2">"DATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATE</span><span class="p">,</span> -</span><span id="L-699"><a href="#L-699"><span class="linenos"> 699</span></a> <span class="s2">"DATETIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATETIME</span><span class="p">,</span> -</span><span id="L-700"><a href="#L-700"><span class="linenos"> 700</span></a> <span class="s2">"INT4RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT4RANGE</span><span class="p">,</span> -</span><span id="L-701"><a href="#L-701"><span class="linenos"> 701</span></a> <span class="s2">"INT4MULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT4MULTIRANGE</span><span class="p">,</span> -</span><span id="L-702"><a href="#L-702"><span class="linenos"> 702</span></a> <span class="s2">"INT8RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT8RANGE</span><span class="p">,</span> -</span><span id="L-703"><a href="#L-703"><span class="linenos"> 703</span></a> <span class="s2">"INT8MULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT8MULTIRANGE</span><span class="p">,</span> -</span><span id="L-704"><a href="#L-704"><span class="linenos"> 704</span></a> <span class="s2">"NUMRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NUMRANGE</span><span class="p">,</span> -</span><span id="L-705"><a href="#L-705"><span class="linenos"> 705</span></a> <span class="s2">"NUMMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NUMMULTIRANGE</span><span class="p">,</span> -</span><span id="L-706"><a href="#L-706"><span class="linenos"> 706</span></a> <span class="s2">"TSRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSRANGE</span><span class="p">,</span> -</span><span id="L-707"><a href="#L-707"><span class="linenos"> 707</span></a> <span class="s2">"TSMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSMULTIRANGE</span><span class="p">,</span> -</span><span id="L-708"><a href="#L-708"><span class="linenos"> 708</span></a> <span class="s2">"TSTZRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSTZRANGE</span><span class="p">,</span> -</span><span id="L-709"><a href="#L-709"><span class="linenos"> 709</span></a> <span class="s2">"TSTZMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSTZMULTIRANGE</span><span class="p">,</span> -</span><span id="L-710"><a href="#L-710"><span class="linenos"> 710</span></a> <span class="s2">"DATERANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATERANGE</span><span class="p">,</span> -</span><span id="L-711"><a href="#L-711"><span class="linenos"> 711</span></a> <span class="s2">"DATEMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATEMULTIRANGE</span><span class="p">,</span> -</span><span id="L-712"><a href="#L-712"><span class="linenos"> 712</span></a> <span class="s2">"UNIQUE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNIQUE</span><span class="p">,</span> -</span><span id="L-713"><a href="#L-713"><span class="linenos"> 713</span></a> <span class="s2">"STRUCT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STRUCT</span><span class="p">,</span> -</span><span id="L-714"><a href="#L-714"><span class="linenos"> 714</span></a> <span class="s2">"VARIANT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARIANT</span><span class="p">,</span> -</span><span id="L-715"><a href="#L-715"><span class="linenos"> 715</span></a> <span class="s2">"ALTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALTER</span><span class="p">,</span> -</span><span id="L-716"><a href="#L-716"><span class="linenos"> 716</span></a> <span class="s2">"ANALYZE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="L-717"><a href="#L-717"><span class="linenos"> 717</span></a> <span class="s2">"CALL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="L-718"><a href="#L-718"><span class="linenos"> 718</span></a> <span class="s2">"COMMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMENT</span><span class="p">,</span> -</span><span id="L-719"><a href="#L-719"><span class="linenos"> 719</span></a> <span class="s2">"COPY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="L-720"><a href="#L-720"><span class="linenos"> 720</span></a> <span class="s2">"EXPLAIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="L-721"><a href="#L-721"><span class="linenos"> 721</span></a> <span class="s2">"GRANT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="L-722"><a href="#L-722"><span class="linenos"> 722</span></a> <span class="s2">"OPTIMIZE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="L-723"><a href="#L-723"><span class="linenos"> 723</span></a> <span class="s2">"PREPARE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="L-724"><a href="#L-724"><span class="linenos"> 724</span></a> <span class="s2">"TRUNCATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="L-725"><a href="#L-725"><span class="linenos"> 725</span></a> <span class="s2">"VACUUM"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="L-726"><a href="#L-726"><span class="linenos"> 726</span></a> <span class="p">}</span> -</span><span id="L-727"><a href="#L-727"><span class="linenos"> 727</span></a> -</span><span id="L-728"><a href="#L-728"><span class="linenos"> 728</span></a> <span class="n">WHITE_SPACE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span> <span class="n">TokenType</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="L-729"><a href="#L-729"><span class="linenos"> 729</span></a> <span class="s2">" "</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SPACE</span><span class="p">,</span> -</span><span id="L-730"><a href="#L-730"><span class="linenos"> 730</span></a> <span class="s2">"</span><span class="se">\t</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SPACE</span><span class="p">,</span> -</span><span id="L-731"><a href="#L-731"><span class="linenos"> 731</span></a> <span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> -</span><span id="L-732"><a href="#L-732"><span class="linenos"> 732</span></a> <span class="s2">"</span><span class="se">\r</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> -</span><span id="L-733"><a href="#L-733"><span class="linenos"> 733</span></a> <span class="s2">"</span><span class="se">\r\n</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> -</span><span id="L-734"><a href="#L-734"><span class="linenos"> 734</span></a> <span class="p">}</span> -</span><span id="L-735"><a href="#L-735"><span class="linenos"> 735</span></a> -</span><span id="L-736"><a href="#L-736"><span class="linenos"> 736</span></a> <span class="n">COMMANDS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="L-737"><a href="#L-737"><span class="linenos"> 737</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="L-738"><a href="#L-738"><span class="linenos"> 738</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXECUTE</span><span class="p">,</span> -</span><span id="L-739"><a href="#L-739"><span class="linenos"> 739</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">FETCH</span><span class="p">,</span> -</span><span id="L-740"><a href="#L-740"><span class="linenos"> 740</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">SHOW</span><span class="p">,</span> -</span><span id="L-741"><a href="#L-741"><span class="linenos"> 741</span></a> <span class="p">}</span> -</span><span id="L-742"><a href="#L-742"><span class="linenos"> 742</span></a> -</span><span id="L-743"><a href="#L-743"><span class="linenos"> 743</span></a> <span class="n">COMMAND_PREFIX_TOKENS</span> <span class="o">=</span> <span class="p">{</span><span class="n">TokenType</span><span class="o">.</span><span class="n">SEMICOLON</span><span class="p">,</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BEGIN</span><span class="p">}</span> -</span><span id="L-744"><a href="#L-744"><span class="linenos"> 744</span></a> -</span><span id="L-745"><a href="#L-745"><span class="linenos"> 745</span></a> <span class="c1"># handle numeric literals like in hive (3L = BIGINT)</span> -</span><span id="L-746"><a href="#L-746"><span class="linenos"> 746</span></a> <span class="n">NUMERIC_LITERALS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="L-747"><a href="#L-747"><span class="linenos"> 747</span></a> <span class="n">ENCODE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span> +</span><span id="L-470"><a href="#L-470"><span class="linenos"> 470</span></a> <span class="c1"># Autofilled</span> +</span><span id="L-471"><a href="#L-471"><span class="linenos"> 471</span></a> <span class="n">IDENTIFIERS_CAN_START_WITH_DIGIT</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="L-472"><a href="#L-472"><span class="linenos"> 472</span></a> +</span><span id="L-473"><a href="#L-473"><span class="linenos"> 473</span></a> <span class="n">_COMMENTS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="L-474"><a href="#L-474"><span class="linenos"> 474</span></a> <span class="n">_FORMAT_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">TokenType</span><span class="p">]]</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="L-475"><a href="#L-475"><span class="linenos"> 475</span></a> <span class="n">_IDENTIFIERS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="L-476"><a href="#L-476"><span class="linenos"> 476</span></a> <span class="n">_IDENTIFIER_ESCAPES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> +</span><span id="L-477"><a href="#L-477"><span class="linenos"> 477</span></a> <span class="n">_QUOTES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="L-478"><a href="#L-478"><span class="linenos"> 478</span></a> <span class="n">_STRING_ESCAPES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> +</span><span id="L-479"><a href="#L-479"><span class="linenos"> 479</span></a> <span class="n">_KEYWORD_TRIE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="L-480"><a href="#L-480"><span class="linenos"> 480</span></a> +</span><span id="L-481"><a href="#L-481"><span class="linenos"> 481</span></a> <span class="n">KEYWORDS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">TokenType</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="L-482"><a href="#L-482"><span class="linenos"> 482</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="se">{{</span><span class="s2">%</span><span class="si">{</span><span class="n">postfix</span><span class="si">}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_START</span> <span class="k">for</span> <span class="n">postfix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> +</span><span id="L-483"><a href="#L-483"><span class="linenos"> 483</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="s2">%</span><span class="se">}}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_END</span> <span class="k">for</span> <span class="n">prefix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> +</span><span id="L-484"><a href="#L-484"><span class="linenos"> 484</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="se">{{{{</span><span class="si">{</span><span class="n">postfix</span><span class="si">}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_START</span> <span class="k">for</span> <span class="n">postfix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> +</span><span id="L-485"><a href="#L-485"><span class="linenos"> 485</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="se">}}}}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_END</span> <span class="k">for</span> <span class="n">prefix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> +</span><span id="L-486"><a href="#L-486"><span class="linenos"> 486</span></a> <span class="s2">"/*+"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HINT</span><span class="p">,</span> +</span><span id="L-487"><a href="#L-487"><span class="linenos"> 487</span></a> <span class="s2">"=="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EQ</span><span class="p">,</span> +</span><span id="L-488"><a href="#L-488"><span class="linenos"> 488</span></a> <span class="s2">"::"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DCOLON</span><span class="p">,</span> +</span><span id="L-489"><a href="#L-489"><span class="linenos"> 489</span></a> <span class="s2">"||"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DPIPE</span><span class="p">,</span> +</span><span id="L-490"><a href="#L-490"><span class="linenos"> 490</span></a> <span class="s2">">="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GTE</span><span class="p">,</span> +</span><span id="L-491"><a href="#L-491"><span class="linenos"> 491</span></a> <span class="s2">"<="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LTE</span><span class="p">,</span> +</span><span id="L-492"><a href="#L-492"><span class="linenos"> 492</span></a> <span class="s2">"<>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEQ</span><span class="p">,</span> +</span><span id="L-493"><a href="#L-493"><span class="linenos"> 493</span></a> <span class="s2">"!="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEQ</span><span class="p">,</span> +</span><span id="L-494"><a href="#L-494"><span class="linenos"> 494</span></a> <span class="s2">"<=>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULLSAFE_EQ</span><span class="p">,</span> +</span><span id="L-495"><a href="#L-495"><span class="linenos"> 495</span></a> <span class="s2">"->"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ARROW</span><span class="p">,</span> +</span><span id="L-496"><a href="#L-496"><span class="linenos"> 496</span></a> <span class="s2">"->>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DARROW</span><span class="p">,</span> +</span><span id="L-497"><a href="#L-497"><span class="linenos"> 497</span></a> <span class="s2">"=>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FARROW</span><span class="p">,</span> +</span><span id="L-498"><a href="#L-498"><span class="linenos"> 498</span></a> <span class="s2">"#>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HASH_ARROW</span><span class="p">,</span> +</span><span id="L-499"><a href="#L-499"><span class="linenos"> 499</span></a> <span class="s2">"#>>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DHASH_ARROW</span><span class="p">,</span> +</span><span id="L-500"><a href="#L-500"><span class="linenos"> 500</span></a> <span class="s2">"<->"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LR_ARROW</span><span class="p">,</span> +</span><span id="L-501"><a href="#L-501"><span class="linenos"> 501</span></a> <span class="s2">"&&"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DAMP</span><span class="p">,</span> +</span><span id="L-502"><a href="#L-502"><span class="linenos"> 502</span></a> <span class="s2">"ALL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALL</span><span class="p">,</span> +</span><span id="L-503"><a href="#L-503"><span class="linenos"> 503</span></a> <span class="s2">"ALWAYS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALWAYS</span><span class="p">,</span> +</span><span id="L-504"><a href="#L-504"><span class="linenos"> 504</span></a> <span class="s2">"AND"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AND</span><span class="p">,</span> +</span><span id="L-505"><a href="#L-505"><span class="linenos"> 505</span></a> <span class="s2">"ANTI"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANTI</span><span class="p">,</span> +</span><span id="L-506"><a href="#L-506"><span class="linenos"> 506</span></a> <span class="s2">"ANY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANY</span><span class="p">,</span> +</span><span id="L-507"><a href="#L-507"><span class="linenos"> 507</span></a> <span class="s2">"ASC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ASC</span><span class="p">,</span> +</span><span id="L-508"><a href="#L-508"><span class="linenos"> 508</span></a> <span class="s2">"AS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALIAS</span><span class="p">,</span> +</span><span id="L-509"><a href="#L-509"><span class="linenos"> 509</span></a> <span class="s2">"ASOF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ASOF</span><span class="p">,</span> +</span><span id="L-510"><a href="#L-510"><span class="linenos"> 510</span></a> <span class="s2">"AUTOINCREMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AUTO_INCREMENT</span><span class="p">,</span> +</span><span id="L-511"><a href="#L-511"><span class="linenos"> 511</span></a> <span class="s2">"AUTO_INCREMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AUTO_INCREMENT</span><span class="p">,</span> +</span><span id="L-512"><a href="#L-512"><span class="linenos"> 512</span></a> <span class="s2">"BEGIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BEGIN</span><span class="p">,</span> +</span><span id="L-513"><a href="#L-513"><span class="linenos"> 513</span></a> <span class="s2">"BETWEEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BETWEEN</span><span class="p">,</span> +</span><span id="L-514"><a href="#L-514"><span class="linenos"> 514</span></a> <span class="s2">"CACHE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CACHE</span><span class="p">,</span> +</span><span id="L-515"><a href="#L-515"><span class="linenos"> 515</span></a> <span class="s2">"UNCACHE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNCACHE</span><span class="p">,</span> +</span><span id="L-516"><a href="#L-516"><span class="linenos"> 516</span></a> <span class="s2">"CASE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CASE</span><span class="p">,</span> +</span><span id="L-517"><a href="#L-517"><span class="linenos"> 517</span></a> <span class="s2">"CHARACTER SET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHARACTER_SET</span><span class="p">,</span> +</span><span id="L-518"><a href="#L-518"><span class="linenos"> 518</span></a> <span class="s2">"CLUSTER BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CLUSTER_BY</span><span class="p">,</span> +</span><span id="L-519"><a href="#L-519"><span class="linenos"> 519</span></a> <span class="s2">"COLLATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLLATE</span><span class="p">,</span> +</span><span id="L-520"><a href="#L-520"><span class="linenos"> 520</span></a> <span class="s2">"COLUMN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLUMN</span><span class="p">,</span> +</span><span id="L-521"><a href="#L-521"><span class="linenos"> 521</span></a> <span class="s2">"COMMIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMIT</span><span class="p">,</span> +</span><span id="L-522"><a href="#L-522"><span class="linenos"> 522</span></a> <span class="s2">"CONSTRAINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CONSTRAINT</span><span class="p">,</span> +</span><span id="L-523"><a href="#L-523"><span class="linenos"> 523</span></a> <span class="s2">"CREATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CREATE</span><span class="p">,</span> +</span><span id="L-524"><a href="#L-524"><span class="linenos"> 524</span></a> <span class="s2">"CROSS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CROSS</span><span class="p">,</span> +</span><span id="L-525"><a href="#L-525"><span class="linenos"> 525</span></a> <span class="s2">"CUBE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CUBE</span><span class="p">,</span> +</span><span id="L-526"><a href="#L-526"><span class="linenos"> 526</span></a> <span class="s2">"CURRENT_DATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_DATE</span><span class="p">,</span> +</span><span id="L-527"><a href="#L-527"><span class="linenos"> 527</span></a> <span class="s2">"CURRENT_TIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_TIME</span><span class="p">,</span> +</span><span id="L-528"><a href="#L-528"><span class="linenos"> 528</span></a> <span class="s2">"CURRENT_TIMESTAMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_TIMESTAMP</span><span class="p">,</span> +</span><span id="L-529"><a href="#L-529"><span class="linenos"> 529</span></a> <span class="s2">"CURRENT_USER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_USER</span><span class="p">,</span> +</span><span id="L-530"><a href="#L-530"><span class="linenos"> 530</span></a> <span class="s2">"DATABASE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATABASE</span><span class="p">,</span> +</span><span id="L-531"><a href="#L-531"><span class="linenos"> 531</span></a> <span class="s2">"DEFAULT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DEFAULT</span><span class="p">,</span> +</span><span id="L-532"><a href="#L-532"><span class="linenos"> 532</span></a> <span class="s2">"DELETE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DELETE</span><span class="p">,</span> +</span><span id="L-533"><a href="#L-533"><span class="linenos"> 533</span></a> <span class="s2">"DESC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DESC</span><span class="p">,</span> +</span><span id="L-534"><a href="#L-534"><span class="linenos"> 534</span></a> <span class="s2">"DESCRIBE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DESCRIBE</span><span class="p">,</span> +</span><span id="L-535"><a href="#L-535"><span class="linenos"> 535</span></a> <span class="s2">"DISTINCT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DISTINCT</span><span class="p">,</span> +</span><span id="L-536"><a href="#L-536"><span class="linenos"> 536</span></a> <span class="s2">"DISTRIBUTE BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DISTRIBUTE_BY</span><span class="p">,</span> +</span><span id="L-537"><a href="#L-537"><span class="linenos"> 537</span></a> <span class="s2">"DIV"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DIV</span><span class="p">,</span> +</span><span id="L-538"><a href="#L-538"><span class="linenos"> 538</span></a> <span class="s2">"DROP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DROP</span><span class="p">,</span> +</span><span id="L-539"><a href="#L-539"><span class="linenos"> 539</span></a> <span class="s2">"ELSE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ELSE</span><span class="p">,</span> +</span><span id="L-540"><a href="#L-540"><span class="linenos"> 540</span></a> <span class="s2">"END"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">END</span><span class="p">,</span> +</span><span id="L-541"><a href="#L-541"><span class="linenos"> 541</span></a> <span class="s2">"ESCAPE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ESCAPE</span><span class="p">,</span> +</span><span id="L-542"><a href="#L-542"><span class="linenos"> 542</span></a> <span class="s2">"EXCEPT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXCEPT</span><span class="p">,</span> +</span><span id="L-543"><a href="#L-543"><span class="linenos"> 543</span></a> <span class="s2">"EXECUTE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXECUTE</span><span class="p">,</span> +</span><span id="L-544"><a href="#L-544"><span class="linenos"> 544</span></a> <span class="s2">"EXISTS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXISTS</span><span class="p">,</span> +</span><span id="L-545"><a href="#L-545"><span class="linenos"> 545</span></a> <span class="s2">"FALSE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FALSE</span><span class="p">,</span> +</span><span id="L-546"><a href="#L-546"><span class="linenos"> 546</span></a> <span class="s2">"FETCH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FETCH</span><span class="p">,</span> +</span><span id="L-547"><a href="#L-547"><span class="linenos"> 547</span></a> <span class="s2">"FILTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FILTER</span><span class="p">,</span> +</span><span id="L-548"><a href="#L-548"><span class="linenos"> 548</span></a> <span class="s2">"FIRST"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FIRST</span><span class="p">,</span> +</span><span id="L-549"><a href="#L-549"><span class="linenos"> 549</span></a> <span class="s2">"FULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FULL</span><span class="p">,</span> +</span><span id="L-550"><a href="#L-550"><span class="linenos"> 550</span></a> <span class="s2">"FUNCTION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FUNCTION</span><span class="p">,</span> +</span><span id="L-551"><a href="#L-551"><span class="linenos"> 551</span></a> <span class="s2">"FOR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FOR</span><span class="p">,</span> +</span><span id="L-552"><a href="#L-552"><span class="linenos"> 552</span></a> <span class="s2">"FOREIGN KEY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FOREIGN_KEY</span><span class="p">,</span> +</span><span id="L-553"><a href="#L-553"><span class="linenos"> 553</span></a> <span class="s2">"FORMAT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FORMAT</span><span class="p">,</span> +</span><span id="L-554"><a href="#L-554"><span class="linenos"> 554</span></a> <span class="s2">"FROM"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FROM</span><span class="p">,</span> +</span><span id="L-555"><a href="#L-555"><span class="linenos"> 555</span></a> <span class="s2">"GEOGRAPHY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GEOGRAPHY</span><span class="p">,</span> +</span><span id="L-556"><a href="#L-556"><span class="linenos"> 556</span></a> <span class="s2">"GEOMETRY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GEOMETRY</span><span class="p">,</span> +</span><span id="L-557"><a href="#L-557"><span class="linenos"> 557</span></a> <span class="s2">"GLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GLOB</span><span class="p">,</span> +</span><span id="L-558"><a href="#L-558"><span class="linenos"> 558</span></a> <span class="s2">"GROUP BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GROUP_BY</span><span class="p">,</span> +</span><span id="L-559"><a href="#L-559"><span class="linenos"> 559</span></a> <span class="s2">"GROUPING SETS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GROUPING_SETS</span><span class="p">,</span> +</span><span id="L-560"><a href="#L-560"><span class="linenos"> 560</span></a> <span class="s2">"HAVING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HAVING</span><span class="p">,</span> +</span><span id="L-561"><a href="#L-561"><span class="linenos"> 561</span></a> <span class="s2">"IF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IF</span><span class="p">,</span> +</span><span id="L-562"><a href="#L-562"><span class="linenos"> 562</span></a> <span class="s2">"ILIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ILIKE</span><span class="p">,</span> +</span><span id="L-563"><a href="#L-563"><span class="linenos"> 563</span></a> <span class="s2">"IN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IN</span><span class="p">,</span> +</span><span id="L-564"><a href="#L-564"><span class="linenos"> 564</span></a> <span class="s2">"INDEX"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INDEX</span><span class="p">,</span> +</span><span id="L-565"><a href="#L-565"><span class="linenos"> 565</span></a> <span class="s2">"INET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INET</span><span class="p">,</span> +</span><span id="L-566"><a href="#L-566"><span class="linenos"> 566</span></a> <span class="s2">"INNER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INNER</span><span class="p">,</span> +</span><span id="L-567"><a href="#L-567"><span class="linenos"> 567</span></a> <span class="s2">"INSERT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INSERT</span><span class="p">,</span> +</span><span id="L-568"><a href="#L-568"><span class="linenos"> 568</span></a> <span class="s2">"INTERVAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTERVAL</span><span class="p">,</span> +</span><span id="L-569"><a href="#L-569"><span class="linenos"> 569</span></a> <span class="s2">"INTERSECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTERSECT</span><span class="p">,</span> +</span><span id="L-570"><a href="#L-570"><span class="linenos"> 570</span></a> <span class="s2">"INTO"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTO</span><span class="p">,</span> +</span><span id="L-571"><a href="#L-571"><span class="linenos"> 571</span></a> <span class="s2">"IS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IS</span><span class="p">,</span> +</span><span id="L-572"><a href="#L-572"><span class="linenos"> 572</span></a> <span class="s2">"ISNULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ISNULL</span><span class="p">,</span> +</span><span id="L-573"><a href="#L-573"><span class="linenos"> 573</span></a> <span class="s2">"JOIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">JOIN</span><span class="p">,</span> +</span><span id="L-574"><a href="#L-574"><span class="linenos"> 574</span></a> <span class="s2">"KEEP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">KEEP</span><span class="p">,</span> +</span><span id="L-575"><a href="#L-575"><span class="linenos"> 575</span></a> <span class="s2">"LATERAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LATERAL</span><span class="p">,</span> +</span><span id="L-576"><a href="#L-576"><span class="linenos"> 576</span></a> <span class="s2">"LEFT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LEFT</span><span class="p">,</span> +</span><span id="L-577"><a href="#L-577"><span class="linenos"> 577</span></a> <span class="s2">"LIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LIKE</span><span class="p">,</span> +</span><span id="L-578"><a href="#L-578"><span class="linenos"> 578</span></a> <span class="s2">"LIMIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LIMIT</span><span class="p">,</span> +</span><span id="L-579"><a href="#L-579"><span class="linenos"> 579</span></a> <span class="s2">"LOAD"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LOAD</span><span class="p">,</span> +</span><span id="L-580"><a href="#L-580"><span class="linenos"> 580</span></a> <span class="s2">"LOCK"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LOCK</span><span class="p">,</span> +</span><span id="L-581"><a href="#L-581"><span class="linenos"> 581</span></a> <span class="s2">"MERGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MERGE</span><span class="p">,</span> +</span><span id="L-582"><a href="#L-582"><span class="linenos"> 582</span></a> <span class="s2">"NATURAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NATURAL</span><span class="p">,</span> +</span><span id="L-583"><a href="#L-583"><span class="linenos"> 583</span></a> <span class="s2">"NEXT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEXT</span><span class="p">,</span> +</span><span id="L-584"><a href="#L-584"><span class="linenos"> 584</span></a> <span class="s2">"NEXT VALUE FOR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEXT_VALUE_FOR</span><span class="p">,</span> +</span><span id="L-585"><a href="#L-585"><span class="linenos"> 585</span></a> <span class="s2">"NOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOT</span><span class="p">,</span> +</span><span id="L-586"><a href="#L-586"><span class="linenos"> 586</span></a> <span class="s2">"NOTNULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOTNULL</span><span class="p">,</span> +</span><span id="L-587"><a href="#L-587"><span class="linenos"> 587</span></a> <span class="s2">"NULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULL</span><span class="p">,</span> +</span><span id="L-588"><a href="#L-588"><span class="linenos"> 588</span></a> <span class="s2">"OBJECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OBJECT</span><span class="p">,</span> +</span><span id="L-589"><a href="#L-589"><span class="linenos"> 589</span></a> <span class="s2">"OFFSET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OFFSET</span><span class="p">,</span> +</span><span id="L-590"><a href="#L-590"><span class="linenos"> 590</span></a> <span class="s2">"ON"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ON</span><span class="p">,</span> +</span><span id="L-591"><a href="#L-591"><span class="linenos"> 591</span></a> <span class="s2">"OR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OR</span><span class="p">,</span> +</span><span id="L-592"><a href="#L-592"><span class="linenos"> 592</span></a> <span class="s2">"ORDER BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ORDER_BY</span><span class="p">,</span> +</span><span id="L-593"><a href="#L-593"><span class="linenos"> 593</span></a> <span class="s2">"ORDINALITY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ORDINALITY</span><span class="p">,</span> +</span><span id="L-594"><a href="#L-594"><span class="linenos"> 594</span></a> <span class="s2">"OUTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OUTER</span><span class="p">,</span> +</span><span id="L-595"><a href="#L-595"><span class="linenos"> 595</span></a> <span class="s2">"OVER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVER</span><span class="p">,</span> +</span><span id="L-596"><a href="#L-596"><span class="linenos"> 596</span></a> <span class="s2">"OVERLAPS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVERLAPS</span><span class="p">,</span> +</span><span id="L-597"><a href="#L-597"><span class="linenos"> 597</span></a> <span class="s2">"OVERWRITE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVERWRITE</span><span class="p">,</span> +</span><span id="L-598"><a href="#L-598"><span class="linenos"> 598</span></a> <span class="s2">"PARTITION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION</span><span class="p">,</span> +</span><span id="L-599"><a href="#L-599"><span class="linenos"> 599</span></a> <span class="s2">"PARTITION BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> +</span><span id="L-600"><a href="#L-600"><span class="linenos"> 600</span></a> <span class="s2">"PARTITIONED BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> +</span><span id="L-601"><a href="#L-601"><span class="linenos"> 601</span></a> <span class="s2">"PARTITIONED_BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> +</span><span id="L-602"><a href="#L-602"><span class="linenos"> 602</span></a> <span class="s2">"PERCENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PERCENT</span><span class="p">,</span> +</span><span id="L-603"><a href="#L-603"><span class="linenos"> 603</span></a> <span class="s2">"PIVOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIVOT</span><span class="p">,</span> +</span><span id="L-604"><a href="#L-604"><span class="linenos"> 604</span></a> <span class="s2">"PRAGMA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PRAGMA</span><span class="p">,</span> +</span><span id="L-605"><a href="#L-605"><span class="linenos"> 605</span></a> <span class="s2">"PRIMARY KEY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PRIMARY_KEY</span><span class="p">,</span> +</span><span id="L-606"><a href="#L-606"><span class="linenos"> 606</span></a> <span class="s2">"PROCEDURE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PROCEDURE</span><span class="p">,</span> +</span><span id="L-607"><a href="#L-607"><span class="linenos"> 607</span></a> <span class="s2">"QUALIFY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">QUALIFY</span><span class="p">,</span> +</span><span id="L-608"><a href="#L-608"><span class="linenos"> 608</span></a> <span class="s2">"RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RANGE</span><span class="p">,</span> +</span><span id="L-609"><a href="#L-609"><span class="linenos"> 609</span></a> <span class="s2">"RECURSIVE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RECURSIVE</span><span class="p">,</span> +</span><span id="L-610"><a href="#L-610"><span class="linenos"> 610</span></a> <span class="s2">"REGEXP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RLIKE</span><span class="p">,</span> +</span><span id="L-611"><a href="#L-611"><span class="linenos"> 611</span></a> <span class="s2">"REPLACE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REPLACE</span><span class="p">,</span> +</span><span id="L-612"><a href="#L-612"><span class="linenos"> 612</span></a> <span class="s2">"RETURNING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RETURNING</span><span class="p">,</span> +</span><span id="L-613"><a href="#L-613"><span class="linenos"> 613</span></a> <span class="s2">"REFERENCES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REFERENCES</span><span class="p">,</span> +</span><span id="L-614"><a href="#L-614"><span class="linenos"> 614</span></a> <span class="s2">"RIGHT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RIGHT</span><span class="p">,</span> +</span><span id="L-615"><a href="#L-615"><span class="linenos"> 615</span></a> <span class="s2">"RLIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RLIKE</span><span class="p">,</span> +</span><span id="L-616"><a href="#L-616"><span class="linenos"> 616</span></a> <span class="s2">"ROLLBACK"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROLLBACK</span><span class="p">,</span> +</span><span id="L-617"><a href="#L-617"><span class="linenos"> 617</span></a> <span class="s2">"ROLLUP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROLLUP</span><span class="p">,</span> +</span><span id="L-618"><a href="#L-618"><span class="linenos"> 618</span></a> <span class="s2">"ROW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROW</span><span class="p">,</span> +</span><span id="L-619"><a href="#L-619"><span class="linenos"> 619</span></a> <span class="s2">"ROWS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROWS</span><span class="p">,</span> +</span><span id="L-620"><a href="#L-620"><span class="linenos"> 620</span></a> <span class="s2">"SCHEMA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SCHEMA</span><span class="p">,</span> +</span><span id="L-621"><a href="#L-621"><span class="linenos"> 621</span></a> <span class="s2">"SELECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SELECT</span><span class="p">,</span> +</span><span id="L-622"><a href="#L-622"><span class="linenos"> 622</span></a> <span class="s2">"SEMI"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMI</span><span class="p">,</span> +</span><span id="L-623"><a href="#L-623"><span class="linenos"> 623</span></a> <span class="s2">"SET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SET</span><span class="p">,</span> +</span><span id="L-624"><a href="#L-624"><span class="linenos"> 624</span></a> <span class="s2">"SETTINGS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SETTINGS</span><span class="p">,</span> +</span><span id="L-625"><a href="#L-625"><span class="linenos"> 625</span></a> <span class="s2">"SHOW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SHOW</span><span class="p">,</span> +</span><span id="L-626"><a href="#L-626"><span class="linenos"> 626</span></a> <span class="s2">"SIMILAR TO"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SIMILAR_TO</span><span class="p">,</span> +</span><span id="L-627"><a href="#L-627"><span class="linenos"> 627</span></a> <span class="s2">"SOME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SOME</span><span class="p">,</span> +</span><span id="L-628"><a href="#L-628"><span class="linenos"> 628</span></a> <span class="s2">"SORT BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SORT_BY</span><span class="p">,</span> +</span><span id="L-629"><a href="#L-629"><span class="linenos"> 629</span></a> <span class="s2">"TABLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TABLE</span><span class="p">,</span> +</span><span id="L-630"><a href="#L-630"><span class="linenos"> 630</span></a> <span class="s2">"TABLESAMPLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TABLE_SAMPLE</span><span class="p">,</span> +</span><span id="L-631"><a href="#L-631"><span class="linenos"> 631</span></a> <span class="s2">"TEMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEMPORARY</span><span class="p">,</span> +</span><span id="L-632"><a href="#L-632"><span class="linenos"> 632</span></a> <span class="s2">"TEMPORARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEMPORARY</span><span class="p">,</span> +</span><span id="L-633"><a href="#L-633"><span class="linenos"> 633</span></a> <span class="s2">"THEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">THEN</span><span class="p">,</span> +</span><span id="L-634"><a href="#L-634"><span class="linenos"> 634</span></a> <span class="s2">"TRUE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TRUE</span><span class="p">,</span> +</span><span id="L-635"><a href="#L-635"><span class="linenos"> 635</span></a> <span class="s2">"UNION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNION</span><span class="p">,</span> +</span><span id="L-636"><a href="#L-636"><span class="linenos"> 636</span></a> <span class="s2">"UNNEST"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNNEST</span><span class="p">,</span> +</span><span id="L-637"><a href="#L-637"><span class="linenos"> 637</span></a> <span class="s2">"UNPIVOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNPIVOT</span><span class="p">,</span> +</span><span id="L-638"><a href="#L-638"><span class="linenos"> 638</span></a> <span class="s2">"UPDATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UPDATE</span><span class="p">,</span> +</span><span id="L-639"><a href="#L-639"><span class="linenos"> 639</span></a> <span class="s2">"USE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USE</span><span class="p">,</span> +</span><span id="L-640"><a href="#L-640"><span class="linenos"> 640</span></a> <span class="s2">"USING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USING</span><span class="p">,</span> +</span><span id="L-641"><a href="#L-641"><span class="linenos"> 641</span></a> <span class="s2">"UUID"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UUID</span><span class="p">,</span> +</span><span id="L-642"><a href="#L-642"><span class="linenos"> 642</span></a> <span class="s2">"VALUES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VALUES</span><span class="p">,</span> +</span><span id="L-643"><a href="#L-643"><span class="linenos"> 643</span></a> <span class="s2">"VIEW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VIEW</span><span class="p">,</span> +</span><span id="L-644"><a href="#L-644"><span class="linenos"> 644</span></a> <span class="s2">"VOLATILE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VOLATILE</span><span class="p">,</span> +</span><span id="L-645"><a href="#L-645"><span class="linenos"> 645</span></a> <span class="s2">"WHEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WHEN</span><span class="p">,</span> +</span><span id="L-646"><a href="#L-646"><span class="linenos"> 646</span></a> <span class="s2">"WHERE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WHERE</span><span class="p">,</span> +</span><span id="L-647"><a href="#L-647"><span class="linenos"> 647</span></a> <span class="s2">"WINDOW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WINDOW</span><span class="p">,</span> +</span><span id="L-648"><a href="#L-648"><span class="linenos"> 648</span></a> <span class="s2">"WITH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WITH</span><span class="p">,</span> +</span><span id="L-649"><a href="#L-649"><span class="linenos"> 649</span></a> <span class="s2">"APPLY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">APPLY</span><span class="p">,</span> +</span><span id="L-650"><a href="#L-650"><span class="linenos"> 650</span></a> <span class="s2">"ARRAY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ARRAY</span><span class="p">,</span> +</span><span id="L-651"><a href="#L-651"><span class="linenos"> 651</span></a> <span class="s2">"BIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span> +</span><span id="L-652"><a href="#L-652"><span class="linenos"> 652</span></a> <span class="s2">"BOOL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span> +</span><span id="L-653"><a href="#L-653"><span class="linenos"> 653</span></a> <span class="s2">"BOOLEAN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span> +</span><span id="L-654"><a href="#L-654"><span class="linenos"> 654</span></a> <span class="s2">"BYTE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TINYINT</span><span class="p">,</span> +</span><span id="L-655"><a href="#L-655"><span class="linenos"> 655</span></a> <span class="s2">"TINYINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TINYINT</span><span class="p">,</span> +</span><span id="L-656"><a href="#L-656"><span class="linenos"> 656</span></a> <span class="s2">"SHORT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> +</span><span id="L-657"><a href="#L-657"><span class="linenos"> 657</span></a> <span class="s2">"SMALLINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> +</span><span id="L-658"><a href="#L-658"><span class="linenos"> 658</span></a> <span class="s2">"INT2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> +</span><span id="L-659"><a href="#L-659"><span class="linenos"> 659</span></a> <span class="s2">"INTEGER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> +</span><span id="L-660"><a href="#L-660"><span class="linenos"> 660</span></a> <span class="s2">"INT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> +</span><span id="L-661"><a href="#L-661"><span class="linenos"> 661</span></a> <span class="s2">"INT4"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> +</span><span id="L-662"><a href="#L-662"><span class="linenos"> 662</span></a> <span class="s2">"LONG"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> +</span><span id="L-663"><a href="#L-663"><span class="linenos"> 663</span></a> <span class="s2">"BIGINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> +</span><span id="L-664"><a href="#L-664"><span class="linenos"> 664</span></a> <span class="s2">"INT8"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> +</span><span id="L-665"><a href="#L-665"><span class="linenos"> 665</span></a> <span class="s2">"DEC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> +</span><span id="L-666"><a href="#L-666"><span class="linenos"> 666</span></a> <span class="s2">"DECIMAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> +</span><span id="L-667"><a href="#L-667"><span class="linenos"> 667</span></a> <span class="s2">"BIGDECIMAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGDECIMAL</span><span class="p">,</span> +</span><span id="L-668"><a href="#L-668"><span class="linenos"> 668</span></a> <span class="s2">"BIGNUMERIC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGDECIMAL</span><span class="p">,</span> +</span><span id="L-669"><a href="#L-669"><span class="linenos"> 669</span></a> <span class="s2">"MAP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MAP</span><span class="p">,</span> +</span><span id="L-670"><a href="#L-670"><span class="linenos"> 670</span></a> <span class="s2">"NULLABLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULLABLE</span><span class="p">,</span> +</span><span id="L-671"><a href="#L-671"><span class="linenos"> 671</span></a> <span class="s2">"NUMBER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> +</span><span id="L-672"><a href="#L-672"><span class="linenos"> 672</span></a> <span class="s2">"NUMERIC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> +</span><span id="L-673"><a href="#L-673"><span class="linenos"> 673</span></a> <span class="s2">"FIXED"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> +</span><span id="L-674"><a href="#L-674"><span class="linenos"> 674</span></a> <span class="s2">"REAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> +</span><span id="L-675"><a href="#L-675"><span class="linenos"> 675</span></a> <span class="s2">"FLOAT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> +</span><span id="L-676"><a href="#L-676"><span class="linenos"> 676</span></a> <span class="s2">"FLOAT4"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> +</span><span id="L-677"><a href="#L-677"><span class="linenos"> 677</span></a> <span class="s2">"FLOAT8"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> +</span><span id="L-678"><a href="#L-678"><span class="linenos"> 678</span></a> <span class="s2">"DOUBLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> +</span><span id="L-679"><a href="#L-679"><span class="linenos"> 679</span></a> <span class="s2">"DOUBLE PRECISION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> +</span><span id="L-680"><a href="#L-680"><span class="linenos"> 680</span></a> <span class="s2">"JSON"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">JSON</span><span class="p">,</span> +</span><span id="L-681"><a href="#L-681"><span class="linenos"> 681</span></a> <span class="s2">"CHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHAR</span><span class="p">,</span> +</span><span id="L-682"><a href="#L-682"><span class="linenos"> 682</span></a> <span class="s2">"CHARACTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHAR</span><span class="p">,</span> +</span><span id="L-683"><a href="#L-683"><span class="linenos"> 683</span></a> <span class="s2">"NCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NCHAR</span><span class="p">,</span> +</span><span id="L-684"><a href="#L-684"><span class="linenos"> 684</span></a> <span class="s2">"VARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span> +</span><span id="L-685"><a href="#L-685"><span class="linenos"> 685</span></a> <span class="s2">"VARCHAR2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span> +</span><span id="L-686"><a href="#L-686"><span class="linenos"> 686</span></a> <span class="s2">"NVARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NVARCHAR</span><span class="p">,</span> +</span><span id="L-687"><a href="#L-687"><span class="linenos"> 687</span></a> <span class="s2">"NVARCHAR2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NVARCHAR</span><span class="p">,</span> +</span><span id="L-688"><a href="#L-688"><span class="linenos"> 688</span></a> <span class="s2">"STR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> +</span><span id="L-689"><a href="#L-689"><span class="linenos"> 689</span></a> <span class="s2">"STRING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> +</span><span id="L-690"><a href="#L-690"><span class="linenos"> 690</span></a> <span class="s2">"TEXT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> +</span><span id="L-691"><a href="#L-691"><span class="linenos"> 691</span></a> <span class="s2">"CLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> +</span><span id="L-692"><a href="#L-692"><span class="linenos"> 692</span></a> <span class="s2">"LONGVARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> +</span><span id="L-693"><a href="#L-693"><span class="linenos"> 693</span></a> <span class="s2">"BINARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BINARY</span><span class="p">,</span> +</span><span id="L-694"><a href="#L-694"><span class="linenos"> 694</span></a> <span class="s2">"BLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> +</span><span id="L-695"><a href="#L-695"><span class="linenos"> 695</span></a> <span class="s2">"BYTEA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> +</span><span id="L-696"><a href="#L-696"><span class="linenos"> 696</span></a> <span class="s2">"VARBINARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> +</span><span id="L-697"><a href="#L-697"><span class="linenos"> 697</span></a> <span class="s2">"TIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIME</span><span class="p">,</span> +</span><span id="L-698"><a href="#L-698"><span class="linenos"> 698</span></a> <span class="s2">"TIMESTAMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> +</span><span id="L-699"><a href="#L-699"><span class="linenos"> 699</span></a> <span class="s2">"TIMESTAMPTZ"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMPTZ</span><span class="p">,</span> +</span><span id="L-700"><a href="#L-700"><span class="linenos"> 700</span></a> <span class="s2">"TIMESTAMPLTZ"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMPLTZ</span><span class="p">,</span> +</span><span id="L-701"><a href="#L-701"><span class="linenos"> 701</span></a> <span class="s2">"DATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATE</span><span class="p">,</span> +</span><span id="L-702"><a href="#L-702"><span class="linenos"> 702</span></a> <span class="s2">"DATETIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATETIME</span><span class="p">,</span> +</span><span id="L-703"><a href="#L-703"><span class="linenos"> 703</span></a> <span class="s2">"INT4RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT4RANGE</span><span class="p">,</span> +</span><span id="L-704"><a href="#L-704"><span class="linenos"> 704</span></a> <span class="s2">"INT4MULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT4MULTIRANGE</span><span class="p">,</span> +</span><span id="L-705"><a href="#L-705"><span class="linenos"> 705</span></a> <span class="s2">"INT8RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT8RANGE</span><span class="p">,</span> +</span><span id="L-706"><a href="#L-706"><span class="linenos"> 706</span></a> <span class="s2">"INT8MULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT8MULTIRANGE</span><span class="p">,</span> +</span><span id="L-707"><a href="#L-707"><span class="linenos"> 707</span></a> <span class="s2">"NUMRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NUMRANGE</span><span class="p">,</span> +</span><span id="L-708"><a href="#L-708"><span class="linenos"> 708</span></a> <span class="s2">"NUMMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NUMMULTIRANGE</span><span class="p">,</span> +</span><span id="L-709"><a href="#L-709"><span class="linenos"> 709</span></a> <span class="s2">"TSRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSRANGE</span><span class="p">,</span> +</span><span id="L-710"><a href="#L-710"><span class="linenos"> 710</span></a> <span class="s2">"TSMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSMULTIRANGE</span><span class="p">,</span> +</span><span id="L-711"><a href="#L-711"><span class="linenos"> 711</span></a> <span class="s2">"TSTZRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSTZRANGE</span><span class="p">,</span> +</span><span id="L-712"><a href="#L-712"><span class="linenos"> 712</span></a> <span class="s2">"TSTZMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSTZMULTIRANGE</span><span class="p">,</span> +</span><span id="L-713"><a href="#L-713"><span class="linenos"> 713</span></a> <span class="s2">"DATERANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATERANGE</span><span class="p">,</span> +</span><span id="L-714"><a href="#L-714"><span class="linenos"> 714</span></a> <span class="s2">"DATEMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATEMULTIRANGE</span><span class="p">,</span> +</span><span id="L-715"><a href="#L-715"><span class="linenos"> 715</span></a> <span class="s2">"UNIQUE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNIQUE</span><span class="p">,</span> +</span><span id="L-716"><a href="#L-716"><span class="linenos"> 716</span></a> <span class="s2">"STRUCT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STRUCT</span><span class="p">,</span> +</span><span id="L-717"><a href="#L-717"><span class="linenos"> 717</span></a> <span class="s2">"VARIANT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARIANT</span><span class="p">,</span> +</span><span id="L-718"><a href="#L-718"><span class="linenos"> 718</span></a> <span class="s2">"ALTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALTER</span><span class="p">,</span> +</span><span id="L-719"><a href="#L-719"><span class="linenos"> 719</span></a> <span class="s2">"ANALYZE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="L-720"><a href="#L-720"><span class="linenos"> 720</span></a> <span class="s2">"CALL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="L-721"><a href="#L-721"><span class="linenos"> 721</span></a> <span class="s2">"COMMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMENT</span><span class="p">,</span> +</span><span id="L-722"><a href="#L-722"><span class="linenos"> 722</span></a> <span class="s2">"COPY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="L-723"><a href="#L-723"><span class="linenos"> 723</span></a> <span class="s2">"EXPLAIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="L-724"><a href="#L-724"><span class="linenos"> 724</span></a> <span class="s2">"GRANT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="L-725"><a href="#L-725"><span class="linenos"> 725</span></a> <span class="s2">"OPTIMIZE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="L-726"><a href="#L-726"><span class="linenos"> 726</span></a> <span class="s2">"PREPARE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="L-727"><a href="#L-727"><span class="linenos"> 727</span></a> <span class="s2">"TRUNCATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="L-728"><a href="#L-728"><span class="linenos"> 728</span></a> <span class="s2">"VACUUM"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="L-729"><a href="#L-729"><span class="linenos"> 729</span></a> <span class="s2">"USER-DEFINED"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USERDEFINED</span><span class="p">,</span> +</span><span id="L-730"><a href="#L-730"><span class="linenos"> 730</span></a> <span class="p">}</span> +</span><span id="L-731"><a href="#L-731"><span class="linenos"> 731</span></a> +</span><span id="L-732"><a href="#L-732"><span class="linenos"> 732</span></a> <span class="n">WHITE_SPACE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span> <span class="n">TokenType</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="L-733"><a href="#L-733"><span class="linenos"> 733</span></a> <span class="s2">" "</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SPACE</span><span class="p">,</span> +</span><span id="L-734"><a href="#L-734"><span class="linenos"> 734</span></a> <span class="s2">"</span><span class="se">\t</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SPACE</span><span class="p">,</span> +</span><span id="L-735"><a href="#L-735"><span class="linenos"> 735</span></a> <span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> +</span><span id="L-736"><a href="#L-736"><span class="linenos"> 736</span></a> <span class="s2">"</span><span class="se">\r</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> +</span><span id="L-737"><a href="#L-737"><span class="linenos"> 737</span></a> <span class="s2">"</span><span class="se">\r\n</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> +</span><span id="L-738"><a href="#L-738"><span class="linenos"> 738</span></a> <span class="p">}</span> +</span><span id="L-739"><a href="#L-739"><span class="linenos"> 739</span></a> +</span><span id="L-740"><a href="#L-740"><span class="linenos"> 740</span></a> <span class="n">COMMANDS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="L-741"><a href="#L-741"><span class="linenos"> 741</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="L-742"><a href="#L-742"><span class="linenos"> 742</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXECUTE</span><span class="p">,</span> +</span><span id="L-743"><a href="#L-743"><span class="linenos"> 743</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">FETCH</span><span class="p">,</span> +</span><span id="L-744"><a href="#L-744"><span class="linenos"> 744</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">SHOW</span><span class="p">,</span> +</span><span id="L-745"><a href="#L-745"><span class="linenos"> 745</span></a> <span class="p">}</span> +</span><span id="L-746"><a href="#L-746"><span class="linenos"> 746</span></a> +</span><span id="L-747"><a href="#L-747"><span class="linenos"> 747</span></a> <span class="n">COMMAND_PREFIX_TOKENS</span> <span class="o">=</span> <span class="p">{</span><span class="n">TokenType</span><span class="o">.</span><span class="n">SEMICOLON</span><span class="p">,</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BEGIN</span><span class="p">}</span> </span><span id="L-748"><a href="#L-748"><span class="linenos"> 748</span></a> -</span><span id="L-749"><a href="#L-749"><span class="linenos"> 749</span></a> <span class="n">COMMENTS</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"--"</span><span class="p">,</span> <span class="p">(</span><span class="s2">"/*"</span><span class="p">,</span> <span class="s2">"*/"</span><span class="p">)]</span> -</span><span id="L-750"><a href="#L-750"><span class="linenos"> 750</span></a> -</span><span id="L-751"><a href="#L-751"><span class="linenos"> 751</span></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span> -</span><span id="L-752"><a href="#L-752"><span class="linenos"> 752</span></a> <span class="s2">"sql"</span><span class="p">,</span> -</span><span id="L-753"><a href="#L-753"><span class="linenos"> 753</span></a> <span class="s2">"size"</span><span class="p">,</span> -</span><span id="L-754"><a href="#L-754"><span class="linenos"> 754</span></a> <span class="s2">"tokens"</span><span class="p">,</span> -</span><span id="L-755"><a href="#L-755"><span class="linenos"> 755</span></a> <span class="s2">"_start"</span><span class="p">,</span> -</span><span id="L-756"><a href="#L-756"><span class="linenos"> 756</span></a> <span class="s2">"_current"</span><span class="p">,</span> -</span><span id="L-757"><a href="#L-757"><span class="linenos"> 757</span></a> <span class="s2">"_line"</span><span class="p">,</span> -</span><span id="L-758"><a href="#L-758"><span class="linenos"> 758</span></a> <span class="s2">"_col"</span><span class="p">,</span> -</span><span id="L-759"><a href="#L-759"><span class="linenos"> 759</span></a> <span class="s2">"_comments"</span><span class="p">,</span> -</span><span id="L-760"><a href="#L-760"><span class="linenos"> 760</span></a> <span class="s2">"_char"</span><span class="p">,</span> -</span><span id="L-761"><a href="#L-761"><span class="linenos"> 761</span></a> <span class="s2">"_end"</span><span class="p">,</span> -</span><span id="L-762"><a href="#L-762"><span class="linenos"> 762</span></a> <span class="s2">"_peek"</span><span class="p">,</span> -</span><span id="L-763"><a href="#L-763"><span class="linenos"> 763</span></a> <span class="s2">"_prev_token_line"</span><span class="p">,</span> -</span><span id="L-764"><a href="#L-764"><span class="linenos"> 764</span></a> <span class="p">)</span> -</span><span id="L-765"><a href="#L-765"><span class="linenos"> 765</span></a> -</span><span id="L-766"><a href="#L-766"><span class="linenos"> 766</span></a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-767"><a href="#L-767"><span class="linenos"> 767</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> -</span><span id="L-768"><a href="#L-768"><span class="linenos"> 768</span></a> -</span><span id="L-769"><a href="#L-769"><span class="linenos"> 769</span></a> <span class="k">def</span> <span class="nf">reset</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-770"><a href="#L-770"><span class="linenos"> 770</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="L-771"><a href="#L-771"><span class="linenos"> 771</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="L-772"><a href="#L-772"><span class="linenos"> 772</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="L-773"><a href="#L-773"><span class="linenos"> 773</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="L-774"><a href="#L-774"><span class="linenos"> 774</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="L-775"><a href="#L-775"><span class="linenos"> 775</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> <span class="o">=</span> <span class="mi">1</span> -</span><span id="L-776"><a href="#L-776"><span class="linenos"> 776</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="L-777"><a href="#L-777"><span class="linenos"> 777</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="L-778"><a href="#L-778"><span class="linenos"> 778</span></a> -</span><span id="L-779"><a href="#L-779"><span class="linenos"> 779</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="L-780"><a href="#L-780"><span class="linenos"> 780</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="L-781"><a href="#L-781"><span class="linenos"> 781</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="L-782"><a href="#L-782"><span class="linenos"> 782</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span> -</span><span id="L-783"><a href="#L-783"><span class="linenos"> 783</span></a> -</span><span id="L-784"><a href="#L-784"><span class="linenos"> 784</span></a> <span class="k">def</span> <span class="nf">tokenize</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sql</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]:</span> -</span><span id="L-785"><a href="#L-785"><span class="linenos"> 785</span></a><span class="w"> </span><span class="sd">"""Returns a list of tokens corresponding to the SQL string `sql`."""</span> -</span><span id="L-786"><a href="#L-786"><span class="linenos"> 786</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> -</span><span id="L-787"><a href="#L-787"><span class="linenos"> 787</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="n">sql</span> -</span><span id="L-788"><a href="#L-788"><span class="linenos"> 788</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">sql</span><span class="p">)</span> -</span><span id="L-789"><a href="#L-789"><span class="linenos"> 789</span></a> -</span><span id="L-790"><a href="#L-790"><span class="linenos"> 790</span></a> <span class="k">try</span><span class="p">:</span> -</span><span id="L-791"><a href="#L-791"><span class="linenos"> 791</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan</span><span class="p">()</span> -</span><span id="L-792"><a href="#L-792"><span class="linenos"> 792</span></a> <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> -</span><span id="L-793"><a href="#L-793"><span class="linenos"> 793</span></a> <span class="n">start</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">50</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> -</span><span id="L-794"><a href="#L-794"><span class="linenos"> 794</span></a> <span class="n">end</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="mi">50</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="L-795"><a href="#L-795"><span class="linenos"> 795</span></a> <span class="n">context</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">]</span> -</span><span id="L-796"><a href="#L-796"><span class="linenos"> 796</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Error tokenizing '</span><span class="si">{</span><span class="n">context</span><span class="si">}</span><span class="s2">'"</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">e</span> -</span><span id="L-797"><a href="#L-797"><span class="linenos"> 797</span></a> -</span><span id="L-798"><a href="#L-798"><span class="linenos"> 798</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> -</span><span id="L-799"><a href="#L-799"><span class="linenos"> 799</span></a> -</span><span id="L-800"><a href="#L-800"><span class="linenos"> 800</span></a> <span class="k">def</span> <span class="nf">_scan</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">until</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Callable</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-801"><a href="#L-801"><span class="linenos"> 801</span></a> <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span><span class="p">:</span> -</span><span id="L-802"><a href="#L-802"><span class="linenos"> 802</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> -</span><span id="L-803"><a href="#L-803"><span class="linenos"> 803</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="L-804"><a href="#L-804"><span class="linenos"> 804</span></a> -</span><span id="L-805"><a href="#L-805"><span class="linenos"> 805</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-806"><a href="#L-806"><span class="linenos"> 806</span></a> <span class="k">break</span> -</span><span id="L-807"><a href="#L-807"><span class="linenos"> 807</span></a> -</span><span id="L-808"><a href="#L-808"><span class="linenos"> 808</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="p">:</span> -</span><span id="L-809"><a href="#L-809"><span class="linenos"> 809</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="o">.</span><span class="n">isdigit</span><span class="p">():</span> -</span><span id="L-810"><a href="#L-810"><span class="linenos"> 810</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_number</span><span class="p">()</span> -</span><span id="L-811"><a href="#L-811"><span class="linenos"> 811</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIERS</span><span class="p">:</span> -</span><span id="L-812"><a href="#L-812"><span class="linenos"> 812</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_identifier</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIERS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">])</span> -</span><span id="L-813"><a href="#L-813"><span class="linenos"> 813</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-814"><a href="#L-814"><span class="linenos"> 814</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_keywords</span><span class="p">()</span> -</span><span id="L-815"><a href="#L-815"><span class="linenos"> 815</span></a> -</span><span id="L-816"><a href="#L-816"><span class="linenos"> 816</span></a> <span class="k">if</span> <span class="n">until</span> <span class="ow">and</span> <span class="n">until</span><span class="p">():</span> -</span><span id="L-817"><a href="#L-817"><span class="linenos"> 817</span></a> <span class="k">break</span> -</span><span id="L-818"><a href="#L-818"><span class="linenos"> 818</span></a> -</span><span id="L-819"><a href="#L-819"><span class="linenos"> 819</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">:</span> -</span><span id="L-820"><a href="#L-820"><span class="linenos"> 820</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">comments</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">)</span> -</span><span id="L-821"><a href="#L-821"><span class="linenos"> 821</span></a> -</span><span id="L-822"><a href="#L-822"><span class="linenos"> 822</span></a> <span class="k">def</span> <span class="nf">_chars</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">size</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-823"><a href="#L-823"><span class="linenos"> 823</span></a> <span class="k">if</span> <span class="n">size</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> -</span><span id="L-824"><a href="#L-824"><span class="linenos"> 824</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> +</span><span id="L-749"><a href="#L-749"><span class="linenos"> 749</span></a> <span class="c1"># handle numeric literals like in hive (3L = BIGINT)</span> +</span><span id="L-750"><a href="#L-750"><span class="linenos"> 750</span></a> <span class="n">NUMERIC_LITERALS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="L-751"><a href="#L-751"><span class="linenos"> 751</span></a> <span class="n">ENCODE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span> +</span><span id="L-752"><a href="#L-752"><span class="linenos"> 752</span></a> +</span><span id="L-753"><a href="#L-753"><span class="linenos"> 753</span></a> <span class="n">COMMENTS</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"--"</span><span class="p">,</span> <span class="p">(</span><span class="s2">"/*"</span><span class="p">,</span> <span class="s2">"*/"</span><span class="p">)]</span> +</span><span id="L-754"><a href="#L-754"><span class="linenos"> 754</span></a> +</span><span id="L-755"><a href="#L-755"><span class="linenos"> 755</span></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span> +</span><span id="L-756"><a href="#L-756"><span class="linenos"> 756</span></a> <span class="s2">"sql"</span><span class="p">,</span> +</span><span id="L-757"><a href="#L-757"><span class="linenos"> 757</span></a> <span class="s2">"size"</span><span class="p">,</span> +</span><span id="L-758"><a href="#L-758"><span class="linenos"> 758</span></a> <span class="s2">"tokens"</span><span class="p">,</span> +</span><span id="L-759"><a href="#L-759"><span class="linenos"> 759</span></a> <span class="s2">"_start"</span><span class="p">,</span> +</span><span id="L-760"><a href="#L-760"><span class="linenos"> 760</span></a> <span class="s2">"_current"</span><span class="p">,</span> +</span><span id="L-761"><a href="#L-761"><span class="linenos"> 761</span></a> <span class="s2">"_line"</span><span class="p">,</span> +</span><span id="L-762"><a href="#L-762"><span class="linenos"> 762</span></a> <span class="s2">"_col"</span><span class="p">,</span> +</span><span id="L-763"><a href="#L-763"><span class="linenos"> 763</span></a> <span class="s2">"_comments"</span><span class="p">,</span> +</span><span id="L-764"><a href="#L-764"><span class="linenos"> 764</span></a> <span class="s2">"_char"</span><span class="p">,</span> +</span><span id="L-765"><a href="#L-765"><span class="linenos"> 765</span></a> <span class="s2">"_end"</span><span class="p">,</span> +</span><span id="L-766"><a href="#L-766"><span class="linenos"> 766</span></a> <span class="s2">"_peek"</span><span class="p">,</span> +</span><span id="L-767"><a href="#L-767"><span class="linenos"> 767</span></a> <span class="s2">"_prev_token_line"</span><span class="p">,</span> +</span><span id="L-768"><a href="#L-768"><span class="linenos"> 768</span></a> <span class="p">)</span> +</span><span id="L-769"><a href="#L-769"><span class="linenos"> 769</span></a> +</span><span id="L-770"><a href="#L-770"><span class="linenos"> 770</span></a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-771"><a href="#L-771"><span class="linenos"> 771</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> +</span><span id="L-772"><a href="#L-772"><span class="linenos"> 772</span></a> +</span><span id="L-773"><a href="#L-773"><span class="linenos"> 773</span></a> <span class="k">def</span> <span class="nf">reset</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-774"><a href="#L-774"><span class="linenos"> 774</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="L-775"><a href="#L-775"><span class="linenos"> 775</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="L-776"><a href="#L-776"><span class="linenos"> 776</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="L-777"><a href="#L-777"><span class="linenos"> 777</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="L-778"><a href="#L-778"><span class="linenos"> 778</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="L-779"><a href="#L-779"><span class="linenos"> 779</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> <span class="o">=</span> <span class="mi">1</span> +</span><span id="L-780"><a href="#L-780"><span class="linenos"> 780</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="L-781"><a href="#L-781"><span class="linenos"> 781</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="L-782"><a href="#L-782"><span class="linenos"> 782</span></a> +</span><span id="L-783"><a href="#L-783"><span class="linenos"> 783</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="L-784"><a href="#L-784"><span class="linenos"> 784</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="L-785"><a href="#L-785"><span class="linenos"> 785</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="L-786"><a href="#L-786"><span class="linenos"> 786</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span> +</span><span id="L-787"><a href="#L-787"><span class="linenos"> 787</span></a> +</span><span id="L-788"><a href="#L-788"><span class="linenos"> 788</span></a> <span class="k">def</span> <span class="nf">tokenize</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sql</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]:</span> +</span><span id="L-789"><a href="#L-789"><span class="linenos"> 789</span></a><span class="w"> </span><span class="sd">"""Returns a list of tokens corresponding to the SQL string `sql`."""</span> +</span><span id="L-790"><a href="#L-790"><span class="linenos"> 790</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> +</span><span id="L-791"><a href="#L-791"><span class="linenos"> 791</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="n">sql</span> +</span><span id="L-792"><a href="#L-792"><span class="linenos"> 792</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">sql</span><span class="p">)</span> +</span><span id="L-793"><a href="#L-793"><span class="linenos"> 793</span></a> +</span><span id="L-794"><a href="#L-794"><span class="linenos"> 794</span></a> <span class="k">try</span><span class="p">:</span> +</span><span id="L-795"><a href="#L-795"><span class="linenos"> 795</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan</span><span class="p">()</span> +</span><span id="L-796"><a href="#L-796"><span class="linenos"> 796</span></a> <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> +</span><span id="L-797"><a href="#L-797"><span class="linenos"> 797</span></a> <span class="n">start</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">50</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> +</span><span id="L-798"><a href="#L-798"><span class="linenos"> 798</span></a> <span class="n">end</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="mi">50</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="L-799"><a href="#L-799"><span class="linenos"> 799</span></a> <span class="n">context</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">]</span> +</span><span id="L-800"><a href="#L-800"><span class="linenos"> 800</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Error tokenizing '</span><span class="si">{</span><span class="n">context</span><span class="si">}</span><span class="s2">'"</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">e</span> +</span><span id="L-801"><a href="#L-801"><span class="linenos"> 801</span></a> +</span><span id="L-802"><a href="#L-802"><span class="linenos"> 802</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> +</span><span id="L-803"><a href="#L-803"><span class="linenos"> 803</span></a> +</span><span id="L-804"><a href="#L-804"><span class="linenos"> 804</span></a> <span class="k">def</span> <span class="nf">_scan</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">until</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Callable</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-805"><a href="#L-805"><span class="linenos"> 805</span></a> <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span><span class="p">:</span> +</span><span id="L-806"><a href="#L-806"><span class="linenos"> 806</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> +</span><span id="L-807"><a href="#L-807"><span class="linenos"> 807</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="L-808"><a href="#L-808"><span class="linenos"> 808</span></a> +</span><span id="L-809"><a href="#L-809"><span class="linenos"> 809</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-810"><a href="#L-810"><span class="linenos"> 810</span></a> <span class="k">break</span> +</span><span id="L-811"><a href="#L-811"><span class="linenos"> 811</span></a> +</span><span id="L-812"><a href="#L-812"><span class="linenos"> 812</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="p">:</span> +</span><span id="L-813"><a href="#L-813"><span class="linenos"> 813</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="o">.</span><span class="n">isdigit</span><span class="p">():</span> +</span><span id="L-814"><a href="#L-814"><span class="linenos"> 814</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_number</span><span class="p">()</span> +</span><span id="L-815"><a href="#L-815"><span class="linenos"> 815</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIERS</span><span class="p">:</span> +</span><span id="L-816"><a href="#L-816"><span class="linenos"> 816</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_identifier</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIERS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">])</span> +</span><span id="L-817"><a href="#L-817"><span class="linenos"> 817</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-818"><a href="#L-818"><span class="linenos"> 818</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_keywords</span><span class="p">()</span> +</span><span id="L-819"><a href="#L-819"><span class="linenos"> 819</span></a> +</span><span id="L-820"><a href="#L-820"><span class="linenos"> 820</span></a> <span class="k">if</span> <span class="n">until</span> <span class="ow">and</span> <span class="n">until</span><span class="p">():</span> +</span><span id="L-821"><a href="#L-821"><span class="linenos"> 821</span></a> <span class="k">break</span> +</span><span id="L-822"><a href="#L-822"><span class="linenos"> 822</span></a> +</span><span id="L-823"><a href="#L-823"><span class="linenos"> 823</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">:</span> +</span><span id="L-824"><a href="#L-824"><span class="linenos"> 824</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">comments</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">)</span> </span><span id="L-825"><a href="#L-825"><span class="linenos"> 825</span></a> -</span><span id="L-826"><a href="#L-826"><span class="linenos"> 826</span></a> <span class="n">start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> -</span><span id="L-827"><a href="#L-827"><span class="linenos"> 827</span></a> <span class="n">end</span> <span class="o">=</span> <span class="n">start</span> <span class="o">+</span> <span class="n">size</span> -</span><span id="L-828"><a href="#L-828"><span class="linenos"> 828</span></a> -</span><span id="L-829"><a href="#L-829"><span class="linenos"> 829</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">]</span> <span class="k">if</span> <span class="n">end</span> <span class="o"><=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="k">else</span> <span class="s2">""</span> -</span><span id="L-830"><a href="#L-830"><span class="linenos"> 830</span></a> -</span><span id="L-831"><a href="#L-831"><span class="linenos"> 831</span></a> <span class="k">def</span> <span class="nf">_advance</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">i</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="n">alnum</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-832"><a href="#L-832"><span class="linenos"> 832</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">)</span> <span class="ow">is</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">:</span> -</span><span id="L-833"><a href="#L-833"><span class="linenos"> 833</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="mi">1</span> -</span><span id="L-834"><a href="#L-834"><span class="linenos"> 834</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="L-835"><a href="#L-835"><span class="linenos"> 835</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-836"><a href="#L-836"><span class="linenos"> 836</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">+=</span> <span class="n">i</span> -</span><span id="L-837"><a href="#L-837"><span class="linenos"> 837</span></a> -</span><span id="L-838"><a href="#L-838"><span class="linenos"> 838</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+=</span> <span class="n">i</span> -</span><span id="L-839"><a href="#L-839"><span class="linenos"> 839</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">>=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> -</span><span id="L-840"><a href="#L-840"><span class="linenos"> 840</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> -</span><span id="L-841"><a href="#L-841"><span class="linenos"> 841</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span> -</span><span id="L-842"><a href="#L-842"><span class="linenos"> 842</span></a> -</span><span id="L-843"><a href="#L-843"><span class="linenos"> 843</span></a> <span class="k">if</span> <span class="n">alnum</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="o">.</span><span class="n">isalnum</span><span class="p">():</span> -</span><span id="L-844"><a href="#L-844"><span class="linenos"> 844</span></a> <span class="c1"># Here we use local variables instead of attributes for better performance</span> -</span><span id="L-845"><a href="#L-845"><span class="linenos"> 845</span></a> <span class="n">_col</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> -</span><span id="L-846"><a href="#L-846"><span class="linenos"> 846</span></a> <span class="n">_current</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> -</span><span id="L-847"><a href="#L-847"><span class="linenos"> 847</span></a> <span class="n">_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> -</span><span id="L-848"><a href="#L-848"><span class="linenos"> 848</span></a> <span class="n">_peek</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> -</span><span id="L-849"><a href="#L-849"><span class="linenos"> 849</span></a> -</span><span id="L-850"><a href="#L-850"><span class="linenos"> 850</span></a> <span class="k">while</span> <span class="n">_peek</span><span class="o">.</span><span class="n">isalnum</span><span class="p">():</span> -</span><span id="L-851"><a href="#L-851"><span class="linenos"> 851</span></a> <span class="n">_col</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="L-852"><a href="#L-852"><span class="linenos"> 852</span></a> <span class="n">_current</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="L-853"><a href="#L-853"><span class="linenos"> 853</span></a> <span class="n">_end</span> <span class="o">=</span> <span class="n">_current</span> <span class="o">>=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> -</span><span id="L-854"><a href="#L-854"><span class="linenos"> 854</span></a> <span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> <span class="k">if</span> <span class="n">_end</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">_current</span><span class="p">]</span> -</span><span id="L-855"><a href="#L-855"><span class="linenos"> 855</span></a> -</span><span id="L-856"><a href="#L-856"><span class="linenos"> 856</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="n">_col</span> -</span><span id="L-857"><a href="#L-857"><span class="linenos"> 857</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">=</span> <span class="n">_current</span> -</span><span id="L-858"><a href="#L-858"><span class="linenos"> 858</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="n">_end</span> -</span><span id="L-859"><a href="#L-859"><span class="linenos"> 859</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="n">_peek</span> -</span><span id="L-860"><a href="#L-860"><span class="linenos"> 860</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> -</span><span id="L-861"><a href="#L-861"><span class="linenos"> 861</span></a> -</span><span id="L-862"><a href="#L-862"><span class="linenos"> 862</span></a> <span class="nd">@property</span> -</span><span id="L-863"><a href="#L-863"><span class="linenos"> 863</span></a> <span class="k">def</span> <span class="nf">_text</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-864"><a href="#L-864"><span class="linenos"> 864</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span> +</span><span id="L-826"><a href="#L-826"><span class="linenos"> 826</span></a> <span class="k">def</span> <span class="nf">_chars</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">size</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-827"><a href="#L-827"><span class="linenos"> 827</span></a> <span class="k">if</span> <span class="n">size</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> +</span><span id="L-828"><a href="#L-828"><span class="linenos"> 828</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> +</span><span id="L-829"><a href="#L-829"><span class="linenos"> 829</span></a> +</span><span id="L-830"><a href="#L-830"><span class="linenos"> 830</span></a> <span class="n">start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> +</span><span id="L-831"><a href="#L-831"><span class="linenos"> 831</span></a> <span class="n">end</span> <span class="o">=</span> <span class="n">start</span> <span class="o">+</span> <span class="n">size</span> +</span><span id="L-832"><a href="#L-832"><span class="linenos"> 832</span></a> +</span><span id="L-833"><a href="#L-833"><span class="linenos"> 833</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">]</span> <span class="k">if</span> <span class="n">end</span> <span class="o"><=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="L-834"><a href="#L-834"><span class="linenos"> 834</span></a> +</span><span id="L-835"><a href="#L-835"><span class="linenos"> 835</span></a> <span class="k">def</span> <span class="nf">_advance</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">i</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="n">alnum</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-836"><a href="#L-836"><span class="linenos"> 836</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">)</span> <span class="ow">is</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">:</span> +</span><span id="L-837"><a href="#L-837"><span class="linenos"> 837</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="mi">1</span> +</span><span id="L-838"><a href="#L-838"><span class="linenos"> 838</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="L-839"><a href="#L-839"><span class="linenos"> 839</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-840"><a href="#L-840"><span class="linenos"> 840</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">+=</span> <span class="n">i</span> +</span><span id="L-841"><a href="#L-841"><span class="linenos"> 841</span></a> +</span><span id="L-842"><a href="#L-842"><span class="linenos"> 842</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+=</span> <span class="n">i</span> +</span><span id="L-843"><a href="#L-843"><span class="linenos"> 843</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">>=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> +</span><span id="L-844"><a href="#L-844"><span class="linenos"> 844</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> +</span><span id="L-845"><a href="#L-845"><span class="linenos"> 845</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span> +</span><span id="L-846"><a href="#L-846"><span class="linenos"> 846</span></a> +</span><span id="L-847"><a href="#L-847"><span class="linenos"> 847</span></a> <span class="k">if</span> <span class="n">alnum</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="o">.</span><span class="n">isalnum</span><span class="p">():</span> +</span><span id="L-848"><a href="#L-848"><span class="linenos"> 848</span></a> <span class="c1"># Here we use local variables instead of attributes for better performance</span> +</span><span id="L-849"><a href="#L-849"><span class="linenos"> 849</span></a> <span class="n">_col</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> +</span><span id="L-850"><a href="#L-850"><span class="linenos"> 850</span></a> <span class="n">_current</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> +</span><span id="L-851"><a href="#L-851"><span class="linenos"> 851</span></a> <span class="n">_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> +</span><span id="L-852"><a href="#L-852"><span class="linenos"> 852</span></a> <span class="n">_peek</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> +</span><span id="L-853"><a href="#L-853"><span class="linenos"> 853</span></a> +</span><span id="L-854"><a href="#L-854"><span class="linenos"> 854</span></a> <span class="k">while</span> <span class="n">_peek</span><span class="o">.</span><span class="n">isalnum</span><span class="p">():</span> +</span><span id="L-855"><a href="#L-855"><span class="linenos"> 855</span></a> <span class="n">_col</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="L-856"><a href="#L-856"><span class="linenos"> 856</span></a> <span class="n">_current</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="L-857"><a href="#L-857"><span class="linenos"> 857</span></a> <span class="n">_end</span> <span class="o">=</span> <span class="n">_current</span> <span class="o">>=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> +</span><span id="L-858"><a href="#L-858"><span class="linenos"> 858</span></a> <span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> <span class="k">if</span> <span class="n">_end</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">_current</span><span class="p">]</span> +</span><span id="L-859"><a href="#L-859"><span class="linenos"> 859</span></a> +</span><span id="L-860"><a href="#L-860"><span class="linenos"> 860</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="n">_col</span> +</span><span id="L-861"><a href="#L-861"><span class="linenos"> 861</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">=</span> <span class="n">_current</span> +</span><span id="L-862"><a href="#L-862"><span class="linenos"> 862</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="n">_end</span> +</span><span id="L-863"><a href="#L-863"><span class="linenos"> 863</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="n">_peek</span> +</span><span id="L-864"><a href="#L-864"><span class="linenos"> 864</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> </span><span id="L-865"><a href="#L-865"><span class="linenos"> 865</span></a> -</span><span id="L-866"><a href="#L-866"><span class="linenos"> 866</span></a> <span class="k">def</span> <span class="nf">peek</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">i</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-867"><a href="#L-867"><span class="linenos"> 867</span></a> <span class="n">i</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="n">i</span> -</span><span id="L-868"><a href="#L-868"><span class="linenos"> 868</span></a> <span class="k">if</span> <span class="n">i</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> -</span><span id="L-869"><a href="#L-869"><span class="linenos"> 869</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> -</span><span id="L-870"><a href="#L-870"><span class="linenos"> 870</span></a> <span class="k">return</span> <span class="s2">""</span> -</span><span id="L-871"><a href="#L-871"><span class="linenos"> 871</span></a> -</span><span id="L-872"><a href="#L-872"><span class="linenos"> 872</span></a> <span class="k">def</span> <span class="nf">_add</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> <span class="n">text</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-873"><a href="#L-873"><span class="linenos"> 873</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> -</span><span id="L-874"><a href="#L-874"><span class="linenos"> 874</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="o">.</span><span class="n">append</span><span class="p">(</span> -</span><span id="L-875"><a href="#L-875"><span class="linenos"> 875</span></a> <span class="n">Token</span><span class="p">(</span> -</span><span id="L-876"><a href="#L-876"><span class="linenos"> 876</span></a> <span class="n">token_type</span><span class="p">,</span> -</span><span id="L-877"><a href="#L-877"><span class="linenos"> 877</span></a> <span class="n">text</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span> <span class="k">if</span> <span class="n">text</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">text</span><span class="p">,</span> -</span><span id="L-878"><a href="#L-878"><span class="linenos"> 878</span></a> <span class="n">line</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="p">,</span> -</span><span id="L-879"><a href="#L-879"><span class="linenos"> 879</span></a> <span class="n">col</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_col</span><span class="p">,</span> -</span><span id="L-880"><a href="#L-880"><span class="linenos"> 880</span></a> <span class="n">start</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="p">,</span> -</span><span id="L-881"><a href="#L-881"><span class="linenos"> 881</span></a> <span class="n">end</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> -</span><span id="L-882"><a href="#L-882"><span class="linenos"> 882</span></a> <span class="n">comments</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">,</span> -</span><span id="L-883"><a href="#L-883"><span class="linenos"> 883</span></a> <span class="p">)</span> -</span><span id="L-884"><a href="#L-884"><span class="linenos"> 884</span></a> <span class="p">)</span> -</span><span id="L-885"><a href="#L-885"><span class="linenos"> 885</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="L-886"><a href="#L-886"><span class="linenos"> 886</span></a> -</span><span id="L-887"><a href="#L-887"><span class="linenos"> 887</span></a> <span class="c1"># If we have either a semicolon or a begin token before the command's token, we'll parse</span> -</span><span id="L-888"><a href="#L-888"><span class="linenos"> 888</span></a> <span class="c1"># whatever follows the command's token as a string</span> -</span><span id="L-889"><a href="#L-889"><span class="linenos"> 889</span></a> <span class="k">if</span> <span class="p">(</span> -</span><span id="L-890"><a href="#L-890"><span class="linenos"> 890</span></a> <span class="n">token_type</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">COMMANDS</span> -</span><span id="L-891"><a href="#L-891"><span class="linenos"> 891</span></a> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">!=</span> <span class="s2">";"</span> -</span><span id="L-892"><a href="#L-892"><span class="linenos"> 892</span></a> <span class="ow">and</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">token_type</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">COMMAND_PREFIX_TOKENS</span><span class="p">)</span> -</span><span id="L-893"><a href="#L-893"><span class="linenos"> 893</span></a> <span class="p">):</span> -</span><span id="L-894"><a href="#L-894"><span class="linenos"> 894</span></a> <span class="n">start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> -</span><span id="L-895"><a href="#L-895"><span class="linenos"> 895</span></a> <span class="n">tokens</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">)</span> -</span><span id="L-896"><a href="#L-896"><span class="linenos"> 896</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="s2">";"</span><span class="p">)</span> -</span><span id="L-897"><a href="#L-897"><span class="linenos"> 897</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[:</span><span class="n">tokens</span><span class="p">]</span> -</span><span id="L-898"><a href="#L-898"><span class="linenos"> 898</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> -</span><span id="L-899"><a href="#L-899"><span class="linenos"> 899</span></a> <span class="k">if</span> <span class="n">text</span><span class="p">:</span> -</span><span id="L-900"><a href="#L-900"><span class="linenos"> 900</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> -</span><span id="L-901"><a href="#L-901"><span class="linenos"> 901</span></a> -</span><span id="L-902"><a href="#L-902"><span class="linenos"> 902</span></a> <span class="k">def</span> <span class="nf">_scan_keywords</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-903"><a href="#L-903"><span class="linenos"> 903</span></a> <span class="n">size</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="L-904"><a href="#L-904"><span class="linenos"> 904</span></a> <span class="n">word</span> <span class="o">=</span> <span class="kc">None</span> -</span><span id="L-905"><a href="#L-905"><span class="linenos"> 905</span></a> <span class="n">chars</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> -</span><span id="L-906"><a href="#L-906"><span class="linenos"> 906</span></a> <span class="n">char</span> <span class="o">=</span> <span class="n">chars</span> -</span><span id="L-907"><a href="#L-907"><span class="linenos"> 907</span></a> <span class="n">prev_space</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="L-908"><a href="#L-908"><span class="linenos"> 908</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="L-909"><a href="#L-909"><span class="linenos"> 909</span></a> <span class="n">trie</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_KEYWORD_TRIE</span> -</span><span id="L-910"><a href="#L-910"><span class="linenos"> 910</span></a> <span class="n">single_token</span> <span class="o">=</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span> -</span><span id="L-911"><a href="#L-911"><span class="linenos"> 911</span></a> -</span><span id="L-912"><a href="#L-912"><span class="linenos"> 912</span></a> <span class="k">while</span> <span class="n">chars</span><span class="p">:</span> -</span><span id="L-913"><a href="#L-913"><span class="linenos"> 913</span></a> <span class="k">if</span> <span class="n">skip</span><span class="p">:</span> -</span><span id="L-914"><a href="#L-914"><span class="linenos"> 914</span></a> <span class="n">result</span> <span class="o">=</span> <span class="mi">1</span> -</span><span id="L-915"><a href="#L-915"><span class="linenos"> 915</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-916"><a href="#L-916"><span class="linenos"> 916</span></a> <span class="n">result</span><span class="p">,</span> <span class="n">trie</span> <span class="o">=</span> <span class="n">in_trie</span><span class="p">(</span><span class="n">trie</span><span class="p">,</span> <span class="n">char</span><span class="o">.</span><span class="n">upper</span><span class="p">())</span> -</span><span id="L-917"><a href="#L-917"><span class="linenos"> 917</span></a> -</span><span id="L-918"><a href="#L-918"><span class="linenos"> 918</span></a> <span class="k">if</span> <span class="n">result</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> -</span><span id="L-919"><a href="#L-919"><span class="linenos"> 919</span></a> <span class="k">break</span> -</span><span id="L-920"><a href="#L-920"><span class="linenos"> 920</span></a> <span class="k">if</span> <span class="n">result</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span> -</span><span id="L-921"><a href="#L-921"><span class="linenos"> 921</span></a> <span class="n">word</span> <span class="o">=</span> <span class="n">chars</span> -</span><span id="L-922"><a href="#L-922"><span class="linenos"> 922</span></a> -</span><span id="L-923"><a href="#L-923"><span class="linenos"> 923</span></a> <span class="n">size</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="L-924"><a href="#L-924"><span class="linenos"> 924</span></a> <span class="n">end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">+</span> <span class="n">size</span> -</span><span id="L-925"><a href="#L-925"><span class="linenos"> 925</span></a> -</span><span id="L-926"><a href="#L-926"><span class="linenos"> 926</span></a> <span class="k">if</span> <span class="n">end</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> -</span><span id="L-927"><a href="#L-927"><span class="linenos"> 927</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">end</span><span class="p">]</span> -</span><span id="L-928"><a href="#L-928"><span class="linenos"> 928</span></a> <span class="n">single_token</span> <span class="o">=</span> <span class="n">single_token</span> <span class="ow">or</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span> -</span><span id="L-929"><a href="#L-929"><span class="linenos"> 929</span></a> <span class="n">is_space</span> <span class="o">=</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span> -</span><span id="L-930"><a href="#L-930"><span class="linenos"> 930</span></a> -</span><span id="L-931"><a href="#L-931"><span class="linenos"> 931</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">is_space</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">prev_space</span><span class="p">:</span> -</span><span id="L-932"><a href="#L-932"><span class="linenos"> 932</span></a> <span class="k">if</span> <span class="n">is_space</span><span class="p">:</span> -</span><span id="L-933"><a href="#L-933"><span class="linenos"> 933</span></a> <span class="n">char</span> <span class="o">=</span> <span class="s2">" "</span> -</span><span id="L-934"><a href="#L-934"><span class="linenos"> 934</span></a> <span class="n">chars</span> <span class="o">+=</span> <span class="n">char</span> -</span><span id="L-935"><a href="#L-935"><span class="linenos"> 935</span></a> <span class="n">prev_space</span> <span class="o">=</span> <span class="n">is_space</span> -</span><span id="L-936"><a href="#L-936"><span class="linenos"> 936</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="L-937"><a href="#L-937"><span class="linenos"> 937</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-938"><a href="#L-938"><span class="linenos"> 938</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">True</span> -</span><span id="L-939"><a href="#L-939"><span class="linenos"> 939</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-940"><a href="#L-940"><span class="linenos"> 940</span></a> <span class="n">char</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="L-941"><a href="#L-941"><span class="linenos"> 941</span></a> <span class="n">chars</span> <span class="o">=</span> <span class="s2">" "</span> -</span><span id="L-942"><a href="#L-942"><span class="linenos"> 942</span></a> -</span><span id="L-943"><a href="#L-943"><span class="linenos"> 943</span></a> <span class="n">word</span> <span class="o">=</span> <span class="kc">None</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">single_token</span> <span class="ow">and</span> <span class="n">chars</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span> <span class="k">else</span> <span class="n">word</span> -</span><span id="L-944"><a href="#L-944"><span class="linenos"> 944</span></a> -</span><span id="L-945"><a href="#L-945"><span class="linenos"> 945</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">word</span><span class="p">:</span> -</span><span id="L-946"><a href="#L-946"><span class="linenos"> 946</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> -</span><span id="L-947"><a href="#L-947"><span class="linenos"> 947</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">],</span> <span class="n">text</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">)</span> -</span><span id="L-948"><a href="#L-948"><span class="linenos"> 948</span></a> <span class="k">return</span> -</span><span id="L-949"><a href="#L-949"><span class="linenos"> 949</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_var</span><span class="p">()</span> -</span><span id="L-950"><a href="#L-950"><span class="linenos"> 950</span></a> <span class="k">return</span> -</span><span id="L-951"><a href="#L-951"><span class="linenos"> 951</span></a> -</span><span id="L-952"><a href="#L-952"><span class="linenos"> 952</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_string</span><span class="p">(</span><span class="n">word</span><span class="p">):</span> -</span><span id="L-953"><a href="#L-953"><span class="linenos"> 953</span></a> <span class="k">return</span> -</span><span id="L-954"><a href="#L-954"><span class="linenos"> 954</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_comment</span><span class="p">(</span><span class="n">word</span><span class="p">):</span> -</span><span id="L-955"><a href="#L-955"><span class="linenos"> 955</span></a> <span class="k">return</span> -</span><span id="L-956"><a href="#L-956"><span class="linenos"> 956</span></a> -</span><span id="L-957"><a href="#L-957"><span class="linenos"> 957</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="L-958"><a href="#L-958"><span class="linenos"> 958</span></a> <span class="n">word</span> <span class="o">=</span> <span class="n">word</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> -</span><span id="L-959"><a href="#L-959"><span class="linenos"> 959</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">[</span><span class="n">word</span><span class="p">],</span> <span class="n">text</span><span class="o">=</span><span class="n">word</span><span class="p">)</span> +</span><span id="L-866"><a href="#L-866"><span class="linenos"> 866</span></a> <span class="nd">@property</span> +</span><span id="L-867"><a href="#L-867"><span class="linenos"> 867</span></a> <span class="k">def</span> <span class="nf">_text</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-868"><a href="#L-868"><span class="linenos"> 868</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span> +</span><span id="L-869"><a href="#L-869"><span class="linenos"> 869</span></a> +</span><span id="L-870"><a href="#L-870"><span class="linenos"> 870</span></a> <span class="k">def</span> <span class="nf">peek</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">i</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-871"><a href="#L-871"><span class="linenos"> 871</span></a> <span class="n">i</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="n">i</span> +</span><span id="L-872"><a href="#L-872"><span class="linenos"> 872</span></a> <span class="k">if</span> <span class="n">i</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> +</span><span id="L-873"><a href="#L-873"><span class="linenos"> 873</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> +</span><span id="L-874"><a href="#L-874"><span class="linenos"> 874</span></a> <span class="k">return</span> <span class="s2">""</span> +</span><span id="L-875"><a href="#L-875"><span class="linenos"> 875</span></a> +</span><span id="L-876"><a href="#L-876"><span class="linenos"> 876</span></a> <span class="k">def</span> <span class="nf">_add</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> <span class="n">text</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-877"><a href="#L-877"><span class="linenos"> 877</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> +</span><span id="L-878"><a href="#L-878"><span class="linenos"> 878</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="o">.</span><span class="n">append</span><span class="p">(</span> +</span><span id="L-879"><a href="#L-879"><span class="linenos"> 879</span></a> <span class="n">Token</span><span class="p">(</span> +</span><span id="L-880"><a href="#L-880"><span class="linenos"> 880</span></a> <span class="n">token_type</span><span class="p">,</span> +</span><span id="L-881"><a href="#L-881"><span class="linenos"> 881</span></a> <span class="n">text</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span> <span class="k">if</span> <span class="n">text</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">text</span><span class="p">,</span> +</span><span id="L-882"><a href="#L-882"><span class="linenos"> 882</span></a> <span class="n">line</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="p">,</span> +</span><span id="L-883"><a href="#L-883"><span class="linenos"> 883</span></a> <span class="n">col</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_col</span><span class="p">,</span> +</span><span id="L-884"><a href="#L-884"><span class="linenos"> 884</span></a> <span class="n">start</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="p">,</span> +</span><span id="L-885"><a href="#L-885"><span class="linenos"> 885</span></a> <span class="n">end</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> +</span><span id="L-886"><a href="#L-886"><span class="linenos"> 886</span></a> <span class="n">comments</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">,</span> +</span><span id="L-887"><a href="#L-887"><span class="linenos"> 887</span></a> <span class="p">)</span> +</span><span id="L-888"><a href="#L-888"><span class="linenos"> 888</span></a> <span class="p">)</span> +</span><span id="L-889"><a href="#L-889"><span class="linenos"> 889</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="L-890"><a href="#L-890"><span class="linenos"> 890</span></a> +</span><span id="L-891"><a href="#L-891"><span class="linenos"> 891</span></a> <span class="c1"># If we have either a semicolon or a begin token before the command's token, we'll parse</span> +</span><span id="L-892"><a href="#L-892"><span class="linenos"> 892</span></a> <span class="c1"># whatever follows the command's token as a string</span> +</span><span id="L-893"><a href="#L-893"><span class="linenos"> 893</span></a> <span class="k">if</span> <span class="p">(</span> +</span><span id="L-894"><a href="#L-894"><span class="linenos"> 894</span></a> <span class="n">token_type</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">COMMANDS</span> +</span><span id="L-895"><a href="#L-895"><span class="linenos"> 895</span></a> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">!=</span> <span class="s2">";"</span> +</span><span id="L-896"><a href="#L-896"><span class="linenos"> 896</span></a> <span class="ow">and</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">token_type</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">COMMAND_PREFIX_TOKENS</span><span class="p">)</span> +</span><span id="L-897"><a href="#L-897"><span class="linenos"> 897</span></a> <span class="p">):</span> +</span><span id="L-898"><a href="#L-898"><span class="linenos"> 898</span></a> <span class="n">start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> +</span><span id="L-899"><a href="#L-899"><span class="linenos"> 899</span></a> <span class="n">tokens</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">)</span> +</span><span id="L-900"><a href="#L-900"><span class="linenos"> 900</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="s2">";"</span><span class="p">)</span> +</span><span id="L-901"><a href="#L-901"><span class="linenos"> 901</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[:</span><span class="n">tokens</span><span class="p">]</span> +</span><span id="L-902"><a href="#L-902"><span class="linenos"> 902</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> +</span><span id="L-903"><a href="#L-903"><span class="linenos"> 903</span></a> <span class="k">if</span> <span class="n">text</span><span class="p">:</span> +</span><span id="L-904"><a href="#L-904"><span class="linenos"> 904</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> +</span><span id="L-905"><a href="#L-905"><span class="linenos"> 905</span></a> +</span><span id="L-906"><a href="#L-906"><span class="linenos"> 906</span></a> <span class="k">def</span> <span class="nf">_scan_keywords</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-907"><a href="#L-907"><span class="linenos"> 907</span></a> <span class="n">size</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="L-908"><a href="#L-908"><span class="linenos"> 908</span></a> <span class="n">word</span> <span class="o">=</span> <span class="kc">None</span> +</span><span id="L-909"><a href="#L-909"><span class="linenos"> 909</span></a> <span class="n">chars</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> +</span><span id="L-910"><a href="#L-910"><span class="linenos"> 910</span></a> <span class="n">char</span> <span class="o">=</span> <span class="n">chars</span> +</span><span id="L-911"><a href="#L-911"><span class="linenos"> 911</span></a> <span class="n">prev_space</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="L-912"><a href="#L-912"><span class="linenos"> 912</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="L-913"><a href="#L-913"><span class="linenos"> 913</span></a> <span class="n">trie</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_KEYWORD_TRIE</span> +</span><span id="L-914"><a href="#L-914"><span class="linenos"> 914</span></a> <span class="n">single_token</span> <span class="o">=</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span> +</span><span id="L-915"><a href="#L-915"><span class="linenos"> 915</span></a> +</span><span id="L-916"><a href="#L-916"><span class="linenos"> 916</span></a> <span class="k">while</span> <span class="n">chars</span><span class="p">:</span> +</span><span id="L-917"><a href="#L-917"><span class="linenos"> 917</span></a> <span class="k">if</span> <span class="n">skip</span><span class="p">:</span> +</span><span id="L-918"><a href="#L-918"><span class="linenos"> 918</span></a> <span class="n">result</span> <span class="o">=</span> <span class="n">TrieResult</span><span class="o">.</span><span class="n">PREFIX</span> +</span><span id="L-919"><a href="#L-919"><span class="linenos"> 919</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-920"><a href="#L-920"><span class="linenos"> 920</span></a> <span class="n">result</span><span class="p">,</span> <span class="n">trie</span> <span class="o">=</span> <span class="n">in_trie</span><span class="p">(</span><span class="n">trie</span><span class="p">,</span> <span class="n">char</span><span class="o">.</span><span class="n">upper</span><span class="p">())</span> +</span><span id="L-921"><a href="#L-921"><span class="linenos"> 921</span></a> +</span><span id="L-922"><a href="#L-922"><span class="linenos"> 922</span></a> <span class="k">if</span> <span class="n">result</span> <span class="o">==</span> <span class="n">TrieResult</span><span class="o">.</span><span class="n">FAILED</span><span class="p">:</span> +</span><span id="L-923"><a href="#L-923"><span class="linenos"> 923</span></a> <span class="k">break</span> +</span><span id="L-924"><a href="#L-924"><span class="linenos"> 924</span></a> <span class="k">if</span> <span class="n">result</span> <span class="o">==</span> <span class="n">TrieResult</span><span class="o">.</span><span class="n">EXISTS</span><span class="p">:</span> +</span><span id="L-925"><a href="#L-925"><span class="linenos"> 925</span></a> <span class="n">word</span> <span class="o">=</span> <span class="n">chars</span> +</span><span id="L-926"><a href="#L-926"><span class="linenos"> 926</span></a> +</span><span id="L-927"><a href="#L-927"><span class="linenos"> 927</span></a> <span class="n">size</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="L-928"><a href="#L-928"><span class="linenos"> 928</span></a> <span class="n">end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">+</span> <span class="n">size</span> +</span><span id="L-929"><a href="#L-929"><span class="linenos"> 929</span></a> +</span><span id="L-930"><a href="#L-930"><span class="linenos"> 930</span></a> <span class="k">if</span> <span class="n">end</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> +</span><span id="L-931"><a href="#L-931"><span class="linenos"> 931</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">end</span><span class="p">]</span> +</span><span id="L-932"><a href="#L-932"><span class="linenos"> 932</span></a> <span class="n">single_token</span> <span class="o">=</span> <span class="n">single_token</span> <span class="ow">or</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span> +</span><span id="L-933"><a href="#L-933"><span class="linenos"> 933</span></a> <span class="n">is_space</span> <span class="o">=</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span> +</span><span id="L-934"><a href="#L-934"><span class="linenos"> 934</span></a> +</span><span id="L-935"><a href="#L-935"><span class="linenos"> 935</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">is_space</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">prev_space</span><span class="p">:</span> +</span><span id="L-936"><a href="#L-936"><span class="linenos"> 936</span></a> <span class="k">if</span> <span class="n">is_space</span><span class="p">:</span> +</span><span id="L-937"><a href="#L-937"><span class="linenos"> 937</span></a> <span class="n">char</span> <span class="o">=</span> <span class="s2">" "</span> +</span><span id="L-938"><a href="#L-938"><span class="linenos"> 938</span></a> <span class="n">chars</span> <span class="o">+=</span> <span class="n">char</span> +</span><span id="L-939"><a href="#L-939"><span class="linenos"> 939</span></a> <span class="n">prev_space</span> <span class="o">=</span> <span class="n">is_space</span> +</span><span id="L-940"><a href="#L-940"><span class="linenos"> 940</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="L-941"><a href="#L-941"><span class="linenos"> 941</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-942"><a href="#L-942"><span class="linenos"> 942</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">True</span> +</span><span id="L-943"><a href="#L-943"><span class="linenos"> 943</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-944"><a href="#L-944"><span class="linenos"> 944</span></a> <span class="n">char</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="L-945"><a href="#L-945"><span class="linenos"> 945</span></a> <span class="n">chars</span> <span class="o">=</span> <span class="s2">" "</span> +</span><span id="L-946"><a href="#L-946"><span class="linenos"> 946</span></a> +</span><span id="L-947"><a href="#L-947"><span class="linenos"> 947</span></a> <span class="n">word</span> <span class="o">=</span> <span class="kc">None</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">single_token</span> <span class="ow">and</span> <span class="n">chars</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span> <span class="k">else</span> <span class="n">word</span> +</span><span id="L-948"><a href="#L-948"><span class="linenos"> 948</span></a> +</span><span id="L-949"><a href="#L-949"><span class="linenos"> 949</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">word</span><span class="p">:</span> +</span><span id="L-950"><a href="#L-950"><span class="linenos"> 950</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> +</span><span id="L-951"><a href="#L-951"><span class="linenos"> 951</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">],</span> <span class="n">text</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">)</span> +</span><span id="L-952"><a href="#L-952"><span class="linenos"> 952</span></a> <span class="k">return</span> +</span><span id="L-953"><a href="#L-953"><span class="linenos"> 953</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_var</span><span class="p">()</span> +</span><span id="L-954"><a href="#L-954"><span class="linenos"> 954</span></a> <span class="k">return</span> +</span><span id="L-955"><a href="#L-955"><span class="linenos"> 955</span></a> +</span><span id="L-956"><a href="#L-956"><span class="linenos"> 956</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_string</span><span class="p">(</span><span class="n">word</span><span class="p">):</span> +</span><span id="L-957"><a href="#L-957"><span class="linenos"> 957</span></a> <span class="k">return</span> +</span><span id="L-958"><a href="#L-958"><span class="linenos"> 958</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_comment</span><span class="p">(</span><span class="n">word</span><span class="p">):</span> +</span><span id="L-959"><a href="#L-959"><span class="linenos"> 959</span></a> <span class="k">return</span> </span><span id="L-960"><a href="#L-960"><span class="linenos"> 960</span></a> -</span><span id="L-961"><a href="#L-961"><span class="linenos"> 961</span></a> <span class="k">def</span> <span class="nf">_scan_comment</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">comment_start</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> -</span><span id="L-962"><a href="#L-962"><span class="linenos"> 962</span></a> <span class="k">if</span> <span class="n">comment_start</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_COMMENTS</span><span class="p">:</span> -</span><span id="L-963"><a href="#L-963"><span class="linenos"> 963</span></a> <span class="k">return</span> <span class="kc">False</span> +</span><span id="L-961"><a href="#L-961"><span class="linenos"> 961</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="L-962"><a href="#L-962"><span class="linenos"> 962</span></a> <span class="n">word</span> <span class="o">=</span> <span class="n">word</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> +</span><span id="L-963"><a href="#L-963"><span class="linenos"> 963</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">[</span><span class="n">word</span><span class="p">],</span> <span class="n">text</span><span class="o">=</span><span class="n">word</span><span class="p">)</span> </span><span id="L-964"><a href="#L-964"><span class="linenos"> 964</span></a> -</span><span id="L-965"><a href="#L-965"><span class="linenos"> 965</span></a> <span class="n">comment_start_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> -</span><span id="L-966"><a href="#L-966"><span class="linenos"> 966</span></a> <span class="n">comment_start_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">comment_start</span><span class="p">)</span> -</span><span id="L-967"><a href="#L-967"><span class="linenos"> 967</span></a> <span class="n">comment_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_COMMENTS</span><span class="p">[</span><span class="n">comment_start</span><span class="p">]</span> +</span><span id="L-965"><a href="#L-965"><span class="linenos"> 965</span></a> <span class="k">def</span> <span class="nf">_scan_comment</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">comment_start</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> +</span><span id="L-966"><a href="#L-966"><span class="linenos"> 966</span></a> <span class="k">if</span> <span class="n">comment_start</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_COMMENTS</span><span class="p">:</span> +</span><span id="L-967"><a href="#L-967"><span class="linenos"> 967</span></a> <span class="k">return</span> <span class="kc">False</span> </span><span id="L-968"><a href="#L-968"><span class="linenos"> 968</span></a> -</span><span id="L-969"><a href="#L-969"><span class="linenos"> 969</span></a> <span class="k">if</span> <span class="n">comment_end</span><span class="p">:</span> -</span><span id="L-970"><a href="#L-970"><span class="linenos"> 970</span></a> <span class="c1"># Skip the comment's start delimiter</span> -</span><span id="L-971"><a href="#L-971"><span class="linenos"> 971</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">comment_start_size</span><span class="p">)</span> +</span><span id="L-969"><a href="#L-969"><span class="linenos"> 969</span></a> <span class="n">comment_start_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> +</span><span id="L-970"><a href="#L-970"><span class="linenos"> 970</span></a> <span class="n">comment_start_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">comment_start</span><span class="p">)</span> +</span><span id="L-971"><a href="#L-971"><span class="linenos"> 971</span></a> <span class="n">comment_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_COMMENTS</span><span class="p">[</span><span class="n">comment_start</span><span class="p">]</span> </span><span id="L-972"><a href="#L-972"><span class="linenos"> 972</span></a> -</span><span id="L-973"><a href="#L-973"><span class="linenos"> 973</span></a> <span class="n">comment_end_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">comment_end</span><span class="p">)</span> -</span><span id="L-974"><a href="#L-974"><span class="linenos"> 974</span></a> <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_chars</span><span class="p">(</span><span class="n">comment_end_size</span><span class="p">)</span> <span class="o">!=</span> <span class="n">comment_end</span><span class="p">:</span> -</span><span id="L-975"><a href="#L-975"><span class="linenos"> 975</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="L-973"><a href="#L-973"><span class="linenos"> 973</span></a> <span class="k">if</span> <span class="n">comment_end</span><span class="p">:</span> +</span><span id="L-974"><a href="#L-974"><span class="linenos"> 974</span></a> <span class="c1"># Skip the comment's start delimiter</span> +</span><span id="L-975"><a href="#L-975"><span class="linenos"> 975</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">comment_start_size</span><span class="p">)</span> </span><span id="L-976"><a href="#L-976"><span class="linenos"> 976</span></a> -</span><span id="L-977"><a href="#L-977"><span class="linenos"> 977</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="p">[</span><span class="n">comment_start_size</span> <span class="p">:</span> <span class="o">-</span><span class="n">comment_end_size</span> <span class="o">+</span> <span class="mi">1</span><span class="p">])</span> -</span><span id="L-978"><a href="#L-978"><span class="linenos"> 978</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">comment_end_size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="L-979"><a href="#L-979"><span class="linenos"> 979</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-980"><a href="#L-980"><span class="linenos"> 980</span></a> <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="p">)</span> <span class="ow">is</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">:</span> -</span><span id="L-981"><a href="#L-981"><span class="linenos"> 981</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="L-982"><a href="#L-982"><span class="linenos"> 982</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="p">[</span><span class="n">comment_start_size</span><span class="p">:])</span> -</span><span id="L-983"><a href="#L-983"><span class="linenos"> 983</span></a> -</span><span id="L-984"><a href="#L-984"><span class="linenos"> 984</span></a> <span class="c1"># Leading comment is attached to the succeeding token, whilst trailing comment to the preceding.</span> -</span><span id="L-985"><a href="#L-985"><span class="linenos"> 985</span></a> <span class="c1"># Multiple consecutive comments are preserved by appending them to the current comments list.</span> -</span><span id="L-986"><a href="#L-986"><span class="linenos"> 986</span></a> <span class="k">if</span> <span class="n">comment_start_line</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span><span class="p">:</span> -</span><span id="L-987"><a href="#L-987"><span class="linenos"> 987</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">comments</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">)</span> -</span><span id="L-988"><a href="#L-988"><span class="linenos"> 988</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="L-989"><a href="#L-989"><span class="linenos"> 989</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> -</span><span id="L-990"><a href="#L-990"><span class="linenos"> 990</span></a> -</span><span id="L-991"><a href="#L-991"><span class="linenos"> 991</span></a> <span class="k">return</span> <span class="kc">True</span> -</span><span id="L-992"><a href="#L-992"><span class="linenos"> 992</span></a> -</span><span id="L-993"><a href="#L-993"><span class="linenos"> 993</span></a> <span class="k">def</span> <span class="nf">_scan_number</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-994"><a href="#L-994"><span class="linenos"> 994</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">==</span> <span class="s2">"0"</span><span class="p">:</span> -</span><span id="L-995"><a href="#L-995"><span class="linenos"> 995</span></a> <span class="n">peek</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> -</span><span id="L-996"><a href="#L-996"><span class="linenos"> 996</span></a> <span class="k">if</span> <span class="n">peek</span> <span class="o">==</span> <span class="s2">"B"</span><span class="p">:</span> -</span><span id="L-997"><a href="#L-997"><span class="linenos"> 997</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_bits</span><span class="p">()</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">BIT_STRINGS</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> -</span><span id="L-998"><a href="#L-998"><span class="linenos"> 998</span></a> <span class="k">elif</span> <span class="n">peek</span> <span class="o">==</span> <span class="s2">"X"</span><span class="p">:</span> -</span><span id="L-999"><a href="#L-999"><span class="linenos"> 999</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_hex</span><span class="p">()</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">HEX_STRINGS</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> -</span><span id="L-1000"><a href="#L-1000"><span class="linenos">1000</span></a> -</span><span id="L-1001"><a href="#L-1001"><span class="linenos">1001</span></a> <span class="n">decimal</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="L-1002"><a href="#L-1002"><span class="linenos">1002</span></a> <span class="n">scientific</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="L-1003"><a href="#L-1003"><span class="linenos">1003</span></a> -</span><span id="L-1004"><a href="#L-1004"><span class="linenos">1004</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> -</span><span id="L-1005"><a href="#L-1005"><span class="linenos">1005</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">isdigit</span><span class="p">():</span> -</span><span id="L-1006"><a href="#L-1006"><span class="linenos">1006</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="L-1007"><a href="#L-1007"><span class="linenos">1007</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="s2">"."</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">decimal</span><span class="p">:</span> -</span><span id="L-1008"><a href="#L-1008"><span class="linenos">1008</span></a> <span class="n">after</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">peek</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> -</span><span id="L-1009"><a href="#L-1009"><span class="linenos">1009</span></a> <span class="k">if</span> <span class="n">after</span><span class="o">.</span><span class="n">isdigit</span><span class="p">()</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">after</span><span class="o">.</span><span class="n">isalpha</span><span class="p">():</span> -</span><span id="L-1010"><a href="#L-1010"><span class="linenos">1010</span></a> <span class="n">decimal</span> <span class="o">=</span> <span class="kc">True</span> -</span><span id="L-1011"><a href="#L-1011"><span class="linenos">1011</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="L-1012"><a href="#L-1012"><span class="linenos">1012</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-1013"><a href="#L-1013"><span class="linenos">1013</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> -</span><span id="L-1014"><a href="#L-1014"><span class="linenos">1014</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"-"</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">)</span> <span class="ow">and</span> <span class="n">scientific</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> -</span><span id="L-1015"><a href="#L-1015"><span class="linenos">1015</span></a> <span class="n">scientific</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="L-1016"><a href="#L-1016"><span class="linenos">1016</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="L-1017"><a href="#L-1017"><span class="linenos">1017</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"E"</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">scientific</span><span class="p">:</span> -</span><span id="L-1018"><a href="#L-1018"><span class="linenos">1018</span></a> <span class="n">scientific</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="L-1019"><a href="#L-1019"><span class="linenos">1019</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="L-1020"><a href="#L-1020"><span class="linenos">1020</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">isidentifier</span><span class="p">():</span> -</span><span id="L-1021"><a href="#L-1021"><span class="linenos">1021</span></a> <span class="n">number_text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> -</span><span id="L-1022"><a href="#L-1022"><span class="linenos">1022</span></a> <span class="n">literal</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="L-1023"><a href="#L-1023"><span class="linenos">1023</span></a> -</span><span id="L-1024"><a href="#L-1024"><span class="linenos">1024</span></a> <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> -</span><span id="L-1025"><a href="#L-1025"><span class="linenos">1025</span></a> <span class="n">literal</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> -</span><span id="L-1026"><a href="#L-1026"><span class="linenos">1026</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="L-977"><a href="#L-977"><span class="linenos"> 977</span></a> <span class="n">comment_end_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">comment_end</span><span class="p">)</span> +</span><span id="L-978"><a href="#L-978"><span class="linenos"> 978</span></a> <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_chars</span><span class="p">(</span><span class="n">comment_end_size</span><span class="p">)</span> <span class="o">!=</span> <span class="n">comment_end</span><span class="p">:</span> +</span><span id="L-979"><a href="#L-979"><span class="linenos"> 979</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="L-980"><a href="#L-980"><span class="linenos"> 980</span></a> +</span><span id="L-981"><a href="#L-981"><span class="linenos"> 981</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="p">[</span><span class="n">comment_start_size</span> <span class="p">:</span> <span class="o">-</span><span class="n">comment_end_size</span> <span class="o">+</span> <span class="mi">1</span><span class="p">])</span> +</span><span id="L-982"><a href="#L-982"><span class="linenos"> 982</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">comment_end_size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="L-983"><a href="#L-983"><span class="linenos"> 983</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-984"><a href="#L-984"><span class="linenos"> 984</span></a> <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="p">)</span> <span class="ow">is</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">:</span> +</span><span id="L-985"><a href="#L-985"><span class="linenos"> 985</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="L-986"><a href="#L-986"><span class="linenos"> 986</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="p">[</span><span class="n">comment_start_size</span><span class="p">:])</span> +</span><span id="L-987"><a href="#L-987"><span class="linenos"> 987</span></a> +</span><span id="L-988"><a href="#L-988"><span class="linenos"> 988</span></a> <span class="c1"># Leading comment is attached to the succeeding token, whilst trailing comment to the preceding.</span> +</span><span id="L-989"><a href="#L-989"><span class="linenos"> 989</span></a> <span class="c1"># Multiple consecutive comments are preserved by appending them to the current comments list.</span> +</span><span id="L-990"><a href="#L-990"><span class="linenos"> 990</span></a> <span class="k">if</span> <span class="n">comment_start_line</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span><span class="p">:</span> +</span><span id="L-991"><a href="#L-991"><span class="linenos"> 991</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">comments</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">)</span> +</span><span id="L-992"><a href="#L-992"><span class="linenos"> 992</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="L-993"><a href="#L-993"><span class="linenos"> 993</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> +</span><span id="L-994"><a href="#L-994"><span class="linenos"> 994</span></a> +</span><span id="L-995"><a href="#L-995"><span class="linenos"> 995</span></a> <span class="k">return</span> <span class="kc">True</span> +</span><span id="L-996"><a href="#L-996"><span class="linenos"> 996</span></a> +</span><span id="L-997"><a href="#L-997"><span class="linenos"> 997</span></a> <span class="k">def</span> <span class="nf">_scan_number</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-998"><a href="#L-998"><span class="linenos"> 998</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">==</span> <span class="s2">"0"</span><span class="p">:</span> +</span><span id="L-999"><a href="#L-999"><span class="linenos"> 999</span></a> <span class="n">peek</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> +</span><span id="L-1000"><a href="#L-1000"><span class="linenos">1000</span></a> <span class="k">if</span> <span class="n">peek</span> <span class="o">==</span> <span class="s2">"B"</span><span class="p">:</span> +</span><span id="L-1001"><a href="#L-1001"><span class="linenos">1001</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_bits</span><span class="p">()</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">BIT_STRINGS</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> +</span><span id="L-1002"><a href="#L-1002"><span class="linenos">1002</span></a> <span class="k">elif</span> <span class="n">peek</span> <span class="o">==</span> <span class="s2">"X"</span><span class="p">:</span> +</span><span id="L-1003"><a href="#L-1003"><span class="linenos">1003</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_hex</span><span class="p">()</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">HEX_STRINGS</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> +</span><span id="L-1004"><a href="#L-1004"><span class="linenos">1004</span></a> +</span><span id="L-1005"><a href="#L-1005"><span class="linenos">1005</span></a> <span class="n">decimal</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="L-1006"><a href="#L-1006"><span class="linenos">1006</span></a> <span class="n">scientific</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="L-1007"><a href="#L-1007"><span class="linenos">1007</span></a> +</span><span id="L-1008"><a href="#L-1008"><span class="linenos">1008</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> +</span><span id="L-1009"><a href="#L-1009"><span class="linenos">1009</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">isdigit</span><span class="p">():</span> +</span><span id="L-1010"><a href="#L-1010"><span class="linenos">1010</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="L-1011"><a href="#L-1011"><span class="linenos">1011</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="s2">"."</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">decimal</span><span class="p">:</span> +</span><span id="L-1012"><a href="#L-1012"><span class="linenos">1012</span></a> <span class="n">after</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">peek</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> +</span><span id="L-1013"><a href="#L-1013"><span class="linenos">1013</span></a> <span class="k">if</span> <span class="n">after</span><span class="o">.</span><span class="n">isdigit</span><span class="p">()</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">after</span><span class="o">.</span><span class="n">isalpha</span><span class="p">():</span> +</span><span id="L-1014"><a href="#L-1014"><span class="linenos">1014</span></a> <span class="n">decimal</span> <span class="o">=</span> <span class="kc">True</span> +</span><span id="L-1015"><a href="#L-1015"><span class="linenos">1015</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="L-1016"><a href="#L-1016"><span class="linenos">1016</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-1017"><a href="#L-1017"><span class="linenos">1017</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> +</span><span id="L-1018"><a href="#L-1018"><span class="linenos">1018</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"-"</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">)</span> <span class="ow">and</span> <span class="n">scientific</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> +</span><span id="L-1019"><a href="#L-1019"><span class="linenos">1019</span></a> <span class="n">scientific</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="L-1020"><a href="#L-1020"><span class="linenos">1020</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="L-1021"><a href="#L-1021"><span class="linenos">1021</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"E"</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">scientific</span><span class="p">:</span> +</span><span id="L-1022"><a href="#L-1022"><span class="linenos">1022</span></a> <span class="n">scientific</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="L-1023"><a href="#L-1023"><span class="linenos">1023</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="L-1024"><a href="#L-1024"><span class="linenos">1024</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">isidentifier</span><span class="p">():</span> +</span><span id="L-1025"><a href="#L-1025"><span class="linenos">1025</span></a> <span class="n">number_text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> +</span><span id="L-1026"><a href="#L-1026"><span class="linenos">1026</span></a> <span class="n">literal</span> <span class="o">=</span> <span class="s2">""</span> </span><span id="L-1027"><a href="#L-1027"><span class="linenos">1027</span></a> -</span><span id="L-1028"><a href="#L-1028"><span class="linenos">1028</span></a> <span class="n">token_type</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">NUMERIC_LITERALS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">literal</span><span class="p">,</span> <span class="s2">""</span><span class="p">))</span> -</span><span id="L-1029"><a href="#L-1029"><span class="linenos">1029</span></a> -</span><span id="L-1030"><a href="#L-1030"><span class="linenos">1030</span></a> <span class="k">if</span> <span class="n">token_type</span><span class="p">:</span> -</span><span id="L-1031"><a href="#L-1031"><span class="linenos">1031</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="n">number_text</span><span class="p">)</span> -</span><span id="L-1032"><a href="#L-1032"><span class="linenos">1032</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">DCOLON</span><span class="p">,</span> <span class="s2">"::"</span><span class="p">)</span> -</span><span id="L-1033"><a href="#L-1033"><span class="linenos">1033</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">token_type</span><span class="p">,</span> <span class="n">literal</span><span class="p">)</span> -</span><span id="L-1034"><a href="#L-1034"><span class="linenos">1034</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">IDENTIFIERS_CAN_START_WITH_DIGIT</span><span class="p">:</span> -</span><span id="L-1035"><a href="#L-1035"><span class="linenos">1035</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> -</span><span id="L-1036"><a href="#L-1036"><span class="linenos">1036</span></a> -</span><span id="L-1037"><a href="#L-1037"><span class="linenos">1037</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="n">number_text</span><span class="p">)</span> -</span><span id="L-1038"><a href="#L-1038"><span class="linenos">1038</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="o">-</span><span class="nb">len</span><span class="p">(</span><span class="n">literal</span><span class="p">))</span> -</span><span id="L-1039"><a href="#L-1039"><span class="linenos">1039</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-1040"><a href="#L-1040"><span class="linenos">1040</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> -</span><span id="L-1041"><a href="#L-1041"><span class="linenos">1041</span></a> -</span><span id="L-1042"><a href="#L-1042"><span class="linenos">1042</span></a> <span class="k">def</span> <span class="nf">_scan_bits</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-1043"><a href="#L-1043"><span class="linenos">1043</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="L-1044"><a href="#L-1044"><span class="linenos">1044</span></a> <span class="n">value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_value</span><span class="p">()</span> -</span><span id="L-1045"><a href="#L-1045"><span class="linenos">1045</span></a> <span class="k">try</span><span class="p">:</span> -</span><span id="L-1046"><a href="#L-1046"><span class="linenos">1046</span></a> <span class="c1"># If `value` can't be converted to a binary, fallback to tokenizing it as an identifier</span> -</span><span id="L-1047"><a href="#L-1047"><span class="linenos">1047</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> -</span><span id="L-1048"><a href="#L-1048"><span class="linenos">1048</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BIT_STRING</span><span class="p">,</span> <span class="n">value</span><span class="p">[</span><span class="mi">2</span><span class="p">:])</span> <span class="c1"># Drop the 0b</span> -</span><span id="L-1049"><a href="#L-1049"><span class="linenos">1049</span></a> <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span> -</span><span id="L-1050"><a href="#L-1050"><span class="linenos">1050</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">)</span> -</span><span id="L-1051"><a href="#L-1051"><span class="linenos">1051</span></a> -</span><span id="L-1052"><a href="#L-1052"><span class="linenos">1052</span></a> <span class="k">def</span> <span class="nf">_scan_hex</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-1053"><a href="#L-1053"><span class="linenos">1053</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="L-1054"><a href="#L-1054"><span class="linenos">1054</span></a> <span class="n">value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_value</span><span class="p">()</span> -</span><span id="L-1055"><a href="#L-1055"><span class="linenos">1055</span></a> <span class="k">try</span><span class="p">:</span> -</span><span id="L-1056"><a href="#L-1056"><span class="linenos">1056</span></a> <span class="c1"># If `value` can't be converted to a hex, fallback to tokenizing it as an identifier</span> -</span><span id="L-1057"><a href="#L-1057"><span class="linenos">1057</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="mi">16</span><span class="p">)</span> -</span><span id="L-1058"><a href="#L-1058"><span class="linenos">1058</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">HEX_STRING</span><span class="p">,</span> <span class="n">value</span><span class="p">[</span><span class="mi">2</span><span class="p">:])</span> <span class="c1"># Drop the 0x</span> -</span><span id="L-1059"><a href="#L-1059"><span class="linenos">1059</span></a> <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span> -</span><span id="L-1060"><a href="#L-1060"><span class="linenos">1060</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">)</span> -</span><span id="L-1061"><a href="#L-1061"><span class="linenos">1061</span></a> -</span><span id="L-1062"><a href="#L-1062"><span class="linenos">1062</span></a> <span class="k">def</span> <span class="nf">_extract_value</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-1063"><a href="#L-1063"><span class="linenos">1063</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> -</span><span id="L-1064"><a href="#L-1064"><span class="linenos">1064</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> -</span><span id="L-1065"><a href="#L-1065"><span class="linenos">1065</span></a> <span class="k">if</span> <span class="n">char</span> <span class="ow">and</span> <span class="n">char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> -</span><span id="L-1066"><a href="#L-1066"><span class="linenos">1066</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="L-1067"><a href="#L-1067"><span class="linenos">1067</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-1068"><a href="#L-1068"><span class="linenos">1068</span></a> <span class="k">break</span> -</span><span id="L-1069"><a href="#L-1069"><span class="linenos">1069</span></a> -</span><span id="L-1070"><a href="#L-1070"><span class="linenos">1070</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> -</span><span id="L-1071"><a href="#L-1071"><span class="linenos">1071</span></a> -</span><span id="L-1072"><a href="#L-1072"><span class="linenos">1072</span></a> <span class="k">def</span> <span class="nf">_scan_string</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">start</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> -</span><span id="L-1073"><a href="#L-1073"><span class="linenos">1073</span></a> <span class="n">base</span> <span class="o">=</span> <span class="kc">None</span> -</span><span id="L-1074"><a href="#L-1074"><span class="linenos">1074</span></a> <span class="n">token_type</span> <span class="o">=</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span> +</span><span id="L-1028"><a href="#L-1028"><span class="linenos">1028</span></a> <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> +</span><span id="L-1029"><a href="#L-1029"><span class="linenos">1029</span></a> <span class="n">literal</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> +</span><span id="L-1030"><a href="#L-1030"><span class="linenos">1030</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="L-1031"><a href="#L-1031"><span class="linenos">1031</span></a> +</span><span id="L-1032"><a href="#L-1032"><span class="linenos">1032</span></a> <span class="n">token_type</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">NUMERIC_LITERALS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">literal</span><span class="p">,</span> <span class="s2">""</span><span class="p">))</span> +</span><span id="L-1033"><a href="#L-1033"><span class="linenos">1033</span></a> +</span><span id="L-1034"><a href="#L-1034"><span class="linenos">1034</span></a> <span class="k">if</span> <span class="n">token_type</span><span class="p">:</span> +</span><span id="L-1035"><a href="#L-1035"><span class="linenos">1035</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="n">number_text</span><span class="p">)</span> +</span><span id="L-1036"><a href="#L-1036"><span class="linenos">1036</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">DCOLON</span><span class="p">,</span> <span class="s2">"::"</span><span class="p">)</span> +</span><span id="L-1037"><a href="#L-1037"><span class="linenos">1037</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">token_type</span><span class="p">,</span> <span class="n">literal</span><span class="p">)</span> +</span><span id="L-1038"><a href="#L-1038"><span class="linenos">1038</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">IDENTIFIERS_CAN_START_WITH_DIGIT</span><span class="p">:</span> +</span><span id="L-1039"><a href="#L-1039"><span class="linenos">1039</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> +</span><span id="L-1040"><a href="#L-1040"><span class="linenos">1040</span></a> +</span><span id="L-1041"><a href="#L-1041"><span class="linenos">1041</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="n">number_text</span><span class="p">)</span> +</span><span id="L-1042"><a href="#L-1042"><span class="linenos">1042</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="o">-</span><span class="nb">len</span><span class="p">(</span><span class="n">literal</span><span class="p">))</span> +</span><span id="L-1043"><a href="#L-1043"><span class="linenos">1043</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-1044"><a href="#L-1044"><span class="linenos">1044</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> +</span><span id="L-1045"><a href="#L-1045"><span class="linenos">1045</span></a> +</span><span id="L-1046"><a href="#L-1046"><span class="linenos">1046</span></a> <span class="k">def</span> <span class="nf">_scan_bits</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-1047"><a href="#L-1047"><span class="linenos">1047</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="L-1048"><a href="#L-1048"><span class="linenos">1048</span></a> <span class="n">value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_value</span><span class="p">()</span> +</span><span id="L-1049"><a href="#L-1049"><span class="linenos">1049</span></a> <span class="k">try</span><span class="p">:</span> +</span><span id="L-1050"><a href="#L-1050"><span class="linenos">1050</span></a> <span class="c1"># If `value` can't be converted to a binary, fallback to tokenizing it as an identifier</span> +</span><span id="L-1051"><a href="#L-1051"><span class="linenos">1051</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> +</span><span id="L-1052"><a href="#L-1052"><span class="linenos">1052</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BIT_STRING</span><span class="p">,</span> <span class="n">value</span><span class="p">[</span><span class="mi">2</span><span class="p">:])</span> <span class="c1"># Drop the 0b</span> +</span><span id="L-1053"><a href="#L-1053"><span class="linenos">1053</span></a> <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span> +</span><span id="L-1054"><a href="#L-1054"><span class="linenos">1054</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">)</span> +</span><span id="L-1055"><a href="#L-1055"><span class="linenos">1055</span></a> +</span><span id="L-1056"><a href="#L-1056"><span class="linenos">1056</span></a> <span class="k">def</span> <span class="nf">_scan_hex</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-1057"><a href="#L-1057"><span class="linenos">1057</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="L-1058"><a href="#L-1058"><span class="linenos">1058</span></a> <span class="n">value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_value</span><span class="p">()</span> +</span><span id="L-1059"><a href="#L-1059"><span class="linenos">1059</span></a> <span class="k">try</span><span class="p">:</span> +</span><span id="L-1060"><a href="#L-1060"><span class="linenos">1060</span></a> <span class="c1"># If `value` can't be converted to a hex, fallback to tokenizing it as an identifier</span> +</span><span id="L-1061"><a href="#L-1061"><span class="linenos">1061</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="mi">16</span><span class="p">)</span> +</span><span id="L-1062"><a href="#L-1062"><span class="linenos">1062</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">HEX_STRING</span><span class="p">,</span> <span class="n">value</span><span class="p">[</span><span class="mi">2</span><span class="p">:])</span> <span class="c1"># Drop the 0x</span> +</span><span id="L-1063"><a href="#L-1063"><span class="linenos">1063</span></a> <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span> +</span><span id="L-1064"><a href="#L-1064"><span class="linenos">1064</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">)</span> +</span><span id="L-1065"><a href="#L-1065"><span class="linenos">1065</span></a> +</span><span id="L-1066"><a href="#L-1066"><span class="linenos">1066</span></a> <span class="k">def</span> <span class="nf">_extract_value</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-1067"><a href="#L-1067"><span class="linenos">1067</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> +</span><span id="L-1068"><a href="#L-1068"><span class="linenos">1068</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> +</span><span id="L-1069"><a href="#L-1069"><span class="linenos">1069</span></a> <span class="k">if</span> <span class="n">char</span> <span class="ow">and</span> <span class="n">char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> +</span><span id="L-1070"><a href="#L-1070"><span class="linenos">1070</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="L-1071"><a href="#L-1071"><span class="linenos">1071</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-1072"><a href="#L-1072"><span class="linenos">1072</span></a> <span class="k">break</span> +</span><span id="L-1073"><a href="#L-1073"><span class="linenos">1073</span></a> +</span><span id="L-1074"><a href="#L-1074"><span class="linenos">1074</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> </span><span id="L-1075"><a href="#L-1075"><span class="linenos">1075</span></a> -</span><span id="L-1076"><a href="#L-1076"><span class="linenos">1076</span></a> <span class="k">if</span> <span class="n">start</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_QUOTES</span><span class="p">:</span> -</span><span id="L-1077"><a href="#L-1077"><span class="linenos">1077</span></a> <span class="n">end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_QUOTES</span><span class="p">[</span><span class="n">start</span><span class="p">]</span> -</span><span id="L-1078"><a href="#L-1078"><span class="linenos">1078</span></a> <span class="k">elif</span> <span class="n">start</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span><span class="p">:</span> -</span><span id="L-1079"><a href="#L-1079"><span class="linenos">1079</span></a> <span class="n">end</span><span class="p">,</span> <span class="n">token_type</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span><span class="p">[</span><span class="n">start</span><span class="p">]</span> -</span><span id="L-1080"><a href="#L-1080"><span class="linenos">1080</span></a> -</span><span id="L-1081"><a href="#L-1081"><span class="linenos">1081</span></a> <span class="k">if</span> <span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HEX_STRING</span><span class="p">:</span> -</span><span id="L-1082"><a href="#L-1082"><span class="linenos">1082</span></a> <span class="n">base</span> <span class="o">=</span> <span class="mi">16</span> -</span><span id="L-1083"><a href="#L-1083"><span class="linenos">1083</span></a> <span class="k">elif</span> <span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT_STRING</span><span class="p">:</span> -</span><span id="L-1084"><a href="#L-1084"><span class="linenos">1084</span></a> <span class="n">base</span> <span class="o">=</span> <span class="mi">2</span> -</span><span id="L-1085"><a href="#L-1085"><span class="linenos">1085</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-1086"><a href="#L-1086"><span class="linenos">1086</span></a> <span class="k">return</span> <span class="kc">False</span> -</span><span id="L-1087"><a href="#L-1087"><span class="linenos">1087</span></a> -</span><span id="L-1088"><a href="#L-1088"><span class="linenos">1088</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">start</span><span class="p">))</span> -</span><span id="L-1089"><a href="#L-1089"><span class="linenos">1089</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_string</span><span class="p">(</span><span class="n">end</span><span class="p">)</span> -</span><span id="L-1090"><a href="#L-1090"><span class="linenos">1090</span></a> -</span><span id="L-1091"><a href="#L-1091"><span class="linenos">1091</span></a> <span class="k">if</span> <span class="n">base</span><span class="p">:</span> -</span><span id="L-1092"><a href="#L-1092"><span class="linenos">1092</span></a> <span class="k">try</span><span class="p">:</span> -</span><span id="L-1093"><a href="#L-1093"><span class="linenos">1093</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">base</span><span class="p">)</span> -</span><span id="L-1094"><a href="#L-1094"><span class="linenos">1094</span></a> <span class="k">except</span><span class="p">:</span> -</span><span id="L-1095"><a href="#L-1095"><span class="linenos">1095</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span> -</span><span id="L-1096"><a href="#L-1096"><span class="linenos">1096</span></a> <span class="sa">f</span><span class="s2">"Numeric string contains invalid characters from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="si">}</span><span class="s2">"</span> -</span><span id="L-1097"><a href="#L-1097"><span class="linenos">1097</span></a> <span class="p">)</span> -</span><span id="L-1098"><a href="#L-1098"><span class="linenos">1098</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-1099"><a href="#L-1099"><span class="linenos">1099</span></a> <span class="n">text</span> <span class="o">=</span> <span class="n">text</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span> <span class="k">else</span> <span class="n">text</span> -</span><span id="L-1100"><a href="#L-1100"><span class="linenos">1100</span></a> -</span><span id="L-1101"><a href="#L-1101"><span class="linenos">1101</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">token_type</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> -</span><span id="L-1102"><a href="#L-1102"><span class="linenos">1102</span></a> <span class="k">return</span> <span class="kc">True</span> -</span><span id="L-1103"><a href="#L-1103"><span class="linenos">1103</span></a> -</span><span id="L-1104"><a href="#L-1104"><span class="linenos">1104</span></a> <span class="k">def</span> <span class="nf">_scan_identifier</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">identifier_end</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-1105"><a href="#L-1105"><span class="linenos">1105</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="L-1106"><a href="#L-1106"><span class="linenos">1106</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_string</span><span class="p">(</span><span class="n">identifier_end</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIER_ESCAPES</span><span class="p">)</span> -</span><span id="L-1107"><a href="#L-1107"><span class="linenos">1107</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> -</span><span id="L-1108"><a href="#L-1108"><span class="linenos">1108</span></a> -</span><span id="L-1109"><a href="#L-1109"><span class="linenos">1109</span></a> <span class="k">def</span> <span class="nf">_scan_var</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="L-1110"><a href="#L-1110"><span class="linenos">1110</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> -</span><span id="L-1111"><a href="#L-1111"><span class="linenos">1111</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> -</span><span id="L-1112"><a href="#L-1112"><span class="linenos">1112</span></a> <span class="k">if</span> <span class="n">char</span> <span class="ow">and</span> <span class="p">(</span><span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">VAR_SINGLE_TOKENS</span> <span class="ow">or</span> <span class="n">char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">):</span> -</span><span id="L-1113"><a href="#L-1113"><span class="linenos">1113</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="L-1114"><a href="#L-1114"><span class="linenos">1114</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-1115"><a href="#L-1115"><span class="linenos">1115</span></a> <span class="k">break</span> -</span><span id="L-1116"><a href="#L-1116"><span class="linenos">1116</span></a> -</span><span id="L-1117"><a href="#L-1117"><span class="linenos">1117</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span> -</span><span id="L-1118"><a href="#L-1118"><span class="linenos">1118</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span> -</span><span id="L-1119"><a href="#L-1119"><span class="linenos">1119</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span> -</span><span id="L-1120"><a href="#L-1120"><span class="linenos">1120</span></a> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> -</span><span id="L-1121"><a href="#L-1121"><span class="linenos">1121</span></a> <span class="p">)</span> -</span><span id="L-1122"><a href="#L-1122"><span class="linenos">1122</span></a> -</span><span id="L-1123"><a href="#L-1123"><span class="linenos">1123</span></a> <span class="k">def</span> <span class="nf">_extract_string</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">delimiter</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">escapes</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="L-1124"><a href="#L-1124"><span class="linenos">1124</span></a> <span class="n">text</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="L-1125"><a href="#L-1125"><span class="linenos">1125</span></a> <span class="n">delim_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">delimiter</span><span class="p">)</span> -</span><span id="L-1126"><a href="#L-1126"><span class="linenos">1126</span></a> <span class="n">escapes</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_STRING_ESCAPES</span> <span class="k">if</span> <span class="n">escapes</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">escapes</span> -</span><span id="L-1127"><a href="#L-1127"><span class="linenos">1127</span></a> -</span><span id="L-1128"><a href="#L-1128"><span class="linenos">1128</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> -</span><span id="L-1129"><a href="#L-1129"><span class="linenos">1129</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="n">escapes</span> <span class="ow">and</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="n">delimiter</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">in</span> <span class="n">escapes</span><span class="p">):</span> -</span><span id="L-1130"><a href="#L-1130"><span class="linenos">1130</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="n">delimiter</span><span class="p">:</span> -</span><span id="L-1131"><a href="#L-1131"><span class="linenos">1131</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> -</span><span id="L-1132"><a href="#L-1132"><span class="linenos">1132</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-1133"><a href="#L-1133"><span class="linenos">1133</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> -</span><span id="L-1134"><a href="#L-1134"><span class="linenos">1134</span></a> -</span><span id="L-1135"><a href="#L-1135"><span class="linenos">1135</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="mi">1</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> -</span><span id="L-1136"><a href="#L-1136"><span class="linenos">1136</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> -</span><span id="L-1137"><a href="#L-1137"><span class="linenos">1137</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-1138"><a href="#L-1138"><span class="linenos">1138</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Missing </span><span class="si">{</span><span class="n">delimiter</span><span class="si">}</span><span class="s2"> from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> -</span><span id="L-1139"><a href="#L-1139"><span class="linenos">1139</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="L-1140"><a href="#L-1140"><span class="linenos">1140</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_chars</span><span class="p">(</span><span class="n">delim_size</span><span class="p">)</span> <span class="o">==</span> <span class="n">delimiter</span><span class="p">:</span> -</span><span id="L-1141"><a href="#L-1141"><span class="linenos">1141</span></a> <span class="k">if</span> <span class="n">delim_size</span> <span class="o">></span> <span class="mi">1</span><span class="p">:</span> -</span><span id="L-1142"><a href="#L-1142"><span class="linenos">1142</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">delim_size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="L-1143"><a href="#L-1143"><span class="linenos">1143</span></a> <span class="k">break</span> -</span><span id="L-1144"><a href="#L-1144"><span class="linenos">1144</span></a> -</span><span id="L-1145"><a href="#L-1145"><span class="linenos">1145</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span><span class="p">:</span> -</span><span id="L-1146"><a href="#L-1146"><span class="linenos">1146</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Missing </span><span class="si">{</span><span class="n">delimiter</span><span class="si">}</span><span class="s2"> from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> -</span><span id="L-1147"><a href="#L-1147"><span class="linenos">1147</span></a> -</span><span id="L-1148"><a href="#L-1148"><span class="linenos">1148</span></a> <span class="n">current</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> -</span><span id="L-1149"><a href="#L-1149"><span class="linenos">1149</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="L-1150"><a href="#L-1150"><span class="linenos">1150</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">current</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> +</span><span id="L-1076"><a href="#L-1076"><span class="linenos">1076</span></a> <span class="k">def</span> <span class="nf">_scan_string</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">start</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> +</span><span id="L-1077"><a href="#L-1077"><span class="linenos">1077</span></a> <span class="n">base</span> <span class="o">=</span> <span class="kc">None</span> +</span><span id="L-1078"><a href="#L-1078"><span class="linenos">1078</span></a> <span class="n">token_type</span> <span class="o">=</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span> +</span><span id="L-1079"><a href="#L-1079"><span class="linenos">1079</span></a> +</span><span id="L-1080"><a href="#L-1080"><span class="linenos">1080</span></a> <span class="k">if</span> <span class="n">start</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_QUOTES</span><span class="p">:</span> +</span><span id="L-1081"><a href="#L-1081"><span class="linenos">1081</span></a> <span class="n">end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_QUOTES</span><span class="p">[</span><span class="n">start</span><span class="p">]</span> +</span><span id="L-1082"><a href="#L-1082"><span class="linenos">1082</span></a> <span class="k">elif</span> <span class="n">start</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span><span class="p">:</span> +</span><span id="L-1083"><a href="#L-1083"><span class="linenos">1083</span></a> <span class="n">end</span><span class="p">,</span> <span class="n">token_type</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span><span class="p">[</span><span class="n">start</span><span class="p">]</span> +</span><span id="L-1084"><a href="#L-1084"><span class="linenos">1084</span></a> +</span><span id="L-1085"><a href="#L-1085"><span class="linenos">1085</span></a> <span class="k">if</span> <span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HEX_STRING</span><span class="p">:</span> +</span><span id="L-1086"><a href="#L-1086"><span class="linenos">1086</span></a> <span class="n">base</span> <span class="o">=</span> <span class="mi">16</span> +</span><span id="L-1087"><a href="#L-1087"><span class="linenos">1087</span></a> <span class="k">elif</span> <span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT_STRING</span><span class="p">:</span> +</span><span id="L-1088"><a href="#L-1088"><span class="linenos">1088</span></a> <span class="n">base</span> <span class="o">=</span> <span class="mi">2</span> +</span><span id="L-1089"><a href="#L-1089"><span class="linenos">1089</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-1090"><a href="#L-1090"><span class="linenos">1090</span></a> <span class="k">return</span> <span class="kc">False</span> +</span><span id="L-1091"><a href="#L-1091"><span class="linenos">1091</span></a> +</span><span id="L-1092"><a href="#L-1092"><span class="linenos">1092</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">start</span><span class="p">))</span> +</span><span id="L-1093"><a href="#L-1093"><span class="linenos">1093</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_string</span><span class="p">(</span><span class="n">end</span><span class="p">)</span> +</span><span id="L-1094"><a href="#L-1094"><span class="linenos">1094</span></a> +</span><span id="L-1095"><a href="#L-1095"><span class="linenos">1095</span></a> <span class="k">if</span> <span class="n">base</span><span class="p">:</span> +</span><span id="L-1096"><a href="#L-1096"><span class="linenos">1096</span></a> <span class="k">try</span><span class="p">:</span> +</span><span id="L-1097"><a href="#L-1097"><span class="linenos">1097</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">base</span><span class="p">)</span> +</span><span id="L-1098"><a href="#L-1098"><span class="linenos">1098</span></a> <span class="k">except</span><span class="p">:</span> +</span><span id="L-1099"><a href="#L-1099"><span class="linenos">1099</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span> +</span><span id="L-1100"><a href="#L-1100"><span class="linenos">1100</span></a> <span class="sa">f</span><span class="s2">"Numeric string contains invalid characters from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="si">}</span><span class="s2">"</span> +</span><span id="L-1101"><a href="#L-1101"><span class="linenos">1101</span></a> <span class="p">)</span> +</span><span id="L-1102"><a href="#L-1102"><span class="linenos">1102</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-1103"><a href="#L-1103"><span class="linenos">1103</span></a> <span class="n">text</span> <span class="o">=</span> <span class="n">text</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span> <span class="k">else</span> <span class="n">text</span> +</span><span id="L-1104"><a href="#L-1104"><span class="linenos">1104</span></a> +</span><span id="L-1105"><a href="#L-1105"><span class="linenos">1105</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">token_type</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> +</span><span id="L-1106"><a href="#L-1106"><span class="linenos">1106</span></a> <span class="k">return</span> <span class="kc">True</span> +</span><span id="L-1107"><a href="#L-1107"><span class="linenos">1107</span></a> +</span><span id="L-1108"><a href="#L-1108"><span class="linenos">1108</span></a> <span class="k">def</span> <span class="nf">_scan_identifier</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">identifier_end</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-1109"><a href="#L-1109"><span class="linenos">1109</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="L-1110"><a href="#L-1110"><span class="linenos">1110</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_string</span><span class="p">(</span><span class="n">identifier_end</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIER_ESCAPES</span><span class="p">)</span> +</span><span id="L-1111"><a href="#L-1111"><span class="linenos">1111</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> +</span><span id="L-1112"><a href="#L-1112"><span class="linenos">1112</span></a> +</span><span id="L-1113"><a href="#L-1113"><span class="linenos">1113</span></a> <span class="k">def</span> <span class="nf">_scan_var</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="L-1114"><a href="#L-1114"><span class="linenos">1114</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> +</span><span id="L-1115"><a href="#L-1115"><span class="linenos">1115</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> +</span><span id="L-1116"><a href="#L-1116"><span class="linenos">1116</span></a> <span class="k">if</span> <span class="n">char</span> <span class="ow">and</span> <span class="p">(</span><span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">VAR_SINGLE_TOKENS</span> <span class="ow">or</span> <span class="n">char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">):</span> +</span><span id="L-1117"><a href="#L-1117"><span class="linenos">1117</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="L-1118"><a href="#L-1118"><span class="linenos">1118</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-1119"><a href="#L-1119"><span class="linenos">1119</span></a> <span class="k">break</span> +</span><span id="L-1120"><a href="#L-1120"><span class="linenos">1120</span></a> +</span><span id="L-1121"><a href="#L-1121"><span class="linenos">1121</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span> +</span><span id="L-1122"><a href="#L-1122"><span class="linenos">1122</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span> +</span><span id="L-1123"><a href="#L-1123"><span class="linenos">1123</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span> +</span><span id="L-1124"><a href="#L-1124"><span class="linenos">1124</span></a> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> +</span><span id="L-1125"><a href="#L-1125"><span class="linenos">1125</span></a> <span class="p">)</span> +</span><span id="L-1126"><a href="#L-1126"><span class="linenos">1126</span></a> +</span><span id="L-1127"><a href="#L-1127"><span class="linenos">1127</span></a> <span class="k">def</span> <span class="nf">_extract_string</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">delimiter</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">escapes</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="L-1128"><a href="#L-1128"><span class="linenos">1128</span></a> <span class="n">text</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="L-1129"><a href="#L-1129"><span class="linenos">1129</span></a> <span class="n">delim_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">delimiter</span><span class="p">)</span> +</span><span id="L-1130"><a href="#L-1130"><span class="linenos">1130</span></a> <span class="n">escapes</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_STRING_ESCAPES</span> <span class="k">if</span> <span class="n">escapes</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">escapes</span> +</span><span id="L-1131"><a href="#L-1131"><span class="linenos">1131</span></a> +</span><span id="L-1132"><a href="#L-1132"><span class="linenos">1132</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> +</span><span id="L-1133"><a href="#L-1133"><span class="linenos">1133</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="n">escapes</span> <span class="ow">and</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="n">delimiter</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">in</span> <span class="n">escapes</span><span class="p">):</span> +</span><span id="L-1134"><a href="#L-1134"><span class="linenos">1134</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="n">delimiter</span><span class="p">:</span> +</span><span id="L-1135"><a href="#L-1135"><span class="linenos">1135</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> +</span><span id="L-1136"><a href="#L-1136"><span class="linenos">1136</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-1137"><a href="#L-1137"><span class="linenos">1137</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> +</span><span id="L-1138"><a href="#L-1138"><span class="linenos">1138</span></a> +</span><span id="L-1139"><a href="#L-1139"><span class="linenos">1139</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="mi">1</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> +</span><span id="L-1140"><a href="#L-1140"><span class="linenos">1140</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> +</span><span id="L-1141"><a href="#L-1141"><span class="linenos">1141</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-1142"><a href="#L-1142"><span class="linenos">1142</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Missing </span><span class="si">{</span><span class="n">delimiter</span><span class="si">}</span><span class="s2"> from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> +</span><span id="L-1143"><a href="#L-1143"><span class="linenos">1143</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="L-1144"><a href="#L-1144"><span class="linenos">1144</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_chars</span><span class="p">(</span><span class="n">delim_size</span><span class="p">)</span> <span class="o">==</span> <span class="n">delimiter</span><span class="p">:</span> +</span><span id="L-1145"><a href="#L-1145"><span class="linenos">1145</span></a> <span class="k">if</span> <span class="n">delim_size</span> <span class="o">></span> <span class="mi">1</span><span class="p">:</span> +</span><span id="L-1146"><a href="#L-1146"><span class="linenos">1146</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">delim_size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="L-1147"><a href="#L-1147"><span class="linenos">1147</span></a> <span class="k">break</span> +</span><span id="L-1148"><a href="#L-1148"><span class="linenos">1148</span></a> +</span><span id="L-1149"><a href="#L-1149"><span class="linenos">1149</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span><span class="p">:</span> +</span><span id="L-1150"><a href="#L-1150"><span class="linenos">1150</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Missing </span><span class="si">{</span><span class="n">delimiter</span><span class="si">}</span><span class="s2"> from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> </span><span id="L-1151"><a href="#L-1151"><span class="linenos">1151</span></a> -</span><span id="L-1152"><a href="#L-1152"><span class="linenos">1152</span></a> <span class="k">return</span> <span class="n">text</span> +</span><span id="L-1152"><a href="#L-1152"><span class="linenos">1152</span></a> <span class="n">current</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> +</span><span id="L-1153"><a href="#L-1153"><span class="linenos">1153</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="L-1154"><a href="#L-1154"><span class="linenos">1154</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">current</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> +</span><span id="L-1155"><a href="#L-1155"><span class="linenos">1155</span></a> +</span><span id="L-1156"><a href="#L-1156"><span class="linenos">1156</span></a> <span class="k">return</span> <span class="n">text</span> </span></pre></div> @@ -2265,175 +2362,178 @@ </span><span id="TokenType-138"><a href="#TokenType-138"><span class="linenos">138</span></a> <span class="n">BIGSERIAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> </span><span id="TokenType-139"><a href="#TokenType-139"><span class="linenos">139</span></a> <span class="n">XML</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> </span><span id="TokenType-140"><a href="#TokenType-140"><span class="linenos">140</span></a> <span class="n">UNIQUEIDENTIFIER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-141"><a href="#TokenType-141"><span class="linenos">141</span></a> <span class="n">MONEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-142"><a href="#TokenType-142"><span class="linenos">142</span></a> <span class="n">SMALLMONEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-143"><a href="#TokenType-143"><span class="linenos">143</span></a> <span class="n">ROWVERSION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-144"><a href="#TokenType-144"><span class="linenos">144</span></a> <span class="n">IMAGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-145"><a href="#TokenType-145"><span class="linenos">145</span></a> <span class="n">VARIANT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-146"><a href="#TokenType-146"><span class="linenos">146</span></a> <span class="n">OBJECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-147"><a href="#TokenType-147"><span class="linenos">147</span></a> <span class="n">INET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-148"><a href="#TokenType-148"><span class="linenos">148</span></a> <span class="n">ENUM</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-149"><a href="#TokenType-149"><span class="linenos">149</span></a> -</span><span id="TokenType-150"><a href="#TokenType-150"><span class="linenos">150</span></a> <span class="c1"># keywords</span> -</span><span id="TokenType-151"><a href="#TokenType-151"><span class="linenos">151</span></a> <span class="n">ALIAS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-152"><a href="#TokenType-152"><span class="linenos">152</span></a> <span class="n">ALTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-153"><a href="#TokenType-153"><span class="linenos">153</span></a> <span class="n">ALWAYS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-154"><a href="#TokenType-154"><span class="linenos">154</span></a> <span class="n">ALL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-155"><a href="#TokenType-155"><span class="linenos">155</span></a> <span class="n">ANTI</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-156"><a href="#TokenType-156"><span class="linenos">156</span></a> <span class="n">ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-157"><a href="#TokenType-157"><span class="linenos">157</span></a> <span class="n">APPLY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-158"><a href="#TokenType-158"><span class="linenos">158</span></a> <span class="n">ARRAY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-159"><a href="#TokenType-159"><span class="linenos">159</span></a> <span class="n">ASC</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-160"><a href="#TokenType-160"><span class="linenos">160</span></a> <span class="n">ASOF</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-161"><a href="#TokenType-161"><span class="linenos">161</span></a> <span class="n">AUTO_INCREMENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-162"><a href="#TokenType-162"><span class="linenos">162</span></a> <span class="n">BEGIN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-163"><a href="#TokenType-163"><span class="linenos">163</span></a> <span class="n">BETWEEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-164"><a href="#TokenType-164"><span class="linenos">164</span></a> <span class="n">CACHE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-165"><a href="#TokenType-165"><span class="linenos">165</span></a> <span class="n">CASE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-166"><a href="#TokenType-166"><span class="linenos">166</span></a> <span class="n">CHARACTER_SET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-167"><a href="#TokenType-167"><span class="linenos">167</span></a> <span class="n">CLUSTER_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-168"><a href="#TokenType-168"><span class="linenos">168</span></a> <span class="n">COLLATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-169"><a href="#TokenType-169"><span class="linenos">169</span></a> <span class="n">COMMAND</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-170"><a href="#TokenType-170"><span class="linenos">170</span></a> <span class="n">COMMENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-171"><a href="#TokenType-171"><span class="linenos">171</span></a> <span class="n">COMMIT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-172"><a href="#TokenType-172"><span class="linenos">172</span></a> <span class="n">CONSTRAINT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-173"><a href="#TokenType-173"><span class="linenos">173</span></a> <span class="n">CREATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-174"><a href="#TokenType-174"><span class="linenos">174</span></a> <span class="n">CROSS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-175"><a href="#TokenType-175"><span class="linenos">175</span></a> <span class="n">CUBE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-176"><a href="#TokenType-176"><span class="linenos">176</span></a> <span class="n">CURRENT_DATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-177"><a href="#TokenType-177"><span class="linenos">177</span></a> <span class="n">CURRENT_DATETIME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-178"><a href="#TokenType-178"><span class="linenos">178</span></a> <span class="n">CURRENT_TIME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-179"><a href="#TokenType-179"><span class="linenos">179</span></a> <span class="n">CURRENT_TIMESTAMP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-180"><a href="#TokenType-180"><span class="linenos">180</span></a> <span class="n">CURRENT_USER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-181"><a href="#TokenType-181"><span class="linenos">181</span></a> <span class="n">DEFAULT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-182"><a href="#TokenType-182"><span class="linenos">182</span></a> <span class="n">DELETE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-183"><a href="#TokenType-183"><span class="linenos">183</span></a> <span class="n">DESC</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-184"><a href="#TokenType-184"><span class="linenos">184</span></a> <span class="n">DESCRIBE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-185"><a href="#TokenType-185"><span class="linenos">185</span></a> <span class="n">DICTIONARY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-186"><a href="#TokenType-186"><span class="linenos">186</span></a> <span class="n">DISTINCT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-187"><a href="#TokenType-187"><span class="linenos">187</span></a> <span class="n">DISTRIBUTE_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-188"><a href="#TokenType-188"><span class="linenos">188</span></a> <span class="n">DIV</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-189"><a href="#TokenType-189"><span class="linenos">189</span></a> <span class="n">DROP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-190"><a href="#TokenType-190"><span class="linenos">190</span></a> <span class="n">ELSE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-191"><a href="#TokenType-191"><span class="linenos">191</span></a> <span class="n">END</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-192"><a href="#TokenType-192"><span class="linenos">192</span></a> <span class="n">ESCAPE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-193"><a href="#TokenType-193"><span class="linenos">193</span></a> <span class="n">EXCEPT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-194"><a href="#TokenType-194"><span class="linenos">194</span></a> <span class="n">EXECUTE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-195"><a href="#TokenType-195"><span class="linenos">195</span></a> <span class="n">EXISTS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-196"><a href="#TokenType-196"><span class="linenos">196</span></a> <span class="n">FALSE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-197"><a href="#TokenType-197"><span class="linenos">197</span></a> <span class="n">FETCH</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-198"><a href="#TokenType-198"><span class="linenos">198</span></a> <span class="n">FILTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-199"><a href="#TokenType-199"><span class="linenos">199</span></a> <span class="n">FINAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-200"><a href="#TokenType-200"><span class="linenos">200</span></a> <span class="n">FIRST</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-201"><a href="#TokenType-201"><span class="linenos">201</span></a> <span class="n">FOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-202"><a href="#TokenType-202"><span class="linenos">202</span></a> <span class="n">FOREIGN_KEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-203"><a href="#TokenType-203"><span class="linenos">203</span></a> <span class="n">FORMAT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-204"><a href="#TokenType-204"><span class="linenos">204</span></a> <span class="n">FROM</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-205"><a href="#TokenType-205"><span class="linenos">205</span></a> <span class="n">FULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-206"><a href="#TokenType-206"><span class="linenos">206</span></a> <span class="n">FUNCTION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-207"><a href="#TokenType-207"><span class="linenos">207</span></a> <span class="n">GLOB</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-208"><a href="#TokenType-208"><span class="linenos">208</span></a> <span class="n">GLOBAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-209"><a href="#TokenType-209"><span class="linenos">209</span></a> <span class="n">GROUP_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-210"><a href="#TokenType-210"><span class="linenos">210</span></a> <span class="n">GROUPING_SETS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-211"><a href="#TokenType-211"><span class="linenos">211</span></a> <span class="n">HAVING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-212"><a href="#TokenType-212"><span class="linenos">212</span></a> <span class="n">HINT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-213"><a href="#TokenType-213"><span class="linenos">213</span></a> <span class="n">IF</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-214"><a href="#TokenType-214"><span class="linenos">214</span></a> <span class="n">ILIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-215"><a href="#TokenType-215"><span class="linenos">215</span></a> <span class="n">ILIKE_ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-216"><a href="#TokenType-216"><span class="linenos">216</span></a> <span class="n">IN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-217"><a href="#TokenType-217"><span class="linenos">217</span></a> <span class="n">INDEX</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-218"><a href="#TokenType-218"><span class="linenos">218</span></a> <span class="n">INNER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-219"><a href="#TokenType-219"><span class="linenos">219</span></a> <span class="n">INSERT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-220"><a href="#TokenType-220"><span class="linenos">220</span></a> <span class="n">INTERSECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-221"><a href="#TokenType-221"><span class="linenos">221</span></a> <span class="n">INTERVAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-222"><a href="#TokenType-222"><span class="linenos">222</span></a> <span class="n">INTO</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-223"><a href="#TokenType-223"><span class="linenos">223</span></a> <span class="n">INTRODUCER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-224"><a href="#TokenType-224"><span class="linenos">224</span></a> <span class="n">IRLIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-225"><a href="#TokenType-225"><span class="linenos">225</span></a> <span class="n">IS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-226"><a href="#TokenType-226"><span class="linenos">226</span></a> <span class="n">ISNULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-227"><a href="#TokenType-227"><span class="linenos">227</span></a> <span class="n">JOIN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-228"><a href="#TokenType-228"><span class="linenos">228</span></a> <span class="n">JOIN_MARKER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-229"><a href="#TokenType-229"><span class="linenos">229</span></a> <span class="n">KEEP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-230"><a href="#TokenType-230"><span class="linenos">230</span></a> <span class="n">LANGUAGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-231"><a href="#TokenType-231"><span class="linenos">231</span></a> <span class="n">LATERAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-232"><a href="#TokenType-232"><span class="linenos">232</span></a> <span class="n">LEFT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-233"><a href="#TokenType-233"><span class="linenos">233</span></a> <span class="n">LIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-234"><a href="#TokenType-234"><span class="linenos">234</span></a> <span class="n">LIKE_ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-235"><a href="#TokenType-235"><span class="linenos">235</span></a> <span class="n">LIMIT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-236"><a href="#TokenType-236"><span class="linenos">236</span></a> <span class="n">LOAD</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-237"><a href="#TokenType-237"><span class="linenos">237</span></a> <span class="n">LOCK</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-238"><a href="#TokenType-238"><span class="linenos">238</span></a> <span class="n">MAP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-239"><a href="#TokenType-239"><span class="linenos">239</span></a> <span class="n">MATCH_RECOGNIZE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-240"><a href="#TokenType-240"><span class="linenos">240</span></a> <span class="n">MERGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-241"><a href="#TokenType-241"><span class="linenos">241</span></a> <span class="n">MOD</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-242"><a href="#TokenType-242"><span class="linenos">242</span></a> <span class="n">NATURAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-243"><a href="#TokenType-243"><span class="linenos">243</span></a> <span class="n">NEXT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-244"><a href="#TokenType-244"><span class="linenos">244</span></a> <span class="n">NEXT_VALUE_FOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-245"><a href="#TokenType-245"><span class="linenos">245</span></a> <span class="n">NOTNULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-246"><a href="#TokenType-246"><span class="linenos">246</span></a> <span class="n">NULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-247"><a href="#TokenType-247"><span class="linenos">247</span></a> <span class="n">OFFSET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-248"><a href="#TokenType-248"><span class="linenos">248</span></a> <span class="n">ON</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-249"><a href="#TokenType-249"><span class="linenos">249</span></a> <span class="n">ORDER_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-250"><a href="#TokenType-250"><span class="linenos">250</span></a> <span class="n">ORDERED</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-251"><a href="#TokenType-251"><span class="linenos">251</span></a> <span class="n">ORDINALITY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-252"><a href="#TokenType-252"><span class="linenos">252</span></a> <span class="n">OUTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-253"><a href="#TokenType-253"><span class="linenos">253</span></a> <span class="n">OVER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-254"><a href="#TokenType-254"><span class="linenos">254</span></a> <span class="n">OVERLAPS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-255"><a href="#TokenType-255"><span class="linenos">255</span></a> <span class="n">OVERWRITE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-256"><a href="#TokenType-256"><span class="linenos">256</span></a> <span class="n">PARTITION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-257"><a href="#TokenType-257"><span class="linenos">257</span></a> <span class="n">PARTITION_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-258"><a href="#TokenType-258"><span class="linenos">258</span></a> <span class="n">PERCENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-259"><a href="#TokenType-259"><span class="linenos">259</span></a> <span class="n">PIVOT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-260"><a href="#TokenType-260"><span class="linenos">260</span></a> <span class="n">PLACEHOLDER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-261"><a href="#TokenType-261"><span class="linenos">261</span></a> <span class="n">PRAGMA</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-262"><a href="#TokenType-262"><span class="linenos">262</span></a> <span class="n">PRIMARY_KEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-263"><a href="#TokenType-263"><span class="linenos">263</span></a> <span class="n">PROCEDURE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-264"><a href="#TokenType-264"><span class="linenos">264</span></a> <span class="n">PROPERTIES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-265"><a href="#TokenType-265"><span class="linenos">265</span></a> <span class="n">PSEUDO_TYPE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-266"><a href="#TokenType-266"><span class="linenos">266</span></a> <span class="n">QUALIFY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-267"><a href="#TokenType-267"><span class="linenos">267</span></a> <span class="n">QUOTE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-268"><a href="#TokenType-268"><span class="linenos">268</span></a> <span class="n">RANGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-269"><a href="#TokenType-269"><span class="linenos">269</span></a> <span class="n">RECURSIVE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-270"><a href="#TokenType-270"><span class="linenos">270</span></a> <span class="n">REPLACE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-271"><a href="#TokenType-271"><span class="linenos">271</span></a> <span class="n">RETURNING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-272"><a href="#TokenType-272"><span class="linenos">272</span></a> <span class="n">REFERENCES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-273"><a href="#TokenType-273"><span class="linenos">273</span></a> <span class="n">RIGHT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-274"><a href="#TokenType-274"><span class="linenos">274</span></a> <span class="n">RLIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-275"><a href="#TokenType-275"><span class="linenos">275</span></a> <span class="n">ROLLBACK</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-276"><a href="#TokenType-276"><span class="linenos">276</span></a> <span class="n">ROLLUP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-277"><a href="#TokenType-277"><span class="linenos">277</span></a> <span class="n">ROW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-278"><a href="#TokenType-278"><span class="linenos">278</span></a> <span class="n">ROWS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-279"><a href="#TokenType-279"><span class="linenos">279</span></a> <span class="n">SELECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-280"><a href="#TokenType-280"><span class="linenos">280</span></a> <span class="n">SEMI</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-281"><a href="#TokenType-281"><span class="linenos">281</span></a> <span class="n">SEPARATOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-282"><a href="#TokenType-282"><span class="linenos">282</span></a> <span class="n">SERDE_PROPERTIES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-283"><a href="#TokenType-283"><span class="linenos">283</span></a> <span class="n">SET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-284"><a href="#TokenType-284"><span class="linenos">284</span></a> <span class="n">SETTINGS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-285"><a href="#TokenType-285"><span class="linenos">285</span></a> <span class="n">SHOW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-286"><a href="#TokenType-286"><span class="linenos">286</span></a> <span class="n">SIMILAR_TO</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-287"><a href="#TokenType-287"><span class="linenos">287</span></a> <span class="n">SOME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-288"><a href="#TokenType-288"><span class="linenos">288</span></a> <span class="n">SORT_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-289"><a href="#TokenType-289"><span class="linenos">289</span></a> <span class="n">STRUCT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-290"><a href="#TokenType-290"><span class="linenos">290</span></a> <span class="n">TABLE_SAMPLE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-291"><a href="#TokenType-291"><span class="linenos">291</span></a> <span class="n">TEMPORARY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-292"><a href="#TokenType-292"><span class="linenos">292</span></a> <span class="n">TOP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-293"><a href="#TokenType-293"><span class="linenos">293</span></a> <span class="n">THEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-294"><a href="#TokenType-294"><span class="linenos">294</span></a> <span class="n">TRUE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-295"><a href="#TokenType-295"><span class="linenos">295</span></a> <span class="n">UNCACHE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-296"><a href="#TokenType-296"><span class="linenos">296</span></a> <span class="n">UNION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-297"><a href="#TokenType-297"><span class="linenos">297</span></a> <span class="n">UNNEST</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-298"><a href="#TokenType-298"><span class="linenos">298</span></a> <span class="n">UNPIVOT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-299"><a href="#TokenType-299"><span class="linenos">299</span></a> <span class="n">UPDATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-300"><a href="#TokenType-300"><span class="linenos">300</span></a> <span class="n">USE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-301"><a href="#TokenType-301"><span class="linenos">301</span></a> <span class="n">USING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-302"><a href="#TokenType-302"><span class="linenos">302</span></a> <span class="n">VALUES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-303"><a href="#TokenType-303"><span class="linenos">303</span></a> <span class="n">VIEW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-304"><a href="#TokenType-304"><span class="linenos">304</span></a> <span class="n">VOLATILE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-305"><a href="#TokenType-305"><span class="linenos">305</span></a> <span class="n">WHEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-306"><a href="#TokenType-306"><span class="linenos">306</span></a> <span class="n">WHERE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-307"><a href="#TokenType-307"><span class="linenos">307</span></a> <span class="n">WINDOW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-308"><a href="#TokenType-308"><span class="linenos">308</span></a> <span class="n">WITH</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> -</span><span id="TokenType-309"><a href="#TokenType-309"><span class="linenos">309</span></a> <span class="n">UNIQUE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-141"><a href="#TokenType-141"><span class="linenos">141</span></a> <span class="n">USERDEFINED</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-142"><a href="#TokenType-142"><span class="linenos">142</span></a> <span class="n">MONEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-143"><a href="#TokenType-143"><span class="linenos">143</span></a> <span class="n">SMALLMONEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-144"><a href="#TokenType-144"><span class="linenos">144</span></a> <span class="n">ROWVERSION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-145"><a href="#TokenType-145"><span class="linenos">145</span></a> <span class="n">IMAGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-146"><a href="#TokenType-146"><span class="linenos">146</span></a> <span class="n">VARIANT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-147"><a href="#TokenType-147"><span class="linenos">147</span></a> <span class="n">OBJECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-148"><a href="#TokenType-148"><span class="linenos">148</span></a> <span class="n">INET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-149"><a href="#TokenType-149"><span class="linenos">149</span></a> <span class="n">ENUM</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-150"><a href="#TokenType-150"><span class="linenos">150</span></a> +</span><span id="TokenType-151"><a href="#TokenType-151"><span class="linenos">151</span></a> <span class="c1"># keywords</span> +</span><span id="TokenType-152"><a href="#TokenType-152"><span class="linenos">152</span></a> <span class="n">ALIAS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-153"><a href="#TokenType-153"><span class="linenos">153</span></a> <span class="n">ALTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-154"><a href="#TokenType-154"><span class="linenos">154</span></a> <span class="n">ALWAYS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-155"><a href="#TokenType-155"><span class="linenos">155</span></a> <span class="n">ALL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-156"><a href="#TokenType-156"><span class="linenos">156</span></a> <span class="n">ANTI</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-157"><a href="#TokenType-157"><span class="linenos">157</span></a> <span class="n">ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-158"><a href="#TokenType-158"><span class="linenos">158</span></a> <span class="n">APPLY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-159"><a href="#TokenType-159"><span class="linenos">159</span></a> <span class="n">ARRAY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-160"><a href="#TokenType-160"><span class="linenos">160</span></a> <span class="n">ASC</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-161"><a href="#TokenType-161"><span class="linenos">161</span></a> <span class="n">ASOF</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-162"><a href="#TokenType-162"><span class="linenos">162</span></a> <span class="n">AUTO_INCREMENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-163"><a href="#TokenType-163"><span class="linenos">163</span></a> <span class="n">BEGIN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-164"><a href="#TokenType-164"><span class="linenos">164</span></a> <span class="n">BETWEEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-165"><a href="#TokenType-165"><span class="linenos">165</span></a> <span class="n">CACHE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-166"><a href="#TokenType-166"><span class="linenos">166</span></a> <span class="n">CASE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-167"><a href="#TokenType-167"><span class="linenos">167</span></a> <span class="n">CHARACTER_SET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-168"><a href="#TokenType-168"><span class="linenos">168</span></a> <span class="n">CLUSTER_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-169"><a href="#TokenType-169"><span class="linenos">169</span></a> <span class="n">COLLATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-170"><a href="#TokenType-170"><span class="linenos">170</span></a> <span class="n">COMMAND</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-171"><a href="#TokenType-171"><span class="linenos">171</span></a> <span class="n">COMMENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-172"><a href="#TokenType-172"><span class="linenos">172</span></a> <span class="n">COMMIT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-173"><a href="#TokenType-173"><span class="linenos">173</span></a> <span class="n">CONSTRAINT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-174"><a href="#TokenType-174"><span class="linenos">174</span></a> <span class="n">CREATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-175"><a href="#TokenType-175"><span class="linenos">175</span></a> <span class="n">CROSS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-176"><a href="#TokenType-176"><span class="linenos">176</span></a> <span class="n">CUBE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-177"><a href="#TokenType-177"><span class="linenos">177</span></a> <span class="n">CURRENT_DATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-178"><a href="#TokenType-178"><span class="linenos">178</span></a> <span class="n">CURRENT_DATETIME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-179"><a href="#TokenType-179"><span class="linenos">179</span></a> <span class="n">CURRENT_TIME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-180"><a href="#TokenType-180"><span class="linenos">180</span></a> <span class="n">CURRENT_TIMESTAMP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-181"><a href="#TokenType-181"><span class="linenos">181</span></a> <span class="n">CURRENT_USER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-182"><a href="#TokenType-182"><span class="linenos">182</span></a> <span class="n">DEFAULT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-183"><a href="#TokenType-183"><span class="linenos">183</span></a> <span class="n">DELETE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-184"><a href="#TokenType-184"><span class="linenos">184</span></a> <span class="n">DESC</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-185"><a href="#TokenType-185"><span class="linenos">185</span></a> <span class="n">DESCRIBE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-186"><a href="#TokenType-186"><span class="linenos">186</span></a> <span class="n">DICTIONARY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-187"><a href="#TokenType-187"><span class="linenos">187</span></a> <span class="n">DISTINCT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-188"><a href="#TokenType-188"><span class="linenos">188</span></a> <span class="n">DISTRIBUTE_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-189"><a href="#TokenType-189"><span class="linenos">189</span></a> <span class="n">DIV</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-190"><a href="#TokenType-190"><span class="linenos">190</span></a> <span class="n">DROP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-191"><a href="#TokenType-191"><span class="linenos">191</span></a> <span class="n">ELSE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-192"><a href="#TokenType-192"><span class="linenos">192</span></a> <span class="n">END</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-193"><a href="#TokenType-193"><span class="linenos">193</span></a> <span class="n">ESCAPE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-194"><a href="#TokenType-194"><span class="linenos">194</span></a> <span class="n">EXCEPT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-195"><a href="#TokenType-195"><span class="linenos">195</span></a> <span class="n">EXECUTE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-196"><a href="#TokenType-196"><span class="linenos">196</span></a> <span class="n">EXISTS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-197"><a href="#TokenType-197"><span class="linenos">197</span></a> <span class="n">FALSE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-198"><a href="#TokenType-198"><span class="linenos">198</span></a> <span class="n">FETCH</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-199"><a href="#TokenType-199"><span class="linenos">199</span></a> <span class="n">FILTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-200"><a href="#TokenType-200"><span class="linenos">200</span></a> <span class="n">FINAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-201"><a href="#TokenType-201"><span class="linenos">201</span></a> <span class="n">FIRST</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-202"><a href="#TokenType-202"><span class="linenos">202</span></a> <span class="n">FOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-203"><a href="#TokenType-203"><span class="linenos">203</span></a> <span class="n">FORCE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-204"><a href="#TokenType-204"><span class="linenos">204</span></a> <span class="n">FOREIGN_KEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-205"><a href="#TokenType-205"><span class="linenos">205</span></a> <span class="n">FORMAT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-206"><a href="#TokenType-206"><span class="linenos">206</span></a> <span class="n">FROM</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-207"><a href="#TokenType-207"><span class="linenos">207</span></a> <span class="n">FULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-208"><a href="#TokenType-208"><span class="linenos">208</span></a> <span class="n">FUNCTION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-209"><a href="#TokenType-209"><span class="linenos">209</span></a> <span class="n">GLOB</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-210"><a href="#TokenType-210"><span class="linenos">210</span></a> <span class="n">GLOBAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-211"><a href="#TokenType-211"><span class="linenos">211</span></a> <span class="n">GROUP_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-212"><a href="#TokenType-212"><span class="linenos">212</span></a> <span class="n">GROUPING_SETS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-213"><a href="#TokenType-213"><span class="linenos">213</span></a> <span class="n">HAVING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-214"><a href="#TokenType-214"><span class="linenos">214</span></a> <span class="n">HINT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-215"><a href="#TokenType-215"><span class="linenos">215</span></a> <span class="n">IF</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-216"><a href="#TokenType-216"><span class="linenos">216</span></a> <span class="n">IGNORE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-217"><a href="#TokenType-217"><span class="linenos">217</span></a> <span class="n">ILIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-218"><a href="#TokenType-218"><span class="linenos">218</span></a> <span class="n">ILIKE_ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-219"><a href="#TokenType-219"><span class="linenos">219</span></a> <span class="n">IN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-220"><a href="#TokenType-220"><span class="linenos">220</span></a> <span class="n">INDEX</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-221"><a href="#TokenType-221"><span class="linenos">221</span></a> <span class="n">INNER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-222"><a href="#TokenType-222"><span class="linenos">222</span></a> <span class="n">INSERT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-223"><a href="#TokenType-223"><span class="linenos">223</span></a> <span class="n">INTERSECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-224"><a href="#TokenType-224"><span class="linenos">224</span></a> <span class="n">INTERVAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-225"><a href="#TokenType-225"><span class="linenos">225</span></a> <span class="n">INTO</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-226"><a href="#TokenType-226"><span class="linenos">226</span></a> <span class="n">INTRODUCER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-227"><a href="#TokenType-227"><span class="linenos">227</span></a> <span class="n">IRLIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-228"><a href="#TokenType-228"><span class="linenos">228</span></a> <span class="n">IS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-229"><a href="#TokenType-229"><span class="linenos">229</span></a> <span class="n">ISNULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-230"><a href="#TokenType-230"><span class="linenos">230</span></a> <span class="n">JOIN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-231"><a href="#TokenType-231"><span class="linenos">231</span></a> <span class="n">JOIN_MARKER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-232"><a href="#TokenType-232"><span class="linenos">232</span></a> <span class="n">KEEP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-233"><a href="#TokenType-233"><span class="linenos">233</span></a> <span class="n">LANGUAGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-234"><a href="#TokenType-234"><span class="linenos">234</span></a> <span class="n">LATERAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-235"><a href="#TokenType-235"><span class="linenos">235</span></a> <span class="n">LEFT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-236"><a href="#TokenType-236"><span class="linenos">236</span></a> <span class="n">LIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-237"><a href="#TokenType-237"><span class="linenos">237</span></a> <span class="n">LIKE_ANY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-238"><a href="#TokenType-238"><span class="linenos">238</span></a> <span class="n">LIMIT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-239"><a href="#TokenType-239"><span class="linenos">239</span></a> <span class="n">LOAD</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-240"><a href="#TokenType-240"><span class="linenos">240</span></a> <span class="n">LOCK</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-241"><a href="#TokenType-241"><span class="linenos">241</span></a> <span class="n">MAP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-242"><a href="#TokenType-242"><span class="linenos">242</span></a> <span class="n">MATCH_RECOGNIZE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-243"><a href="#TokenType-243"><span class="linenos">243</span></a> <span class="n">MERGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-244"><a href="#TokenType-244"><span class="linenos">244</span></a> <span class="n">MOD</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-245"><a href="#TokenType-245"><span class="linenos">245</span></a> <span class="n">NATURAL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-246"><a href="#TokenType-246"><span class="linenos">246</span></a> <span class="n">NEXT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-247"><a href="#TokenType-247"><span class="linenos">247</span></a> <span class="n">NEXT_VALUE_FOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-248"><a href="#TokenType-248"><span class="linenos">248</span></a> <span class="n">NOTNULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-249"><a href="#TokenType-249"><span class="linenos">249</span></a> <span class="n">NULL</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-250"><a href="#TokenType-250"><span class="linenos">250</span></a> <span class="n">OFFSET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-251"><a href="#TokenType-251"><span class="linenos">251</span></a> <span class="n">ON</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-252"><a href="#TokenType-252"><span class="linenos">252</span></a> <span class="n">ORDER_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-253"><a href="#TokenType-253"><span class="linenos">253</span></a> <span class="n">ORDERED</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-254"><a href="#TokenType-254"><span class="linenos">254</span></a> <span class="n">ORDINALITY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-255"><a href="#TokenType-255"><span class="linenos">255</span></a> <span class="n">OUTER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-256"><a href="#TokenType-256"><span class="linenos">256</span></a> <span class="n">OVER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-257"><a href="#TokenType-257"><span class="linenos">257</span></a> <span class="n">OVERLAPS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-258"><a href="#TokenType-258"><span class="linenos">258</span></a> <span class="n">OVERWRITE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-259"><a href="#TokenType-259"><span class="linenos">259</span></a> <span class="n">PARTITION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-260"><a href="#TokenType-260"><span class="linenos">260</span></a> <span class="n">PARTITION_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-261"><a href="#TokenType-261"><span class="linenos">261</span></a> <span class="n">PERCENT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-262"><a href="#TokenType-262"><span class="linenos">262</span></a> <span class="n">PIVOT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-263"><a href="#TokenType-263"><span class="linenos">263</span></a> <span class="n">PLACEHOLDER</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-264"><a href="#TokenType-264"><span class="linenos">264</span></a> <span class="n">PRAGMA</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-265"><a href="#TokenType-265"><span class="linenos">265</span></a> <span class="n">PRIMARY_KEY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-266"><a href="#TokenType-266"><span class="linenos">266</span></a> <span class="n">PROCEDURE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-267"><a href="#TokenType-267"><span class="linenos">267</span></a> <span class="n">PROPERTIES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-268"><a href="#TokenType-268"><span class="linenos">268</span></a> <span class="n">PSEUDO_TYPE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-269"><a href="#TokenType-269"><span class="linenos">269</span></a> <span class="n">QUALIFY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-270"><a href="#TokenType-270"><span class="linenos">270</span></a> <span class="n">QUOTE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-271"><a href="#TokenType-271"><span class="linenos">271</span></a> <span class="n">RANGE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-272"><a href="#TokenType-272"><span class="linenos">272</span></a> <span class="n">RECURSIVE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-273"><a href="#TokenType-273"><span class="linenos">273</span></a> <span class="n">REPLACE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-274"><a href="#TokenType-274"><span class="linenos">274</span></a> <span class="n">RETURNING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-275"><a href="#TokenType-275"><span class="linenos">275</span></a> <span class="n">REFERENCES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-276"><a href="#TokenType-276"><span class="linenos">276</span></a> <span class="n">RIGHT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-277"><a href="#TokenType-277"><span class="linenos">277</span></a> <span class="n">RLIKE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-278"><a href="#TokenType-278"><span class="linenos">278</span></a> <span class="n">ROLLBACK</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-279"><a href="#TokenType-279"><span class="linenos">279</span></a> <span class="n">ROLLUP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-280"><a href="#TokenType-280"><span class="linenos">280</span></a> <span class="n">ROW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-281"><a href="#TokenType-281"><span class="linenos">281</span></a> <span class="n">ROWS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-282"><a href="#TokenType-282"><span class="linenos">282</span></a> <span class="n">SELECT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-283"><a href="#TokenType-283"><span class="linenos">283</span></a> <span class="n">SEMI</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-284"><a href="#TokenType-284"><span class="linenos">284</span></a> <span class="n">SEPARATOR</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-285"><a href="#TokenType-285"><span class="linenos">285</span></a> <span class="n">SERDE_PROPERTIES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-286"><a href="#TokenType-286"><span class="linenos">286</span></a> <span class="n">SET</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-287"><a href="#TokenType-287"><span class="linenos">287</span></a> <span class="n">SETTINGS</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-288"><a href="#TokenType-288"><span class="linenos">288</span></a> <span class="n">SHOW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-289"><a href="#TokenType-289"><span class="linenos">289</span></a> <span class="n">SIMILAR_TO</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-290"><a href="#TokenType-290"><span class="linenos">290</span></a> <span class="n">SOME</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-291"><a href="#TokenType-291"><span class="linenos">291</span></a> <span class="n">SORT_BY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-292"><a href="#TokenType-292"><span class="linenos">292</span></a> <span class="n">STRUCT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-293"><a href="#TokenType-293"><span class="linenos">293</span></a> <span class="n">TABLE_SAMPLE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-294"><a href="#TokenType-294"><span class="linenos">294</span></a> <span class="n">TEMPORARY</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-295"><a href="#TokenType-295"><span class="linenos">295</span></a> <span class="n">TOP</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-296"><a href="#TokenType-296"><span class="linenos">296</span></a> <span class="n">THEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-297"><a href="#TokenType-297"><span class="linenos">297</span></a> <span class="n">TRUE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-298"><a href="#TokenType-298"><span class="linenos">298</span></a> <span class="n">UNCACHE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-299"><a href="#TokenType-299"><span class="linenos">299</span></a> <span class="n">UNION</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-300"><a href="#TokenType-300"><span class="linenos">300</span></a> <span class="n">UNNEST</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-301"><a href="#TokenType-301"><span class="linenos">301</span></a> <span class="n">UNPIVOT</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-302"><a href="#TokenType-302"><span class="linenos">302</span></a> <span class="n">UPDATE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-303"><a href="#TokenType-303"><span class="linenos">303</span></a> <span class="n">USE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-304"><a href="#TokenType-304"><span class="linenos">304</span></a> <span class="n">USING</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-305"><a href="#TokenType-305"><span class="linenos">305</span></a> <span class="n">VALUES</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-306"><a href="#TokenType-306"><span class="linenos">306</span></a> <span class="n">VIEW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-307"><a href="#TokenType-307"><span class="linenos">307</span></a> <span class="n">VOLATILE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-308"><a href="#TokenType-308"><span class="linenos">308</span></a> <span class="n">WHEN</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-309"><a href="#TokenType-309"><span class="linenos">309</span></a> <span class="n">WHERE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-310"><a href="#TokenType-310"><span class="linenos">310</span></a> <span class="n">WINDOW</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-311"><a href="#TokenType-311"><span class="linenos">311</span></a> <span class="n">WITH</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> +</span><span id="TokenType-312"><a href="#TokenType-312"><span class="linenos">312</span></a> <span class="n">UNIQUE</span> <span class="o">=</span> <span class="n">auto</span><span class="p">()</span> </span></pre></div> @@ -3929,6 +4029,18 @@ </div> + <div id="TokenType.USERDEFINED" class="classattr"> + <div class="attr variable"> + <span class="name">USERDEFINED</span> = +<span class="default_value"><<a href="#TokenType.USERDEFINED">TokenType.USERDEFINED</a>: 'USERDEFINED'></span> + + + </div> + <a class="headerlink" href="#TokenType.USERDEFINED"></a> + + + + </div> <div id="TokenType.MONEY" class="classattr"> <div class="attr variable"> <span class="name">MONEY</span> = @@ -4637,6 +4749,18 @@ </div> + <div id="TokenType.FORCE" class="classattr"> + <div class="attr variable"> + <span class="name">FORCE</span> = +<span class="default_value"><<a href="#TokenType.FORCE">TokenType.FORCE</a>: 'FORCE'></span> + + + </div> + <a class="headerlink" href="#TokenType.FORCE"></a> + + + + </div> <div id="TokenType.FOREIGN_KEY" class="classattr"> <div class="attr variable"> <span class="name">FOREIGN_KEY</span> = @@ -4781,6 +4905,18 @@ </div> + <div id="TokenType.IGNORE" class="classattr"> + <div class="attr variable"> + <span class="name">IGNORE</span> = +<span class="default_value"><<a href="#TokenType.IGNORE">TokenType.IGNORE</a>: 'IGNORE'></span> + + + </div> + <a class="headerlink" href="#TokenType.IGNORE"></a> + + + + </div> <div id="TokenType.ILIKE" class="classattr"> <div class="attr variable"> <span class="name">ILIKE</span> = @@ -5955,61 +6091,61 @@ </div> <a class="headerlink" href="#Token"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Token-312"><a href="#Token-312"><span class="linenos">312</span></a><span class="k">class</span> <span class="nc">Token</span><span class="p">:</span> -</span><span id="Token-313"><a href="#Token-313"><span class="linenos">313</span></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"token_type"</span><span class="p">,</span> <span class="s2">"text"</span><span class="p">,</span> <span class="s2">"line"</span><span class="p">,</span> <span class="s2">"col"</span><span class="p">,</span> <span class="s2">"start"</span><span class="p">,</span> <span class="s2">"end"</span><span class="p">,</span> <span class="s2">"comments"</span><span class="p">)</span> -</span><span id="Token-314"><a href="#Token-314"><span class="linenos">314</span></a> -</span><span id="Token-315"><a href="#Token-315"><span class="linenos">315</span></a> <span class="nd">@classmethod</span> -</span><span id="Token-316"><a href="#Token-316"><span class="linenos">316</span></a> <span class="k">def</span> <span class="nf">number</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">number</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="Token-317"><a href="#Token-317"><span class="linenos">317</span></a><span class="w"> </span><span class="sd">"""Returns a NUMBER token with `number` as its text."""</span> -</span><span id="Token-318"><a href="#Token-318"><span class="linenos">318</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">number</span><span class="p">))</span> -</span><span id="Token-319"><a href="#Token-319"><span class="linenos">319</span></a> -</span><span id="Token-320"><a href="#Token-320"><span class="linenos">320</span></a> <span class="nd">@classmethod</span> -</span><span id="Token-321"><a href="#Token-321"><span class="linenos">321</span></a> <span class="k">def</span> <span class="nf">string</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">string</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="Token-322"><a href="#Token-322"><span class="linenos">322</span></a><span class="w"> </span><span class="sd">"""Returns a STRING token with `string` as its text."""</span> -</span><span id="Token-323"><a href="#Token-323"><span class="linenos">323</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span><span class="p">,</span> <span class="n">string</span><span class="p">)</span> -</span><span id="Token-324"><a href="#Token-324"><span class="linenos">324</span></a> -</span><span id="Token-325"><a href="#Token-325"><span class="linenos">325</span></a> <span class="nd">@classmethod</span> -</span><span id="Token-326"><a href="#Token-326"><span class="linenos">326</span></a> <span class="k">def</span> <span class="nf">identifier</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">identifier</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="Token-327"><a href="#Token-327"><span class="linenos">327</span></a><span class="w"> </span><span class="sd">"""Returns an IDENTIFIER token with `identifier` as its text."""</span> -</span><span id="Token-328"><a href="#Token-328"><span class="linenos">328</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> <span class="n">identifier</span><span class="p">)</span> -</span><span id="Token-329"><a href="#Token-329"><span class="linenos">329</span></a> -</span><span id="Token-330"><a href="#Token-330"><span class="linenos">330</span></a> <span class="nd">@classmethod</span> -</span><span id="Token-331"><a href="#Token-331"><span class="linenos">331</span></a> <span class="k">def</span> <span class="nf">var</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">var</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="Token-332"><a href="#Token-332"><span class="linenos">332</span></a><span class="w"> </span><span class="sd">"""Returns an VAR token with `var` as its text."""</span> -</span><span id="Token-333"><a href="#Token-333"><span class="linenos">333</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">,</span> <span class="n">var</span><span class="p">)</span> -</span><span id="Token-334"><a href="#Token-334"><span class="linenos">334</span></a> -</span><span id="Token-335"><a href="#Token-335"><span class="linenos">335</span></a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span> -</span><span id="Token-336"><a href="#Token-336"><span class="linenos">336</span></a> <span class="bp">self</span><span class="p">,</span> -</span><span id="Token-337"><a href="#Token-337"><span class="linenos">337</span></a> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> -</span><span id="Token-338"><a href="#Token-338"><span class="linenos">338</span></a> <span class="n">text</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> -</span><span id="Token-339"><a href="#Token-339"><span class="linenos">339</span></a> <span class="n">line</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> -</span><span id="Token-340"><a href="#Token-340"><span class="linenos">340</span></a> <span class="n">col</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> -</span><span id="Token-341"><a href="#Token-341"><span class="linenos">341</span></a> <span class="n">start</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> -</span><span id="Token-342"><a href="#Token-342"><span class="linenos">342</span></a> <span class="n">end</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> -</span><span id="Token-343"><a href="#Token-343"><span class="linenos">343</span></a> <span class="n">comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span> -</span><span id="Token-344"><a href="#Token-344"><span class="linenos">344</span></a> <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Token-345"><a href="#Token-345"><span class="linenos">345</span></a><span class="w"> </span><span class="sd">"""Token initializer.</span> -</span><span id="Token-346"><a href="#Token-346"><span class="linenos">346</span></a> -</span><span id="Token-347"><a href="#Token-347"><span class="linenos">347</span></a><span class="sd"> Args:</span> -</span><span id="Token-348"><a href="#Token-348"><span class="linenos">348</span></a><span class="sd"> token_type: The TokenType Enum.</span> -</span><span id="Token-349"><a href="#Token-349"><span class="linenos">349</span></a><span class="sd"> text: The text of the token.</span> -</span><span id="Token-350"><a href="#Token-350"><span class="linenos">350</span></a><span class="sd"> line: The line that the token ends on.</span> -</span><span id="Token-351"><a href="#Token-351"><span class="linenos">351</span></a><span class="sd"> col: The column that the token ends on.</span> -</span><span id="Token-352"><a href="#Token-352"><span class="linenos">352</span></a><span class="sd"> start: The start index of the token.</span> -</span><span id="Token-353"><a href="#Token-353"><span class="linenos">353</span></a><span class="sd"> end: The ending index of the token.</span> -</span><span id="Token-354"><a href="#Token-354"><span class="linenos">354</span></a><span class="sd"> comments: The comments to attach to the token.</span> -</span><span id="Token-355"><a href="#Token-355"><span class="linenos">355</span></a><span class="sd"> """</span> -</span><span id="Token-356"><a href="#Token-356"><span class="linenos">356</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">token_type</span> <span class="o">=</span> <span class="n">token_type</span> -</span><span id="Token-357"><a href="#Token-357"><span class="linenos">357</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">text</span> <span class="o">=</span> <span class="n">text</span> -</span><span id="Token-358"><a href="#Token-358"><span class="linenos">358</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">line</span> <span class="o">=</span> <span class="n">line</span> -</span><span id="Token-359"><a href="#Token-359"><span class="linenos">359</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">col</span> <span class="o">=</span> <span class="n">col</span> -</span><span id="Token-360"><a href="#Token-360"><span class="linenos">360</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">start</span> <span class="o">=</span> <span class="n">start</span> -</span><span id="Token-361"><a href="#Token-361"><span class="linenos">361</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">end</span> <span class="o">=</span> <span class="n">end</span> -</span><span id="Token-362"><a href="#Token-362"><span class="linenos">362</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">comments</span> <span class="o">=</span> <span class="n">comments</span> -</span><span id="Token-363"><a href="#Token-363"><span class="linenos">363</span></a> -</span><span id="Token-364"><a href="#Token-364"><span class="linenos">364</span></a> <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Token-365"><a href="#Token-365"><span class="linenos">365</span></a> <span class="n">attributes</span> <span class="o">=</span> <span class="s2">", "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">k</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__slots__</span><span class="p">)</span> -</span><span id="Token-366"><a href="#Token-366"><span class="linenos">366</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"<Token </span><span class="si">{</span><span class="n">attributes</span><span class="si">}</span><span class="s2">>"</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Token-315"><a href="#Token-315"><span class="linenos">315</span></a><span class="k">class</span> <span class="nc">Token</span><span class="p">:</span> +</span><span id="Token-316"><a href="#Token-316"><span class="linenos">316</span></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span><span class="s2">"token_type"</span><span class="p">,</span> <span class="s2">"text"</span><span class="p">,</span> <span class="s2">"line"</span><span class="p">,</span> <span class="s2">"col"</span><span class="p">,</span> <span class="s2">"start"</span><span class="p">,</span> <span class="s2">"end"</span><span class="p">,</span> <span class="s2">"comments"</span><span class="p">)</span> +</span><span id="Token-317"><a href="#Token-317"><span class="linenos">317</span></a> +</span><span id="Token-318"><a href="#Token-318"><span class="linenos">318</span></a> <span class="nd">@classmethod</span> +</span><span id="Token-319"><a href="#Token-319"><span class="linenos">319</span></a> <span class="k">def</span> <span class="nf">number</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">number</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="Token-320"><a href="#Token-320"><span class="linenos">320</span></a><span class="w"> </span><span class="sd">"""Returns a NUMBER token with `number` as its text."""</span> +</span><span id="Token-321"><a href="#Token-321"><span class="linenos">321</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">number</span><span class="p">))</span> +</span><span id="Token-322"><a href="#Token-322"><span class="linenos">322</span></a> +</span><span id="Token-323"><a href="#Token-323"><span class="linenos">323</span></a> <span class="nd">@classmethod</span> +</span><span id="Token-324"><a href="#Token-324"><span class="linenos">324</span></a> <span class="k">def</span> <span class="nf">string</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">string</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="Token-325"><a href="#Token-325"><span class="linenos">325</span></a><span class="w"> </span><span class="sd">"""Returns a STRING token with `string` as its text."""</span> +</span><span id="Token-326"><a href="#Token-326"><span class="linenos">326</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span><span class="p">,</span> <span class="n">string</span><span class="p">)</span> +</span><span id="Token-327"><a href="#Token-327"><span class="linenos">327</span></a> +</span><span id="Token-328"><a href="#Token-328"><span class="linenos">328</span></a> <span class="nd">@classmethod</span> +</span><span id="Token-329"><a href="#Token-329"><span class="linenos">329</span></a> <span class="k">def</span> <span class="nf">identifier</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">identifier</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="Token-330"><a href="#Token-330"><span class="linenos">330</span></a><span class="w"> </span><span class="sd">"""Returns an IDENTIFIER token with `identifier` as its text."""</span> +</span><span id="Token-331"><a href="#Token-331"><span class="linenos">331</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> <span class="n">identifier</span><span class="p">)</span> +</span><span id="Token-332"><a href="#Token-332"><span class="linenos">332</span></a> +</span><span id="Token-333"><a href="#Token-333"><span class="linenos">333</span></a> <span class="nd">@classmethod</span> +</span><span id="Token-334"><a href="#Token-334"><span class="linenos">334</span></a> <span class="k">def</span> <span class="nf">var</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">var</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="Token-335"><a href="#Token-335"><span class="linenos">335</span></a><span class="w"> </span><span class="sd">"""Returns an VAR token with `var` as its text."""</span> +</span><span id="Token-336"><a href="#Token-336"><span class="linenos">336</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">,</span> <span class="n">var</span><span class="p">)</span> +</span><span id="Token-337"><a href="#Token-337"><span class="linenos">337</span></a> +</span><span id="Token-338"><a href="#Token-338"><span class="linenos">338</span></a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span> +</span><span id="Token-339"><a href="#Token-339"><span class="linenos">339</span></a> <span class="bp">self</span><span class="p">,</span> +</span><span id="Token-340"><a href="#Token-340"><span class="linenos">340</span></a> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> +</span><span id="Token-341"><a href="#Token-341"><span class="linenos">341</span></a> <span class="n">text</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> +</span><span id="Token-342"><a href="#Token-342"><span class="linenos">342</span></a> <span class="n">line</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> +</span><span id="Token-343"><a href="#Token-343"><span class="linenos">343</span></a> <span class="n">col</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> +</span><span id="Token-344"><a href="#Token-344"><span class="linenos">344</span></a> <span class="n">start</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> +</span><span id="Token-345"><a href="#Token-345"><span class="linenos">345</span></a> <span class="n">end</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> +</span><span id="Token-346"><a href="#Token-346"><span class="linenos">346</span></a> <span class="n">comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span> +</span><span id="Token-347"><a href="#Token-347"><span class="linenos">347</span></a> <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Token-348"><a href="#Token-348"><span class="linenos">348</span></a><span class="w"> </span><span class="sd">"""Token initializer.</span> +</span><span id="Token-349"><a href="#Token-349"><span class="linenos">349</span></a> +</span><span id="Token-350"><a href="#Token-350"><span class="linenos">350</span></a><span class="sd"> Args:</span> +</span><span id="Token-351"><a href="#Token-351"><span class="linenos">351</span></a><span class="sd"> token_type: The TokenType Enum.</span> +</span><span id="Token-352"><a href="#Token-352"><span class="linenos">352</span></a><span class="sd"> text: The text of the token.</span> +</span><span id="Token-353"><a href="#Token-353"><span class="linenos">353</span></a><span class="sd"> line: The line that the token ends on.</span> +</span><span id="Token-354"><a href="#Token-354"><span class="linenos">354</span></a><span class="sd"> col: The column that the token ends on.</span> +</span><span id="Token-355"><a href="#Token-355"><span class="linenos">355</span></a><span class="sd"> start: The start index of the token.</span> +</span><span id="Token-356"><a href="#Token-356"><span class="linenos">356</span></a><span class="sd"> end: The ending index of the token.</span> +</span><span id="Token-357"><a href="#Token-357"><span class="linenos">357</span></a><span class="sd"> comments: The comments to attach to the token.</span> +</span><span id="Token-358"><a href="#Token-358"><span class="linenos">358</span></a><span class="sd"> """</span> +</span><span id="Token-359"><a href="#Token-359"><span class="linenos">359</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">token_type</span> <span class="o">=</span> <span class="n">token_type</span> +</span><span id="Token-360"><a href="#Token-360"><span class="linenos">360</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">text</span> <span class="o">=</span> <span class="n">text</span> +</span><span id="Token-361"><a href="#Token-361"><span class="linenos">361</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">line</span> <span class="o">=</span> <span class="n">line</span> +</span><span id="Token-362"><a href="#Token-362"><span class="linenos">362</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">col</span> <span class="o">=</span> <span class="n">col</span> +</span><span id="Token-363"><a href="#Token-363"><span class="linenos">363</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">start</span> <span class="o">=</span> <span class="n">start</span> +</span><span id="Token-364"><a href="#Token-364"><span class="linenos">364</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">end</span> <span class="o">=</span> <span class="n">end</span> +</span><span id="Token-365"><a href="#Token-365"><span class="linenos">365</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">comments</span> <span class="o">=</span> <span class="n">comments</span> +</span><span id="Token-366"><a href="#Token-366"><span class="linenos">366</span></a> +</span><span id="Token-367"><a href="#Token-367"><span class="linenos">367</span></a> <span class="k">def</span> <span class="fm">__repr__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Token-368"><a href="#Token-368"><span class="linenos">368</span></a> <span class="n">attributes</span> <span class="o">=</span> <span class="s2">", "</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">k</span><span class="si">}</span><span class="s2">: </span><span class="si">{</span><span class="nb">getattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">k</span><span class="p">)</span><span class="si">}</span><span class="s2">"</span> <span class="k">for</span> <span class="n">k</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="vm">__slots__</span><span class="p">)</span> +</span><span id="Token-369"><a href="#Token-369"><span class="linenos">369</span></a> <span class="k">return</span> <span class="sa">f</span><span class="s2">"<Token </span><span class="si">{</span><span class="n">attributes</span><span class="si">}</span><span class="s2">>"</span> </span></pre></div> @@ -6025,34 +6161,34 @@ </div> <a class="headerlink" href="#Token.__init__"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Token.__init__-335"><a href="#Token.__init__-335"><span class="linenos">335</span></a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span> -</span><span id="Token.__init__-336"><a href="#Token.__init__-336"><span class="linenos">336</span></a> <span class="bp">self</span><span class="p">,</span> -</span><span id="Token.__init__-337"><a href="#Token.__init__-337"><span class="linenos">337</span></a> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> -</span><span id="Token.__init__-338"><a href="#Token.__init__-338"><span class="linenos">338</span></a> <span class="n">text</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> -</span><span id="Token.__init__-339"><a href="#Token.__init__-339"><span class="linenos">339</span></a> <span class="n">line</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> -</span><span id="Token.__init__-340"><a href="#Token.__init__-340"><span class="linenos">340</span></a> <span class="n">col</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> -</span><span id="Token.__init__-341"><a href="#Token.__init__-341"><span class="linenos">341</span></a> <span class="n">start</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> -</span><span id="Token.__init__-342"><a href="#Token.__init__-342"><span class="linenos">342</span></a> <span class="n">end</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> -</span><span id="Token.__init__-343"><a href="#Token.__init__-343"><span class="linenos">343</span></a> <span class="n">comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span> -</span><span id="Token.__init__-344"><a href="#Token.__init__-344"><span class="linenos">344</span></a> <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Token.__init__-345"><a href="#Token.__init__-345"><span class="linenos">345</span></a><span class="w"> </span><span class="sd">"""Token initializer.</span> -</span><span id="Token.__init__-346"><a href="#Token.__init__-346"><span class="linenos">346</span></a> -</span><span id="Token.__init__-347"><a href="#Token.__init__-347"><span class="linenos">347</span></a><span class="sd"> Args:</span> -</span><span id="Token.__init__-348"><a href="#Token.__init__-348"><span class="linenos">348</span></a><span class="sd"> token_type: The TokenType Enum.</span> -</span><span id="Token.__init__-349"><a href="#Token.__init__-349"><span class="linenos">349</span></a><span class="sd"> text: The text of the token.</span> -</span><span id="Token.__init__-350"><a href="#Token.__init__-350"><span class="linenos">350</span></a><span class="sd"> line: The line that the token ends on.</span> -</span><span id="Token.__init__-351"><a href="#Token.__init__-351"><span class="linenos">351</span></a><span class="sd"> col: The column that the token ends on.</span> -</span><span id="Token.__init__-352"><a href="#Token.__init__-352"><span class="linenos">352</span></a><span class="sd"> start: The start index of the token.</span> -</span><span id="Token.__init__-353"><a href="#Token.__init__-353"><span class="linenos">353</span></a><span class="sd"> end: The ending index of the token.</span> -</span><span id="Token.__init__-354"><a href="#Token.__init__-354"><span class="linenos">354</span></a><span class="sd"> comments: The comments to attach to the token.</span> -</span><span id="Token.__init__-355"><a href="#Token.__init__-355"><span class="linenos">355</span></a><span class="sd"> """</span> -</span><span id="Token.__init__-356"><a href="#Token.__init__-356"><span class="linenos">356</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">token_type</span> <span class="o">=</span> <span class="n">token_type</span> -</span><span id="Token.__init__-357"><a href="#Token.__init__-357"><span class="linenos">357</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">text</span> <span class="o">=</span> <span class="n">text</span> -</span><span id="Token.__init__-358"><a href="#Token.__init__-358"><span class="linenos">358</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">line</span> <span class="o">=</span> <span class="n">line</span> -</span><span id="Token.__init__-359"><a href="#Token.__init__-359"><span class="linenos">359</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">col</span> <span class="o">=</span> <span class="n">col</span> -</span><span id="Token.__init__-360"><a href="#Token.__init__-360"><span class="linenos">360</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">start</span> <span class="o">=</span> <span class="n">start</span> -</span><span id="Token.__init__-361"><a href="#Token.__init__-361"><span class="linenos">361</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">end</span> <span class="o">=</span> <span class="n">end</span> -</span><span id="Token.__init__-362"><a href="#Token.__init__-362"><span class="linenos">362</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">comments</span> <span class="o">=</span> <span class="n">comments</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Token.__init__-338"><a href="#Token.__init__-338"><span class="linenos">338</span></a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span> +</span><span id="Token.__init__-339"><a href="#Token.__init__-339"><span class="linenos">339</span></a> <span class="bp">self</span><span class="p">,</span> +</span><span id="Token.__init__-340"><a href="#Token.__init__-340"><span class="linenos">340</span></a> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> +</span><span id="Token.__init__-341"><a href="#Token.__init__-341"><span class="linenos">341</span></a> <span class="n">text</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> +</span><span id="Token.__init__-342"><a href="#Token.__init__-342"><span class="linenos">342</span></a> <span class="n">line</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> +</span><span id="Token.__init__-343"><a href="#Token.__init__-343"><span class="linenos">343</span></a> <span class="n">col</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> +</span><span id="Token.__init__-344"><a href="#Token.__init__-344"><span class="linenos">344</span></a> <span class="n">start</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> +</span><span id="Token.__init__-345"><a href="#Token.__init__-345"><span class="linenos">345</span></a> <span class="n">end</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> +</span><span id="Token.__init__-346"><a href="#Token.__init__-346"><span class="linenos">346</span></a> <span class="n">comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[],</span> +</span><span id="Token.__init__-347"><a href="#Token.__init__-347"><span class="linenos">347</span></a> <span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Token.__init__-348"><a href="#Token.__init__-348"><span class="linenos">348</span></a><span class="w"> </span><span class="sd">"""Token initializer.</span> +</span><span id="Token.__init__-349"><a href="#Token.__init__-349"><span class="linenos">349</span></a> +</span><span id="Token.__init__-350"><a href="#Token.__init__-350"><span class="linenos">350</span></a><span class="sd"> Args:</span> +</span><span id="Token.__init__-351"><a href="#Token.__init__-351"><span class="linenos">351</span></a><span class="sd"> token_type: The TokenType Enum.</span> +</span><span id="Token.__init__-352"><a href="#Token.__init__-352"><span class="linenos">352</span></a><span class="sd"> text: The text of the token.</span> +</span><span id="Token.__init__-353"><a href="#Token.__init__-353"><span class="linenos">353</span></a><span class="sd"> line: The line that the token ends on.</span> +</span><span id="Token.__init__-354"><a href="#Token.__init__-354"><span class="linenos">354</span></a><span class="sd"> col: The column that the token ends on.</span> +</span><span id="Token.__init__-355"><a href="#Token.__init__-355"><span class="linenos">355</span></a><span class="sd"> start: The start index of the token.</span> +</span><span id="Token.__init__-356"><a href="#Token.__init__-356"><span class="linenos">356</span></a><span class="sd"> end: The ending index of the token.</span> +</span><span id="Token.__init__-357"><a href="#Token.__init__-357"><span class="linenos">357</span></a><span class="sd"> comments: The comments to attach to the token.</span> +</span><span id="Token.__init__-358"><a href="#Token.__init__-358"><span class="linenos">358</span></a><span class="sd"> """</span> +</span><span id="Token.__init__-359"><a href="#Token.__init__-359"><span class="linenos">359</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">token_type</span> <span class="o">=</span> <span class="n">token_type</span> +</span><span id="Token.__init__-360"><a href="#Token.__init__-360"><span class="linenos">360</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">text</span> <span class="o">=</span> <span class="n">text</span> +</span><span id="Token.__init__-361"><a href="#Token.__init__-361"><span class="linenos">361</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">line</span> <span class="o">=</span> <span class="n">line</span> +</span><span id="Token.__init__-362"><a href="#Token.__init__-362"><span class="linenos">362</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">col</span> <span class="o">=</span> <span class="n">col</span> +</span><span id="Token.__init__-363"><a href="#Token.__init__-363"><span class="linenos">363</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">start</span> <span class="o">=</span> <span class="n">start</span> +</span><span id="Token.__init__-364"><a href="#Token.__init__-364"><span class="linenos">364</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">end</span> <span class="o">=</span> <span class="n">end</span> +</span><span id="Token.__init__-365"><a href="#Token.__init__-365"><span class="linenos">365</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">comments</span> <span class="o">=</span> <span class="n">comments</span> </span></pre></div> @@ -6085,10 +6221,10 @@ </div> <a class="headerlink" href="#Token.number"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Token.number-315"><a href="#Token.number-315"><span class="linenos">315</span></a> <span class="nd">@classmethod</span> -</span><span id="Token.number-316"><a href="#Token.number-316"><span class="linenos">316</span></a> <span class="k">def</span> <span class="nf">number</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">number</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="Token.number-317"><a href="#Token.number-317"><span class="linenos">317</span></a><span class="w"> </span><span class="sd">"""Returns a NUMBER token with `number` as its text."""</span> -</span><span id="Token.number-318"><a href="#Token.number-318"><span class="linenos">318</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">number</span><span class="p">))</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Token.number-318"><a href="#Token.number-318"><span class="linenos">318</span></a> <span class="nd">@classmethod</span> +</span><span id="Token.number-319"><a href="#Token.number-319"><span class="linenos">319</span></a> <span class="k">def</span> <span class="nf">number</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">number</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="Token.number-320"><a href="#Token.number-320"><span class="linenos">320</span></a><span class="w"> </span><span class="sd">"""Returns a NUMBER token with `number` as its text."""</span> +</span><span id="Token.number-321"><a href="#Token.number-321"><span class="linenos">321</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">number</span><span class="p">))</span> </span></pre></div> @@ -6109,10 +6245,10 @@ </div> <a class="headerlink" href="#Token.string"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Token.string-320"><a href="#Token.string-320"><span class="linenos">320</span></a> <span class="nd">@classmethod</span> -</span><span id="Token.string-321"><a href="#Token.string-321"><span class="linenos">321</span></a> <span class="k">def</span> <span class="nf">string</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">string</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="Token.string-322"><a href="#Token.string-322"><span class="linenos">322</span></a><span class="w"> </span><span class="sd">"""Returns a STRING token with `string` as its text."""</span> -</span><span id="Token.string-323"><a href="#Token.string-323"><span class="linenos">323</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span><span class="p">,</span> <span class="n">string</span><span class="p">)</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Token.string-323"><a href="#Token.string-323"><span class="linenos">323</span></a> <span class="nd">@classmethod</span> +</span><span id="Token.string-324"><a href="#Token.string-324"><span class="linenos">324</span></a> <span class="k">def</span> <span class="nf">string</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">string</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="Token.string-325"><a href="#Token.string-325"><span class="linenos">325</span></a><span class="w"> </span><span class="sd">"""Returns a STRING token with `string` as its text."""</span> +</span><span id="Token.string-326"><a href="#Token.string-326"><span class="linenos">326</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span><span class="p">,</span> <span class="n">string</span><span class="p">)</span> </span></pre></div> @@ -6133,10 +6269,10 @@ </div> <a class="headerlink" href="#Token.identifier"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Token.identifier-325"><a href="#Token.identifier-325"><span class="linenos">325</span></a> <span class="nd">@classmethod</span> -</span><span id="Token.identifier-326"><a href="#Token.identifier-326"><span class="linenos">326</span></a> <span class="k">def</span> <span class="nf">identifier</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">identifier</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="Token.identifier-327"><a href="#Token.identifier-327"><span class="linenos">327</span></a><span class="w"> </span><span class="sd">"""Returns an IDENTIFIER token with `identifier` as its text."""</span> -</span><span id="Token.identifier-328"><a href="#Token.identifier-328"><span class="linenos">328</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> <span class="n">identifier</span><span class="p">)</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Token.identifier-328"><a href="#Token.identifier-328"><span class="linenos">328</span></a> <span class="nd">@classmethod</span> +</span><span id="Token.identifier-329"><a href="#Token.identifier-329"><span class="linenos">329</span></a> <span class="k">def</span> <span class="nf">identifier</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">identifier</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="Token.identifier-330"><a href="#Token.identifier-330"><span class="linenos">330</span></a><span class="w"> </span><span class="sd">"""Returns an IDENTIFIER token with `identifier` as its text."""</span> +</span><span id="Token.identifier-331"><a href="#Token.identifier-331"><span class="linenos">331</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> <span class="n">identifier</span><span class="p">)</span> </span></pre></div> @@ -6157,10 +6293,10 @@ </div> <a class="headerlink" href="#Token.var"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Token.var-330"><a href="#Token.var-330"><span class="linenos">330</span></a> <span class="nd">@classmethod</span> -</span><span id="Token.var-331"><a href="#Token.var-331"><span class="linenos">331</span></a> <span class="k">def</span> <span class="nf">var</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">var</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> -</span><span id="Token.var-332"><a href="#Token.var-332"><span class="linenos">332</span></a><span class="w"> </span><span class="sd">"""Returns an VAR token with `var` as its text."""</span> -</span><span id="Token.var-333"><a href="#Token.var-333"><span class="linenos">333</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">,</span> <span class="n">var</span><span class="p">)</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Token.var-333"><a href="#Token.var-333"><span class="linenos">333</span></a> <span class="nd">@classmethod</span> +</span><span id="Token.var-334"><a href="#Token.var-334"><span class="linenos">334</span></a> <span class="k">def</span> <span class="nf">var</span><span class="p">(</span><span class="bp">cls</span><span class="p">,</span> <span class="n">var</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">Token</span><span class="p">:</span> +</span><span id="Token.var-335"><a href="#Token.var-335"><span class="linenos">335</span></a><span class="w"> </span><span class="sd">"""Returns an VAR token with `var` as its text."""</span> +</span><span id="Token.var-336"><a href="#Token.var-336"><span class="linenos">336</span></a> <span class="k">return</span> <span class="bp">cls</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">,</span> <span class="n">var</span><span class="p">)</span> </span></pre></div> @@ -6169,6 +6305,83 @@ </div> + <div id="Token.token_type" class="classattr"> + <div class="attr variable"> + <span class="name">token_type</span> + + + </div> + <a class="headerlink" href="#Token.token_type"></a> + + + + </div> + <div id="Token.text" class="classattr"> + <div class="attr variable"> + <span class="name">text</span> + + + </div> + <a class="headerlink" href="#Token.text"></a> + + + + </div> + <div id="Token.line" class="classattr"> + <div class="attr variable"> + <span class="name">line</span> + + + </div> + <a class="headerlink" href="#Token.line"></a> + + + + </div> + <div id="Token.col" class="classattr"> + <div class="attr variable"> + <span class="name">col</span> + + + </div> + <a class="headerlink" href="#Token.col"></a> + + + + </div> + <div id="Token.start" class="classattr"> + <div class="attr variable"> + <span class="name">start</span> + + + </div> + <a class="headerlink" href="#Token.start"></a> + + + + </div> + <div id="Token.end" class="classattr"> + <div class="attr variable"> + <span class="name">end</span> + + + </div> + <a class="headerlink" href="#Token.end"></a> + + + + </div> + <div id="Token.comments" class="classattr"> + <div class="attr variable"> + <span class="name">comments</span> + + + </div> + <a class="headerlink" href="#Token.comments"></a> + + + + </div> </section> <section id="Tokenizer"> <input id="Tokenizer-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> @@ -6181,743 +6394,964 @@ </div> <a class="headerlink" href="#Tokenizer"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Tokenizer-422"><a href="#Tokenizer-422"><span class="linenos"> 422</span></a><span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">metaclass</span><span class="o">=</span><span class="n">_Tokenizer</span><span class="p">):</span> -</span><span id="Tokenizer-423"><a href="#Tokenizer-423"><span class="linenos"> 423</span></a> <span class="n">SINGLE_TOKENS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Tokenizer-424"><a href="#Tokenizer-424"><span class="linenos"> 424</span></a> <span class="s2">"("</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_PAREN</span><span class="p">,</span> -</span><span id="Tokenizer-425"><a href="#Tokenizer-425"><span class="linenos"> 425</span></a> <span class="s2">")"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_PAREN</span><span class="p">,</span> -</span><span id="Tokenizer-426"><a href="#Tokenizer-426"><span class="linenos"> 426</span></a> <span class="s2">"["</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACKET</span><span class="p">,</span> -</span><span id="Tokenizer-427"><a href="#Tokenizer-427"><span class="linenos"> 427</span></a> <span class="s2">"]"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_BRACKET</span><span class="p">,</span> -</span><span id="Tokenizer-428"><a href="#Tokenizer-428"><span class="linenos"> 428</span></a> <span class="s2">"{"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACE</span><span class="p">,</span> -</span><span id="Tokenizer-429"><a href="#Tokenizer-429"><span class="linenos"> 429</span></a> <span class="s2">"}"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_BRACE</span><span class="p">,</span> -</span><span id="Tokenizer-430"><a href="#Tokenizer-430"><span class="linenos"> 430</span></a> <span class="s2">"&"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AMP</span><span class="p">,</span> -</span><span id="Tokenizer-431"><a href="#Tokenizer-431"><span class="linenos"> 431</span></a> <span class="s2">"^"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CARET</span><span class="p">,</span> -</span><span id="Tokenizer-432"><a href="#Tokenizer-432"><span class="linenos"> 432</span></a> <span class="s2">":"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLON</span><span class="p">,</span> -</span><span id="Tokenizer-433"><a href="#Tokenizer-433"><span class="linenos"> 433</span></a> <span class="s2">","</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMA</span><span class="p">,</span> -</span><span id="Tokenizer-434"><a href="#Tokenizer-434"><span class="linenos"> 434</span></a> <span class="s2">"."</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOT</span><span class="p">,</span> -</span><span id="Tokenizer-435"><a href="#Tokenizer-435"><span class="linenos"> 435</span></a> <span class="s2">"-"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DASH</span><span class="p">,</span> -</span><span id="Tokenizer-436"><a href="#Tokenizer-436"><span class="linenos"> 436</span></a> <span class="s2">"="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EQ</span><span class="p">,</span> -</span><span id="Tokenizer-437"><a href="#Tokenizer-437"><span class="linenos"> 437</span></a> <span class="s2">">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GT</span><span class="p">,</span> -</span><span id="Tokenizer-438"><a href="#Tokenizer-438"><span class="linenos"> 438</span></a> <span class="s2">"<"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LT</span><span class="p">,</span> -</span><span id="Tokenizer-439"><a href="#Tokenizer-439"><span class="linenos"> 439</span></a> <span class="s2">"%"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MOD</span><span class="p">,</span> -</span><span id="Tokenizer-440"><a href="#Tokenizer-440"><span class="linenos"> 440</span></a> <span class="s2">"!"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOT</span><span class="p">,</span> -</span><span id="Tokenizer-441"><a href="#Tokenizer-441"><span class="linenos"> 441</span></a> <span class="s2">"|"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span> -</span><span id="Tokenizer-442"><a href="#Tokenizer-442"><span class="linenos"> 442</span></a> <span class="s2">"+"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PLUS</span><span class="p">,</span> -</span><span id="Tokenizer-443"><a href="#Tokenizer-443"><span class="linenos"> 443</span></a> <span class="s2">";"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMICOLON</span><span class="p">,</span> -</span><span id="Tokenizer-444"><a href="#Tokenizer-444"><span class="linenos"> 444</span></a> <span class="s2">"/"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SLASH</span><span class="p">,</span> -</span><span id="Tokenizer-445"><a href="#Tokenizer-445"><span class="linenos"> 445</span></a> <span class="s2">"</span><span class="se">\\</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BACKSLASH</span><span class="p">,</span> -</span><span id="Tokenizer-446"><a href="#Tokenizer-446"><span class="linenos"> 446</span></a> <span class="s2">"*"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STAR</span><span class="p">,</span> -</span><span id="Tokenizer-447"><a href="#Tokenizer-447"><span class="linenos"> 447</span></a> <span class="s2">"~"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TILDA</span><span class="p">,</span> -</span><span id="Tokenizer-448"><a href="#Tokenizer-448"><span class="linenos"> 448</span></a> <span class="s2">"?"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PLACEHOLDER</span><span class="p">,</span> -</span><span id="Tokenizer-449"><a href="#Tokenizer-449"><span class="linenos"> 449</span></a> <span class="s2">"@"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">,</span> -</span><span id="Tokenizer-450"><a href="#Tokenizer-450"><span class="linenos"> 450</span></a> <span class="c1"># used for breaking a var like x'y' but nothing else</span> -</span><span id="Tokenizer-451"><a href="#Tokenizer-451"><span class="linenos"> 451</span></a> <span class="c1"># the token type doesn't matter</span> -</span><span id="Tokenizer-452"><a href="#Tokenizer-452"><span class="linenos"> 452</span></a> <span class="s2">"'"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">QUOTE</span><span class="p">,</span> -</span><span id="Tokenizer-453"><a href="#Tokenizer-453"><span class="linenos"> 453</span></a> <span class="s2">"`"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> -</span><span id="Tokenizer-454"><a href="#Tokenizer-454"><span class="linenos"> 454</span></a> <span class="s1">'"'</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> -</span><span id="Tokenizer-455"><a href="#Tokenizer-455"><span class="linenos"> 455</span></a> <span class="s2">"#"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HASH</span><span class="p">,</span> -</span><span id="Tokenizer-456"><a href="#Tokenizer-456"><span class="linenos"> 456</span></a> <span class="p">}</span> -</span><span id="Tokenizer-457"><a href="#Tokenizer-457"><span class="linenos"> 457</span></a> -</span><span id="Tokenizer-458"><a href="#Tokenizer-458"><span class="linenos"> 458</span></a> <span class="n">BIT_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Tokenizer-459"><a href="#Tokenizer-459"><span class="linenos"> 459</span></a> <span class="n">BYTE_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Tokenizer-460"><a href="#Tokenizer-460"><span class="linenos"> 460</span></a> <span class="n">HEX_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Tokenizer-461"><a href="#Tokenizer-461"><span class="linenos"> 461</span></a> <span class="n">RAW_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Tokenizer-462"><a href="#Tokenizer-462"><span class="linenos"> 462</span></a> <span class="n">IDENTIFIERS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'"'</span><span class="p">]</span> -</span><span id="Tokenizer-463"><a href="#Tokenizer-463"><span class="linenos"> 463</span></a> <span class="n">IDENTIFIER_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'"'</span><span class="p">]</span> -</span><span id="Tokenizer-464"><a href="#Tokenizer-464"><span class="linenos"> 464</span></a> <span class="n">QUOTES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">|</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"'"</span><span class="p">]</span> -</span><span id="Tokenizer-465"><a href="#Tokenizer-465"><span class="linenos"> 465</span></a> <span class="n">STRING_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"'"</span><span class="p">]</span> -</span><span id="Tokenizer-466"><a href="#Tokenizer-466"><span class="linenos"> 466</span></a> <span class="n">VAR_SINGLE_TOKENS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> -</span><span id="Tokenizer-467"><a href="#Tokenizer-467"><span class="linenos"> 467</span></a> -</span><span id="Tokenizer-468"><a href="#Tokenizer-468"><span class="linenos"> 468</span></a> <span class="c1"># Autofilled</span> -</span><span id="Tokenizer-469"><a href="#Tokenizer-469"><span class="linenos"> 469</span></a> <span class="n">IDENTIFIERS_CAN_START_WITH_DIGIT</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Tokenizer-425"><a href="#Tokenizer-425"><span class="linenos"> 425</span></a><span class="k">class</span> <span class="nc">Tokenizer</span><span class="p">(</span><span class="n">metaclass</span><span class="o">=</span><span class="n">_Tokenizer</span><span class="p">):</span> +</span><span id="Tokenizer-426"><a href="#Tokenizer-426"><span class="linenos"> 426</span></a> <span class="n">SINGLE_TOKENS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Tokenizer-427"><a href="#Tokenizer-427"><span class="linenos"> 427</span></a> <span class="s2">"("</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_PAREN</span><span class="p">,</span> +</span><span id="Tokenizer-428"><a href="#Tokenizer-428"><span class="linenos"> 428</span></a> <span class="s2">")"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_PAREN</span><span class="p">,</span> +</span><span id="Tokenizer-429"><a href="#Tokenizer-429"><span class="linenos"> 429</span></a> <span class="s2">"["</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACKET</span><span class="p">,</span> +</span><span id="Tokenizer-430"><a href="#Tokenizer-430"><span class="linenos"> 430</span></a> <span class="s2">"]"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_BRACKET</span><span class="p">,</span> +</span><span id="Tokenizer-431"><a href="#Tokenizer-431"><span class="linenos"> 431</span></a> <span class="s2">"{"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">L_BRACE</span><span class="p">,</span> +</span><span id="Tokenizer-432"><a href="#Tokenizer-432"><span class="linenos"> 432</span></a> <span class="s2">"}"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">R_BRACE</span><span class="p">,</span> +</span><span id="Tokenizer-433"><a href="#Tokenizer-433"><span class="linenos"> 433</span></a> <span class="s2">"&"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AMP</span><span class="p">,</span> +</span><span id="Tokenizer-434"><a href="#Tokenizer-434"><span class="linenos"> 434</span></a> <span class="s2">"^"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CARET</span><span class="p">,</span> +</span><span id="Tokenizer-435"><a href="#Tokenizer-435"><span class="linenos"> 435</span></a> <span class="s2">":"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLON</span><span class="p">,</span> +</span><span id="Tokenizer-436"><a href="#Tokenizer-436"><span class="linenos"> 436</span></a> <span class="s2">","</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMA</span><span class="p">,</span> +</span><span id="Tokenizer-437"><a href="#Tokenizer-437"><span class="linenos"> 437</span></a> <span class="s2">"."</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOT</span><span class="p">,</span> +</span><span id="Tokenizer-438"><a href="#Tokenizer-438"><span class="linenos"> 438</span></a> <span class="s2">"-"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DASH</span><span class="p">,</span> +</span><span id="Tokenizer-439"><a href="#Tokenizer-439"><span class="linenos"> 439</span></a> <span class="s2">"="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EQ</span><span class="p">,</span> +</span><span id="Tokenizer-440"><a href="#Tokenizer-440"><span class="linenos"> 440</span></a> <span class="s2">">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GT</span><span class="p">,</span> +</span><span id="Tokenizer-441"><a href="#Tokenizer-441"><span class="linenos"> 441</span></a> <span class="s2">"<"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LT</span><span class="p">,</span> +</span><span id="Tokenizer-442"><a href="#Tokenizer-442"><span class="linenos"> 442</span></a> <span class="s2">"%"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MOD</span><span class="p">,</span> +</span><span id="Tokenizer-443"><a href="#Tokenizer-443"><span class="linenos"> 443</span></a> <span class="s2">"!"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOT</span><span class="p">,</span> +</span><span id="Tokenizer-444"><a href="#Tokenizer-444"><span class="linenos"> 444</span></a> <span class="s2">"|"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span> +</span><span id="Tokenizer-445"><a href="#Tokenizer-445"><span class="linenos"> 445</span></a> <span class="s2">"+"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PLUS</span><span class="p">,</span> +</span><span id="Tokenizer-446"><a href="#Tokenizer-446"><span class="linenos"> 446</span></a> <span class="s2">";"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMICOLON</span><span class="p">,</span> +</span><span id="Tokenizer-447"><a href="#Tokenizer-447"><span class="linenos"> 447</span></a> <span class="s2">"/"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SLASH</span><span class="p">,</span> +</span><span id="Tokenizer-448"><a href="#Tokenizer-448"><span class="linenos"> 448</span></a> <span class="s2">"</span><span class="se">\\</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BACKSLASH</span><span class="p">,</span> +</span><span id="Tokenizer-449"><a href="#Tokenizer-449"><span class="linenos"> 449</span></a> <span class="s2">"*"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STAR</span><span class="p">,</span> +</span><span id="Tokenizer-450"><a href="#Tokenizer-450"><span class="linenos"> 450</span></a> <span class="s2">"~"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TILDA</span><span class="p">,</span> +</span><span id="Tokenizer-451"><a href="#Tokenizer-451"><span class="linenos"> 451</span></a> <span class="s2">"?"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PLACEHOLDER</span><span class="p">,</span> +</span><span id="Tokenizer-452"><a href="#Tokenizer-452"><span class="linenos"> 452</span></a> <span class="s2">"@"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span><span class="p">,</span> +</span><span id="Tokenizer-453"><a href="#Tokenizer-453"><span class="linenos"> 453</span></a> <span class="c1"># used for breaking a var like x'y' but nothing else</span> +</span><span id="Tokenizer-454"><a href="#Tokenizer-454"><span class="linenos"> 454</span></a> <span class="c1"># the token type doesn't matter</span> +</span><span id="Tokenizer-455"><a href="#Tokenizer-455"><span class="linenos"> 455</span></a> <span class="s2">"'"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">QUOTE</span><span class="p">,</span> +</span><span id="Tokenizer-456"><a href="#Tokenizer-456"><span class="linenos"> 456</span></a> <span class="s2">"`"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> +</span><span id="Tokenizer-457"><a href="#Tokenizer-457"><span class="linenos"> 457</span></a> <span class="s1">'"'</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> +</span><span id="Tokenizer-458"><a href="#Tokenizer-458"><span class="linenos"> 458</span></a> <span class="s2">"#"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HASH</span><span class="p">,</span> +</span><span id="Tokenizer-459"><a href="#Tokenizer-459"><span class="linenos"> 459</span></a> <span class="p">}</span> +</span><span id="Tokenizer-460"><a href="#Tokenizer-460"><span class="linenos"> 460</span></a> +</span><span id="Tokenizer-461"><a href="#Tokenizer-461"><span class="linenos"> 461</span></a> <span class="n">BIT_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Tokenizer-462"><a href="#Tokenizer-462"><span class="linenos"> 462</span></a> <span class="n">BYTE_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Tokenizer-463"><a href="#Tokenizer-463"><span class="linenos"> 463</span></a> <span class="n">HEX_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Tokenizer-464"><a href="#Tokenizer-464"><span class="linenos"> 464</span></a> <span class="n">RAW_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Tokenizer-465"><a href="#Tokenizer-465"><span class="linenos"> 465</span></a> <span class="n">IDENTIFIERS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]]</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'"'</span><span class="p">]</span> +</span><span id="Tokenizer-466"><a href="#Tokenizer-466"><span class="linenos"> 466</span></a> <span class="n">IDENTIFIER_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'"'</span><span class="p">]</span> +</span><span id="Tokenizer-467"><a href="#Tokenizer-467"><span class="linenos"> 467</span></a> <span class="n">QUOTES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">|</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"'"</span><span class="p">]</span> +</span><span id="Tokenizer-468"><a href="#Tokenizer-468"><span class="linenos"> 468</span></a> <span class="n">STRING_ESCAPES</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"'"</span><span class="p">]</span> +</span><span id="Tokenizer-469"><a href="#Tokenizer-469"><span class="linenos"> 469</span></a> <span class="n">VAR_SINGLE_TOKENS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> </span><span id="Tokenizer-470"><a href="#Tokenizer-470"><span class="linenos"> 470</span></a> -</span><span id="Tokenizer-471"><a href="#Tokenizer-471"><span class="linenos"> 471</span></a> <span class="n">_COMMENTS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="Tokenizer-472"><a href="#Tokenizer-472"><span class="linenos"> 472</span></a> <span class="n">_FORMAT_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">TokenType</span><span class="p">]]</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="Tokenizer-473"><a href="#Tokenizer-473"><span class="linenos"> 473</span></a> <span class="n">_IDENTIFIERS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="Tokenizer-474"><a href="#Tokenizer-474"><span class="linenos"> 474</span></a> <span class="n">_IDENTIFIER_ESCAPES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> -</span><span id="Tokenizer-475"><a href="#Tokenizer-475"><span class="linenos"> 475</span></a> <span class="n">_QUOTES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="Tokenizer-476"><a href="#Tokenizer-476"><span class="linenos"> 476</span></a> <span class="n">_STRING_ESCAPES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> -</span><span id="Tokenizer-477"><a href="#Tokenizer-477"><span class="linenos"> 477</span></a> <span class="n">_KEYWORD_TRIE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="Tokenizer-478"><a href="#Tokenizer-478"><span class="linenos"> 478</span></a> -</span><span id="Tokenizer-479"><a href="#Tokenizer-479"><span class="linenos"> 479</span></a> <span class="n">KEYWORDS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">TokenType</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Tokenizer-480"><a href="#Tokenizer-480"><span class="linenos"> 480</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="se">{{</span><span class="s2">%</span><span class="si">{</span><span class="n">postfix</span><span class="si">}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_START</span> <span class="k">for</span> <span class="n">postfix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> -</span><span id="Tokenizer-481"><a href="#Tokenizer-481"><span class="linenos"> 481</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="s2">%</span><span class="se">}}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_END</span> <span class="k">for</span> <span class="n">prefix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> -</span><span id="Tokenizer-482"><a href="#Tokenizer-482"><span class="linenos"> 482</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="se">{{{{</span><span class="si">{</span><span class="n">postfix</span><span class="si">}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_START</span> <span class="k">for</span> <span class="n">postfix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> -</span><span id="Tokenizer-483"><a href="#Tokenizer-483"><span class="linenos"> 483</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="se">}}}}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_END</span> <span class="k">for</span> <span class="n">prefix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> -</span><span id="Tokenizer-484"><a href="#Tokenizer-484"><span class="linenos"> 484</span></a> <span class="s2">"/*+"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HINT</span><span class="p">,</span> -</span><span id="Tokenizer-485"><a href="#Tokenizer-485"><span class="linenos"> 485</span></a> <span class="s2">"=="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EQ</span><span class="p">,</span> -</span><span id="Tokenizer-486"><a href="#Tokenizer-486"><span class="linenos"> 486</span></a> <span class="s2">"::"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DCOLON</span><span class="p">,</span> -</span><span id="Tokenizer-487"><a href="#Tokenizer-487"><span class="linenos"> 487</span></a> <span class="s2">"||"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DPIPE</span><span class="p">,</span> -</span><span id="Tokenizer-488"><a href="#Tokenizer-488"><span class="linenos"> 488</span></a> <span class="s2">">="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GTE</span><span class="p">,</span> -</span><span id="Tokenizer-489"><a href="#Tokenizer-489"><span class="linenos"> 489</span></a> <span class="s2">"<="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LTE</span><span class="p">,</span> -</span><span id="Tokenizer-490"><a href="#Tokenizer-490"><span class="linenos"> 490</span></a> <span class="s2">"<>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEQ</span><span class="p">,</span> -</span><span id="Tokenizer-491"><a href="#Tokenizer-491"><span class="linenos"> 491</span></a> <span class="s2">"!="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEQ</span><span class="p">,</span> -</span><span id="Tokenizer-492"><a href="#Tokenizer-492"><span class="linenos"> 492</span></a> <span class="s2">"<=>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULLSAFE_EQ</span><span class="p">,</span> -</span><span id="Tokenizer-493"><a href="#Tokenizer-493"><span class="linenos"> 493</span></a> <span class="s2">"->"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ARROW</span><span class="p">,</span> -</span><span id="Tokenizer-494"><a href="#Tokenizer-494"><span class="linenos"> 494</span></a> <span class="s2">"->>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DARROW</span><span class="p">,</span> -</span><span id="Tokenizer-495"><a href="#Tokenizer-495"><span class="linenos"> 495</span></a> <span class="s2">"=>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FARROW</span><span class="p">,</span> -</span><span id="Tokenizer-496"><a href="#Tokenizer-496"><span class="linenos"> 496</span></a> <span class="s2">"#>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HASH_ARROW</span><span class="p">,</span> -</span><span id="Tokenizer-497"><a href="#Tokenizer-497"><span class="linenos"> 497</span></a> <span class="s2">"#>>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DHASH_ARROW</span><span class="p">,</span> -</span><span id="Tokenizer-498"><a href="#Tokenizer-498"><span class="linenos"> 498</span></a> <span class="s2">"<->"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LR_ARROW</span><span class="p">,</span> -</span><span id="Tokenizer-499"><a href="#Tokenizer-499"><span class="linenos"> 499</span></a> <span class="s2">"&&"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DAMP</span><span class="p">,</span> -</span><span id="Tokenizer-500"><a href="#Tokenizer-500"><span class="linenos"> 500</span></a> <span class="s2">"ALL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALL</span><span class="p">,</span> -</span><span id="Tokenizer-501"><a href="#Tokenizer-501"><span class="linenos"> 501</span></a> <span class="s2">"ALWAYS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALWAYS</span><span class="p">,</span> -</span><span id="Tokenizer-502"><a href="#Tokenizer-502"><span class="linenos"> 502</span></a> <span class="s2">"AND"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AND</span><span class="p">,</span> -</span><span id="Tokenizer-503"><a href="#Tokenizer-503"><span class="linenos"> 503</span></a> <span class="s2">"ANTI"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANTI</span><span class="p">,</span> -</span><span id="Tokenizer-504"><a href="#Tokenizer-504"><span class="linenos"> 504</span></a> <span class="s2">"ANY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANY</span><span class="p">,</span> -</span><span id="Tokenizer-505"><a href="#Tokenizer-505"><span class="linenos"> 505</span></a> <span class="s2">"ASC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ASC</span><span class="p">,</span> -</span><span id="Tokenizer-506"><a href="#Tokenizer-506"><span class="linenos"> 506</span></a> <span class="s2">"AS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALIAS</span><span class="p">,</span> -</span><span id="Tokenizer-507"><a href="#Tokenizer-507"><span class="linenos"> 507</span></a> <span class="s2">"ASOF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ASOF</span><span class="p">,</span> -</span><span id="Tokenizer-508"><a href="#Tokenizer-508"><span class="linenos"> 508</span></a> <span class="s2">"AUTOINCREMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AUTO_INCREMENT</span><span class="p">,</span> -</span><span id="Tokenizer-509"><a href="#Tokenizer-509"><span class="linenos"> 509</span></a> <span class="s2">"AUTO_INCREMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AUTO_INCREMENT</span><span class="p">,</span> -</span><span id="Tokenizer-510"><a href="#Tokenizer-510"><span class="linenos"> 510</span></a> <span class="s2">"BEGIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BEGIN</span><span class="p">,</span> -</span><span id="Tokenizer-511"><a href="#Tokenizer-511"><span class="linenos"> 511</span></a> <span class="s2">"BETWEEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BETWEEN</span><span class="p">,</span> -</span><span id="Tokenizer-512"><a href="#Tokenizer-512"><span class="linenos"> 512</span></a> <span class="s2">"CACHE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CACHE</span><span class="p">,</span> -</span><span id="Tokenizer-513"><a href="#Tokenizer-513"><span class="linenos"> 513</span></a> <span class="s2">"UNCACHE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNCACHE</span><span class="p">,</span> -</span><span id="Tokenizer-514"><a href="#Tokenizer-514"><span class="linenos"> 514</span></a> <span class="s2">"CASE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CASE</span><span class="p">,</span> -</span><span id="Tokenizer-515"><a href="#Tokenizer-515"><span class="linenos"> 515</span></a> <span class="s2">"CHARACTER SET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHARACTER_SET</span><span class="p">,</span> -</span><span id="Tokenizer-516"><a href="#Tokenizer-516"><span class="linenos"> 516</span></a> <span class="s2">"CLUSTER BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CLUSTER_BY</span><span class="p">,</span> -</span><span id="Tokenizer-517"><a href="#Tokenizer-517"><span class="linenos"> 517</span></a> <span class="s2">"COLLATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLLATE</span><span class="p">,</span> -</span><span id="Tokenizer-518"><a href="#Tokenizer-518"><span class="linenos"> 518</span></a> <span class="s2">"COLUMN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLUMN</span><span class="p">,</span> -</span><span id="Tokenizer-519"><a href="#Tokenizer-519"><span class="linenos"> 519</span></a> <span class="s2">"COMMIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMIT</span><span class="p">,</span> -</span><span id="Tokenizer-520"><a href="#Tokenizer-520"><span class="linenos"> 520</span></a> <span class="s2">"CONSTRAINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CONSTRAINT</span><span class="p">,</span> -</span><span id="Tokenizer-521"><a href="#Tokenizer-521"><span class="linenos"> 521</span></a> <span class="s2">"CREATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CREATE</span><span class="p">,</span> -</span><span id="Tokenizer-522"><a href="#Tokenizer-522"><span class="linenos"> 522</span></a> <span class="s2">"CROSS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CROSS</span><span class="p">,</span> -</span><span id="Tokenizer-523"><a href="#Tokenizer-523"><span class="linenos"> 523</span></a> <span class="s2">"CUBE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CUBE</span><span class="p">,</span> -</span><span id="Tokenizer-524"><a href="#Tokenizer-524"><span class="linenos"> 524</span></a> <span class="s2">"CURRENT_DATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_DATE</span><span class="p">,</span> -</span><span id="Tokenizer-525"><a href="#Tokenizer-525"><span class="linenos"> 525</span></a> <span class="s2">"CURRENT_TIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_TIME</span><span class="p">,</span> -</span><span id="Tokenizer-526"><a href="#Tokenizer-526"><span class="linenos"> 526</span></a> <span class="s2">"CURRENT_TIMESTAMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_TIMESTAMP</span><span class="p">,</span> -</span><span id="Tokenizer-527"><a href="#Tokenizer-527"><span class="linenos"> 527</span></a> <span class="s2">"CURRENT_USER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_USER</span><span class="p">,</span> -</span><span id="Tokenizer-528"><a href="#Tokenizer-528"><span class="linenos"> 528</span></a> <span class="s2">"DATABASE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATABASE</span><span class="p">,</span> -</span><span id="Tokenizer-529"><a href="#Tokenizer-529"><span class="linenos"> 529</span></a> <span class="s2">"DEFAULT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DEFAULT</span><span class="p">,</span> -</span><span id="Tokenizer-530"><a href="#Tokenizer-530"><span class="linenos"> 530</span></a> <span class="s2">"DELETE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DELETE</span><span class="p">,</span> -</span><span id="Tokenizer-531"><a href="#Tokenizer-531"><span class="linenos"> 531</span></a> <span class="s2">"DESC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DESC</span><span class="p">,</span> -</span><span id="Tokenizer-532"><a href="#Tokenizer-532"><span class="linenos"> 532</span></a> <span class="s2">"DESCRIBE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DESCRIBE</span><span class="p">,</span> -</span><span id="Tokenizer-533"><a href="#Tokenizer-533"><span class="linenos"> 533</span></a> <span class="s2">"DISTINCT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DISTINCT</span><span class="p">,</span> -</span><span id="Tokenizer-534"><a href="#Tokenizer-534"><span class="linenos"> 534</span></a> <span class="s2">"DISTRIBUTE BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DISTRIBUTE_BY</span><span class="p">,</span> -</span><span id="Tokenizer-535"><a href="#Tokenizer-535"><span class="linenos"> 535</span></a> <span class="s2">"DIV"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DIV</span><span class="p">,</span> -</span><span id="Tokenizer-536"><a href="#Tokenizer-536"><span class="linenos"> 536</span></a> <span class="s2">"DROP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DROP</span><span class="p">,</span> -</span><span id="Tokenizer-537"><a href="#Tokenizer-537"><span class="linenos"> 537</span></a> <span class="s2">"ELSE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ELSE</span><span class="p">,</span> -</span><span id="Tokenizer-538"><a href="#Tokenizer-538"><span class="linenos"> 538</span></a> <span class="s2">"END"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">END</span><span class="p">,</span> -</span><span id="Tokenizer-539"><a href="#Tokenizer-539"><span class="linenos"> 539</span></a> <span class="s2">"ESCAPE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ESCAPE</span><span class="p">,</span> -</span><span id="Tokenizer-540"><a href="#Tokenizer-540"><span class="linenos"> 540</span></a> <span class="s2">"EXCEPT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXCEPT</span><span class="p">,</span> -</span><span id="Tokenizer-541"><a href="#Tokenizer-541"><span class="linenos"> 541</span></a> <span class="s2">"EXECUTE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXECUTE</span><span class="p">,</span> -</span><span id="Tokenizer-542"><a href="#Tokenizer-542"><span class="linenos"> 542</span></a> <span class="s2">"EXISTS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXISTS</span><span class="p">,</span> -</span><span id="Tokenizer-543"><a href="#Tokenizer-543"><span class="linenos"> 543</span></a> <span class="s2">"FALSE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FALSE</span><span class="p">,</span> -</span><span id="Tokenizer-544"><a href="#Tokenizer-544"><span class="linenos"> 544</span></a> <span class="s2">"FETCH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FETCH</span><span class="p">,</span> -</span><span id="Tokenizer-545"><a href="#Tokenizer-545"><span class="linenos"> 545</span></a> <span class="s2">"FILTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FILTER</span><span class="p">,</span> -</span><span id="Tokenizer-546"><a href="#Tokenizer-546"><span class="linenos"> 546</span></a> <span class="s2">"FIRST"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FIRST</span><span class="p">,</span> -</span><span id="Tokenizer-547"><a href="#Tokenizer-547"><span class="linenos"> 547</span></a> <span class="s2">"FULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FULL</span><span class="p">,</span> -</span><span id="Tokenizer-548"><a href="#Tokenizer-548"><span class="linenos"> 548</span></a> <span class="s2">"FUNCTION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FUNCTION</span><span class="p">,</span> -</span><span id="Tokenizer-549"><a href="#Tokenizer-549"><span class="linenos"> 549</span></a> <span class="s2">"FOR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FOR</span><span class="p">,</span> -</span><span id="Tokenizer-550"><a href="#Tokenizer-550"><span class="linenos"> 550</span></a> <span class="s2">"FOREIGN KEY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FOREIGN_KEY</span><span class="p">,</span> -</span><span id="Tokenizer-551"><a href="#Tokenizer-551"><span class="linenos"> 551</span></a> <span class="s2">"FORMAT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FORMAT</span><span class="p">,</span> -</span><span id="Tokenizer-552"><a href="#Tokenizer-552"><span class="linenos"> 552</span></a> <span class="s2">"FROM"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FROM</span><span class="p">,</span> -</span><span id="Tokenizer-553"><a href="#Tokenizer-553"><span class="linenos"> 553</span></a> <span class="s2">"GEOGRAPHY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GEOGRAPHY</span><span class="p">,</span> -</span><span id="Tokenizer-554"><a href="#Tokenizer-554"><span class="linenos"> 554</span></a> <span class="s2">"GEOMETRY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GEOMETRY</span><span class="p">,</span> -</span><span id="Tokenizer-555"><a href="#Tokenizer-555"><span class="linenos"> 555</span></a> <span class="s2">"GLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GLOB</span><span class="p">,</span> -</span><span id="Tokenizer-556"><a href="#Tokenizer-556"><span class="linenos"> 556</span></a> <span class="s2">"GROUP BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GROUP_BY</span><span class="p">,</span> -</span><span id="Tokenizer-557"><a href="#Tokenizer-557"><span class="linenos"> 557</span></a> <span class="s2">"GROUPING SETS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GROUPING_SETS</span><span class="p">,</span> -</span><span id="Tokenizer-558"><a href="#Tokenizer-558"><span class="linenos"> 558</span></a> <span class="s2">"HAVING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HAVING</span><span class="p">,</span> -</span><span id="Tokenizer-559"><a href="#Tokenizer-559"><span class="linenos"> 559</span></a> <span class="s2">"IF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IF</span><span class="p">,</span> -</span><span id="Tokenizer-560"><a href="#Tokenizer-560"><span class="linenos"> 560</span></a> <span class="s2">"ILIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ILIKE</span><span class="p">,</span> -</span><span id="Tokenizer-561"><a href="#Tokenizer-561"><span class="linenos"> 561</span></a> <span class="s2">"IN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IN</span><span class="p">,</span> -</span><span id="Tokenizer-562"><a href="#Tokenizer-562"><span class="linenos"> 562</span></a> <span class="s2">"INDEX"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INDEX</span><span class="p">,</span> -</span><span id="Tokenizer-563"><a href="#Tokenizer-563"><span class="linenos"> 563</span></a> <span class="s2">"INET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INET</span><span class="p">,</span> -</span><span id="Tokenizer-564"><a href="#Tokenizer-564"><span class="linenos"> 564</span></a> <span class="s2">"INNER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INNER</span><span class="p">,</span> -</span><span id="Tokenizer-565"><a href="#Tokenizer-565"><span class="linenos"> 565</span></a> <span class="s2">"INSERT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INSERT</span><span class="p">,</span> -</span><span id="Tokenizer-566"><a href="#Tokenizer-566"><span class="linenos"> 566</span></a> <span class="s2">"INTERVAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTERVAL</span><span class="p">,</span> -</span><span id="Tokenizer-567"><a href="#Tokenizer-567"><span class="linenos"> 567</span></a> <span class="s2">"INTERSECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTERSECT</span><span class="p">,</span> -</span><span id="Tokenizer-568"><a href="#Tokenizer-568"><span class="linenos"> 568</span></a> <span class="s2">"INTO"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTO</span><span class="p">,</span> -</span><span id="Tokenizer-569"><a href="#Tokenizer-569"><span class="linenos"> 569</span></a> <span class="s2">"IS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IS</span><span class="p">,</span> -</span><span id="Tokenizer-570"><a href="#Tokenizer-570"><span class="linenos"> 570</span></a> <span class="s2">"ISNULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ISNULL</span><span class="p">,</span> -</span><span id="Tokenizer-571"><a href="#Tokenizer-571"><span class="linenos"> 571</span></a> <span class="s2">"JOIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">JOIN</span><span class="p">,</span> -</span><span id="Tokenizer-572"><a href="#Tokenizer-572"><span class="linenos"> 572</span></a> <span class="s2">"KEEP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">KEEP</span><span class="p">,</span> -</span><span id="Tokenizer-573"><a href="#Tokenizer-573"><span class="linenos"> 573</span></a> <span class="s2">"LATERAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LATERAL</span><span class="p">,</span> -</span><span id="Tokenizer-574"><a href="#Tokenizer-574"><span class="linenos"> 574</span></a> <span class="s2">"LEFT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LEFT</span><span class="p">,</span> -</span><span id="Tokenizer-575"><a href="#Tokenizer-575"><span class="linenos"> 575</span></a> <span class="s2">"LIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LIKE</span><span class="p">,</span> -</span><span id="Tokenizer-576"><a href="#Tokenizer-576"><span class="linenos"> 576</span></a> <span class="s2">"LIMIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LIMIT</span><span class="p">,</span> -</span><span id="Tokenizer-577"><a href="#Tokenizer-577"><span class="linenos"> 577</span></a> <span class="s2">"LOAD"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LOAD</span><span class="p">,</span> -</span><span id="Tokenizer-578"><a href="#Tokenizer-578"><span class="linenos"> 578</span></a> <span class="s2">"LOCK"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LOCK</span><span class="p">,</span> -</span><span id="Tokenizer-579"><a href="#Tokenizer-579"><span class="linenos"> 579</span></a> <span class="s2">"MERGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MERGE</span><span class="p">,</span> -</span><span id="Tokenizer-580"><a href="#Tokenizer-580"><span class="linenos"> 580</span></a> <span class="s2">"NATURAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NATURAL</span><span class="p">,</span> -</span><span id="Tokenizer-581"><a href="#Tokenizer-581"><span class="linenos"> 581</span></a> <span class="s2">"NEXT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEXT</span><span class="p">,</span> -</span><span id="Tokenizer-582"><a href="#Tokenizer-582"><span class="linenos"> 582</span></a> <span class="s2">"NEXT VALUE FOR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEXT_VALUE_FOR</span><span class="p">,</span> -</span><span id="Tokenizer-583"><a href="#Tokenizer-583"><span class="linenos"> 583</span></a> <span class="s2">"NOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOT</span><span class="p">,</span> -</span><span id="Tokenizer-584"><a href="#Tokenizer-584"><span class="linenos"> 584</span></a> <span class="s2">"NOTNULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOTNULL</span><span class="p">,</span> -</span><span id="Tokenizer-585"><a href="#Tokenizer-585"><span class="linenos"> 585</span></a> <span class="s2">"NULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULL</span><span class="p">,</span> -</span><span id="Tokenizer-586"><a href="#Tokenizer-586"><span class="linenos"> 586</span></a> <span class="s2">"OBJECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OBJECT</span><span class="p">,</span> -</span><span id="Tokenizer-587"><a href="#Tokenizer-587"><span class="linenos"> 587</span></a> <span class="s2">"OFFSET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OFFSET</span><span class="p">,</span> -</span><span id="Tokenizer-588"><a href="#Tokenizer-588"><span class="linenos"> 588</span></a> <span class="s2">"ON"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ON</span><span class="p">,</span> -</span><span id="Tokenizer-589"><a href="#Tokenizer-589"><span class="linenos"> 589</span></a> <span class="s2">"OR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OR</span><span class="p">,</span> -</span><span id="Tokenizer-590"><a href="#Tokenizer-590"><span class="linenos"> 590</span></a> <span class="s2">"ORDER BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ORDER_BY</span><span class="p">,</span> -</span><span id="Tokenizer-591"><a href="#Tokenizer-591"><span class="linenos"> 591</span></a> <span class="s2">"ORDINALITY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ORDINALITY</span><span class="p">,</span> -</span><span id="Tokenizer-592"><a href="#Tokenizer-592"><span class="linenos"> 592</span></a> <span class="s2">"OUTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OUTER</span><span class="p">,</span> -</span><span id="Tokenizer-593"><a href="#Tokenizer-593"><span class="linenos"> 593</span></a> <span class="s2">"OVER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVER</span><span class="p">,</span> -</span><span id="Tokenizer-594"><a href="#Tokenizer-594"><span class="linenos"> 594</span></a> <span class="s2">"OVERLAPS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVERLAPS</span><span class="p">,</span> -</span><span id="Tokenizer-595"><a href="#Tokenizer-595"><span class="linenos"> 595</span></a> <span class="s2">"OVERWRITE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVERWRITE</span><span class="p">,</span> -</span><span id="Tokenizer-596"><a href="#Tokenizer-596"><span class="linenos"> 596</span></a> <span class="s2">"PARTITION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION</span><span class="p">,</span> -</span><span id="Tokenizer-597"><a href="#Tokenizer-597"><span class="linenos"> 597</span></a> <span class="s2">"PARTITION BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> -</span><span id="Tokenizer-598"><a href="#Tokenizer-598"><span class="linenos"> 598</span></a> <span class="s2">"PARTITIONED BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> -</span><span id="Tokenizer-599"><a href="#Tokenizer-599"><span class="linenos"> 599</span></a> <span class="s2">"PARTITIONED_BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> -</span><span id="Tokenizer-600"><a href="#Tokenizer-600"><span class="linenos"> 600</span></a> <span class="s2">"PERCENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PERCENT</span><span class="p">,</span> -</span><span id="Tokenizer-601"><a href="#Tokenizer-601"><span class="linenos"> 601</span></a> <span class="s2">"PIVOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIVOT</span><span class="p">,</span> -</span><span id="Tokenizer-602"><a href="#Tokenizer-602"><span class="linenos"> 602</span></a> <span class="s2">"PRAGMA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PRAGMA</span><span class="p">,</span> -</span><span id="Tokenizer-603"><a href="#Tokenizer-603"><span class="linenos"> 603</span></a> <span class="s2">"PRIMARY KEY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PRIMARY_KEY</span><span class="p">,</span> -</span><span id="Tokenizer-604"><a href="#Tokenizer-604"><span class="linenos"> 604</span></a> <span class="s2">"PROCEDURE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PROCEDURE</span><span class="p">,</span> -</span><span id="Tokenizer-605"><a href="#Tokenizer-605"><span class="linenos"> 605</span></a> <span class="s2">"QUALIFY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">QUALIFY</span><span class="p">,</span> -</span><span id="Tokenizer-606"><a href="#Tokenizer-606"><span class="linenos"> 606</span></a> <span class="s2">"RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RANGE</span><span class="p">,</span> -</span><span id="Tokenizer-607"><a href="#Tokenizer-607"><span class="linenos"> 607</span></a> <span class="s2">"RECURSIVE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RECURSIVE</span><span class="p">,</span> -</span><span id="Tokenizer-608"><a href="#Tokenizer-608"><span class="linenos"> 608</span></a> <span class="s2">"REGEXP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RLIKE</span><span class="p">,</span> -</span><span id="Tokenizer-609"><a href="#Tokenizer-609"><span class="linenos"> 609</span></a> <span class="s2">"REPLACE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REPLACE</span><span class="p">,</span> -</span><span id="Tokenizer-610"><a href="#Tokenizer-610"><span class="linenos"> 610</span></a> <span class="s2">"RETURNING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RETURNING</span><span class="p">,</span> -</span><span id="Tokenizer-611"><a href="#Tokenizer-611"><span class="linenos"> 611</span></a> <span class="s2">"REFERENCES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REFERENCES</span><span class="p">,</span> -</span><span id="Tokenizer-612"><a href="#Tokenizer-612"><span class="linenos"> 612</span></a> <span class="s2">"RIGHT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RIGHT</span><span class="p">,</span> -</span><span id="Tokenizer-613"><a href="#Tokenizer-613"><span class="linenos"> 613</span></a> <span class="s2">"RLIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RLIKE</span><span class="p">,</span> -</span><span id="Tokenizer-614"><a href="#Tokenizer-614"><span class="linenos"> 614</span></a> <span class="s2">"ROLLBACK"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROLLBACK</span><span class="p">,</span> -</span><span id="Tokenizer-615"><a href="#Tokenizer-615"><span class="linenos"> 615</span></a> <span class="s2">"ROLLUP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROLLUP</span><span class="p">,</span> -</span><span id="Tokenizer-616"><a href="#Tokenizer-616"><span class="linenos"> 616</span></a> <span class="s2">"ROW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROW</span><span class="p">,</span> -</span><span id="Tokenizer-617"><a href="#Tokenizer-617"><span class="linenos"> 617</span></a> <span class="s2">"ROWS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROWS</span><span class="p">,</span> -</span><span id="Tokenizer-618"><a href="#Tokenizer-618"><span class="linenos"> 618</span></a> <span class="s2">"SCHEMA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SCHEMA</span><span class="p">,</span> -</span><span id="Tokenizer-619"><a href="#Tokenizer-619"><span class="linenos"> 619</span></a> <span class="s2">"SELECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SELECT</span><span class="p">,</span> -</span><span id="Tokenizer-620"><a href="#Tokenizer-620"><span class="linenos"> 620</span></a> <span class="s2">"SEMI"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMI</span><span class="p">,</span> -</span><span id="Tokenizer-621"><a href="#Tokenizer-621"><span class="linenos"> 621</span></a> <span class="s2">"SET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SET</span><span class="p">,</span> -</span><span id="Tokenizer-622"><a href="#Tokenizer-622"><span class="linenos"> 622</span></a> <span class="s2">"SETTINGS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SETTINGS</span><span class="p">,</span> -</span><span id="Tokenizer-623"><a href="#Tokenizer-623"><span class="linenos"> 623</span></a> <span class="s2">"SHOW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SHOW</span><span class="p">,</span> -</span><span id="Tokenizer-624"><a href="#Tokenizer-624"><span class="linenos"> 624</span></a> <span class="s2">"SIMILAR TO"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SIMILAR_TO</span><span class="p">,</span> -</span><span id="Tokenizer-625"><a href="#Tokenizer-625"><span class="linenos"> 625</span></a> <span class="s2">"SOME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SOME</span><span class="p">,</span> -</span><span id="Tokenizer-626"><a href="#Tokenizer-626"><span class="linenos"> 626</span></a> <span class="s2">"SORT BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SORT_BY</span><span class="p">,</span> -</span><span id="Tokenizer-627"><a href="#Tokenizer-627"><span class="linenos"> 627</span></a> <span class="s2">"TABLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TABLE</span><span class="p">,</span> -</span><span id="Tokenizer-628"><a href="#Tokenizer-628"><span class="linenos"> 628</span></a> <span class="s2">"TABLESAMPLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TABLE_SAMPLE</span><span class="p">,</span> -</span><span id="Tokenizer-629"><a href="#Tokenizer-629"><span class="linenos"> 629</span></a> <span class="s2">"TEMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEMPORARY</span><span class="p">,</span> -</span><span id="Tokenizer-630"><a href="#Tokenizer-630"><span class="linenos"> 630</span></a> <span class="s2">"TEMPORARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEMPORARY</span><span class="p">,</span> -</span><span id="Tokenizer-631"><a href="#Tokenizer-631"><span class="linenos"> 631</span></a> <span class="s2">"THEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">THEN</span><span class="p">,</span> -</span><span id="Tokenizer-632"><a href="#Tokenizer-632"><span class="linenos"> 632</span></a> <span class="s2">"TRUE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TRUE</span><span class="p">,</span> -</span><span id="Tokenizer-633"><a href="#Tokenizer-633"><span class="linenos"> 633</span></a> <span class="s2">"UNION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNION</span><span class="p">,</span> -</span><span id="Tokenizer-634"><a href="#Tokenizer-634"><span class="linenos"> 634</span></a> <span class="s2">"UNNEST"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNNEST</span><span class="p">,</span> -</span><span id="Tokenizer-635"><a href="#Tokenizer-635"><span class="linenos"> 635</span></a> <span class="s2">"UNPIVOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNPIVOT</span><span class="p">,</span> -</span><span id="Tokenizer-636"><a href="#Tokenizer-636"><span class="linenos"> 636</span></a> <span class="s2">"UPDATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UPDATE</span><span class="p">,</span> -</span><span id="Tokenizer-637"><a href="#Tokenizer-637"><span class="linenos"> 637</span></a> <span class="s2">"USE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USE</span><span class="p">,</span> -</span><span id="Tokenizer-638"><a href="#Tokenizer-638"><span class="linenos"> 638</span></a> <span class="s2">"USING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USING</span><span class="p">,</span> -</span><span id="Tokenizer-639"><a href="#Tokenizer-639"><span class="linenos"> 639</span></a> <span class="s2">"UUID"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UUID</span><span class="p">,</span> -</span><span id="Tokenizer-640"><a href="#Tokenizer-640"><span class="linenos"> 640</span></a> <span class="s2">"VALUES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VALUES</span><span class="p">,</span> -</span><span id="Tokenizer-641"><a href="#Tokenizer-641"><span class="linenos"> 641</span></a> <span class="s2">"VIEW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VIEW</span><span class="p">,</span> -</span><span id="Tokenizer-642"><a href="#Tokenizer-642"><span class="linenos"> 642</span></a> <span class="s2">"VOLATILE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VOLATILE</span><span class="p">,</span> -</span><span id="Tokenizer-643"><a href="#Tokenizer-643"><span class="linenos"> 643</span></a> <span class="s2">"WHEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WHEN</span><span class="p">,</span> -</span><span id="Tokenizer-644"><a href="#Tokenizer-644"><span class="linenos"> 644</span></a> <span class="s2">"WHERE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WHERE</span><span class="p">,</span> -</span><span id="Tokenizer-645"><a href="#Tokenizer-645"><span class="linenos"> 645</span></a> <span class="s2">"WINDOW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WINDOW</span><span class="p">,</span> -</span><span id="Tokenizer-646"><a href="#Tokenizer-646"><span class="linenos"> 646</span></a> <span class="s2">"WITH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WITH</span><span class="p">,</span> -</span><span id="Tokenizer-647"><a href="#Tokenizer-647"><span class="linenos"> 647</span></a> <span class="s2">"APPLY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">APPLY</span><span class="p">,</span> -</span><span id="Tokenizer-648"><a href="#Tokenizer-648"><span class="linenos"> 648</span></a> <span class="s2">"ARRAY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ARRAY</span><span class="p">,</span> -</span><span id="Tokenizer-649"><a href="#Tokenizer-649"><span class="linenos"> 649</span></a> <span class="s2">"BIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span> -</span><span id="Tokenizer-650"><a href="#Tokenizer-650"><span class="linenos"> 650</span></a> <span class="s2">"BOOL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span> -</span><span id="Tokenizer-651"><a href="#Tokenizer-651"><span class="linenos"> 651</span></a> <span class="s2">"BOOLEAN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span> -</span><span id="Tokenizer-652"><a href="#Tokenizer-652"><span class="linenos"> 652</span></a> <span class="s2">"BYTE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TINYINT</span><span class="p">,</span> -</span><span id="Tokenizer-653"><a href="#Tokenizer-653"><span class="linenos"> 653</span></a> <span class="s2">"TINYINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TINYINT</span><span class="p">,</span> -</span><span id="Tokenizer-654"><a href="#Tokenizer-654"><span class="linenos"> 654</span></a> <span class="s2">"SHORT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> -</span><span id="Tokenizer-655"><a href="#Tokenizer-655"><span class="linenos"> 655</span></a> <span class="s2">"SMALLINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> -</span><span id="Tokenizer-656"><a href="#Tokenizer-656"><span class="linenos"> 656</span></a> <span class="s2">"INT2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> -</span><span id="Tokenizer-657"><a href="#Tokenizer-657"><span class="linenos"> 657</span></a> <span class="s2">"INTEGER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> -</span><span id="Tokenizer-658"><a href="#Tokenizer-658"><span class="linenos"> 658</span></a> <span class="s2">"INT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> -</span><span id="Tokenizer-659"><a href="#Tokenizer-659"><span class="linenos"> 659</span></a> <span class="s2">"INT4"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> -</span><span id="Tokenizer-660"><a href="#Tokenizer-660"><span class="linenos"> 660</span></a> <span class="s2">"LONG"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> -</span><span id="Tokenizer-661"><a href="#Tokenizer-661"><span class="linenos"> 661</span></a> <span class="s2">"BIGINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> -</span><span id="Tokenizer-662"><a href="#Tokenizer-662"><span class="linenos"> 662</span></a> <span class="s2">"INT8"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> -</span><span id="Tokenizer-663"><a href="#Tokenizer-663"><span class="linenos"> 663</span></a> <span class="s2">"DEC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> -</span><span id="Tokenizer-664"><a href="#Tokenizer-664"><span class="linenos"> 664</span></a> <span class="s2">"DECIMAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> -</span><span id="Tokenizer-665"><a href="#Tokenizer-665"><span class="linenos"> 665</span></a> <span class="s2">"BIGDECIMAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGDECIMAL</span><span class="p">,</span> -</span><span id="Tokenizer-666"><a href="#Tokenizer-666"><span class="linenos"> 666</span></a> <span class="s2">"BIGNUMERIC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGDECIMAL</span><span class="p">,</span> -</span><span id="Tokenizer-667"><a href="#Tokenizer-667"><span class="linenos"> 667</span></a> <span class="s2">"MAP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MAP</span><span class="p">,</span> -</span><span id="Tokenizer-668"><a href="#Tokenizer-668"><span class="linenos"> 668</span></a> <span class="s2">"NULLABLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULLABLE</span><span class="p">,</span> -</span><span id="Tokenizer-669"><a href="#Tokenizer-669"><span class="linenos"> 669</span></a> <span class="s2">"NUMBER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> -</span><span id="Tokenizer-670"><a href="#Tokenizer-670"><span class="linenos"> 670</span></a> <span class="s2">"NUMERIC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> -</span><span id="Tokenizer-671"><a href="#Tokenizer-671"><span class="linenos"> 671</span></a> <span class="s2">"FIXED"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> -</span><span id="Tokenizer-672"><a href="#Tokenizer-672"><span class="linenos"> 672</span></a> <span class="s2">"REAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> -</span><span id="Tokenizer-673"><a href="#Tokenizer-673"><span class="linenos"> 673</span></a> <span class="s2">"FLOAT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> -</span><span id="Tokenizer-674"><a href="#Tokenizer-674"><span class="linenos"> 674</span></a> <span class="s2">"FLOAT4"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> -</span><span id="Tokenizer-675"><a href="#Tokenizer-675"><span class="linenos"> 675</span></a> <span class="s2">"FLOAT8"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> -</span><span id="Tokenizer-676"><a href="#Tokenizer-676"><span class="linenos"> 676</span></a> <span class="s2">"DOUBLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> -</span><span id="Tokenizer-677"><a href="#Tokenizer-677"><span class="linenos"> 677</span></a> <span class="s2">"DOUBLE PRECISION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> -</span><span id="Tokenizer-678"><a href="#Tokenizer-678"><span class="linenos"> 678</span></a> <span class="s2">"JSON"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">JSON</span><span class="p">,</span> -</span><span id="Tokenizer-679"><a href="#Tokenizer-679"><span class="linenos"> 679</span></a> <span class="s2">"CHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHAR</span><span class="p">,</span> -</span><span id="Tokenizer-680"><a href="#Tokenizer-680"><span class="linenos"> 680</span></a> <span class="s2">"CHARACTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHAR</span><span class="p">,</span> -</span><span id="Tokenizer-681"><a href="#Tokenizer-681"><span class="linenos"> 681</span></a> <span class="s2">"NCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NCHAR</span><span class="p">,</span> -</span><span id="Tokenizer-682"><a href="#Tokenizer-682"><span class="linenos"> 682</span></a> <span class="s2">"VARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span> -</span><span id="Tokenizer-683"><a href="#Tokenizer-683"><span class="linenos"> 683</span></a> <span class="s2">"VARCHAR2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span> -</span><span id="Tokenizer-684"><a href="#Tokenizer-684"><span class="linenos"> 684</span></a> <span class="s2">"NVARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NVARCHAR</span><span class="p">,</span> -</span><span id="Tokenizer-685"><a href="#Tokenizer-685"><span class="linenos"> 685</span></a> <span class="s2">"NVARCHAR2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NVARCHAR</span><span class="p">,</span> -</span><span id="Tokenizer-686"><a href="#Tokenizer-686"><span class="linenos"> 686</span></a> <span class="s2">"STR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> -</span><span id="Tokenizer-687"><a href="#Tokenizer-687"><span class="linenos"> 687</span></a> <span class="s2">"STRING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> -</span><span id="Tokenizer-688"><a href="#Tokenizer-688"><span class="linenos"> 688</span></a> <span class="s2">"TEXT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> -</span><span id="Tokenizer-689"><a href="#Tokenizer-689"><span class="linenos"> 689</span></a> <span class="s2">"CLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> -</span><span id="Tokenizer-690"><a href="#Tokenizer-690"><span class="linenos"> 690</span></a> <span class="s2">"LONGVARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> -</span><span id="Tokenizer-691"><a href="#Tokenizer-691"><span class="linenos"> 691</span></a> <span class="s2">"BINARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BINARY</span><span class="p">,</span> -</span><span id="Tokenizer-692"><a href="#Tokenizer-692"><span class="linenos"> 692</span></a> <span class="s2">"BLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> -</span><span id="Tokenizer-693"><a href="#Tokenizer-693"><span class="linenos"> 693</span></a> <span class="s2">"BYTEA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> -</span><span id="Tokenizer-694"><a href="#Tokenizer-694"><span class="linenos"> 694</span></a> <span class="s2">"VARBINARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> -</span><span id="Tokenizer-695"><a href="#Tokenizer-695"><span class="linenos"> 695</span></a> <span class="s2">"TIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIME</span><span class="p">,</span> -</span><span id="Tokenizer-696"><a href="#Tokenizer-696"><span class="linenos"> 696</span></a> <span class="s2">"TIMESTAMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> -</span><span id="Tokenizer-697"><a href="#Tokenizer-697"><span class="linenos"> 697</span></a> <span class="s2">"TIMESTAMPTZ"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMPTZ</span><span class="p">,</span> -</span><span id="Tokenizer-698"><a href="#Tokenizer-698"><span class="linenos"> 698</span></a> <span class="s2">"TIMESTAMPLTZ"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMPLTZ</span><span class="p">,</span> -</span><span id="Tokenizer-699"><a href="#Tokenizer-699"><span class="linenos"> 699</span></a> <span class="s2">"DATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATE</span><span class="p">,</span> -</span><span id="Tokenizer-700"><a href="#Tokenizer-700"><span class="linenos"> 700</span></a> <span class="s2">"DATETIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATETIME</span><span class="p">,</span> -</span><span id="Tokenizer-701"><a href="#Tokenizer-701"><span class="linenos"> 701</span></a> <span class="s2">"INT4RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT4RANGE</span><span class="p">,</span> -</span><span id="Tokenizer-702"><a href="#Tokenizer-702"><span class="linenos"> 702</span></a> <span class="s2">"INT4MULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT4MULTIRANGE</span><span class="p">,</span> -</span><span id="Tokenizer-703"><a href="#Tokenizer-703"><span class="linenos"> 703</span></a> <span class="s2">"INT8RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT8RANGE</span><span class="p">,</span> -</span><span id="Tokenizer-704"><a href="#Tokenizer-704"><span class="linenos"> 704</span></a> <span class="s2">"INT8MULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT8MULTIRANGE</span><span class="p">,</span> -</span><span id="Tokenizer-705"><a href="#Tokenizer-705"><span class="linenos"> 705</span></a> <span class="s2">"NUMRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NUMRANGE</span><span class="p">,</span> -</span><span id="Tokenizer-706"><a href="#Tokenizer-706"><span class="linenos"> 706</span></a> <span class="s2">"NUMMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NUMMULTIRANGE</span><span class="p">,</span> -</span><span id="Tokenizer-707"><a href="#Tokenizer-707"><span class="linenos"> 707</span></a> <span class="s2">"TSRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSRANGE</span><span class="p">,</span> -</span><span id="Tokenizer-708"><a href="#Tokenizer-708"><span class="linenos"> 708</span></a> <span class="s2">"TSMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSMULTIRANGE</span><span class="p">,</span> -</span><span id="Tokenizer-709"><a href="#Tokenizer-709"><span class="linenos"> 709</span></a> <span class="s2">"TSTZRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSTZRANGE</span><span class="p">,</span> -</span><span id="Tokenizer-710"><a href="#Tokenizer-710"><span class="linenos"> 710</span></a> <span class="s2">"TSTZMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSTZMULTIRANGE</span><span class="p">,</span> -</span><span id="Tokenizer-711"><a href="#Tokenizer-711"><span class="linenos"> 711</span></a> <span class="s2">"DATERANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATERANGE</span><span class="p">,</span> -</span><span id="Tokenizer-712"><a href="#Tokenizer-712"><span class="linenos"> 712</span></a> <span class="s2">"DATEMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATEMULTIRANGE</span><span class="p">,</span> -</span><span id="Tokenizer-713"><a href="#Tokenizer-713"><span class="linenos"> 713</span></a> <span class="s2">"UNIQUE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNIQUE</span><span class="p">,</span> -</span><span id="Tokenizer-714"><a href="#Tokenizer-714"><span class="linenos"> 714</span></a> <span class="s2">"STRUCT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STRUCT</span><span class="p">,</span> -</span><span id="Tokenizer-715"><a href="#Tokenizer-715"><span class="linenos"> 715</span></a> <span class="s2">"VARIANT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARIANT</span><span class="p">,</span> -</span><span id="Tokenizer-716"><a href="#Tokenizer-716"><span class="linenos"> 716</span></a> <span class="s2">"ALTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALTER</span><span class="p">,</span> -</span><span id="Tokenizer-717"><a href="#Tokenizer-717"><span class="linenos"> 717</span></a> <span class="s2">"ANALYZE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="Tokenizer-718"><a href="#Tokenizer-718"><span class="linenos"> 718</span></a> <span class="s2">"CALL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="Tokenizer-719"><a href="#Tokenizer-719"><span class="linenos"> 719</span></a> <span class="s2">"COMMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMENT</span><span class="p">,</span> -</span><span id="Tokenizer-720"><a href="#Tokenizer-720"><span class="linenos"> 720</span></a> <span class="s2">"COPY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="Tokenizer-721"><a href="#Tokenizer-721"><span class="linenos"> 721</span></a> <span class="s2">"EXPLAIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="Tokenizer-722"><a href="#Tokenizer-722"><span class="linenos"> 722</span></a> <span class="s2">"GRANT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="Tokenizer-723"><a href="#Tokenizer-723"><span class="linenos"> 723</span></a> <span class="s2">"OPTIMIZE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="Tokenizer-724"><a href="#Tokenizer-724"><span class="linenos"> 724</span></a> <span class="s2">"PREPARE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="Tokenizer-725"><a href="#Tokenizer-725"><span class="linenos"> 725</span></a> <span class="s2">"TRUNCATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="Tokenizer-726"><a href="#Tokenizer-726"><span class="linenos"> 726</span></a> <span class="s2">"VACUUM"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="Tokenizer-727"><a href="#Tokenizer-727"><span class="linenos"> 727</span></a> <span class="p">}</span> -</span><span id="Tokenizer-728"><a href="#Tokenizer-728"><span class="linenos"> 728</span></a> -</span><span id="Tokenizer-729"><a href="#Tokenizer-729"><span class="linenos"> 729</span></a> <span class="n">WHITE_SPACE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span> <span class="n">TokenType</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Tokenizer-730"><a href="#Tokenizer-730"><span class="linenos"> 730</span></a> <span class="s2">" "</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SPACE</span><span class="p">,</span> -</span><span id="Tokenizer-731"><a href="#Tokenizer-731"><span class="linenos"> 731</span></a> <span class="s2">"</span><span class="se">\t</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SPACE</span><span class="p">,</span> -</span><span id="Tokenizer-732"><a href="#Tokenizer-732"><span class="linenos"> 732</span></a> <span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> -</span><span id="Tokenizer-733"><a href="#Tokenizer-733"><span class="linenos"> 733</span></a> <span class="s2">"</span><span class="se">\r</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> -</span><span id="Tokenizer-734"><a href="#Tokenizer-734"><span class="linenos"> 734</span></a> <span class="s2">"</span><span class="se">\r\n</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> -</span><span id="Tokenizer-735"><a href="#Tokenizer-735"><span class="linenos"> 735</span></a> <span class="p">}</span> -</span><span id="Tokenizer-736"><a href="#Tokenizer-736"><span class="linenos"> 736</span></a> -</span><span id="Tokenizer-737"><a href="#Tokenizer-737"><span class="linenos"> 737</span></a> <span class="n">COMMANDS</span> <span class="o">=</span> <span class="p">{</span> -</span><span id="Tokenizer-738"><a href="#Tokenizer-738"><span class="linenos"> 738</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> -</span><span id="Tokenizer-739"><a href="#Tokenizer-739"><span class="linenos"> 739</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXECUTE</span><span class="p">,</span> -</span><span id="Tokenizer-740"><a href="#Tokenizer-740"><span class="linenos"> 740</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">FETCH</span><span class="p">,</span> -</span><span id="Tokenizer-741"><a href="#Tokenizer-741"><span class="linenos"> 741</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">SHOW</span><span class="p">,</span> -</span><span id="Tokenizer-742"><a href="#Tokenizer-742"><span class="linenos"> 742</span></a> <span class="p">}</span> -</span><span id="Tokenizer-743"><a href="#Tokenizer-743"><span class="linenos"> 743</span></a> -</span><span id="Tokenizer-744"><a href="#Tokenizer-744"><span class="linenos"> 744</span></a> <span class="n">COMMAND_PREFIX_TOKENS</span> <span class="o">=</span> <span class="p">{</span><span class="n">TokenType</span><span class="o">.</span><span class="n">SEMICOLON</span><span class="p">,</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BEGIN</span><span class="p">}</span> -</span><span id="Tokenizer-745"><a href="#Tokenizer-745"><span class="linenos"> 745</span></a> -</span><span id="Tokenizer-746"><a href="#Tokenizer-746"><span class="linenos"> 746</span></a> <span class="c1"># handle numeric literals like in hive (3L = BIGINT)</span> -</span><span id="Tokenizer-747"><a href="#Tokenizer-747"><span class="linenos"> 747</span></a> <span class="n">NUMERIC_LITERALS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> -</span><span id="Tokenizer-748"><a href="#Tokenizer-748"><span class="linenos"> 748</span></a> <span class="n">ENCODE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span> +</span><span id="Tokenizer-471"><a href="#Tokenizer-471"><span class="linenos"> 471</span></a> <span class="c1"># Autofilled</span> +</span><span id="Tokenizer-472"><a href="#Tokenizer-472"><span class="linenos"> 472</span></a> <span class="n">IDENTIFIERS_CAN_START_WITH_DIGIT</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="Tokenizer-473"><a href="#Tokenizer-473"><span class="linenos"> 473</span></a> +</span><span id="Tokenizer-474"><a href="#Tokenizer-474"><span class="linenos"> 474</span></a> <span class="n">_COMMENTS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="Tokenizer-475"><a href="#Tokenizer-475"><span class="linenos"> 475</span></a> <span class="n">_FORMAT_STRINGS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">t</span><span class="o">.</span><span class="n">Tuple</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">TokenType</span><span class="p">]]</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="Tokenizer-476"><a href="#Tokenizer-476"><span class="linenos"> 476</span></a> <span class="n">_IDENTIFIERS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="Tokenizer-477"><a href="#Tokenizer-477"><span class="linenos"> 477</span></a> <span class="n">_IDENTIFIER_ESCAPES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> +</span><span id="Tokenizer-478"><a href="#Tokenizer-478"><span class="linenos"> 478</span></a> <span class="n">_QUOTES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="Tokenizer-479"><a href="#Tokenizer-479"><span class="linenos"> 479</span></a> <span class="n">_STRING_ESCAPES</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span> +</span><span id="Tokenizer-480"><a href="#Tokenizer-480"><span class="linenos"> 480</span></a> <span class="n">_KEYWORD_TRIE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="Tokenizer-481"><a href="#Tokenizer-481"><span class="linenos"> 481</span></a> +</span><span id="Tokenizer-482"><a href="#Tokenizer-482"><span class="linenos"> 482</span></a> <span class="n">KEYWORDS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">TokenType</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Tokenizer-483"><a href="#Tokenizer-483"><span class="linenos"> 483</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="se">{{</span><span class="s2">%</span><span class="si">{</span><span class="n">postfix</span><span class="si">}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_START</span> <span class="k">for</span> <span class="n">postfix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> +</span><span id="Tokenizer-484"><a href="#Tokenizer-484"><span class="linenos"> 484</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="s2">%</span><span class="se">}}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_END</span> <span class="k">for</span> <span class="n">prefix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">""</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> +</span><span id="Tokenizer-485"><a href="#Tokenizer-485"><span class="linenos"> 485</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="se">{{{{</span><span class="si">{</span><span class="n">postfix</span><span class="si">}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_START</span> <span class="k">for</span> <span class="n">postfix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> +</span><span id="Tokenizer-486"><a href="#Tokenizer-486"><span class="linenos"> 486</span></a> <span class="o">**</span><span class="p">{</span><span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">prefix</span><span class="si">}</span><span class="se">}}}}</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BLOCK_END</span> <span class="k">for</span> <span class="n">prefix</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"+"</span><span class="p">,</span> <span class="s2">"-"</span><span class="p">)},</span> +</span><span id="Tokenizer-487"><a href="#Tokenizer-487"><span class="linenos"> 487</span></a> <span class="s2">"/*+"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HINT</span><span class="p">,</span> +</span><span id="Tokenizer-488"><a href="#Tokenizer-488"><span class="linenos"> 488</span></a> <span class="s2">"=="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EQ</span><span class="p">,</span> +</span><span id="Tokenizer-489"><a href="#Tokenizer-489"><span class="linenos"> 489</span></a> <span class="s2">"::"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DCOLON</span><span class="p">,</span> +</span><span id="Tokenizer-490"><a href="#Tokenizer-490"><span class="linenos"> 490</span></a> <span class="s2">"||"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DPIPE</span><span class="p">,</span> +</span><span id="Tokenizer-491"><a href="#Tokenizer-491"><span class="linenos"> 491</span></a> <span class="s2">">="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GTE</span><span class="p">,</span> +</span><span id="Tokenizer-492"><a href="#Tokenizer-492"><span class="linenos"> 492</span></a> <span class="s2">"<="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LTE</span><span class="p">,</span> +</span><span id="Tokenizer-493"><a href="#Tokenizer-493"><span class="linenos"> 493</span></a> <span class="s2">"<>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEQ</span><span class="p">,</span> +</span><span id="Tokenizer-494"><a href="#Tokenizer-494"><span class="linenos"> 494</span></a> <span class="s2">"!="</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEQ</span><span class="p">,</span> +</span><span id="Tokenizer-495"><a href="#Tokenizer-495"><span class="linenos"> 495</span></a> <span class="s2">"<=>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULLSAFE_EQ</span><span class="p">,</span> +</span><span id="Tokenizer-496"><a href="#Tokenizer-496"><span class="linenos"> 496</span></a> <span class="s2">"->"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ARROW</span><span class="p">,</span> +</span><span id="Tokenizer-497"><a href="#Tokenizer-497"><span class="linenos"> 497</span></a> <span class="s2">"->>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DARROW</span><span class="p">,</span> +</span><span id="Tokenizer-498"><a href="#Tokenizer-498"><span class="linenos"> 498</span></a> <span class="s2">"=>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FARROW</span><span class="p">,</span> +</span><span id="Tokenizer-499"><a href="#Tokenizer-499"><span class="linenos"> 499</span></a> <span class="s2">"#>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HASH_ARROW</span><span class="p">,</span> +</span><span id="Tokenizer-500"><a href="#Tokenizer-500"><span class="linenos"> 500</span></a> <span class="s2">"#>>"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DHASH_ARROW</span><span class="p">,</span> +</span><span id="Tokenizer-501"><a href="#Tokenizer-501"><span class="linenos"> 501</span></a> <span class="s2">"<->"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LR_ARROW</span><span class="p">,</span> +</span><span id="Tokenizer-502"><a href="#Tokenizer-502"><span class="linenos"> 502</span></a> <span class="s2">"&&"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DAMP</span><span class="p">,</span> +</span><span id="Tokenizer-503"><a href="#Tokenizer-503"><span class="linenos"> 503</span></a> <span class="s2">"ALL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALL</span><span class="p">,</span> +</span><span id="Tokenizer-504"><a href="#Tokenizer-504"><span class="linenos"> 504</span></a> <span class="s2">"ALWAYS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALWAYS</span><span class="p">,</span> +</span><span id="Tokenizer-505"><a href="#Tokenizer-505"><span class="linenos"> 505</span></a> <span class="s2">"AND"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AND</span><span class="p">,</span> +</span><span id="Tokenizer-506"><a href="#Tokenizer-506"><span class="linenos"> 506</span></a> <span class="s2">"ANTI"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANTI</span><span class="p">,</span> +</span><span id="Tokenizer-507"><a href="#Tokenizer-507"><span class="linenos"> 507</span></a> <span class="s2">"ANY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ANY</span><span class="p">,</span> +</span><span id="Tokenizer-508"><a href="#Tokenizer-508"><span class="linenos"> 508</span></a> <span class="s2">"ASC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ASC</span><span class="p">,</span> +</span><span id="Tokenizer-509"><a href="#Tokenizer-509"><span class="linenos"> 509</span></a> <span class="s2">"AS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALIAS</span><span class="p">,</span> +</span><span id="Tokenizer-510"><a href="#Tokenizer-510"><span class="linenos"> 510</span></a> <span class="s2">"ASOF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ASOF</span><span class="p">,</span> +</span><span id="Tokenizer-511"><a href="#Tokenizer-511"><span class="linenos"> 511</span></a> <span class="s2">"AUTOINCREMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AUTO_INCREMENT</span><span class="p">,</span> +</span><span id="Tokenizer-512"><a href="#Tokenizer-512"><span class="linenos"> 512</span></a> <span class="s2">"AUTO_INCREMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">AUTO_INCREMENT</span><span class="p">,</span> +</span><span id="Tokenizer-513"><a href="#Tokenizer-513"><span class="linenos"> 513</span></a> <span class="s2">"BEGIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BEGIN</span><span class="p">,</span> +</span><span id="Tokenizer-514"><a href="#Tokenizer-514"><span class="linenos"> 514</span></a> <span class="s2">"BETWEEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BETWEEN</span><span class="p">,</span> +</span><span id="Tokenizer-515"><a href="#Tokenizer-515"><span class="linenos"> 515</span></a> <span class="s2">"CACHE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CACHE</span><span class="p">,</span> +</span><span id="Tokenizer-516"><a href="#Tokenizer-516"><span class="linenos"> 516</span></a> <span class="s2">"UNCACHE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNCACHE</span><span class="p">,</span> +</span><span id="Tokenizer-517"><a href="#Tokenizer-517"><span class="linenos"> 517</span></a> <span class="s2">"CASE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CASE</span><span class="p">,</span> +</span><span id="Tokenizer-518"><a href="#Tokenizer-518"><span class="linenos"> 518</span></a> <span class="s2">"CHARACTER SET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHARACTER_SET</span><span class="p">,</span> +</span><span id="Tokenizer-519"><a href="#Tokenizer-519"><span class="linenos"> 519</span></a> <span class="s2">"CLUSTER BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CLUSTER_BY</span><span class="p">,</span> +</span><span id="Tokenizer-520"><a href="#Tokenizer-520"><span class="linenos"> 520</span></a> <span class="s2">"COLLATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLLATE</span><span class="p">,</span> +</span><span id="Tokenizer-521"><a href="#Tokenizer-521"><span class="linenos"> 521</span></a> <span class="s2">"COLUMN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COLUMN</span><span class="p">,</span> +</span><span id="Tokenizer-522"><a href="#Tokenizer-522"><span class="linenos"> 522</span></a> <span class="s2">"COMMIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMIT</span><span class="p">,</span> +</span><span id="Tokenizer-523"><a href="#Tokenizer-523"><span class="linenos"> 523</span></a> <span class="s2">"CONSTRAINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CONSTRAINT</span><span class="p">,</span> +</span><span id="Tokenizer-524"><a href="#Tokenizer-524"><span class="linenos"> 524</span></a> <span class="s2">"CREATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CREATE</span><span class="p">,</span> +</span><span id="Tokenizer-525"><a href="#Tokenizer-525"><span class="linenos"> 525</span></a> <span class="s2">"CROSS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CROSS</span><span class="p">,</span> +</span><span id="Tokenizer-526"><a href="#Tokenizer-526"><span class="linenos"> 526</span></a> <span class="s2">"CUBE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CUBE</span><span class="p">,</span> +</span><span id="Tokenizer-527"><a href="#Tokenizer-527"><span class="linenos"> 527</span></a> <span class="s2">"CURRENT_DATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_DATE</span><span class="p">,</span> +</span><span id="Tokenizer-528"><a href="#Tokenizer-528"><span class="linenos"> 528</span></a> <span class="s2">"CURRENT_TIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_TIME</span><span class="p">,</span> +</span><span id="Tokenizer-529"><a href="#Tokenizer-529"><span class="linenos"> 529</span></a> <span class="s2">"CURRENT_TIMESTAMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_TIMESTAMP</span><span class="p">,</span> +</span><span id="Tokenizer-530"><a href="#Tokenizer-530"><span class="linenos"> 530</span></a> <span class="s2">"CURRENT_USER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CURRENT_USER</span><span class="p">,</span> +</span><span id="Tokenizer-531"><a href="#Tokenizer-531"><span class="linenos"> 531</span></a> <span class="s2">"DATABASE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATABASE</span><span class="p">,</span> +</span><span id="Tokenizer-532"><a href="#Tokenizer-532"><span class="linenos"> 532</span></a> <span class="s2">"DEFAULT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DEFAULT</span><span class="p">,</span> +</span><span id="Tokenizer-533"><a href="#Tokenizer-533"><span class="linenos"> 533</span></a> <span class="s2">"DELETE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DELETE</span><span class="p">,</span> +</span><span id="Tokenizer-534"><a href="#Tokenizer-534"><span class="linenos"> 534</span></a> <span class="s2">"DESC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DESC</span><span class="p">,</span> +</span><span id="Tokenizer-535"><a href="#Tokenizer-535"><span class="linenos"> 535</span></a> <span class="s2">"DESCRIBE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DESCRIBE</span><span class="p">,</span> +</span><span id="Tokenizer-536"><a href="#Tokenizer-536"><span class="linenos"> 536</span></a> <span class="s2">"DISTINCT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DISTINCT</span><span class="p">,</span> +</span><span id="Tokenizer-537"><a href="#Tokenizer-537"><span class="linenos"> 537</span></a> <span class="s2">"DISTRIBUTE BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DISTRIBUTE_BY</span><span class="p">,</span> +</span><span id="Tokenizer-538"><a href="#Tokenizer-538"><span class="linenos"> 538</span></a> <span class="s2">"DIV"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DIV</span><span class="p">,</span> +</span><span id="Tokenizer-539"><a href="#Tokenizer-539"><span class="linenos"> 539</span></a> <span class="s2">"DROP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DROP</span><span class="p">,</span> +</span><span id="Tokenizer-540"><a href="#Tokenizer-540"><span class="linenos"> 540</span></a> <span class="s2">"ELSE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ELSE</span><span class="p">,</span> +</span><span id="Tokenizer-541"><a href="#Tokenizer-541"><span class="linenos"> 541</span></a> <span class="s2">"END"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">END</span><span class="p">,</span> +</span><span id="Tokenizer-542"><a href="#Tokenizer-542"><span class="linenos"> 542</span></a> <span class="s2">"ESCAPE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ESCAPE</span><span class="p">,</span> +</span><span id="Tokenizer-543"><a href="#Tokenizer-543"><span class="linenos"> 543</span></a> <span class="s2">"EXCEPT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXCEPT</span><span class="p">,</span> +</span><span id="Tokenizer-544"><a href="#Tokenizer-544"><span class="linenos"> 544</span></a> <span class="s2">"EXECUTE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXECUTE</span><span class="p">,</span> +</span><span id="Tokenizer-545"><a href="#Tokenizer-545"><span class="linenos"> 545</span></a> <span class="s2">"EXISTS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXISTS</span><span class="p">,</span> +</span><span id="Tokenizer-546"><a href="#Tokenizer-546"><span class="linenos"> 546</span></a> <span class="s2">"FALSE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FALSE</span><span class="p">,</span> +</span><span id="Tokenizer-547"><a href="#Tokenizer-547"><span class="linenos"> 547</span></a> <span class="s2">"FETCH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FETCH</span><span class="p">,</span> +</span><span id="Tokenizer-548"><a href="#Tokenizer-548"><span class="linenos"> 548</span></a> <span class="s2">"FILTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FILTER</span><span class="p">,</span> +</span><span id="Tokenizer-549"><a href="#Tokenizer-549"><span class="linenos"> 549</span></a> <span class="s2">"FIRST"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FIRST</span><span class="p">,</span> +</span><span id="Tokenizer-550"><a href="#Tokenizer-550"><span class="linenos"> 550</span></a> <span class="s2">"FULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FULL</span><span class="p">,</span> +</span><span id="Tokenizer-551"><a href="#Tokenizer-551"><span class="linenos"> 551</span></a> <span class="s2">"FUNCTION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FUNCTION</span><span class="p">,</span> +</span><span id="Tokenizer-552"><a href="#Tokenizer-552"><span class="linenos"> 552</span></a> <span class="s2">"FOR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FOR</span><span class="p">,</span> +</span><span id="Tokenizer-553"><a href="#Tokenizer-553"><span class="linenos"> 553</span></a> <span class="s2">"FOREIGN KEY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FOREIGN_KEY</span><span class="p">,</span> +</span><span id="Tokenizer-554"><a href="#Tokenizer-554"><span class="linenos"> 554</span></a> <span class="s2">"FORMAT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FORMAT</span><span class="p">,</span> +</span><span id="Tokenizer-555"><a href="#Tokenizer-555"><span class="linenos"> 555</span></a> <span class="s2">"FROM"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FROM</span><span class="p">,</span> +</span><span id="Tokenizer-556"><a href="#Tokenizer-556"><span class="linenos"> 556</span></a> <span class="s2">"GEOGRAPHY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GEOGRAPHY</span><span class="p">,</span> +</span><span id="Tokenizer-557"><a href="#Tokenizer-557"><span class="linenos"> 557</span></a> <span class="s2">"GEOMETRY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GEOMETRY</span><span class="p">,</span> +</span><span id="Tokenizer-558"><a href="#Tokenizer-558"><span class="linenos"> 558</span></a> <span class="s2">"GLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GLOB</span><span class="p">,</span> +</span><span id="Tokenizer-559"><a href="#Tokenizer-559"><span class="linenos"> 559</span></a> <span class="s2">"GROUP BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GROUP_BY</span><span class="p">,</span> +</span><span id="Tokenizer-560"><a href="#Tokenizer-560"><span class="linenos"> 560</span></a> <span class="s2">"GROUPING SETS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">GROUPING_SETS</span><span class="p">,</span> +</span><span id="Tokenizer-561"><a href="#Tokenizer-561"><span class="linenos"> 561</span></a> <span class="s2">"HAVING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HAVING</span><span class="p">,</span> +</span><span id="Tokenizer-562"><a href="#Tokenizer-562"><span class="linenos"> 562</span></a> <span class="s2">"IF"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IF</span><span class="p">,</span> +</span><span id="Tokenizer-563"><a href="#Tokenizer-563"><span class="linenos"> 563</span></a> <span class="s2">"ILIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ILIKE</span><span class="p">,</span> +</span><span id="Tokenizer-564"><a href="#Tokenizer-564"><span class="linenos"> 564</span></a> <span class="s2">"IN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IN</span><span class="p">,</span> +</span><span id="Tokenizer-565"><a href="#Tokenizer-565"><span class="linenos"> 565</span></a> <span class="s2">"INDEX"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INDEX</span><span class="p">,</span> +</span><span id="Tokenizer-566"><a href="#Tokenizer-566"><span class="linenos"> 566</span></a> <span class="s2">"INET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INET</span><span class="p">,</span> +</span><span id="Tokenizer-567"><a href="#Tokenizer-567"><span class="linenos"> 567</span></a> <span class="s2">"INNER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INNER</span><span class="p">,</span> +</span><span id="Tokenizer-568"><a href="#Tokenizer-568"><span class="linenos"> 568</span></a> <span class="s2">"INSERT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INSERT</span><span class="p">,</span> +</span><span id="Tokenizer-569"><a href="#Tokenizer-569"><span class="linenos"> 569</span></a> <span class="s2">"INTERVAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTERVAL</span><span class="p">,</span> +</span><span id="Tokenizer-570"><a href="#Tokenizer-570"><span class="linenos"> 570</span></a> <span class="s2">"INTERSECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTERSECT</span><span class="p">,</span> +</span><span id="Tokenizer-571"><a href="#Tokenizer-571"><span class="linenos"> 571</span></a> <span class="s2">"INTO"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INTO</span><span class="p">,</span> +</span><span id="Tokenizer-572"><a href="#Tokenizer-572"><span class="linenos"> 572</span></a> <span class="s2">"IS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">IS</span><span class="p">,</span> +</span><span id="Tokenizer-573"><a href="#Tokenizer-573"><span class="linenos"> 573</span></a> <span class="s2">"ISNULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ISNULL</span><span class="p">,</span> +</span><span id="Tokenizer-574"><a href="#Tokenizer-574"><span class="linenos"> 574</span></a> <span class="s2">"JOIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">JOIN</span><span class="p">,</span> +</span><span id="Tokenizer-575"><a href="#Tokenizer-575"><span class="linenos"> 575</span></a> <span class="s2">"KEEP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">KEEP</span><span class="p">,</span> +</span><span id="Tokenizer-576"><a href="#Tokenizer-576"><span class="linenos"> 576</span></a> <span class="s2">"LATERAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LATERAL</span><span class="p">,</span> +</span><span id="Tokenizer-577"><a href="#Tokenizer-577"><span class="linenos"> 577</span></a> <span class="s2">"LEFT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LEFT</span><span class="p">,</span> +</span><span id="Tokenizer-578"><a href="#Tokenizer-578"><span class="linenos"> 578</span></a> <span class="s2">"LIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LIKE</span><span class="p">,</span> +</span><span id="Tokenizer-579"><a href="#Tokenizer-579"><span class="linenos"> 579</span></a> <span class="s2">"LIMIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LIMIT</span><span class="p">,</span> +</span><span id="Tokenizer-580"><a href="#Tokenizer-580"><span class="linenos"> 580</span></a> <span class="s2">"LOAD"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LOAD</span><span class="p">,</span> +</span><span id="Tokenizer-581"><a href="#Tokenizer-581"><span class="linenos"> 581</span></a> <span class="s2">"LOCK"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">LOCK</span><span class="p">,</span> +</span><span id="Tokenizer-582"><a href="#Tokenizer-582"><span class="linenos"> 582</span></a> <span class="s2">"MERGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MERGE</span><span class="p">,</span> +</span><span id="Tokenizer-583"><a href="#Tokenizer-583"><span class="linenos"> 583</span></a> <span class="s2">"NATURAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NATURAL</span><span class="p">,</span> +</span><span id="Tokenizer-584"><a href="#Tokenizer-584"><span class="linenos"> 584</span></a> <span class="s2">"NEXT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEXT</span><span class="p">,</span> +</span><span id="Tokenizer-585"><a href="#Tokenizer-585"><span class="linenos"> 585</span></a> <span class="s2">"NEXT VALUE FOR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NEXT_VALUE_FOR</span><span class="p">,</span> +</span><span id="Tokenizer-586"><a href="#Tokenizer-586"><span class="linenos"> 586</span></a> <span class="s2">"NOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOT</span><span class="p">,</span> +</span><span id="Tokenizer-587"><a href="#Tokenizer-587"><span class="linenos"> 587</span></a> <span class="s2">"NOTNULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NOTNULL</span><span class="p">,</span> +</span><span id="Tokenizer-588"><a href="#Tokenizer-588"><span class="linenos"> 588</span></a> <span class="s2">"NULL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULL</span><span class="p">,</span> +</span><span id="Tokenizer-589"><a href="#Tokenizer-589"><span class="linenos"> 589</span></a> <span class="s2">"OBJECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OBJECT</span><span class="p">,</span> +</span><span id="Tokenizer-590"><a href="#Tokenizer-590"><span class="linenos"> 590</span></a> <span class="s2">"OFFSET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OFFSET</span><span class="p">,</span> +</span><span id="Tokenizer-591"><a href="#Tokenizer-591"><span class="linenos"> 591</span></a> <span class="s2">"ON"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ON</span><span class="p">,</span> +</span><span id="Tokenizer-592"><a href="#Tokenizer-592"><span class="linenos"> 592</span></a> <span class="s2">"OR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OR</span><span class="p">,</span> +</span><span id="Tokenizer-593"><a href="#Tokenizer-593"><span class="linenos"> 593</span></a> <span class="s2">"ORDER BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ORDER_BY</span><span class="p">,</span> +</span><span id="Tokenizer-594"><a href="#Tokenizer-594"><span class="linenos"> 594</span></a> <span class="s2">"ORDINALITY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ORDINALITY</span><span class="p">,</span> +</span><span id="Tokenizer-595"><a href="#Tokenizer-595"><span class="linenos"> 595</span></a> <span class="s2">"OUTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OUTER</span><span class="p">,</span> +</span><span id="Tokenizer-596"><a href="#Tokenizer-596"><span class="linenos"> 596</span></a> <span class="s2">"OVER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVER</span><span class="p">,</span> +</span><span id="Tokenizer-597"><a href="#Tokenizer-597"><span class="linenos"> 597</span></a> <span class="s2">"OVERLAPS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVERLAPS</span><span class="p">,</span> +</span><span id="Tokenizer-598"><a href="#Tokenizer-598"><span class="linenos"> 598</span></a> <span class="s2">"OVERWRITE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">OVERWRITE</span><span class="p">,</span> +</span><span id="Tokenizer-599"><a href="#Tokenizer-599"><span class="linenos"> 599</span></a> <span class="s2">"PARTITION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION</span><span class="p">,</span> +</span><span id="Tokenizer-600"><a href="#Tokenizer-600"><span class="linenos"> 600</span></a> <span class="s2">"PARTITION BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> +</span><span id="Tokenizer-601"><a href="#Tokenizer-601"><span class="linenos"> 601</span></a> <span class="s2">"PARTITIONED BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> +</span><span id="Tokenizer-602"><a href="#Tokenizer-602"><span class="linenos"> 602</span></a> <span class="s2">"PARTITIONED_BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARTITION_BY</span><span class="p">,</span> +</span><span id="Tokenizer-603"><a href="#Tokenizer-603"><span class="linenos"> 603</span></a> <span class="s2">"PERCENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PERCENT</span><span class="p">,</span> +</span><span id="Tokenizer-604"><a href="#Tokenizer-604"><span class="linenos"> 604</span></a> <span class="s2">"PIVOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PIVOT</span><span class="p">,</span> +</span><span id="Tokenizer-605"><a href="#Tokenizer-605"><span class="linenos"> 605</span></a> <span class="s2">"PRAGMA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PRAGMA</span><span class="p">,</span> +</span><span id="Tokenizer-606"><a href="#Tokenizer-606"><span class="linenos"> 606</span></a> <span class="s2">"PRIMARY KEY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PRIMARY_KEY</span><span class="p">,</span> +</span><span id="Tokenizer-607"><a href="#Tokenizer-607"><span class="linenos"> 607</span></a> <span class="s2">"PROCEDURE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PROCEDURE</span><span class="p">,</span> +</span><span id="Tokenizer-608"><a href="#Tokenizer-608"><span class="linenos"> 608</span></a> <span class="s2">"QUALIFY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">QUALIFY</span><span class="p">,</span> +</span><span id="Tokenizer-609"><a href="#Tokenizer-609"><span class="linenos"> 609</span></a> <span class="s2">"RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RANGE</span><span class="p">,</span> +</span><span id="Tokenizer-610"><a href="#Tokenizer-610"><span class="linenos"> 610</span></a> <span class="s2">"RECURSIVE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RECURSIVE</span><span class="p">,</span> +</span><span id="Tokenizer-611"><a href="#Tokenizer-611"><span class="linenos"> 611</span></a> <span class="s2">"REGEXP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RLIKE</span><span class="p">,</span> +</span><span id="Tokenizer-612"><a href="#Tokenizer-612"><span class="linenos"> 612</span></a> <span class="s2">"REPLACE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REPLACE</span><span class="p">,</span> +</span><span id="Tokenizer-613"><a href="#Tokenizer-613"><span class="linenos"> 613</span></a> <span class="s2">"RETURNING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RETURNING</span><span class="p">,</span> +</span><span id="Tokenizer-614"><a href="#Tokenizer-614"><span class="linenos"> 614</span></a> <span class="s2">"REFERENCES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">REFERENCES</span><span class="p">,</span> +</span><span id="Tokenizer-615"><a href="#Tokenizer-615"><span class="linenos"> 615</span></a> <span class="s2">"RIGHT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RIGHT</span><span class="p">,</span> +</span><span id="Tokenizer-616"><a href="#Tokenizer-616"><span class="linenos"> 616</span></a> <span class="s2">"RLIKE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">RLIKE</span><span class="p">,</span> +</span><span id="Tokenizer-617"><a href="#Tokenizer-617"><span class="linenos"> 617</span></a> <span class="s2">"ROLLBACK"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROLLBACK</span><span class="p">,</span> +</span><span id="Tokenizer-618"><a href="#Tokenizer-618"><span class="linenos"> 618</span></a> <span class="s2">"ROLLUP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROLLUP</span><span class="p">,</span> +</span><span id="Tokenizer-619"><a href="#Tokenizer-619"><span class="linenos"> 619</span></a> <span class="s2">"ROW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROW</span><span class="p">,</span> +</span><span id="Tokenizer-620"><a href="#Tokenizer-620"><span class="linenos"> 620</span></a> <span class="s2">"ROWS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ROWS</span><span class="p">,</span> +</span><span id="Tokenizer-621"><a href="#Tokenizer-621"><span class="linenos"> 621</span></a> <span class="s2">"SCHEMA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SCHEMA</span><span class="p">,</span> +</span><span id="Tokenizer-622"><a href="#Tokenizer-622"><span class="linenos"> 622</span></a> <span class="s2">"SELECT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SELECT</span><span class="p">,</span> +</span><span id="Tokenizer-623"><a href="#Tokenizer-623"><span class="linenos"> 623</span></a> <span class="s2">"SEMI"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SEMI</span><span class="p">,</span> +</span><span id="Tokenizer-624"><a href="#Tokenizer-624"><span class="linenos"> 624</span></a> <span class="s2">"SET"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SET</span><span class="p">,</span> +</span><span id="Tokenizer-625"><a href="#Tokenizer-625"><span class="linenos"> 625</span></a> <span class="s2">"SETTINGS"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SETTINGS</span><span class="p">,</span> +</span><span id="Tokenizer-626"><a href="#Tokenizer-626"><span class="linenos"> 626</span></a> <span class="s2">"SHOW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SHOW</span><span class="p">,</span> +</span><span id="Tokenizer-627"><a href="#Tokenizer-627"><span class="linenos"> 627</span></a> <span class="s2">"SIMILAR TO"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SIMILAR_TO</span><span class="p">,</span> +</span><span id="Tokenizer-628"><a href="#Tokenizer-628"><span class="linenos"> 628</span></a> <span class="s2">"SOME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SOME</span><span class="p">,</span> +</span><span id="Tokenizer-629"><a href="#Tokenizer-629"><span class="linenos"> 629</span></a> <span class="s2">"SORT BY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SORT_BY</span><span class="p">,</span> +</span><span id="Tokenizer-630"><a href="#Tokenizer-630"><span class="linenos"> 630</span></a> <span class="s2">"TABLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TABLE</span><span class="p">,</span> +</span><span id="Tokenizer-631"><a href="#Tokenizer-631"><span class="linenos"> 631</span></a> <span class="s2">"TABLESAMPLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TABLE_SAMPLE</span><span class="p">,</span> +</span><span id="Tokenizer-632"><a href="#Tokenizer-632"><span class="linenos"> 632</span></a> <span class="s2">"TEMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEMPORARY</span><span class="p">,</span> +</span><span id="Tokenizer-633"><a href="#Tokenizer-633"><span class="linenos"> 633</span></a> <span class="s2">"TEMPORARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEMPORARY</span><span class="p">,</span> +</span><span id="Tokenizer-634"><a href="#Tokenizer-634"><span class="linenos"> 634</span></a> <span class="s2">"THEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">THEN</span><span class="p">,</span> +</span><span id="Tokenizer-635"><a href="#Tokenizer-635"><span class="linenos"> 635</span></a> <span class="s2">"TRUE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TRUE</span><span class="p">,</span> +</span><span id="Tokenizer-636"><a href="#Tokenizer-636"><span class="linenos"> 636</span></a> <span class="s2">"UNION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNION</span><span class="p">,</span> +</span><span id="Tokenizer-637"><a href="#Tokenizer-637"><span class="linenos"> 637</span></a> <span class="s2">"UNNEST"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNNEST</span><span class="p">,</span> +</span><span id="Tokenizer-638"><a href="#Tokenizer-638"><span class="linenos"> 638</span></a> <span class="s2">"UNPIVOT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNPIVOT</span><span class="p">,</span> +</span><span id="Tokenizer-639"><a href="#Tokenizer-639"><span class="linenos"> 639</span></a> <span class="s2">"UPDATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UPDATE</span><span class="p">,</span> +</span><span id="Tokenizer-640"><a href="#Tokenizer-640"><span class="linenos"> 640</span></a> <span class="s2">"USE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USE</span><span class="p">,</span> +</span><span id="Tokenizer-641"><a href="#Tokenizer-641"><span class="linenos"> 641</span></a> <span class="s2">"USING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USING</span><span class="p">,</span> +</span><span id="Tokenizer-642"><a href="#Tokenizer-642"><span class="linenos"> 642</span></a> <span class="s2">"UUID"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UUID</span><span class="p">,</span> +</span><span id="Tokenizer-643"><a href="#Tokenizer-643"><span class="linenos"> 643</span></a> <span class="s2">"VALUES"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VALUES</span><span class="p">,</span> +</span><span id="Tokenizer-644"><a href="#Tokenizer-644"><span class="linenos"> 644</span></a> <span class="s2">"VIEW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VIEW</span><span class="p">,</span> +</span><span id="Tokenizer-645"><a href="#Tokenizer-645"><span class="linenos"> 645</span></a> <span class="s2">"VOLATILE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VOLATILE</span><span class="p">,</span> +</span><span id="Tokenizer-646"><a href="#Tokenizer-646"><span class="linenos"> 646</span></a> <span class="s2">"WHEN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WHEN</span><span class="p">,</span> +</span><span id="Tokenizer-647"><a href="#Tokenizer-647"><span class="linenos"> 647</span></a> <span class="s2">"WHERE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WHERE</span><span class="p">,</span> +</span><span id="Tokenizer-648"><a href="#Tokenizer-648"><span class="linenos"> 648</span></a> <span class="s2">"WINDOW"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WINDOW</span><span class="p">,</span> +</span><span id="Tokenizer-649"><a href="#Tokenizer-649"><span class="linenos"> 649</span></a> <span class="s2">"WITH"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">WITH</span><span class="p">,</span> +</span><span id="Tokenizer-650"><a href="#Tokenizer-650"><span class="linenos"> 650</span></a> <span class="s2">"APPLY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">APPLY</span><span class="p">,</span> +</span><span id="Tokenizer-651"><a href="#Tokenizer-651"><span class="linenos"> 651</span></a> <span class="s2">"ARRAY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ARRAY</span><span class="p">,</span> +</span><span id="Tokenizer-652"><a href="#Tokenizer-652"><span class="linenos"> 652</span></a> <span class="s2">"BIT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT</span><span class="p">,</span> +</span><span id="Tokenizer-653"><a href="#Tokenizer-653"><span class="linenos"> 653</span></a> <span class="s2">"BOOL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span> +</span><span id="Tokenizer-654"><a href="#Tokenizer-654"><span class="linenos"> 654</span></a> <span class="s2">"BOOLEAN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BOOLEAN</span><span class="p">,</span> +</span><span id="Tokenizer-655"><a href="#Tokenizer-655"><span class="linenos"> 655</span></a> <span class="s2">"BYTE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TINYINT</span><span class="p">,</span> +</span><span id="Tokenizer-656"><a href="#Tokenizer-656"><span class="linenos"> 656</span></a> <span class="s2">"TINYINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TINYINT</span><span class="p">,</span> +</span><span id="Tokenizer-657"><a href="#Tokenizer-657"><span class="linenos"> 657</span></a> <span class="s2">"SHORT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> +</span><span id="Tokenizer-658"><a href="#Tokenizer-658"><span class="linenos"> 658</span></a> <span class="s2">"SMALLINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> +</span><span id="Tokenizer-659"><a href="#Tokenizer-659"><span class="linenos"> 659</span></a> <span class="s2">"INT2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SMALLINT</span><span class="p">,</span> +</span><span id="Tokenizer-660"><a href="#Tokenizer-660"><span class="linenos"> 660</span></a> <span class="s2">"INTEGER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> +</span><span id="Tokenizer-661"><a href="#Tokenizer-661"><span class="linenos"> 661</span></a> <span class="s2">"INT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> +</span><span id="Tokenizer-662"><a href="#Tokenizer-662"><span class="linenos"> 662</span></a> <span class="s2">"INT4"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT</span><span class="p">,</span> +</span><span id="Tokenizer-663"><a href="#Tokenizer-663"><span class="linenos"> 663</span></a> <span class="s2">"LONG"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> +</span><span id="Tokenizer-664"><a href="#Tokenizer-664"><span class="linenos"> 664</span></a> <span class="s2">"BIGINT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> +</span><span id="Tokenizer-665"><a href="#Tokenizer-665"><span class="linenos"> 665</span></a> <span class="s2">"INT8"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGINT</span><span class="p">,</span> +</span><span id="Tokenizer-666"><a href="#Tokenizer-666"><span class="linenos"> 666</span></a> <span class="s2">"DEC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> +</span><span id="Tokenizer-667"><a href="#Tokenizer-667"><span class="linenos"> 667</span></a> <span class="s2">"DECIMAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> +</span><span id="Tokenizer-668"><a href="#Tokenizer-668"><span class="linenos"> 668</span></a> <span class="s2">"BIGDECIMAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGDECIMAL</span><span class="p">,</span> +</span><span id="Tokenizer-669"><a href="#Tokenizer-669"><span class="linenos"> 669</span></a> <span class="s2">"BIGNUMERIC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIGDECIMAL</span><span class="p">,</span> +</span><span id="Tokenizer-670"><a href="#Tokenizer-670"><span class="linenos"> 670</span></a> <span class="s2">"MAP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">MAP</span><span class="p">,</span> +</span><span id="Tokenizer-671"><a href="#Tokenizer-671"><span class="linenos"> 671</span></a> <span class="s2">"NULLABLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NULLABLE</span><span class="p">,</span> +</span><span id="Tokenizer-672"><a href="#Tokenizer-672"><span class="linenos"> 672</span></a> <span class="s2">"NUMBER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> +</span><span id="Tokenizer-673"><a href="#Tokenizer-673"><span class="linenos"> 673</span></a> <span class="s2">"NUMERIC"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> +</span><span id="Tokenizer-674"><a href="#Tokenizer-674"><span class="linenos"> 674</span></a> <span class="s2">"FIXED"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DECIMAL</span><span class="p">,</span> +</span><span id="Tokenizer-675"><a href="#Tokenizer-675"><span class="linenos"> 675</span></a> <span class="s2">"REAL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> +</span><span id="Tokenizer-676"><a href="#Tokenizer-676"><span class="linenos"> 676</span></a> <span class="s2">"FLOAT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> +</span><span id="Tokenizer-677"><a href="#Tokenizer-677"><span class="linenos"> 677</span></a> <span class="s2">"FLOAT4"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">FLOAT</span><span class="p">,</span> +</span><span id="Tokenizer-678"><a href="#Tokenizer-678"><span class="linenos"> 678</span></a> <span class="s2">"FLOAT8"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> +</span><span id="Tokenizer-679"><a href="#Tokenizer-679"><span class="linenos"> 679</span></a> <span class="s2">"DOUBLE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> +</span><span id="Tokenizer-680"><a href="#Tokenizer-680"><span class="linenos"> 680</span></a> <span class="s2">"DOUBLE PRECISION"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DOUBLE</span><span class="p">,</span> +</span><span id="Tokenizer-681"><a href="#Tokenizer-681"><span class="linenos"> 681</span></a> <span class="s2">"JSON"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">JSON</span><span class="p">,</span> +</span><span id="Tokenizer-682"><a href="#Tokenizer-682"><span class="linenos"> 682</span></a> <span class="s2">"CHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHAR</span><span class="p">,</span> +</span><span id="Tokenizer-683"><a href="#Tokenizer-683"><span class="linenos"> 683</span></a> <span class="s2">"CHARACTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">CHAR</span><span class="p">,</span> +</span><span id="Tokenizer-684"><a href="#Tokenizer-684"><span class="linenos"> 684</span></a> <span class="s2">"NCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NCHAR</span><span class="p">,</span> +</span><span id="Tokenizer-685"><a href="#Tokenizer-685"><span class="linenos"> 685</span></a> <span class="s2">"VARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span> +</span><span id="Tokenizer-686"><a href="#Tokenizer-686"><span class="linenos"> 686</span></a> <span class="s2">"VARCHAR2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARCHAR</span><span class="p">,</span> +</span><span id="Tokenizer-687"><a href="#Tokenizer-687"><span class="linenos"> 687</span></a> <span class="s2">"NVARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NVARCHAR</span><span class="p">,</span> +</span><span id="Tokenizer-688"><a href="#Tokenizer-688"><span class="linenos"> 688</span></a> <span class="s2">"NVARCHAR2"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NVARCHAR</span><span class="p">,</span> +</span><span id="Tokenizer-689"><a href="#Tokenizer-689"><span class="linenos"> 689</span></a> <span class="s2">"STR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> +</span><span id="Tokenizer-690"><a href="#Tokenizer-690"><span class="linenos"> 690</span></a> <span class="s2">"STRING"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> +</span><span id="Tokenizer-691"><a href="#Tokenizer-691"><span class="linenos"> 691</span></a> <span class="s2">"TEXT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> +</span><span id="Tokenizer-692"><a href="#Tokenizer-692"><span class="linenos"> 692</span></a> <span class="s2">"CLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> +</span><span id="Tokenizer-693"><a href="#Tokenizer-693"><span class="linenos"> 693</span></a> <span class="s2">"LONGVARCHAR"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TEXT</span><span class="p">,</span> +</span><span id="Tokenizer-694"><a href="#Tokenizer-694"><span class="linenos"> 694</span></a> <span class="s2">"BINARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BINARY</span><span class="p">,</span> +</span><span id="Tokenizer-695"><a href="#Tokenizer-695"><span class="linenos"> 695</span></a> <span class="s2">"BLOB"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> +</span><span id="Tokenizer-696"><a href="#Tokenizer-696"><span class="linenos"> 696</span></a> <span class="s2">"BYTEA"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> +</span><span id="Tokenizer-697"><a href="#Tokenizer-697"><span class="linenos"> 697</span></a> <span class="s2">"VARBINARY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARBINARY</span><span class="p">,</span> +</span><span id="Tokenizer-698"><a href="#Tokenizer-698"><span class="linenos"> 698</span></a> <span class="s2">"TIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIME</span><span class="p">,</span> +</span><span id="Tokenizer-699"><a href="#Tokenizer-699"><span class="linenos"> 699</span></a> <span class="s2">"TIMESTAMP"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMP</span><span class="p">,</span> +</span><span id="Tokenizer-700"><a href="#Tokenizer-700"><span class="linenos"> 700</span></a> <span class="s2">"TIMESTAMPTZ"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMPTZ</span><span class="p">,</span> +</span><span id="Tokenizer-701"><a href="#Tokenizer-701"><span class="linenos"> 701</span></a> <span class="s2">"TIMESTAMPLTZ"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TIMESTAMPLTZ</span><span class="p">,</span> +</span><span id="Tokenizer-702"><a href="#Tokenizer-702"><span class="linenos"> 702</span></a> <span class="s2">"DATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATE</span><span class="p">,</span> +</span><span id="Tokenizer-703"><a href="#Tokenizer-703"><span class="linenos"> 703</span></a> <span class="s2">"DATETIME"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATETIME</span><span class="p">,</span> +</span><span id="Tokenizer-704"><a href="#Tokenizer-704"><span class="linenos"> 704</span></a> <span class="s2">"INT4RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT4RANGE</span><span class="p">,</span> +</span><span id="Tokenizer-705"><a href="#Tokenizer-705"><span class="linenos"> 705</span></a> <span class="s2">"INT4MULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT4MULTIRANGE</span><span class="p">,</span> +</span><span id="Tokenizer-706"><a href="#Tokenizer-706"><span class="linenos"> 706</span></a> <span class="s2">"INT8RANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT8RANGE</span><span class="p">,</span> +</span><span id="Tokenizer-707"><a href="#Tokenizer-707"><span class="linenos"> 707</span></a> <span class="s2">"INT8MULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">INT8MULTIRANGE</span><span class="p">,</span> +</span><span id="Tokenizer-708"><a href="#Tokenizer-708"><span class="linenos"> 708</span></a> <span class="s2">"NUMRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NUMRANGE</span><span class="p">,</span> +</span><span id="Tokenizer-709"><a href="#Tokenizer-709"><span class="linenos"> 709</span></a> <span class="s2">"NUMMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">NUMMULTIRANGE</span><span class="p">,</span> +</span><span id="Tokenizer-710"><a href="#Tokenizer-710"><span class="linenos"> 710</span></a> <span class="s2">"TSRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSRANGE</span><span class="p">,</span> +</span><span id="Tokenizer-711"><a href="#Tokenizer-711"><span class="linenos"> 711</span></a> <span class="s2">"TSMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSMULTIRANGE</span><span class="p">,</span> +</span><span id="Tokenizer-712"><a href="#Tokenizer-712"><span class="linenos"> 712</span></a> <span class="s2">"TSTZRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSTZRANGE</span><span class="p">,</span> +</span><span id="Tokenizer-713"><a href="#Tokenizer-713"><span class="linenos"> 713</span></a> <span class="s2">"TSTZMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">TSTZMULTIRANGE</span><span class="p">,</span> +</span><span id="Tokenizer-714"><a href="#Tokenizer-714"><span class="linenos"> 714</span></a> <span class="s2">"DATERANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATERANGE</span><span class="p">,</span> +</span><span id="Tokenizer-715"><a href="#Tokenizer-715"><span class="linenos"> 715</span></a> <span class="s2">"DATEMULTIRANGE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">DATEMULTIRANGE</span><span class="p">,</span> +</span><span id="Tokenizer-716"><a href="#Tokenizer-716"><span class="linenos"> 716</span></a> <span class="s2">"UNIQUE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">UNIQUE</span><span class="p">,</span> +</span><span id="Tokenizer-717"><a href="#Tokenizer-717"><span class="linenos"> 717</span></a> <span class="s2">"STRUCT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STRUCT</span><span class="p">,</span> +</span><span id="Tokenizer-718"><a href="#Tokenizer-718"><span class="linenos"> 718</span></a> <span class="s2">"VARIANT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VARIANT</span><span class="p">,</span> +</span><span id="Tokenizer-719"><a href="#Tokenizer-719"><span class="linenos"> 719</span></a> <span class="s2">"ALTER"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">ALTER</span><span class="p">,</span> +</span><span id="Tokenizer-720"><a href="#Tokenizer-720"><span class="linenos"> 720</span></a> <span class="s2">"ANALYZE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="Tokenizer-721"><a href="#Tokenizer-721"><span class="linenos"> 721</span></a> <span class="s2">"CALL"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="Tokenizer-722"><a href="#Tokenizer-722"><span class="linenos"> 722</span></a> <span class="s2">"COMMENT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMENT</span><span class="p">,</span> +</span><span id="Tokenizer-723"><a href="#Tokenizer-723"><span class="linenos"> 723</span></a> <span class="s2">"COPY"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="Tokenizer-724"><a href="#Tokenizer-724"><span class="linenos"> 724</span></a> <span class="s2">"EXPLAIN"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="Tokenizer-725"><a href="#Tokenizer-725"><span class="linenos"> 725</span></a> <span class="s2">"GRANT"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="Tokenizer-726"><a href="#Tokenizer-726"><span class="linenos"> 726</span></a> <span class="s2">"OPTIMIZE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="Tokenizer-727"><a href="#Tokenizer-727"><span class="linenos"> 727</span></a> <span class="s2">"PREPARE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="Tokenizer-728"><a href="#Tokenizer-728"><span class="linenos"> 728</span></a> <span class="s2">"TRUNCATE"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="Tokenizer-729"><a href="#Tokenizer-729"><span class="linenos"> 729</span></a> <span class="s2">"VACUUM"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="Tokenizer-730"><a href="#Tokenizer-730"><span class="linenos"> 730</span></a> <span class="s2">"USER-DEFINED"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">USERDEFINED</span><span class="p">,</span> +</span><span id="Tokenizer-731"><a href="#Tokenizer-731"><span class="linenos"> 731</span></a> <span class="p">}</span> +</span><span id="Tokenizer-732"><a href="#Tokenizer-732"><span class="linenos"> 732</span></a> +</span><span id="Tokenizer-733"><a href="#Tokenizer-733"><span class="linenos"> 733</span></a> <span class="n">WHITE_SPACE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span> <span class="n">TokenType</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Tokenizer-734"><a href="#Tokenizer-734"><span class="linenos"> 734</span></a> <span class="s2">" "</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SPACE</span><span class="p">,</span> +</span><span id="Tokenizer-735"><a href="#Tokenizer-735"><span class="linenos"> 735</span></a> <span class="s2">"</span><span class="se">\t</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">SPACE</span><span class="p">,</span> +</span><span id="Tokenizer-736"><a href="#Tokenizer-736"><span class="linenos"> 736</span></a> <span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> +</span><span id="Tokenizer-737"><a href="#Tokenizer-737"><span class="linenos"> 737</span></a> <span class="s2">"</span><span class="se">\r</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> +</span><span id="Tokenizer-738"><a href="#Tokenizer-738"><span class="linenos"> 738</span></a> <span class="s2">"</span><span class="se">\r\n</span><span class="s2">"</span><span class="p">:</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">,</span> +</span><span id="Tokenizer-739"><a href="#Tokenizer-739"><span class="linenos"> 739</span></a> <span class="p">}</span> +</span><span id="Tokenizer-740"><a href="#Tokenizer-740"><span class="linenos"> 740</span></a> +</span><span id="Tokenizer-741"><a href="#Tokenizer-741"><span class="linenos"> 741</span></a> <span class="n">COMMANDS</span> <span class="o">=</span> <span class="p">{</span> +</span><span id="Tokenizer-742"><a href="#Tokenizer-742"><span class="linenos"> 742</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">COMMAND</span><span class="p">,</span> +</span><span id="Tokenizer-743"><a href="#Tokenizer-743"><span class="linenos"> 743</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">EXECUTE</span><span class="p">,</span> +</span><span id="Tokenizer-744"><a href="#Tokenizer-744"><span class="linenos"> 744</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">FETCH</span><span class="p">,</span> +</span><span id="Tokenizer-745"><a href="#Tokenizer-745"><span class="linenos"> 745</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">SHOW</span><span class="p">,</span> +</span><span id="Tokenizer-746"><a href="#Tokenizer-746"><span class="linenos"> 746</span></a> <span class="p">}</span> +</span><span id="Tokenizer-747"><a href="#Tokenizer-747"><span class="linenos"> 747</span></a> +</span><span id="Tokenizer-748"><a href="#Tokenizer-748"><span class="linenos"> 748</span></a> <span class="n">COMMAND_PREFIX_TOKENS</span> <span class="o">=</span> <span class="p">{</span><span class="n">TokenType</span><span class="o">.</span><span class="n">SEMICOLON</span><span class="p">,</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BEGIN</span><span class="p">}</span> </span><span id="Tokenizer-749"><a href="#Tokenizer-749"><span class="linenos"> 749</span></a> -</span><span id="Tokenizer-750"><a href="#Tokenizer-750"><span class="linenos"> 750</span></a> <span class="n">COMMENTS</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"--"</span><span class="p">,</span> <span class="p">(</span><span class="s2">"/*"</span><span class="p">,</span> <span class="s2">"*/"</span><span class="p">)]</span> -</span><span id="Tokenizer-751"><a href="#Tokenizer-751"><span class="linenos"> 751</span></a> -</span><span id="Tokenizer-752"><a href="#Tokenizer-752"><span class="linenos"> 752</span></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span> -</span><span id="Tokenizer-753"><a href="#Tokenizer-753"><span class="linenos"> 753</span></a> <span class="s2">"sql"</span><span class="p">,</span> -</span><span id="Tokenizer-754"><a href="#Tokenizer-754"><span class="linenos"> 754</span></a> <span class="s2">"size"</span><span class="p">,</span> -</span><span id="Tokenizer-755"><a href="#Tokenizer-755"><span class="linenos"> 755</span></a> <span class="s2">"tokens"</span><span class="p">,</span> -</span><span id="Tokenizer-756"><a href="#Tokenizer-756"><span class="linenos"> 756</span></a> <span class="s2">"_start"</span><span class="p">,</span> -</span><span id="Tokenizer-757"><a href="#Tokenizer-757"><span class="linenos"> 757</span></a> <span class="s2">"_current"</span><span class="p">,</span> -</span><span id="Tokenizer-758"><a href="#Tokenizer-758"><span class="linenos"> 758</span></a> <span class="s2">"_line"</span><span class="p">,</span> -</span><span id="Tokenizer-759"><a href="#Tokenizer-759"><span class="linenos"> 759</span></a> <span class="s2">"_col"</span><span class="p">,</span> -</span><span id="Tokenizer-760"><a href="#Tokenizer-760"><span class="linenos"> 760</span></a> <span class="s2">"_comments"</span><span class="p">,</span> -</span><span id="Tokenizer-761"><a href="#Tokenizer-761"><span class="linenos"> 761</span></a> <span class="s2">"_char"</span><span class="p">,</span> -</span><span id="Tokenizer-762"><a href="#Tokenizer-762"><span class="linenos"> 762</span></a> <span class="s2">"_end"</span><span class="p">,</span> -</span><span id="Tokenizer-763"><a href="#Tokenizer-763"><span class="linenos"> 763</span></a> <span class="s2">"_peek"</span><span class="p">,</span> -</span><span id="Tokenizer-764"><a href="#Tokenizer-764"><span class="linenos"> 764</span></a> <span class="s2">"_prev_token_line"</span><span class="p">,</span> -</span><span id="Tokenizer-765"><a href="#Tokenizer-765"><span class="linenos"> 765</span></a> <span class="p">)</span> -</span><span id="Tokenizer-766"><a href="#Tokenizer-766"><span class="linenos"> 766</span></a> -</span><span id="Tokenizer-767"><a href="#Tokenizer-767"><span class="linenos"> 767</span></a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-768"><a href="#Tokenizer-768"><span class="linenos"> 768</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> -</span><span id="Tokenizer-769"><a href="#Tokenizer-769"><span class="linenos"> 769</span></a> -</span><span id="Tokenizer-770"><a href="#Tokenizer-770"><span class="linenos"> 770</span></a> <span class="k">def</span> <span class="nf">reset</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-771"><a href="#Tokenizer-771"><span class="linenos"> 771</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="Tokenizer-772"><a href="#Tokenizer-772"><span class="linenos"> 772</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="Tokenizer-773"><a href="#Tokenizer-773"><span class="linenos"> 773</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Tokenizer-774"><a href="#Tokenizer-774"><span class="linenos"> 774</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="Tokenizer-775"><a href="#Tokenizer-775"><span class="linenos"> 775</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="Tokenizer-776"><a href="#Tokenizer-776"><span class="linenos"> 776</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> <span class="o">=</span> <span class="mi">1</span> -</span><span id="Tokenizer-777"><a href="#Tokenizer-777"><span class="linenos"> 777</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="Tokenizer-778"><a href="#Tokenizer-778"><span class="linenos"> 778</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Tokenizer-779"><a href="#Tokenizer-779"><span class="linenos"> 779</span></a> -</span><span id="Tokenizer-780"><a href="#Tokenizer-780"><span class="linenos"> 780</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="Tokenizer-781"><a href="#Tokenizer-781"><span class="linenos"> 781</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="Tokenizer-782"><a href="#Tokenizer-782"><span class="linenos"> 782</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="Tokenizer-783"><a href="#Tokenizer-783"><span class="linenos"> 783</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span> -</span><span id="Tokenizer-784"><a href="#Tokenizer-784"><span class="linenos"> 784</span></a> -</span><span id="Tokenizer-785"><a href="#Tokenizer-785"><span class="linenos"> 785</span></a> <span class="k">def</span> <span class="nf">tokenize</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sql</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]:</span> -</span><span id="Tokenizer-786"><a href="#Tokenizer-786"><span class="linenos"> 786</span></a><span class="w"> </span><span class="sd">"""Returns a list of tokens corresponding to the SQL string `sql`."""</span> -</span><span id="Tokenizer-787"><a href="#Tokenizer-787"><span class="linenos"> 787</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> -</span><span id="Tokenizer-788"><a href="#Tokenizer-788"><span class="linenos"> 788</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="n">sql</span> -</span><span id="Tokenizer-789"><a href="#Tokenizer-789"><span class="linenos"> 789</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">sql</span><span class="p">)</span> -</span><span id="Tokenizer-790"><a href="#Tokenizer-790"><span class="linenos"> 790</span></a> -</span><span id="Tokenizer-791"><a href="#Tokenizer-791"><span class="linenos"> 791</span></a> <span class="k">try</span><span class="p">:</span> -</span><span id="Tokenizer-792"><a href="#Tokenizer-792"><span class="linenos"> 792</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan</span><span class="p">()</span> -</span><span id="Tokenizer-793"><a href="#Tokenizer-793"><span class="linenos"> 793</span></a> <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> -</span><span id="Tokenizer-794"><a href="#Tokenizer-794"><span class="linenos"> 794</span></a> <span class="n">start</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">50</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> -</span><span id="Tokenizer-795"><a href="#Tokenizer-795"><span class="linenos"> 795</span></a> <span class="n">end</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="mi">50</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="Tokenizer-796"><a href="#Tokenizer-796"><span class="linenos"> 796</span></a> <span class="n">context</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">]</span> -</span><span id="Tokenizer-797"><a href="#Tokenizer-797"><span class="linenos"> 797</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Error tokenizing '</span><span class="si">{</span><span class="n">context</span><span class="si">}</span><span class="s2">'"</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">e</span> -</span><span id="Tokenizer-798"><a href="#Tokenizer-798"><span class="linenos"> 798</span></a> -</span><span id="Tokenizer-799"><a href="#Tokenizer-799"><span class="linenos"> 799</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> -</span><span id="Tokenizer-800"><a href="#Tokenizer-800"><span class="linenos"> 800</span></a> -</span><span id="Tokenizer-801"><a href="#Tokenizer-801"><span class="linenos"> 801</span></a> <span class="k">def</span> <span class="nf">_scan</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">until</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Callable</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-802"><a href="#Tokenizer-802"><span class="linenos"> 802</span></a> <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span><span class="p">:</span> -</span><span id="Tokenizer-803"><a href="#Tokenizer-803"><span class="linenos"> 803</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> -</span><span id="Tokenizer-804"><a href="#Tokenizer-804"><span class="linenos"> 804</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="Tokenizer-805"><a href="#Tokenizer-805"><span class="linenos"> 805</span></a> -</span><span id="Tokenizer-806"><a href="#Tokenizer-806"><span class="linenos"> 806</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-807"><a href="#Tokenizer-807"><span class="linenos"> 807</span></a> <span class="k">break</span> -</span><span id="Tokenizer-808"><a href="#Tokenizer-808"><span class="linenos"> 808</span></a> -</span><span id="Tokenizer-809"><a href="#Tokenizer-809"><span class="linenos"> 809</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="p">:</span> -</span><span id="Tokenizer-810"><a href="#Tokenizer-810"><span class="linenos"> 810</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="o">.</span><span class="n">isdigit</span><span class="p">():</span> -</span><span id="Tokenizer-811"><a href="#Tokenizer-811"><span class="linenos"> 811</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_number</span><span class="p">()</span> -</span><span id="Tokenizer-812"><a href="#Tokenizer-812"><span class="linenos"> 812</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIERS</span><span class="p">:</span> -</span><span id="Tokenizer-813"><a href="#Tokenizer-813"><span class="linenos"> 813</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_identifier</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIERS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">])</span> -</span><span id="Tokenizer-814"><a href="#Tokenizer-814"><span class="linenos"> 814</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-815"><a href="#Tokenizer-815"><span class="linenos"> 815</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_keywords</span><span class="p">()</span> -</span><span id="Tokenizer-816"><a href="#Tokenizer-816"><span class="linenos"> 816</span></a> -</span><span id="Tokenizer-817"><a href="#Tokenizer-817"><span class="linenos"> 817</span></a> <span class="k">if</span> <span class="n">until</span> <span class="ow">and</span> <span class="n">until</span><span class="p">():</span> -</span><span id="Tokenizer-818"><a href="#Tokenizer-818"><span class="linenos"> 818</span></a> <span class="k">break</span> -</span><span id="Tokenizer-819"><a href="#Tokenizer-819"><span class="linenos"> 819</span></a> -</span><span id="Tokenizer-820"><a href="#Tokenizer-820"><span class="linenos"> 820</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">:</span> -</span><span id="Tokenizer-821"><a href="#Tokenizer-821"><span class="linenos"> 821</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">comments</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">)</span> -</span><span id="Tokenizer-822"><a href="#Tokenizer-822"><span class="linenos"> 822</span></a> -</span><span id="Tokenizer-823"><a href="#Tokenizer-823"><span class="linenos"> 823</span></a> <span class="k">def</span> <span class="nf">_chars</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">size</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Tokenizer-824"><a href="#Tokenizer-824"><span class="linenos"> 824</span></a> <span class="k">if</span> <span class="n">size</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> -</span><span id="Tokenizer-825"><a href="#Tokenizer-825"><span class="linenos"> 825</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> +</span><span id="Tokenizer-750"><a href="#Tokenizer-750"><span class="linenos"> 750</span></a> <span class="c1"># handle numeric literals like in hive (3L = BIGINT)</span> +</span><span id="Tokenizer-751"><a href="#Tokenizer-751"><span class="linenos"> 751</span></a> <span class="n">NUMERIC_LITERALS</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Dict</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">{}</span> +</span><span id="Tokenizer-752"><a href="#Tokenizer-752"><span class="linenos"> 752</span></a> <span class="n">ENCODE</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span> +</span><span id="Tokenizer-753"><a href="#Tokenizer-753"><span class="linenos"> 753</span></a> +</span><span id="Tokenizer-754"><a href="#Tokenizer-754"><span class="linenos"> 754</span></a> <span class="n">COMMENTS</span> <span class="o">=</span> <span class="p">[</span><span class="s2">"--"</span><span class="p">,</span> <span class="p">(</span><span class="s2">"/*"</span><span class="p">,</span> <span class="s2">"*/"</span><span class="p">)]</span> +</span><span id="Tokenizer-755"><a href="#Tokenizer-755"><span class="linenos"> 755</span></a> +</span><span id="Tokenizer-756"><a href="#Tokenizer-756"><span class="linenos"> 756</span></a> <span class="vm">__slots__</span> <span class="o">=</span> <span class="p">(</span> +</span><span id="Tokenizer-757"><a href="#Tokenizer-757"><span class="linenos"> 757</span></a> <span class="s2">"sql"</span><span class="p">,</span> +</span><span id="Tokenizer-758"><a href="#Tokenizer-758"><span class="linenos"> 758</span></a> <span class="s2">"size"</span><span class="p">,</span> +</span><span id="Tokenizer-759"><a href="#Tokenizer-759"><span class="linenos"> 759</span></a> <span class="s2">"tokens"</span><span class="p">,</span> +</span><span id="Tokenizer-760"><a href="#Tokenizer-760"><span class="linenos"> 760</span></a> <span class="s2">"_start"</span><span class="p">,</span> +</span><span id="Tokenizer-761"><a href="#Tokenizer-761"><span class="linenos"> 761</span></a> <span class="s2">"_current"</span><span class="p">,</span> +</span><span id="Tokenizer-762"><a href="#Tokenizer-762"><span class="linenos"> 762</span></a> <span class="s2">"_line"</span><span class="p">,</span> +</span><span id="Tokenizer-763"><a href="#Tokenizer-763"><span class="linenos"> 763</span></a> <span class="s2">"_col"</span><span class="p">,</span> +</span><span id="Tokenizer-764"><a href="#Tokenizer-764"><span class="linenos"> 764</span></a> <span class="s2">"_comments"</span><span class="p">,</span> +</span><span id="Tokenizer-765"><a href="#Tokenizer-765"><span class="linenos"> 765</span></a> <span class="s2">"_char"</span><span class="p">,</span> +</span><span id="Tokenizer-766"><a href="#Tokenizer-766"><span class="linenos"> 766</span></a> <span class="s2">"_end"</span><span class="p">,</span> +</span><span id="Tokenizer-767"><a href="#Tokenizer-767"><span class="linenos"> 767</span></a> <span class="s2">"_peek"</span><span class="p">,</span> +</span><span id="Tokenizer-768"><a href="#Tokenizer-768"><span class="linenos"> 768</span></a> <span class="s2">"_prev_token_line"</span><span class="p">,</span> +</span><span id="Tokenizer-769"><a href="#Tokenizer-769"><span class="linenos"> 769</span></a> <span class="p">)</span> +</span><span id="Tokenizer-770"><a href="#Tokenizer-770"><span class="linenos"> 770</span></a> +</span><span id="Tokenizer-771"><a href="#Tokenizer-771"><span class="linenos"> 771</span></a> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-772"><a href="#Tokenizer-772"><span class="linenos"> 772</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> +</span><span id="Tokenizer-773"><a href="#Tokenizer-773"><span class="linenos"> 773</span></a> +</span><span id="Tokenizer-774"><a href="#Tokenizer-774"><span class="linenos"> 774</span></a> <span class="k">def</span> <span class="nf">reset</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-775"><a href="#Tokenizer-775"><span class="linenos"> 775</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="Tokenizer-776"><a href="#Tokenizer-776"><span class="linenos"> 776</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="Tokenizer-777"><a href="#Tokenizer-777"><span class="linenos"> 777</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Tokenizer-778"><a href="#Tokenizer-778"><span class="linenos"> 778</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="Tokenizer-779"><a href="#Tokenizer-779"><span class="linenos"> 779</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="Tokenizer-780"><a href="#Tokenizer-780"><span class="linenos"> 780</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> <span class="o">=</span> <span class="mi">1</span> +</span><span id="Tokenizer-781"><a href="#Tokenizer-781"><span class="linenos"> 781</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="Tokenizer-782"><a href="#Tokenizer-782"><span class="linenos"> 782</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Tokenizer-783"><a href="#Tokenizer-783"><span class="linenos"> 783</span></a> +</span><span id="Tokenizer-784"><a href="#Tokenizer-784"><span class="linenos"> 784</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="Tokenizer-785"><a href="#Tokenizer-785"><span class="linenos"> 785</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="Tokenizer-786"><a href="#Tokenizer-786"><span class="linenos"> 786</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="Tokenizer-787"><a href="#Tokenizer-787"><span class="linenos"> 787</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span> +</span><span id="Tokenizer-788"><a href="#Tokenizer-788"><span class="linenos"> 788</span></a> +</span><span id="Tokenizer-789"><a href="#Tokenizer-789"><span class="linenos"> 789</span></a> <span class="k">def</span> <span class="nf">tokenize</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sql</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]:</span> +</span><span id="Tokenizer-790"><a href="#Tokenizer-790"><span class="linenos"> 790</span></a><span class="w"> </span><span class="sd">"""Returns a list of tokens corresponding to the SQL string `sql`."""</span> +</span><span id="Tokenizer-791"><a href="#Tokenizer-791"><span class="linenos"> 791</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> +</span><span id="Tokenizer-792"><a href="#Tokenizer-792"><span class="linenos"> 792</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="n">sql</span> +</span><span id="Tokenizer-793"><a href="#Tokenizer-793"><span class="linenos"> 793</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">sql</span><span class="p">)</span> +</span><span id="Tokenizer-794"><a href="#Tokenizer-794"><span class="linenos"> 794</span></a> +</span><span id="Tokenizer-795"><a href="#Tokenizer-795"><span class="linenos"> 795</span></a> <span class="k">try</span><span class="p">:</span> +</span><span id="Tokenizer-796"><a href="#Tokenizer-796"><span class="linenos"> 796</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan</span><span class="p">()</span> +</span><span id="Tokenizer-797"><a href="#Tokenizer-797"><span class="linenos"> 797</span></a> <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> +</span><span id="Tokenizer-798"><a href="#Tokenizer-798"><span class="linenos"> 798</span></a> <span class="n">start</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">50</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> +</span><span id="Tokenizer-799"><a href="#Tokenizer-799"><span class="linenos"> 799</span></a> <span class="n">end</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="mi">50</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="Tokenizer-800"><a href="#Tokenizer-800"><span class="linenos"> 800</span></a> <span class="n">context</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">]</span> +</span><span id="Tokenizer-801"><a href="#Tokenizer-801"><span class="linenos"> 801</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Error tokenizing '</span><span class="si">{</span><span class="n">context</span><span class="si">}</span><span class="s2">'"</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">e</span> +</span><span id="Tokenizer-802"><a href="#Tokenizer-802"><span class="linenos"> 802</span></a> +</span><span id="Tokenizer-803"><a href="#Tokenizer-803"><span class="linenos"> 803</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> +</span><span id="Tokenizer-804"><a href="#Tokenizer-804"><span class="linenos"> 804</span></a> +</span><span id="Tokenizer-805"><a href="#Tokenizer-805"><span class="linenos"> 805</span></a> <span class="k">def</span> <span class="nf">_scan</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">until</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="n">t</span><span class="o">.</span><span class="n">Callable</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-806"><a href="#Tokenizer-806"><span class="linenos"> 806</span></a> <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span><span class="p">:</span> +</span><span id="Tokenizer-807"><a href="#Tokenizer-807"><span class="linenos"> 807</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> +</span><span id="Tokenizer-808"><a href="#Tokenizer-808"><span class="linenos"> 808</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="Tokenizer-809"><a href="#Tokenizer-809"><span class="linenos"> 809</span></a> +</span><span id="Tokenizer-810"><a href="#Tokenizer-810"><span class="linenos"> 810</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-811"><a href="#Tokenizer-811"><span class="linenos"> 811</span></a> <span class="k">break</span> +</span><span id="Tokenizer-812"><a href="#Tokenizer-812"><span class="linenos"> 812</span></a> +</span><span id="Tokenizer-813"><a href="#Tokenizer-813"><span class="linenos"> 813</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="p">:</span> +</span><span id="Tokenizer-814"><a href="#Tokenizer-814"><span class="linenos"> 814</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="o">.</span><span class="n">isdigit</span><span class="p">():</span> +</span><span id="Tokenizer-815"><a href="#Tokenizer-815"><span class="linenos"> 815</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_number</span><span class="p">()</span> +</span><span id="Tokenizer-816"><a href="#Tokenizer-816"><span class="linenos"> 816</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIERS</span><span class="p">:</span> +</span><span id="Tokenizer-817"><a href="#Tokenizer-817"><span class="linenos"> 817</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_identifier</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIERS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">])</span> +</span><span id="Tokenizer-818"><a href="#Tokenizer-818"><span class="linenos"> 818</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-819"><a href="#Tokenizer-819"><span class="linenos"> 819</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_keywords</span><span class="p">()</span> +</span><span id="Tokenizer-820"><a href="#Tokenizer-820"><span class="linenos"> 820</span></a> +</span><span id="Tokenizer-821"><a href="#Tokenizer-821"><span class="linenos"> 821</span></a> <span class="k">if</span> <span class="n">until</span> <span class="ow">and</span> <span class="n">until</span><span class="p">():</span> +</span><span id="Tokenizer-822"><a href="#Tokenizer-822"><span class="linenos"> 822</span></a> <span class="k">break</span> +</span><span id="Tokenizer-823"><a href="#Tokenizer-823"><span class="linenos"> 823</span></a> +</span><span id="Tokenizer-824"><a href="#Tokenizer-824"><span class="linenos"> 824</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">:</span> +</span><span id="Tokenizer-825"><a href="#Tokenizer-825"><span class="linenos"> 825</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">comments</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">)</span> </span><span id="Tokenizer-826"><a href="#Tokenizer-826"><span class="linenos"> 826</span></a> -</span><span id="Tokenizer-827"><a href="#Tokenizer-827"><span class="linenos"> 827</span></a> <span class="n">start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> -</span><span id="Tokenizer-828"><a href="#Tokenizer-828"><span class="linenos"> 828</span></a> <span class="n">end</span> <span class="o">=</span> <span class="n">start</span> <span class="o">+</span> <span class="n">size</span> -</span><span id="Tokenizer-829"><a href="#Tokenizer-829"><span class="linenos"> 829</span></a> -</span><span id="Tokenizer-830"><a href="#Tokenizer-830"><span class="linenos"> 830</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">]</span> <span class="k">if</span> <span class="n">end</span> <span class="o"><=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="k">else</span> <span class="s2">""</span> -</span><span id="Tokenizer-831"><a href="#Tokenizer-831"><span class="linenos"> 831</span></a> -</span><span id="Tokenizer-832"><a href="#Tokenizer-832"><span class="linenos"> 832</span></a> <span class="k">def</span> <span class="nf">_advance</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">i</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="n">alnum</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-833"><a href="#Tokenizer-833"><span class="linenos"> 833</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">)</span> <span class="ow">is</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">:</span> -</span><span id="Tokenizer-834"><a href="#Tokenizer-834"><span class="linenos"> 834</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="mi">1</span> -</span><span id="Tokenizer-835"><a href="#Tokenizer-835"><span class="linenos"> 835</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="Tokenizer-836"><a href="#Tokenizer-836"><span class="linenos"> 836</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-837"><a href="#Tokenizer-837"><span class="linenos"> 837</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">+=</span> <span class="n">i</span> -</span><span id="Tokenizer-838"><a href="#Tokenizer-838"><span class="linenos"> 838</span></a> -</span><span id="Tokenizer-839"><a href="#Tokenizer-839"><span class="linenos"> 839</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+=</span> <span class="n">i</span> -</span><span id="Tokenizer-840"><a href="#Tokenizer-840"><span class="linenos"> 840</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">>=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> -</span><span id="Tokenizer-841"><a href="#Tokenizer-841"><span class="linenos"> 841</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> -</span><span id="Tokenizer-842"><a href="#Tokenizer-842"><span class="linenos"> 842</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span> -</span><span id="Tokenizer-843"><a href="#Tokenizer-843"><span class="linenos"> 843</span></a> -</span><span id="Tokenizer-844"><a href="#Tokenizer-844"><span class="linenos"> 844</span></a> <span class="k">if</span> <span class="n">alnum</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="o">.</span><span class="n">isalnum</span><span class="p">():</span> -</span><span id="Tokenizer-845"><a href="#Tokenizer-845"><span class="linenos"> 845</span></a> <span class="c1"># Here we use local variables instead of attributes for better performance</span> -</span><span id="Tokenizer-846"><a href="#Tokenizer-846"><span class="linenos"> 846</span></a> <span class="n">_col</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> -</span><span id="Tokenizer-847"><a href="#Tokenizer-847"><span class="linenos"> 847</span></a> <span class="n">_current</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> -</span><span id="Tokenizer-848"><a href="#Tokenizer-848"><span class="linenos"> 848</span></a> <span class="n">_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> -</span><span id="Tokenizer-849"><a href="#Tokenizer-849"><span class="linenos"> 849</span></a> <span class="n">_peek</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> -</span><span id="Tokenizer-850"><a href="#Tokenizer-850"><span class="linenos"> 850</span></a> -</span><span id="Tokenizer-851"><a href="#Tokenizer-851"><span class="linenos"> 851</span></a> <span class="k">while</span> <span class="n">_peek</span><span class="o">.</span><span class="n">isalnum</span><span class="p">():</span> -</span><span id="Tokenizer-852"><a href="#Tokenizer-852"><span class="linenos"> 852</span></a> <span class="n">_col</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="Tokenizer-853"><a href="#Tokenizer-853"><span class="linenos"> 853</span></a> <span class="n">_current</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="Tokenizer-854"><a href="#Tokenizer-854"><span class="linenos"> 854</span></a> <span class="n">_end</span> <span class="o">=</span> <span class="n">_current</span> <span class="o">>=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> -</span><span id="Tokenizer-855"><a href="#Tokenizer-855"><span class="linenos"> 855</span></a> <span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> <span class="k">if</span> <span class="n">_end</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">_current</span><span class="p">]</span> -</span><span id="Tokenizer-856"><a href="#Tokenizer-856"><span class="linenos"> 856</span></a> -</span><span id="Tokenizer-857"><a href="#Tokenizer-857"><span class="linenos"> 857</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="n">_col</span> -</span><span id="Tokenizer-858"><a href="#Tokenizer-858"><span class="linenos"> 858</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">=</span> <span class="n">_current</span> -</span><span id="Tokenizer-859"><a href="#Tokenizer-859"><span class="linenos"> 859</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="n">_end</span> -</span><span id="Tokenizer-860"><a href="#Tokenizer-860"><span class="linenos"> 860</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="n">_peek</span> -</span><span id="Tokenizer-861"><a href="#Tokenizer-861"><span class="linenos"> 861</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> -</span><span id="Tokenizer-862"><a href="#Tokenizer-862"><span class="linenos"> 862</span></a> -</span><span id="Tokenizer-863"><a href="#Tokenizer-863"><span class="linenos"> 863</span></a> <span class="nd">@property</span> -</span><span id="Tokenizer-864"><a href="#Tokenizer-864"><span class="linenos"> 864</span></a> <span class="k">def</span> <span class="nf">_text</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Tokenizer-865"><a href="#Tokenizer-865"><span class="linenos"> 865</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span> +</span><span id="Tokenizer-827"><a href="#Tokenizer-827"><span class="linenos"> 827</span></a> <span class="k">def</span> <span class="nf">_chars</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">size</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Tokenizer-828"><a href="#Tokenizer-828"><span class="linenos"> 828</span></a> <span class="k">if</span> <span class="n">size</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> +</span><span id="Tokenizer-829"><a href="#Tokenizer-829"><span class="linenos"> 829</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> +</span><span id="Tokenizer-830"><a href="#Tokenizer-830"><span class="linenos"> 830</span></a> +</span><span id="Tokenizer-831"><a href="#Tokenizer-831"><span class="linenos"> 831</span></a> <span class="n">start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> +</span><span id="Tokenizer-832"><a href="#Tokenizer-832"><span class="linenos"> 832</span></a> <span class="n">end</span> <span class="o">=</span> <span class="n">start</span> <span class="o">+</span> <span class="n">size</span> +</span><span id="Tokenizer-833"><a href="#Tokenizer-833"><span class="linenos"> 833</span></a> +</span><span id="Tokenizer-834"><a href="#Tokenizer-834"><span class="linenos"> 834</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">]</span> <span class="k">if</span> <span class="n">end</span> <span class="o"><=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="k">else</span> <span class="s2">""</span> +</span><span id="Tokenizer-835"><a href="#Tokenizer-835"><span class="linenos"> 835</span></a> +</span><span id="Tokenizer-836"><a href="#Tokenizer-836"><span class="linenos"> 836</span></a> <span class="k">def</span> <span class="nf">_advance</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">i</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="n">alnum</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-837"><a href="#Tokenizer-837"><span class="linenos"> 837</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">)</span> <span class="ow">is</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">:</span> +</span><span id="Tokenizer-838"><a href="#Tokenizer-838"><span class="linenos"> 838</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="mi">1</span> +</span><span id="Tokenizer-839"><a href="#Tokenizer-839"><span class="linenos"> 839</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="Tokenizer-840"><a href="#Tokenizer-840"><span class="linenos"> 840</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-841"><a href="#Tokenizer-841"><span class="linenos"> 841</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">+=</span> <span class="n">i</span> +</span><span id="Tokenizer-842"><a href="#Tokenizer-842"><span class="linenos"> 842</span></a> +</span><span id="Tokenizer-843"><a href="#Tokenizer-843"><span class="linenos"> 843</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+=</span> <span class="n">i</span> +</span><span id="Tokenizer-844"><a href="#Tokenizer-844"><span class="linenos"> 844</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">>=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> +</span><span id="Tokenizer-845"><a href="#Tokenizer-845"><span class="linenos"> 845</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> +</span><span id="Tokenizer-846"><a href="#Tokenizer-846"><span class="linenos"> 846</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span> +</span><span id="Tokenizer-847"><a href="#Tokenizer-847"><span class="linenos"> 847</span></a> +</span><span id="Tokenizer-848"><a href="#Tokenizer-848"><span class="linenos"> 848</span></a> <span class="k">if</span> <span class="n">alnum</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="o">.</span><span class="n">isalnum</span><span class="p">():</span> +</span><span id="Tokenizer-849"><a href="#Tokenizer-849"><span class="linenos"> 849</span></a> <span class="c1"># Here we use local variables instead of attributes for better performance</span> +</span><span id="Tokenizer-850"><a href="#Tokenizer-850"><span class="linenos"> 850</span></a> <span class="n">_col</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> +</span><span id="Tokenizer-851"><a href="#Tokenizer-851"><span class="linenos"> 851</span></a> <span class="n">_current</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> +</span><span id="Tokenizer-852"><a href="#Tokenizer-852"><span class="linenos"> 852</span></a> <span class="n">_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> +</span><span id="Tokenizer-853"><a href="#Tokenizer-853"><span class="linenos"> 853</span></a> <span class="n">_peek</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> +</span><span id="Tokenizer-854"><a href="#Tokenizer-854"><span class="linenos"> 854</span></a> +</span><span id="Tokenizer-855"><a href="#Tokenizer-855"><span class="linenos"> 855</span></a> <span class="k">while</span> <span class="n">_peek</span><span class="o">.</span><span class="n">isalnum</span><span class="p">():</span> +</span><span id="Tokenizer-856"><a href="#Tokenizer-856"><span class="linenos"> 856</span></a> <span class="n">_col</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="Tokenizer-857"><a href="#Tokenizer-857"><span class="linenos"> 857</span></a> <span class="n">_current</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="Tokenizer-858"><a href="#Tokenizer-858"><span class="linenos"> 858</span></a> <span class="n">_end</span> <span class="o">=</span> <span class="n">_current</span> <span class="o">>=</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> +</span><span id="Tokenizer-859"><a href="#Tokenizer-859"><span class="linenos"> 859</span></a> <span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> <span class="k">if</span> <span class="n">_end</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">_current</span><span class="p">]</span> +</span><span id="Tokenizer-860"><a href="#Tokenizer-860"><span class="linenos"> 860</span></a> +</span><span id="Tokenizer-861"><a href="#Tokenizer-861"><span class="linenos"> 861</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="n">_col</span> +</span><span id="Tokenizer-862"><a href="#Tokenizer-862"><span class="linenos"> 862</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">=</span> <span class="n">_current</span> +</span><span id="Tokenizer-863"><a href="#Tokenizer-863"><span class="linenos"> 863</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="n">_end</span> +</span><span id="Tokenizer-864"><a href="#Tokenizer-864"><span class="linenos"> 864</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="n">_peek</span> +</span><span id="Tokenizer-865"><a href="#Tokenizer-865"><span class="linenos"> 865</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> </span><span id="Tokenizer-866"><a href="#Tokenizer-866"><span class="linenos"> 866</span></a> -</span><span id="Tokenizer-867"><a href="#Tokenizer-867"><span class="linenos"> 867</span></a> <span class="k">def</span> <span class="nf">peek</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">i</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Tokenizer-868"><a href="#Tokenizer-868"><span class="linenos"> 868</span></a> <span class="n">i</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="n">i</span> -</span><span id="Tokenizer-869"><a href="#Tokenizer-869"><span class="linenos"> 869</span></a> <span class="k">if</span> <span class="n">i</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> -</span><span id="Tokenizer-870"><a href="#Tokenizer-870"><span class="linenos"> 870</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> -</span><span id="Tokenizer-871"><a href="#Tokenizer-871"><span class="linenos"> 871</span></a> <span class="k">return</span> <span class="s2">""</span> -</span><span id="Tokenizer-872"><a href="#Tokenizer-872"><span class="linenos"> 872</span></a> -</span><span id="Tokenizer-873"><a href="#Tokenizer-873"><span class="linenos"> 873</span></a> <span class="k">def</span> <span class="nf">_add</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> <span class="n">text</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-874"><a href="#Tokenizer-874"><span class="linenos"> 874</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> -</span><span id="Tokenizer-875"><a href="#Tokenizer-875"><span class="linenos"> 875</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="o">.</span><span class="n">append</span><span class="p">(</span> -</span><span id="Tokenizer-876"><a href="#Tokenizer-876"><span class="linenos"> 876</span></a> <span class="n">Token</span><span class="p">(</span> -</span><span id="Tokenizer-877"><a href="#Tokenizer-877"><span class="linenos"> 877</span></a> <span class="n">token_type</span><span class="p">,</span> -</span><span id="Tokenizer-878"><a href="#Tokenizer-878"><span class="linenos"> 878</span></a> <span class="n">text</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span> <span class="k">if</span> <span class="n">text</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">text</span><span class="p">,</span> -</span><span id="Tokenizer-879"><a href="#Tokenizer-879"><span class="linenos"> 879</span></a> <span class="n">line</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="p">,</span> -</span><span id="Tokenizer-880"><a href="#Tokenizer-880"><span class="linenos"> 880</span></a> <span class="n">col</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_col</span><span class="p">,</span> -</span><span id="Tokenizer-881"><a href="#Tokenizer-881"><span class="linenos"> 881</span></a> <span class="n">start</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="p">,</span> -</span><span id="Tokenizer-882"><a href="#Tokenizer-882"><span class="linenos"> 882</span></a> <span class="n">end</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> -</span><span id="Tokenizer-883"><a href="#Tokenizer-883"><span class="linenos"> 883</span></a> <span class="n">comments</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">,</span> -</span><span id="Tokenizer-884"><a href="#Tokenizer-884"><span class="linenos"> 884</span></a> <span class="p">)</span> -</span><span id="Tokenizer-885"><a href="#Tokenizer-885"><span class="linenos"> 885</span></a> <span class="p">)</span> -</span><span id="Tokenizer-886"><a href="#Tokenizer-886"><span class="linenos"> 886</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Tokenizer-887"><a href="#Tokenizer-887"><span class="linenos"> 887</span></a> -</span><span id="Tokenizer-888"><a href="#Tokenizer-888"><span class="linenos"> 888</span></a> <span class="c1"># If we have either a semicolon or a begin token before the command's token, we'll parse</span> -</span><span id="Tokenizer-889"><a href="#Tokenizer-889"><span class="linenos"> 889</span></a> <span class="c1"># whatever follows the command's token as a string</span> -</span><span id="Tokenizer-890"><a href="#Tokenizer-890"><span class="linenos"> 890</span></a> <span class="k">if</span> <span class="p">(</span> -</span><span id="Tokenizer-891"><a href="#Tokenizer-891"><span class="linenos"> 891</span></a> <span class="n">token_type</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">COMMANDS</span> -</span><span id="Tokenizer-892"><a href="#Tokenizer-892"><span class="linenos"> 892</span></a> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">!=</span> <span class="s2">";"</span> -</span><span id="Tokenizer-893"><a href="#Tokenizer-893"><span class="linenos"> 893</span></a> <span class="ow">and</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">token_type</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">COMMAND_PREFIX_TOKENS</span><span class="p">)</span> -</span><span id="Tokenizer-894"><a href="#Tokenizer-894"><span class="linenos"> 894</span></a> <span class="p">):</span> -</span><span id="Tokenizer-895"><a href="#Tokenizer-895"><span class="linenos"> 895</span></a> <span class="n">start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> -</span><span id="Tokenizer-896"><a href="#Tokenizer-896"><span class="linenos"> 896</span></a> <span class="n">tokens</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">)</span> -</span><span id="Tokenizer-897"><a href="#Tokenizer-897"><span class="linenos"> 897</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="s2">";"</span><span class="p">)</span> -</span><span id="Tokenizer-898"><a href="#Tokenizer-898"><span class="linenos"> 898</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[:</span><span class="n">tokens</span><span class="p">]</span> -</span><span id="Tokenizer-899"><a href="#Tokenizer-899"><span class="linenos"> 899</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> -</span><span id="Tokenizer-900"><a href="#Tokenizer-900"><span class="linenos"> 900</span></a> <span class="k">if</span> <span class="n">text</span><span class="p">:</span> -</span><span id="Tokenizer-901"><a href="#Tokenizer-901"><span class="linenos"> 901</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> -</span><span id="Tokenizer-902"><a href="#Tokenizer-902"><span class="linenos"> 902</span></a> -</span><span id="Tokenizer-903"><a href="#Tokenizer-903"><span class="linenos"> 903</span></a> <span class="k">def</span> <span class="nf">_scan_keywords</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-904"><a href="#Tokenizer-904"><span class="linenos"> 904</span></a> <span class="n">size</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="Tokenizer-905"><a href="#Tokenizer-905"><span class="linenos"> 905</span></a> <span class="n">word</span> <span class="o">=</span> <span class="kc">None</span> -</span><span id="Tokenizer-906"><a href="#Tokenizer-906"><span class="linenos"> 906</span></a> <span class="n">chars</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> -</span><span id="Tokenizer-907"><a href="#Tokenizer-907"><span class="linenos"> 907</span></a> <span class="n">char</span> <span class="o">=</span> <span class="n">chars</span> -</span><span id="Tokenizer-908"><a href="#Tokenizer-908"><span class="linenos"> 908</span></a> <span class="n">prev_space</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="Tokenizer-909"><a href="#Tokenizer-909"><span class="linenos"> 909</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="Tokenizer-910"><a href="#Tokenizer-910"><span class="linenos"> 910</span></a> <span class="n">trie</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_KEYWORD_TRIE</span> -</span><span id="Tokenizer-911"><a href="#Tokenizer-911"><span class="linenos"> 911</span></a> <span class="n">single_token</span> <span class="o">=</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span> -</span><span id="Tokenizer-912"><a href="#Tokenizer-912"><span class="linenos"> 912</span></a> -</span><span id="Tokenizer-913"><a href="#Tokenizer-913"><span class="linenos"> 913</span></a> <span class="k">while</span> <span class="n">chars</span><span class="p">:</span> -</span><span id="Tokenizer-914"><a href="#Tokenizer-914"><span class="linenos"> 914</span></a> <span class="k">if</span> <span class="n">skip</span><span class="p">:</span> -</span><span id="Tokenizer-915"><a href="#Tokenizer-915"><span class="linenos"> 915</span></a> <span class="n">result</span> <span class="o">=</span> <span class="mi">1</span> -</span><span id="Tokenizer-916"><a href="#Tokenizer-916"><span class="linenos"> 916</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-917"><a href="#Tokenizer-917"><span class="linenos"> 917</span></a> <span class="n">result</span><span class="p">,</span> <span class="n">trie</span> <span class="o">=</span> <span class="n">in_trie</span><span class="p">(</span><span class="n">trie</span><span class="p">,</span> <span class="n">char</span><span class="o">.</span><span class="n">upper</span><span class="p">())</span> -</span><span id="Tokenizer-918"><a href="#Tokenizer-918"><span class="linenos"> 918</span></a> -</span><span id="Tokenizer-919"><a href="#Tokenizer-919"><span class="linenos"> 919</span></a> <span class="k">if</span> <span class="n">result</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> -</span><span id="Tokenizer-920"><a href="#Tokenizer-920"><span class="linenos"> 920</span></a> <span class="k">break</span> -</span><span id="Tokenizer-921"><a href="#Tokenizer-921"><span class="linenos"> 921</span></a> <span class="k">if</span> <span class="n">result</span> <span class="o">==</span> <span class="mi">2</span><span class="p">:</span> -</span><span id="Tokenizer-922"><a href="#Tokenizer-922"><span class="linenos"> 922</span></a> <span class="n">word</span> <span class="o">=</span> <span class="n">chars</span> -</span><span id="Tokenizer-923"><a href="#Tokenizer-923"><span class="linenos"> 923</span></a> -</span><span id="Tokenizer-924"><a href="#Tokenizer-924"><span class="linenos"> 924</span></a> <span class="n">size</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="Tokenizer-925"><a href="#Tokenizer-925"><span class="linenos"> 925</span></a> <span class="n">end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">+</span> <span class="n">size</span> -</span><span id="Tokenizer-926"><a href="#Tokenizer-926"><span class="linenos"> 926</span></a> -</span><span id="Tokenizer-927"><a href="#Tokenizer-927"><span class="linenos"> 927</span></a> <span class="k">if</span> <span class="n">end</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> -</span><span id="Tokenizer-928"><a href="#Tokenizer-928"><span class="linenos"> 928</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">end</span><span class="p">]</span> -</span><span id="Tokenizer-929"><a href="#Tokenizer-929"><span class="linenos"> 929</span></a> <span class="n">single_token</span> <span class="o">=</span> <span class="n">single_token</span> <span class="ow">or</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span> -</span><span id="Tokenizer-930"><a href="#Tokenizer-930"><span class="linenos"> 930</span></a> <span class="n">is_space</span> <span class="o">=</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span> -</span><span id="Tokenizer-931"><a href="#Tokenizer-931"><span class="linenos"> 931</span></a> -</span><span id="Tokenizer-932"><a href="#Tokenizer-932"><span class="linenos"> 932</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">is_space</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">prev_space</span><span class="p">:</span> -</span><span id="Tokenizer-933"><a href="#Tokenizer-933"><span class="linenos"> 933</span></a> <span class="k">if</span> <span class="n">is_space</span><span class="p">:</span> -</span><span id="Tokenizer-934"><a href="#Tokenizer-934"><span class="linenos"> 934</span></a> <span class="n">char</span> <span class="o">=</span> <span class="s2">" "</span> -</span><span id="Tokenizer-935"><a href="#Tokenizer-935"><span class="linenos"> 935</span></a> <span class="n">chars</span> <span class="o">+=</span> <span class="n">char</span> -</span><span id="Tokenizer-936"><a href="#Tokenizer-936"><span class="linenos"> 936</span></a> <span class="n">prev_space</span> <span class="o">=</span> <span class="n">is_space</span> -</span><span id="Tokenizer-937"><a href="#Tokenizer-937"><span class="linenos"> 937</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="Tokenizer-938"><a href="#Tokenizer-938"><span class="linenos"> 938</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-939"><a href="#Tokenizer-939"><span class="linenos"> 939</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">True</span> -</span><span id="Tokenizer-940"><a href="#Tokenizer-940"><span class="linenos"> 940</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-941"><a href="#Tokenizer-941"><span class="linenos"> 941</span></a> <span class="n">char</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="Tokenizer-942"><a href="#Tokenizer-942"><span class="linenos"> 942</span></a> <span class="n">chars</span> <span class="o">=</span> <span class="s2">" "</span> -</span><span id="Tokenizer-943"><a href="#Tokenizer-943"><span class="linenos"> 943</span></a> -</span><span id="Tokenizer-944"><a href="#Tokenizer-944"><span class="linenos"> 944</span></a> <span class="n">word</span> <span class="o">=</span> <span class="kc">None</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">single_token</span> <span class="ow">and</span> <span class="n">chars</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span> <span class="k">else</span> <span class="n">word</span> -</span><span id="Tokenizer-945"><a href="#Tokenizer-945"><span class="linenos"> 945</span></a> -</span><span id="Tokenizer-946"><a href="#Tokenizer-946"><span class="linenos"> 946</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">word</span><span class="p">:</span> -</span><span id="Tokenizer-947"><a href="#Tokenizer-947"><span class="linenos"> 947</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> -</span><span id="Tokenizer-948"><a href="#Tokenizer-948"><span class="linenos"> 948</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">],</span> <span class="n">text</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">)</span> -</span><span id="Tokenizer-949"><a href="#Tokenizer-949"><span class="linenos"> 949</span></a> <span class="k">return</span> -</span><span id="Tokenizer-950"><a href="#Tokenizer-950"><span class="linenos"> 950</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_var</span><span class="p">()</span> -</span><span id="Tokenizer-951"><a href="#Tokenizer-951"><span class="linenos"> 951</span></a> <span class="k">return</span> -</span><span id="Tokenizer-952"><a href="#Tokenizer-952"><span class="linenos"> 952</span></a> -</span><span id="Tokenizer-953"><a href="#Tokenizer-953"><span class="linenos"> 953</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_string</span><span class="p">(</span><span class="n">word</span><span class="p">):</span> -</span><span id="Tokenizer-954"><a href="#Tokenizer-954"><span class="linenos"> 954</span></a> <span class="k">return</span> -</span><span id="Tokenizer-955"><a href="#Tokenizer-955"><span class="linenos"> 955</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_comment</span><span class="p">(</span><span class="n">word</span><span class="p">):</span> -</span><span id="Tokenizer-956"><a href="#Tokenizer-956"><span class="linenos"> 956</span></a> <span class="k">return</span> -</span><span id="Tokenizer-957"><a href="#Tokenizer-957"><span class="linenos"> 957</span></a> -</span><span id="Tokenizer-958"><a href="#Tokenizer-958"><span class="linenos"> 958</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="Tokenizer-959"><a href="#Tokenizer-959"><span class="linenos"> 959</span></a> <span class="n">word</span> <span class="o">=</span> <span class="n">word</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> -</span><span id="Tokenizer-960"><a href="#Tokenizer-960"><span class="linenos"> 960</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">[</span><span class="n">word</span><span class="p">],</span> <span class="n">text</span><span class="o">=</span><span class="n">word</span><span class="p">)</span> +</span><span id="Tokenizer-867"><a href="#Tokenizer-867"><span class="linenos"> 867</span></a> <span class="nd">@property</span> +</span><span id="Tokenizer-868"><a href="#Tokenizer-868"><span class="linenos"> 868</span></a> <span class="k">def</span> <span class="nf">_text</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Tokenizer-869"><a href="#Tokenizer-869"><span class="linenos"> 869</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span> +</span><span id="Tokenizer-870"><a href="#Tokenizer-870"><span class="linenos"> 870</span></a> +</span><span id="Tokenizer-871"><a href="#Tokenizer-871"><span class="linenos"> 871</span></a> <span class="k">def</span> <span class="nf">peek</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">i</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Tokenizer-872"><a href="#Tokenizer-872"><span class="linenos"> 872</span></a> <span class="n">i</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="n">i</span> +</span><span id="Tokenizer-873"><a href="#Tokenizer-873"><span class="linenos"> 873</span></a> <span class="k">if</span> <span class="n">i</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> +</span><span id="Tokenizer-874"><a href="#Tokenizer-874"><span class="linenos"> 874</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> +</span><span id="Tokenizer-875"><a href="#Tokenizer-875"><span class="linenos"> 875</span></a> <span class="k">return</span> <span class="s2">""</span> +</span><span id="Tokenizer-876"><a href="#Tokenizer-876"><span class="linenos"> 876</span></a> +</span><span id="Tokenizer-877"><a href="#Tokenizer-877"><span class="linenos"> 877</span></a> <span class="k">def</span> <span class="nf">_add</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">token_type</span><span class="p">:</span> <span class="n">TokenType</span><span class="p">,</span> <span class="n">text</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">Optional</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-878"><a href="#Tokenizer-878"><span class="linenos"> 878</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> +</span><span id="Tokenizer-879"><a href="#Tokenizer-879"><span class="linenos"> 879</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="o">.</span><span class="n">append</span><span class="p">(</span> +</span><span id="Tokenizer-880"><a href="#Tokenizer-880"><span class="linenos"> 880</span></a> <span class="n">Token</span><span class="p">(</span> +</span><span id="Tokenizer-881"><a href="#Tokenizer-881"><span class="linenos"> 881</span></a> <span class="n">token_type</span><span class="p">,</span> +</span><span id="Tokenizer-882"><a href="#Tokenizer-882"><span class="linenos"> 882</span></a> <span class="n">text</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span> <span class="k">if</span> <span class="n">text</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">text</span><span class="p">,</span> +</span><span id="Tokenizer-883"><a href="#Tokenizer-883"><span class="linenos"> 883</span></a> <span class="n">line</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="p">,</span> +</span><span id="Tokenizer-884"><a href="#Tokenizer-884"><span class="linenos"> 884</span></a> <span class="n">col</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_col</span><span class="p">,</span> +</span><span id="Tokenizer-885"><a href="#Tokenizer-885"><span class="linenos"> 885</span></a> <span class="n">start</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="p">,</span> +</span><span id="Tokenizer-886"><a href="#Tokenizer-886"><span class="linenos"> 886</span></a> <span class="n">end</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span> +</span><span id="Tokenizer-887"><a href="#Tokenizer-887"><span class="linenos"> 887</span></a> <span class="n">comments</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">,</span> +</span><span id="Tokenizer-888"><a href="#Tokenizer-888"><span class="linenos"> 888</span></a> <span class="p">)</span> +</span><span id="Tokenizer-889"><a href="#Tokenizer-889"><span class="linenos"> 889</span></a> <span class="p">)</span> +</span><span id="Tokenizer-890"><a href="#Tokenizer-890"><span class="linenos"> 890</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Tokenizer-891"><a href="#Tokenizer-891"><span class="linenos"> 891</span></a> +</span><span id="Tokenizer-892"><a href="#Tokenizer-892"><span class="linenos"> 892</span></a> <span class="c1"># If we have either a semicolon or a begin token before the command's token, we'll parse</span> +</span><span id="Tokenizer-893"><a href="#Tokenizer-893"><span class="linenos"> 893</span></a> <span class="c1"># whatever follows the command's token as a string</span> +</span><span id="Tokenizer-894"><a href="#Tokenizer-894"><span class="linenos"> 894</span></a> <span class="k">if</span> <span class="p">(</span> +</span><span id="Tokenizer-895"><a href="#Tokenizer-895"><span class="linenos"> 895</span></a> <span class="n">token_type</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">COMMANDS</span> +</span><span id="Tokenizer-896"><a href="#Tokenizer-896"><span class="linenos"> 896</span></a> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">!=</span> <span class="s2">";"</span> +</span><span id="Tokenizer-897"><a href="#Tokenizer-897"><span class="linenos"> 897</span></a> <span class="ow">and</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">2</span><span class="p">]</span><span class="o">.</span><span class="n">token_type</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">COMMAND_PREFIX_TOKENS</span><span class="p">)</span> +</span><span id="Tokenizer-898"><a href="#Tokenizer-898"><span class="linenos"> 898</span></a> <span class="p">):</span> +</span><span id="Tokenizer-899"><a href="#Tokenizer-899"><span class="linenos"> 899</span></a> <span class="n">start</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> +</span><span id="Tokenizer-900"><a href="#Tokenizer-900"><span class="linenos"> 900</span></a> <span class="n">tokens</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">)</span> +</span><span id="Tokenizer-901"><a href="#Tokenizer-901"><span class="linenos"> 901</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan</span><span class="p">(</span><span class="k">lambda</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="s2">";"</span><span class="p">)</span> +</span><span id="Tokenizer-902"><a href="#Tokenizer-902"><span class="linenos"> 902</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[:</span><span class="n">tokens</span><span class="p">]</span> +</span><span id="Tokenizer-903"><a href="#Tokenizer-903"><span class="linenos"> 903</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> +</span><span id="Tokenizer-904"><a href="#Tokenizer-904"><span class="linenos"> 904</span></a> <span class="k">if</span> <span class="n">text</span><span class="p">:</span> +</span><span id="Tokenizer-905"><a href="#Tokenizer-905"><span class="linenos"> 905</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> +</span><span id="Tokenizer-906"><a href="#Tokenizer-906"><span class="linenos"> 906</span></a> +</span><span id="Tokenizer-907"><a href="#Tokenizer-907"><span class="linenos"> 907</span></a> <span class="k">def</span> <span class="nf">_scan_keywords</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-908"><a href="#Tokenizer-908"><span class="linenos"> 908</span></a> <span class="n">size</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="Tokenizer-909"><a href="#Tokenizer-909"><span class="linenos"> 909</span></a> <span class="n">word</span> <span class="o">=</span> <span class="kc">None</span> +</span><span id="Tokenizer-910"><a href="#Tokenizer-910"><span class="linenos"> 910</span></a> <span class="n">chars</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> +</span><span id="Tokenizer-911"><a href="#Tokenizer-911"><span class="linenos"> 911</span></a> <span class="n">char</span> <span class="o">=</span> <span class="n">chars</span> +</span><span id="Tokenizer-912"><a href="#Tokenizer-912"><span class="linenos"> 912</span></a> <span class="n">prev_space</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="Tokenizer-913"><a href="#Tokenizer-913"><span class="linenos"> 913</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="Tokenizer-914"><a href="#Tokenizer-914"><span class="linenos"> 914</span></a> <span class="n">trie</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_KEYWORD_TRIE</span> +</span><span id="Tokenizer-915"><a href="#Tokenizer-915"><span class="linenos"> 915</span></a> <span class="n">single_token</span> <span class="o">=</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span> +</span><span id="Tokenizer-916"><a href="#Tokenizer-916"><span class="linenos"> 916</span></a> +</span><span id="Tokenizer-917"><a href="#Tokenizer-917"><span class="linenos"> 917</span></a> <span class="k">while</span> <span class="n">chars</span><span class="p">:</span> +</span><span id="Tokenizer-918"><a href="#Tokenizer-918"><span class="linenos"> 918</span></a> <span class="k">if</span> <span class="n">skip</span><span class="p">:</span> +</span><span id="Tokenizer-919"><a href="#Tokenizer-919"><span class="linenos"> 919</span></a> <span class="n">result</span> <span class="o">=</span> <span class="n">TrieResult</span><span class="o">.</span><span class="n">PREFIX</span> +</span><span id="Tokenizer-920"><a href="#Tokenizer-920"><span class="linenos"> 920</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-921"><a href="#Tokenizer-921"><span class="linenos"> 921</span></a> <span class="n">result</span><span class="p">,</span> <span class="n">trie</span> <span class="o">=</span> <span class="n">in_trie</span><span class="p">(</span><span class="n">trie</span><span class="p">,</span> <span class="n">char</span><span class="o">.</span><span class="n">upper</span><span class="p">())</span> +</span><span id="Tokenizer-922"><a href="#Tokenizer-922"><span class="linenos"> 922</span></a> +</span><span id="Tokenizer-923"><a href="#Tokenizer-923"><span class="linenos"> 923</span></a> <span class="k">if</span> <span class="n">result</span> <span class="o">==</span> <span class="n">TrieResult</span><span class="o">.</span><span class="n">FAILED</span><span class="p">:</span> +</span><span id="Tokenizer-924"><a href="#Tokenizer-924"><span class="linenos"> 924</span></a> <span class="k">break</span> +</span><span id="Tokenizer-925"><a href="#Tokenizer-925"><span class="linenos"> 925</span></a> <span class="k">if</span> <span class="n">result</span> <span class="o">==</span> <span class="n">TrieResult</span><span class="o">.</span><span class="n">EXISTS</span><span class="p">:</span> +</span><span id="Tokenizer-926"><a href="#Tokenizer-926"><span class="linenos"> 926</span></a> <span class="n">word</span> <span class="o">=</span> <span class="n">chars</span> +</span><span id="Tokenizer-927"><a href="#Tokenizer-927"><span class="linenos"> 927</span></a> +</span><span id="Tokenizer-928"><a href="#Tokenizer-928"><span class="linenos"> 928</span></a> <span class="n">size</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="Tokenizer-929"><a href="#Tokenizer-929"><span class="linenos"> 929</span></a> <span class="n">end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">+</span> <span class="n">size</span> +</span><span id="Tokenizer-930"><a href="#Tokenizer-930"><span class="linenos"> 930</span></a> +</span><span id="Tokenizer-931"><a href="#Tokenizer-931"><span class="linenos"> 931</span></a> <span class="k">if</span> <span class="n">end</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> +</span><span id="Tokenizer-932"><a href="#Tokenizer-932"><span class="linenos"> 932</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">end</span><span class="p">]</span> +</span><span id="Tokenizer-933"><a href="#Tokenizer-933"><span class="linenos"> 933</span></a> <span class="n">single_token</span> <span class="o">=</span> <span class="n">single_token</span> <span class="ow">or</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span> +</span><span id="Tokenizer-934"><a href="#Tokenizer-934"><span class="linenos"> 934</span></a> <span class="n">is_space</span> <span class="o">=</span> <span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span> +</span><span id="Tokenizer-935"><a href="#Tokenizer-935"><span class="linenos"> 935</span></a> +</span><span id="Tokenizer-936"><a href="#Tokenizer-936"><span class="linenos"> 936</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">is_space</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">prev_space</span><span class="p">:</span> +</span><span id="Tokenizer-937"><a href="#Tokenizer-937"><span class="linenos"> 937</span></a> <span class="k">if</span> <span class="n">is_space</span><span class="p">:</span> +</span><span id="Tokenizer-938"><a href="#Tokenizer-938"><span class="linenos"> 938</span></a> <span class="n">char</span> <span class="o">=</span> <span class="s2">" "</span> +</span><span id="Tokenizer-939"><a href="#Tokenizer-939"><span class="linenos"> 939</span></a> <span class="n">chars</span> <span class="o">+=</span> <span class="n">char</span> +</span><span id="Tokenizer-940"><a href="#Tokenizer-940"><span class="linenos"> 940</span></a> <span class="n">prev_space</span> <span class="o">=</span> <span class="n">is_space</span> +</span><span id="Tokenizer-941"><a href="#Tokenizer-941"><span class="linenos"> 941</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="Tokenizer-942"><a href="#Tokenizer-942"><span class="linenos"> 942</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-943"><a href="#Tokenizer-943"><span class="linenos"> 943</span></a> <span class="n">skip</span> <span class="o">=</span> <span class="kc">True</span> +</span><span id="Tokenizer-944"><a href="#Tokenizer-944"><span class="linenos"> 944</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-945"><a href="#Tokenizer-945"><span class="linenos"> 945</span></a> <span class="n">char</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="Tokenizer-946"><a href="#Tokenizer-946"><span class="linenos"> 946</span></a> <span class="n">chars</span> <span class="o">=</span> <span class="s2">" "</span> +</span><span id="Tokenizer-947"><a href="#Tokenizer-947"><span class="linenos"> 947</span></a> +</span><span id="Tokenizer-948"><a href="#Tokenizer-948"><span class="linenos"> 948</span></a> <span class="n">word</span> <span class="o">=</span> <span class="kc">None</span> <span class="k">if</span> <span class="ow">not</span> <span class="n">single_token</span> <span class="ow">and</span> <span class="n">chars</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span> <span class="k">else</span> <span class="n">word</span> +</span><span id="Tokenizer-949"><a href="#Tokenizer-949"><span class="linenos"> 949</span></a> +</span><span id="Tokenizer-950"><a href="#Tokenizer-950"><span class="linenos"> 950</span></a> <span class="k">if</span> <span class="ow">not</span> <span class="n">word</span><span class="p">:</span> +</span><span id="Tokenizer-951"><a href="#Tokenizer-951"><span class="linenos"> 951</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> +</span><span id="Tokenizer-952"><a href="#Tokenizer-952"><span class="linenos"> 952</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">],</span> <span class="n">text</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_char</span><span class="p">)</span> +</span><span id="Tokenizer-953"><a href="#Tokenizer-953"><span class="linenos"> 953</span></a> <span class="k">return</span> +</span><span id="Tokenizer-954"><a href="#Tokenizer-954"><span class="linenos"> 954</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_var</span><span class="p">()</span> +</span><span id="Tokenizer-955"><a href="#Tokenizer-955"><span class="linenos"> 955</span></a> <span class="k">return</span> +</span><span id="Tokenizer-956"><a href="#Tokenizer-956"><span class="linenos"> 956</span></a> +</span><span id="Tokenizer-957"><a href="#Tokenizer-957"><span class="linenos"> 957</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_string</span><span class="p">(</span><span class="n">word</span><span class="p">):</span> +</span><span id="Tokenizer-958"><a href="#Tokenizer-958"><span class="linenos"> 958</span></a> <span class="k">return</span> +</span><span id="Tokenizer-959"><a href="#Tokenizer-959"><span class="linenos"> 959</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_comment</span><span class="p">(</span><span class="n">word</span><span class="p">):</span> +</span><span id="Tokenizer-960"><a href="#Tokenizer-960"><span class="linenos"> 960</span></a> <span class="k">return</span> </span><span id="Tokenizer-961"><a href="#Tokenizer-961"><span class="linenos"> 961</span></a> -</span><span id="Tokenizer-962"><a href="#Tokenizer-962"><span class="linenos"> 962</span></a> <span class="k">def</span> <span class="nf">_scan_comment</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">comment_start</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> -</span><span id="Tokenizer-963"><a href="#Tokenizer-963"><span class="linenos"> 963</span></a> <span class="k">if</span> <span class="n">comment_start</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_COMMENTS</span><span class="p">:</span> -</span><span id="Tokenizer-964"><a href="#Tokenizer-964"><span class="linenos"> 964</span></a> <span class="k">return</span> <span class="kc">False</span> +</span><span id="Tokenizer-962"><a href="#Tokenizer-962"><span class="linenos"> 962</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="Tokenizer-963"><a href="#Tokenizer-963"><span class="linenos"> 963</span></a> <span class="n">word</span> <span class="o">=</span> <span class="n">word</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> +</span><span id="Tokenizer-964"><a href="#Tokenizer-964"><span class="linenos"> 964</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="p">[</span><span class="n">word</span><span class="p">],</span> <span class="n">text</span><span class="o">=</span><span class="n">word</span><span class="p">)</span> </span><span id="Tokenizer-965"><a href="#Tokenizer-965"><span class="linenos"> 965</span></a> -</span><span id="Tokenizer-966"><a href="#Tokenizer-966"><span class="linenos"> 966</span></a> <span class="n">comment_start_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> -</span><span id="Tokenizer-967"><a href="#Tokenizer-967"><span class="linenos"> 967</span></a> <span class="n">comment_start_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">comment_start</span><span class="p">)</span> -</span><span id="Tokenizer-968"><a href="#Tokenizer-968"><span class="linenos"> 968</span></a> <span class="n">comment_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_COMMENTS</span><span class="p">[</span><span class="n">comment_start</span><span class="p">]</span> +</span><span id="Tokenizer-966"><a href="#Tokenizer-966"><span class="linenos"> 966</span></a> <span class="k">def</span> <span class="nf">_scan_comment</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">comment_start</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> +</span><span id="Tokenizer-967"><a href="#Tokenizer-967"><span class="linenos"> 967</span></a> <span class="k">if</span> <span class="n">comment_start</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_COMMENTS</span><span class="p">:</span> +</span><span id="Tokenizer-968"><a href="#Tokenizer-968"><span class="linenos"> 968</span></a> <span class="k">return</span> <span class="kc">False</span> </span><span id="Tokenizer-969"><a href="#Tokenizer-969"><span class="linenos"> 969</span></a> -</span><span id="Tokenizer-970"><a href="#Tokenizer-970"><span class="linenos"> 970</span></a> <span class="k">if</span> <span class="n">comment_end</span><span class="p">:</span> -</span><span id="Tokenizer-971"><a href="#Tokenizer-971"><span class="linenos"> 971</span></a> <span class="c1"># Skip the comment's start delimiter</span> -</span><span id="Tokenizer-972"><a href="#Tokenizer-972"><span class="linenos"> 972</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">comment_start_size</span><span class="p">)</span> +</span><span id="Tokenizer-970"><a href="#Tokenizer-970"><span class="linenos"> 970</span></a> <span class="n">comment_start_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> +</span><span id="Tokenizer-971"><a href="#Tokenizer-971"><span class="linenos"> 971</span></a> <span class="n">comment_start_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">comment_start</span><span class="p">)</span> +</span><span id="Tokenizer-972"><a href="#Tokenizer-972"><span class="linenos"> 972</span></a> <span class="n">comment_end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_COMMENTS</span><span class="p">[</span><span class="n">comment_start</span><span class="p">]</span> </span><span id="Tokenizer-973"><a href="#Tokenizer-973"><span class="linenos"> 973</span></a> -</span><span id="Tokenizer-974"><a href="#Tokenizer-974"><span class="linenos"> 974</span></a> <span class="n">comment_end_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">comment_end</span><span class="p">)</span> -</span><span id="Tokenizer-975"><a href="#Tokenizer-975"><span class="linenos"> 975</span></a> <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_chars</span><span class="p">(</span><span class="n">comment_end_size</span><span class="p">)</span> <span class="o">!=</span> <span class="n">comment_end</span><span class="p">:</span> -</span><span id="Tokenizer-976"><a href="#Tokenizer-976"><span class="linenos"> 976</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Tokenizer-974"><a href="#Tokenizer-974"><span class="linenos"> 974</span></a> <span class="k">if</span> <span class="n">comment_end</span><span class="p">:</span> +</span><span id="Tokenizer-975"><a href="#Tokenizer-975"><span class="linenos"> 975</span></a> <span class="c1"># Skip the comment's start delimiter</span> +</span><span id="Tokenizer-976"><a href="#Tokenizer-976"><span class="linenos"> 976</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">comment_start_size</span><span class="p">)</span> </span><span id="Tokenizer-977"><a href="#Tokenizer-977"><span class="linenos"> 977</span></a> -</span><span id="Tokenizer-978"><a href="#Tokenizer-978"><span class="linenos"> 978</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="p">[</span><span class="n">comment_start_size</span> <span class="p">:</span> <span class="o">-</span><span class="n">comment_end_size</span> <span class="o">+</span> <span class="mi">1</span><span class="p">])</span> -</span><span id="Tokenizer-979"><a href="#Tokenizer-979"><span class="linenos"> 979</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">comment_end_size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="Tokenizer-980"><a href="#Tokenizer-980"><span class="linenos"> 980</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-981"><a href="#Tokenizer-981"><span class="linenos"> 981</span></a> <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="p">)</span> <span class="ow">is</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">:</span> -</span><span id="Tokenizer-982"><a href="#Tokenizer-982"><span class="linenos"> 982</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="Tokenizer-983"><a href="#Tokenizer-983"><span class="linenos"> 983</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="p">[</span><span class="n">comment_start_size</span><span class="p">:])</span> -</span><span id="Tokenizer-984"><a href="#Tokenizer-984"><span class="linenos"> 984</span></a> -</span><span id="Tokenizer-985"><a href="#Tokenizer-985"><span class="linenos"> 985</span></a> <span class="c1"># Leading comment is attached to the succeeding token, whilst trailing comment to the preceding.</span> -</span><span id="Tokenizer-986"><a href="#Tokenizer-986"><span class="linenos"> 986</span></a> <span class="c1"># Multiple consecutive comments are preserved by appending them to the current comments list.</span> -</span><span id="Tokenizer-987"><a href="#Tokenizer-987"><span class="linenos"> 987</span></a> <span class="k">if</span> <span class="n">comment_start_line</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span><span class="p">:</span> -</span><span id="Tokenizer-988"><a href="#Tokenizer-988"><span class="linenos"> 988</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">comments</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">)</span> -</span><span id="Tokenizer-989"><a href="#Tokenizer-989"><span class="linenos"> 989</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Tokenizer-990"><a href="#Tokenizer-990"><span class="linenos"> 990</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> -</span><span id="Tokenizer-991"><a href="#Tokenizer-991"><span class="linenos"> 991</span></a> -</span><span id="Tokenizer-992"><a href="#Tokenizer-992"><span class="linenos"> 992</span></a> <span class="k">return</span> <span class="kc">True</span> -</span><span id="Tokenizer-993"><a href="#Tokenizer-993"><span class="linenos"> 993</span></a> -</span><span id="Tokenizer-994"><a href="#Tokenizer-994"><span class="linenos"> 994</span></a> <span class="k">def</span> <span class="nf">_scan_number</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-995"><a href="#Tokenizer-995"><span class="linenos"> 995</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">==</span> <span class="s2">"0"</span><span class="p">:</span> -</span><span id="Tokenizer-996"><a href="#Tokenizer-996"><span class="linenos"> 996</span></a> <span class="n">peek</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> -</span><span id="Tokenizer-997"><a href="#Tokenizer-997"><span class="linenos"> 997</span></a> <span class="k">if</span> <span class="n">peek</span> <span class="o">==</span> <span class="s2">"B"</span><span class="p">:</span> -</span><span id="Tokenizer-998"><a href="#Tokenizer-998"><span class="linenos"> 998</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_bits</span><span class="p">()</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">BIT_STRINGS</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> -</span><span id="Tokenizer-999"><a href="#Tokenizer-999"><span class="linenos"> 999</span></a> <span class="k">elif</span> <span class="n">peek</span> <span class="o">==</span> <span class="s2">"X"</span><span class="p">:</span> -</span><span id="Tokenizer-1000"><a href="#Tokenizer-1000"><span class="linenos">1000</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_hex</span><span class="p">()</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">HEX_STRINGS</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> -</span><span id="Tokenizer-1001"><a href="#Tokenizer-1001"><span class="linenos">1001</span></a> -</span><span id="Tokenizer-1002"><a href="#Tokenizer-1002"><span class="linenos">1002</span></a> <span class="n">decimal</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="Tokenizer-1003"><a href="#Tokenizer-1003"><span class="linenos">1003</span></a> <span class="n">scientific</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="Tokenizer-1004"><a href="#Tokenizer-1004"><span class="linenos">1004</span></a> -</span><span id="Tokenizer-1005"><a href="#Tokenizer-1005"><span class="linenos">1005</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> -</span><span id="Tokenizer-1006"><a href="#Tokenizer-1006"><span class="linenos">1006</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">isdigit</span><span class="p">():</span> -</span><span id="Tokenizer-1007"><a href="#Tokenizer-1007"><span class="linenos">1007</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="Tokenizer-1008"><a href="#Tokenizer-1008"><span class="linenos">1008</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="s2">"."</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">decimal</span><span class="p">:</span> -</span><span id="Tokenizer-1009"><a href="#Tokenizer-1009"><span class="linenos">1009</span></a> <span class="n">after</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">peek</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> -</span><span id="Tokenizer-1010"><a href="#Tokenizer-1010"><span class="linenos">1010</span></a> <span class="k">if</span> <span class="n">after</span><span class="o">.</span><span class="n">isdigit</span><span class="p">()</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">after</span><span class="o">.</span><span class="n">isalpha</span><span class="p">():</span> -</span><span id="Tokenizer-1011"><a href="#Tokenizer-1011"><span class="linenos">1011</span></a> <span class="n">decimal</span> <span class="o">=</span> <span class="kc">True</span> -</span><span id="Tokenizer-1012"><a href="#Tokenizer-1012"><span class="linenos">1012</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="Tokenizer-1013"><a href="#Tokenizer-1013"><span class="linenos">1013</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-1014"><a href="#Tokenizer-1014"><span class="linenos">1014</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> -</span><span id="Tokenizer-1015"><a href="#Tokenizer-1015"><span class="linenos">1015</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"-"</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">)</span> <span class="ow">and</span> <span class="n">scientific</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> -</span><span id="Tokenizer-1016"><a href="#Tokenizer-1016"><span class="linenos">1016</span></a> <span class="n">scientific</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="Tokenizer-1017"><a href="#Tokenizer-1017"><span class="linenos">1017</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="Tokenizer-1018"><a href="#Tokenizer-1018"><span class="linenos">1018</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"E"</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">scientific</span><span class="p">:</span> -</span><span id="Tokenizer-1019"><a href="#Tokenizer-1019"><span class="linenos">1019</span></a> <span class="n">scientific</span> <span class="o">+=</span> <span class="mi">1</span> -</span><span id="Tokenizer-1020"><a href="#Tokenizer-1020"><span class="linenos">1020</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="Tokenizer-1021"><a href="#Tokenizer-1021"><span class="linenos">1021</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">isidentifier</span><span class="p">():</span> -</span><span id="Tokenizer-1022"><a href="#Tokenizer-1022"><span class="linenos">1022</span></a> <span class="n">number_text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> -</span><span id="Tokenizer-1023"><a href="#Tokenizer-1023"><span class="linenos">1023</span></a> <span class="n">literal</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="Tokenizer-1024"><a href="#Tokenizer-1024"><span class="linenos">1024</span></a> -</span><span id="Tokenizer-1025"><a href="#Tokenizer-1025"><span class="linenos">1025</span></a> <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> -</span><span id="Tokenizer-1026"><a href="#Tokenizer-1026"><span class="linenos">1026</span></a> <span class="n">literal</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> -</span><span id="Tokenizer-1027"><a href="#Tokenizer-1027"><span class="linenos">1027</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="Tokenizer-978"><a href="#Tokenizer-978"><span class="linenos"> 978</span></a> <span class="n">comment_end_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">comment_end</span><span class="p">)</span> +</span><span id="Tokenizer-979"><a href="#Tokenizer-979"><span class="linenos"> 979</span></a> <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_chars</span><span class="p">(</span><span class="n">comment_end_size</span><span class="p">)</span> <span class="o">!=</span> <span class="n">comment_end</span><span class="p">:</span> +</span><span id="Tokenizer-980"><a href="#Tokenizer-980"><span class="linenos"> 980</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Tokenizer-981"><a href="#Tokenizer-981"><span class="linenos"> 981</span></a> +</span><span id="Tokenizer-982"><a href="#Tokenizer-982"><span class="linenos"> 982</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="p">[</span><span class="n">comment_start_size</span> <span class="p">:</span> <span class="o">-</span><span class="n">comment_end_size</span> <span class="o">+</span> <span class="mi">1</span><span class="p">])</span> +</span><span id="Tokenizer-983"><a href="#Tokenizer-983"><span class="linenos"> 983</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">comment_end_size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="Tokenizer-984"><a href="#Tokenizer-984"><span class="linenos"> 984</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-985"><a href="#Tokenizer-985"><span class="linenos"> 985</span></a> <span class="k">while</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="ow">and</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">WHITE_SPACE</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="p">)</span> <span class="ow">is</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BREAK</span><span class="p">:</span> +</span><span id="Tokenizer-986"><a href="#Tokenizer-986"><span class="linenos"> 986</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Tokenizer-987"><a href="#Tokenizer-987"><span class="linenos"> 987</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="p">[</span><span class="n">comment_start_size</span><span class="p">:])</span> +</span><span id="Tokenizer-988"><a href="#Tokenizer-988"><span class="linenos"> 988</span></a> +</span><span id="Tokenizer-989"><a href="#Tokenizer-989"><span class="linenos"> 989</span></a> <span class="c1"># Leading comment is attached to the succeeding token, whilst trailing comment to the preceding.</span> +</span><span id="Tokenizer-990"><a href="#Tokenizer-990"><span class="linenos"> 990</span></a> <span class="c1"># Multiple consecutive comments are preserved by appending them to the current comments list.</span> +</span><span id="Tokenizer-991"><a href="#Tokenizer-991"><span class="linenos"> 991</span></a> <span class="k">if</span> <span class="n">comment_start_line</span> <span class="o">==</span> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span><span class="p">:</span> +</span><span id="Tokenizer-992"><a href="#Tokenizer-992"><span class="linenos"> 992</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">comments</span><span class="o">.</span><span class="n">extend</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">)</span> +</span><span id="Tokenizer-993"><a href="#Tokenizer-993"><span class="linenos"> 993</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Tokenizer-994"><a href="#Tokenizer-994"><span class="linenos"> 994</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> +</span><span id="Tokenizer-995"><a href="#Tokenizer-995"><span class="linenos"> 995</span></a> +</span><span id="Tokenizer-996"><a href="#Tokenizer-996"><span class="linenos"> 996</span></a> <span class="k">return</span> <span class="kc">True</span> +</span><span id="Tokenizer-997"><a href="#Tokenizer-997"><span class="linenos"> 997</span></a> +</span><span id="Tokenizer-998"><a href="#Tokenizer-998"><span class="linenos"> 998</span></a> <span class="k">def</span> <span class="nf">_scan_number</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-999"><a href="#Tokenizer-999"><span class="linenos"> 999</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">==</span> <span class="s2">"0"</span><span class="p">:</span> +</span><span id="Tokenizer-1000"><a href="#Tokenizer-1000"><span class="linenos">1000</span></a> <span class="n">peek</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> +</span><span id="Tokenizer-1001"><a href="#Tokenizer-1001"><span class="linenos">1001</span></a> <span class="k">if</span> <span class="n">peek</span> <span class="o">==</span> <span class="s2">"B"</span><span class="p">:</span> +</span><span id="Tokenizer-1002"><a href="#Tokenizer-1002"><span class="linenos">1002</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_bits</span><span class="p">()</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">BIT_STRINGS</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> +</span><span id="Tokenizer-1003"><a href="#Tokenizer-1003"><span class="linenos">1003</span></a> <span class="k">elif</span> <span class="n">peek</span> <span class="o">==</span> <span class="s2">"X"</span><span class="p">:</span> +</span><span id="Tokenizer-1004"><a href="#Tokenizer-1004"><span class="linenos">1004</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scan_hex</span><span class="p">()</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">HEX_STRINGS</span> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> +</span><span id="Tokenizer-1005"><a href="#Tokenizer-1005"><span class="linenos">1005</span></a> +</span><span id="Tokenizer-1006"><a href="#Tokenizer-1006"><span class="linenos">1006</span></a> <span class="n">decimal</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="Tokenizer-1007"><a href="#Tokenizer-1007"><span class="linenos">1007</span></a> <span class="n">scientific</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="Tokenizer-1008"><a href="#Tokenizer-1008"><span class="linenos">1008</span></a> +</span><span id="Tokenizer-1009"><a href="#Tokenizer-1009"><span class="linenos">1009</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> +</span><span id="Tokenizer-1010"><a href="#Tokenizer-1010"><span class="linenos">1010</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">isdigit</span><span class="p">():</span> +</span><span id="Tokenizer-1011"><a href="#Tokenizer-1011"><span class="linenos">1011</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="Tokenizer-1012"><a href="#Tokenizer-1012"><span class="linenos">1012</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="s2">"."</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">decimal</span><span class="p">:</span> +</span><span id="Tokenizer-1013"><a href="#Tokenizer-1013"><span class="linenos">1013</span></a> <span class="n">after</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">peek</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> +</span><span id="Tokenizer-1014"><a href="#Tokenizer-1014"><span class="linenos">1014</span></a> <span class="k">if</span> <span class="n">after</span><span class="o">.</span><span class="n">isdigit</span><span class="p">()</span> <span class="ow">or</span> <span class="ow">not</span> <span class="n">after</span><span class="o">.</span><span class="n">isalpha</span><span class="p">():</span> +</span><span id="Tokenizer-1015"><a href="#Tokenizer-1015"><span class="linenos">1015</span></a> <span class="n">decimal</span> <span class="o">=</span> <span class="kc">True</span> +</span><span id="Tokenizer-1016"><a href="#Tokenizer-1016"><span class="linenos">1016</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="Tokenizer-1017"><a href="#Tokenizer-1017"><span class="linenos">1017</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-1018"><a href="#Tokenizer-1018"><span class="linenos">1018</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> +</span><span id="Tokenizer-1019"><a href="#Tokenizer-1019"><span class="linenos">1019</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">"-"</span><span class="p">,</span> <span class="s2">"+"</span><span class="p">)</span> <span class="ow">and</span> <span class="n">scientific</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> +</span><span id="Tokenizer-1020"><a href="#Tokenizer-1020"><span class="linenos">1020</span></a> <span class="n">scientific</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="Tokenizer-1021"><a href="#Tokenizer-1021"><span class="linenos">1021</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="Tokenizer-1022"><a href="#Tokenizer-1022"><span class="linenos">1022</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"E"</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">scientific</span><span class="p">:</span> +</span><span id="Tokenizer-1023"><a href="#Tokenizer-1023"><span class="linenos">1023</span></a> <span class="n">scientific</span> <span class="o">+=</span> <span class="mi">1</span> +</span><span id="Tokenizer-1024"><a href="#Tokenizer-1024"><span class="linenos">1024</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="Tokenizer-1025"><a href="#Tokenizer-1025"><span class="linenos">1025</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">isidentifier</span><span class="p">():</span> +</span><span id="Tokenizer-1026"><a href="#Tokenizer-1026"><span class="linenos">1026</span></a> <span class="n">number_text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> +</span><span id="Tokenizer-1027"><a href="#Tokenizer-1027"><span class="linenos">1027</span></a> <span class="n">literal</span> <span class="o">=</span> <span class="s2">""</span> </span><span id="Tokenizer-1028"><a href="#Tokenizer-1028"><span class="linenos">1028</span></a> -</span><span id="Tokenizer-1029"><a href="#Tokenizer-1029"><span class="linenos">1029</span></a> <span class="n">token_type</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">NUMERIC_LITERALS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">literal</span><span class="p">,</span> <span class="s2">""</span><span class="p">))</span> -</span><span id="Tokenizer-1030"><a href="#Tokenizer-1030"><span class="linenos">1030</span></a> -</span><span id="Tokenizer-1031"><a href="#Tokenizer-1031"><span class="linenos">1031</span></a> <span class="k">if</span> <span class="n">token_type</span><span class="p">:</span> -</span><span id="Tokenizer-1032"><a href="#Tokenizer-1032"><span class="linenos">1032</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="n">number_text</span><span class="p">)</span> -</span><span id="Tokenizer-1033"><a href="#Tokenizer-1033"><span class="linenos">1033</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">DCOLON</span><span class="p">,</span> <span class="s2">"::"</span><span class="p">)</span> -</span><span id="Tokenizer-1034"><a href="#Tokenizer-1034"><span class="linenos">1034</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">token_type</span><span class="p">,</span> <span class="n">literal</span><span class="p">)</span> -</span><span id="Tokenizer-1035"><a href="#Tokenizer-1035"><span class="linenos">1035</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">IDENTIFIERS_CAN_START_WITH_DIGIT</span><span class="p">:</span> -</span><span id="Tokenizer-1036"><a href="#Tokenizer-1036"><span class="linenos">1036</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> -</span><span id="Tokenizer-1037"><a href="#Tokenizer-1037"><span class="linenos">1037</span></a> -</span><span id="Tokenizer-1038"><a href="#Tokenizer-1038"><span class="linenos">1038</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="n">number_text</span><span class="p">)</span> -</span><span id="Tokenizer-1039"><a href="#Tokenizer-1039"><span class="linenos">1039</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="o">-</span><span class="nb">len</span><span class="p">(</span><span class="n">literal</span><span class="p">))</span> -</span><span id="Tokenizer-1040"><a href="#Tokenizer-1040"><span class="linenos">1040</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-1041"><a href="#Tokenizer-1041"><span class="linenos">1041</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> -</span><span id="Tokenizer-1042"><a href="#Tokenizer-1042"><span class="linenos">1042</span></a> -</span><span id="Tokenizer-1043"><a href="#Tokenizer-1043"><span class="linenos">1043</span></a> <span class="k">def</span> <span class="nf">_scan_bits</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-1044"><a href="#Tokenizer-1044"><span class="linenos">1044</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="Tokenizer-1045"><a href="#Tokenizer-1045"><span class="linenos">1045</span></a> <span class="n">value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_value</span><span class="p">()</span> -</span><span id="Tokenizer-1046"><a href="#Tokenizer-1046"><span class="linenos">1046</span></a> <span class="k">try</span><span class="p">:</span> -</span><span id="Tokenizer-1047"><a href="#Tokenizer-1047"><span class="linenos">1047</span></a> <span class="c1"># If `value` can't be converted to a binary, fallback to tokenizing it as an identifier</span> -</span><span id="Tokenizer-1048"><a href="#Tokenizer-1048"><span class="linenos">1048</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> -</span><span id="Tokenizer-1049"><a href="#Tokenizer-1049"><span class="linenos">1049</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BIT_STRING</span><span class="p">,</span> <span class="n">value</span><span class="p">[</span><span class="mi">2</span><span class="p">:])</span> <span class="c1"># Drop the 0b</span> -</span><span id="Tokenizer-1050"><a href="#Tokenizer-1050"><span class="linenos">1050</span></a> <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span> -</span><span id="Tokenizer-1051"><a href="#Tokenizer-1051"><span class="linenos">1051</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">)</span> -</span><span id="Tokenizer-1052"><a href="#Tokenizer-1052"><span class="linenos">1052</span></a> -</span><span id="Tokenizer-1053"><a href="#Tokenizer-1053"><span class="linenos">1053</span></a> <span class="k">def</span> <span class="nf">_scan_hex</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-1054"><a href="#Tokenizer-1054"><span class="linenos">1054</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="Tokenizer-1055"><a href="#Tokenizer-1055"><span class="linenos">1055</span></a> <span class="n">value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_value</span><span class="p">()</span> -</span><span id="Tokenizer-1056"><a href="#Tokenizer-1056"><span class="linenos">1056</span></a> <span class="k">try</span><span class="p">:</span> -</span><span id="Tokenizer-1057"><a href="#Tokenizer-1057"><span class="linenos">1057</span></a> <span class="c1"># If `value` can't be converted to a hex, fallback to tokenizing it as an identifier</span> -</span><span id="Tokenizer-1058"><a href="#Tokenizer-1058"><span class="linenos">1058</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="mi">16</span><span class="p">)</span> -</span><span id="Tokenizer-1059"><a href="#Tokenizer-1059"><span class="linenos">1059</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">HEX_STRING</span><span class="p">,</span> <span class="n">value</span><span class="p">[</span><span class="mi">2</span><span class="p">:])</span> <span class="c1"># Drop the 0x</span> -</span><span id="Tokenizer-1060"><a href="#Tokenizer-1060"><span class="linenos">1060</span></a> <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span> -</span><span id="Tokenizer-1061"><a href="#Tokenizer-1061"><span class="linenos">1061</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">)</span> -</span><span id="Tokenizer-1062"><a href="#Tokenizer-1062"><span class="linenos">1062</span></a> -</span><span id="Tokenizer-1063"><a href="#Tokenizer-1063"><span class="linenos">1063</span></a> <span class="k">def</span> <span class="nf">_extract_value</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Tokenizer-1064"><a href="#Tokenizer-1064"><span class="linenos">1064</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> -</span><span id="Tokenizer-1065"><a href="#Tokenizer-1065"><span class="linenos">1065</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> -</span><span id="Tokenizer-1066"><a href="#Tokenizer-1066"><span class="linenos">1066</span></a> <span class="k">if</span> <span class="n">char</span> <span class="ow">and</span> <span class="n">char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> -</span><span id="Tokenizer-1067"><a href="#Tokenizer-1067"><span class="linenos">1067</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="Tokenizer-1068"><a href="#Tokenizer-1068"><span class="linenos">1068</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-1069"><a href="#Tokenizer-1069"><span class="linenos">1069</span></a> <span class="k">break</span> -</span><span id="Tokenizer-1070"><a href="#Tokenizer-1070"><span class="linenos">1070</span></a> -</span><span id="Tokenizer-1071"><a href="#Tokenizer-1071"><span class="linenos">1071</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> -</span><span id="Tokenizer-1072"><a href="#Tokenizer-1072"><span class="linenos">1072</span></a> -</span><span id="Tokenizer-1073"><a href="#Tokenizer-1073"><span class="linenos">1073</span></a> <span class="k">def</span> <span class="nf">_scan_string</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">start</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> -</span><span id="Tokenizer-1074"><a href="#Tokenizer-1074"><span class="linenos">1074</span></a> <span class="n">base</span> <span class="o">=</span> <span class="kc">None</span> -</span><span id="Tokenizer-1075"><a href="#Tokenizer-1075"><span class="linenos">1075</span></a> <span class="n">token_type</span> <span class="o">=</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span> +</span><span id="Tokenizer-1029"><a href="#Tokenizer-1029"><span class="linenos">1029</span></a> <span class="k">while</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> +</span><span id="Tokenizer-1030"><a href="#Tokenizer-1030"><span class="linenos">1030</span></a> <span class="n">literal</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span> +</span><span id="Tokenizer-1031"><a href="#Tokenizer-1031"><span class="linenos">1031</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="Tokenizer-1032"><a href="#Tokenizer-1032"><span class="linenos">1032</span></a> +</span><span id="Tokenizer-1033"><a href="#Tokenizer-1033"><span class="linenos">1033</span></a> <span class="n">token_type</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">NUMERIC_LITERALS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">literal</span><span class="p">,</span> <span class="s2">""</span><span class="p">))</span> +</span><span id="Tokenizer-1034"><a href="#Tokenizer-1034"><span class="linenos">1034</span></a> +</span><span id="Tokenizer-1035"><a href="#Tokenizer-1035"><span class="linenos">1035</span></a> <span class="k">if</span> <span class="n">token_type</span><span class="p">:</span> +</span><span id="Tokenizer-1036"><a href="#Tokenizer-1036"><span class="linenos">1036</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="n">number_text</span><span class="p">)</span> +</span><span id="Tokenizer-1037"><a href="#Tokenizer-1037"><span class="linenos">1037</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">DCOLON</span><span class="p">,</span> <span class="s2">"::"</span><span class="p">)</span> +</span><span id="Tokenizer-1038"><a href="#Tokenizer-1038"><span class="linenos">1038</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">token_type</span><span class="p">,</span> <span class="n">literal</span><span class="p">)</span> +</span><span id="Tokenizer-1039"><a href="#Tokenizer-1039"><span class="linenos">1039</span></a> <span class="k">elif</span> <span class="bp">self</span><span class="o">.</span><span class="n">IDENTIFIERS_CAN_START_WITH_DIGIT</span><span class="p">:</span> +</span><span id="Tokenizer-1040"><a href="#Tokenizer-1040"><span class="linenos">1040</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> +</span><span id="Tokenizer-1041"><a href="#Tokenizer-1041"><span class="linenos">1041</span></a> +</span><span id="Tokenizer-1042"><a href="#Tokenizer-1042"><span class="linenos">1042</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">,</span> <span class="n">number_text</span><span class="p">)</span> +</span><span id="Tokenizer-1043"><a href="#Tokenizer-1043"><span class="linenos">1043</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="o">-</span><span class="nb">len</span><span class="p">(</span><span class="n">literal</span><span class="p">))</span> +</span><span id="Tokenizer-1044"><a href="#Tokenizer-1044"><span class="linenos">1044</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-1045"><a href="#Tokenizer-1045"><span class="linenos">1045</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">NUMBER</span><span class="p">)</span> +</span><span id="Tokenizer-1046"><a href="#Tokenizer-1046"><span class="linenos">1046</span></a> +</span><span id="Tokenizer-1047"><a href="#Tokenizer-1047"><span class="linenos">1047</span></a> <span class="k">def</span> <span class="nf">_scan_bits</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-1048"><a href="#Tokenizer-1048"><span class="linenos">1048</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="Tokenizer-1049"><a href="#Tokenizer-1049"><span class="linenos">1049</span></a> <span class="n">value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_value</span><span class="p">()</span> +</span><span id="Tokenizer-1050"><a href="#Tokenizer-1050"><span class="linenos">1050</span></a> <span class="k">try</span><span class="p">:</span> +</span><span id="Tokenizer-1051"><a href="#Tokenizer-1051"><span class="linenos">1051</span></a> <span class="c1"># If `value` can't be converted to a binary, fallback to tokenizing it as an identifier</span> +</span><span id="Tokenizer-1052"><a href="#Tokenizer-1052"><span class="linenos">1052</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> +</span><span id="Tokenizer-1053"><a href="#Tokenizer-1053"><span class="linenos">1053</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">BIT_STRING</span><span class="p">,</span> <span class="n">value</span><span class="p">[</span><span class="mi">2</span><span class="p">:])</span> <span class="c1"># Drop the 0b</span> +</span><span id="Tokenizer-1054"><a href="#Tokenizer-1054"><span class="linenos">1054</span></a> <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span> +</span><span id="Tokenizer-1055"><a href="#Tokenizer-1055"><span class="linenos">1055</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">)</span> +</span><span id="Tokenizer-1056"><a href="#Tokenizer-1056"><span class="linenos">1056</span></a> +</span><span id="Tokenizer-1057"><a href="#Tokenizer-1057"><span class="linenos">1057</span></a> <span class="k">def</span> <span class="nf">_scan_hex</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-1058"><a href="#Tokenizer-1058"><span class="linenos">1058</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="Tokenizer-1059"><a href="#Tokenizer-1059"><span class="linenos">1059</span></a> <span class="n">value</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_value</span><span class="p">()</span> +</span><span id="Tokenizer-1060"><a href="#Tokenizer-1060"><span class="linenos">1060</span></a> <span class="k">try</span><span class="p">:</span> +</span><span id="Tokenizer-1061"><a href="#Tokenizer-1061"><span class="linenos">1061</span></a> <span class="c1"># If `value` can't be converted to a hex, fallback to tokenizing it as an identifier</span> +</span><span id="Tokenizer-1062"><a href="#Tokenizer-1062"><span class="linenos">1062</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="mi">16</span><span class="p">)</span> +</span><span id="Tokenizer-1063"><a href="#Tokenizer-1063"><span class="linenos">1063</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">HEX_STRING</span><span class="p">,</span> <span class="n">value</span><span class="p">[</span><span class="mi">2</span><span class="p">:])</span> <span class="c1"># Drop the 0x</span> +</span><span id="Tokenizer-1064"><a href="#Tokenizer-1064"><span class="linenos">1064</span></a> <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span> +</span><span id="Tokenizer-1065"><a href="#Tokenizer-1065"><span class="linenos">1065</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">)</span> +</span><span id="Tokenizer-1066"><a href="#Tokenizer-1066"><span class="linenos">1066</span></a> +</span><span id="Tokenizer-1067"><a href="#Tokenizer-1067"><span class="linenos">1067</span></a> <span class="k">def</span> <span class="nf">_extract_value</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Tokenizer-1068"><a href="#Tokenizer-1068"><span class="linenos">1068</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> +</span><span id="Tokenizer-1069"><a href="#Tokenizer-1069"><span class="linenos">1069</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> +</span><span id="Tokenizer-1070"><a href="#Tokenizer-1070"><span class="linenos">1070</span></a> <span class="k">if</span> <span class="n">char</span> <span class="ow">and</span> <span class="n">char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">:</span> +</span><span id="Tokenizer-1071"><a href="#Tokenizer-1071"><span class="linenos">1071</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Tokenizer-1072"><a href="#Tokenizer-1072"><span class="linenos">1072</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-1073"><a href="#Tokenizer-1073"><span class="linenos">1073</span></a> <span class="k">break</span> +</span><span id="Tokenizer-1074"><a href="#Tokenizer-1074"><span class="linenos">1074</span></a> +</span><span id="Tokenizer-1075"><a href="#Tokenizer-1075"><span class="linenos">1075</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_text</span> </span><span id="Tokenizer-1076"><a href="#Tokenizer-1076"><span class="linenos">1076</span></a> -</span><span id="Tokenizer-1077"><a href="#Tokenizer-1077"><span class="linenos">1077</span></a> <span class="k">if</span> <span class="n">start</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_QUOTES</span><span class="p">:</span> -</span><span id="Tokenizer-1078"><a href="#Tokenizer-1078"><span class="linenos">1078</span></a> <span class="n">end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_QUOTES</span><span class="p">[</span><span class="n">start</span><span class="p">]</span> -</span><span id="Tokenizer-1079"><a href="#Tokenizer-1079"><span class="linenos">1079</span></a> <span class="k">elif</span> <span class="n">start</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span><span class="p">:</span> -</span><span id="Tokenizer-1080"><a href="#Tokenizer-1080"><span class="linenos">1080</span></a> <span class="n">end</span><span class="p">,</span> <span class="n">token_type</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span><span class="p">[</span><span class="n">start</span><span class="p">]</span> -</span><span id="Tokenizer-1081"><a href="#Tokenizer-1081"><span class="linenos">1081</span></a> -</span><span id="Tokenizer-1082"><a href="#Tokenizer-1082"><span class="linenos">1082</span></a> <span class="k">if</span> <span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HEX_STRING</span><span class="p">:</span> -</span><span id="Tokenizer-1083"><a href="#Tokenizer-1083"><span class="linenos">1083</span></a> <span class="n">base</span> <span class="o">=</span> <span class="mi">16</span> -</span><span id="Tokenizer-1084"><a href="#Tokenizer-1084"><span class="linenos">1084</span></a> <span class="k">elif</span> <span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT_STRING</span><span class="p">:</span> -</span><span id="Tokenizer-1085"><a href="#Tokenizer-1085"><span class="linenos">1085</span></a> <span class="n">base</span> <span class="o">=</span> <span class="mi">2</span> -</span><span id="Tokenizer-1086"><a href="#Tokenizer-1086"><span class="linenos">1086</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-1087"><a href="#Tokenizer-1087"><span class="linenos">1087</span></a> <span class="k">return</span> <span class="kc">False</span> -</span><span id="Tokenizer-1088"><a href="#Tokenizer-1088"><span class="linenos">1088</span></a> -</span><span id="Tokenizer-1089"><a href="#Tokenizer-1089"><span class="linenos">1089</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">start</span><span class="p">))</span> -</span><span id="Tokenizer-1090"><a href="#Tokenizer-1090"><span class="linenos">1090</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_string</span><span class="p">(</span><span class="n">end</span><span class="p">)</span> -</span><span id="Tokenizer-1091"><a href="#Tokenizer-1091"><span class="linenos">1091</span></a> -</span><span id="Tokenizer-1092"><a href="#Tokenizer-1092"><span class="linenos">1092</span></a> <span class="k">if</span> <span class="n">base</span><span class="p">:</span> -</span><span id="Tokenizer-1093"><a href="#Tokenizer-1093"><span class="linenos">1093</span></a> <span class="k">try</span><span class="p">:</span> -</span><span id="Tokenizer-1094"><a href="#Tokenizer-1094"><span class="linenos">1094</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">base</span><span class="p">)</span> -</span><span id="Tokenizer-1095"><a href="#Tokenizer-1095"><span class="linenos">1095</span></a> <span class="k">except</span><span class="p">:</span> -</span><span id="Tokenizer-1096"><a href="#Tokenizer-1096"><span class="linenos">1096</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span> -</span><span id="Tokenizer-1097"><a href="#Tokenizer-1097"><span class="linenos">1097</span></a> <span class="sa">f</span><span class="s2">"Numeric string contains invalid characters from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="si">}</span><span class="s2">"</span> -</span><span id="Tokenizer-1098"><a href="#Tokenizer-1098"><span class="linenos">1098</span></a> <span class="p">)</span> -</span><span id="Tokenizer-1099"><a href="#Tokenizer-1099"><span class="linenos">1099</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-1100"><a href="#Tokenizer-1100"><span class="linenos">1100</span></a> <span class="n">text</span> <span class="o">=</span> <span class="n">text</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span> <span class="k">else</span> <span class="n">text</span> -</span><span id="Tokenizer-1101"><a href="#Tokenizer-1101"><span class="linenos">1101</span></a> -</span><span id="Tokenizer-1102"><a href="#Tokenizer-1102"><span class="linenos">1102</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">token_type</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> -</span><span id="Tokenizer-1103"><a href="#Tokenizer-1103"><span class="linenos">1103</span></a> <span class="k">return</span> <span class="kc">True</span> -</span><span id="Tokenizer-1104"><a href="#Tokenizer-1104"><span class="linenos">1104</span></a> -</span><span id="Tokenizer-1105"><a href="#Tokenizer-1105"><span class="linenos">1105</span></a> <span class="k">def</span> <span class="nf">_scan_identifier</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">identifier_end</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-1106"><a href="#Tokenizer-1106"><span class="linenos">1106</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> -</span><span id="Tokenizer-1107"><a href="#Tokenizer-1107"><span class="linenos">1107</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_string</span><span class="p">(</span><span class="n">identifier_end</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIER_ESCAPES</span><span class="p">)</span> -</span><span id="Tokenizer-1108"><a href="#Tokenizer-1108"><span class="linenos">1108</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> -</span><span id="Tokenizer-1109"><a href="#Tokenizer-1109"><span class="linenos">1109</span></a> -</span><span id="Tokenizer-1110"><a href="#Tokenizer-1110"><span class="linenos">1110</span></a> <span class="k">def</span> <span class="nf">_scan_var</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer-1111"><a href="#Tokenizer-1111"><span class="linenos">1111</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> -</span><span id="Tokenizer-1112"><a href="#Tokenizer-1112"><span class="linenos">1112</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> -</span><span id="Tokenizer-1113"><a href="#Tokenizer-1113"><span class="linenos">1113</span></a> <span class="k">if</span> <span class="n">char</span> <span class="ow">and</span> <span class="p">(</span><span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">VAR_SINGLE_TOKENS</span> <span class="ow">or</span> <span class="n">char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">):</span> -</span><span id="Tokenizer-1114"><a href="#Tokenizer-1114"><span class="linenos">1114</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="Tokenizer-1115"><a href="#Tokenizer-1115"><span class="linenos">1115</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-1116"><a href="#Tokenizer-1116"><span class="linenos">1116</span></a> <span class="k">break</span> -</span><span id="Tokenizer-1117"><a href="#Tokenizer-1117"><span class="linenos">1117</span></a> -</span><span id="Tokenizer-1118"><a href="#Tokenizer-1118"><span class="linenos">1118</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span> -</span><span id="Tokenizer-1119"><a href="#Tokenizer-1119"><span class="linenos">1119</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span> -</span><span id="Tokenizer-1120"><a href="#Tokenizer-1120"><span class="linenos">1120</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span> -</span><span id="Tokenizer-1121"><a href="#Tokenizer-1121"><span class="linenos">1121</span></a> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> -</span><span id="Tokenizer-1122"><a href="#Tokenizer-1122"><span class="linenos">1122</span></a> <span class="p">)</span> -</span><span id="Tokenizer-1123"><a href="#Tokenizer-1123"><span class="linenos">1123</span></a> -</span><span id="Tokenizer-1124"><a href="#Tokenizer-1124"><span class="linenos">1124</span></a> <span class="k">def</span> <span class="nf">_extract_string</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">delimiter</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">escapes</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Tokenizer-1125"><a href="#Tokenizer-1125"><span class="linenos">1125</span></a> <span class="n">text</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="Tokenizer-1126"><a href="#Tokenizer-1126"><span class="linenos">1126</span></a> <span class="n">delim_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">delimiter</span><span class="p">)</span> -</span><span id="Tokenizer-1127"><a href="#Tokenizer-1127"><span class="linenos">1127</span></a> <span class="n">escapes</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_STRING_ESCAPES</span> <span class="k">if</span> <span class="n">escapes</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">escapes</span> -</span><span id="Tokenizer-1128"><a href="#Tokenizer-1128"><span class="linenos">1128</span></a> -</span><span id="Tokenizer-1129"><a href="#Tokenizer-1129"><span class="linenos">1129</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> -</span><span id="Tokenizer-1130"><a href="#Tokenizer-1130"><span class="linenos">1130</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="n">escapes</span> <span class="ow">and</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="n">delimiter</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">in</span> <span class="n">escapes</span><span class="p">):</span> -</span><span id="Tokenizer-1131"><a href="#Tokenizer-1131"><span class="linenos">1131</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="n">delimiter</span><span class="p">:</span> -</span><span id="Tokenizer-1132"><a href="#Tokenizer-1132"><span class="linenos">1132</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> -</span><span id="Tokenizer-1133"><a href="#Tokenizer-1133"><span class="linenos">1133</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-1134"><a href="#Tokenizer-1134"><span class="linenos">1134</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> -</span><span id="Tokenizer-1135"><a href="#Tokenizer-1135"><span class="linenos">1135</span></a> -</span><span id="Tokenizer-1136"><a href="#Tokenizer-1136"><span class="linenos">1136</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="mi">1</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> -</span><span id="Tokenizer-1137"><a href="#Tokenizer-1137"><span class="linenos">1137</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> -</span><span id="Tokenizer-1138"><a href="#Tokenizer-1138"><span class="linenos">1138</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-1139"><a href="#Tokenizer-1139"><span class="linenos">1139</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Missing </span><span class="si">{</span><span class="n">delimiter</span><span class="si">}</span><span class="s2"> from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> -</span><span id="Tokenizer-1140"><a href="#Tokenizer-1140"><span class="linenos">1140</span></a> <span class="k">else</span><span class="p">:</span> -</span><span id="Tokenizer-1141"><a href="#Tokenizer-1141"><span class="linenos">1141</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_chars</span><span class="p">(</span><span class="n">delim_size</span><span class="p">)</span> <span class="o">==</span> <span class="n">delimiter</span><span class="p">:</span> -</span><span id="Tokenizer-1142"><a href="#Tokenizer-1142"><span class="linenos">1142</span></a> <span class="k">if</span> <span class="n">delim_size</span> <span class="o">></span> <span class="mi">1</span><span class="p">:</span> -</span><span id="Tokenizer-1143"><a href="#Tokenizer-1143"><span class="linenos">1143</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">delim_size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="Tokenizer-1144"><a href="#Tokenizer-1144"><span class="linenos">1144</span></a> <span class="k">break</span> -</span><span id="Tokenizer-1145"><a href="#Tokenizer-1145"><span class="linenos">1145</span></a> -</span><span id="Tokenizer-1146"><a href="#Tokenizer-1146"><span class="linenos">1146</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span><span class="p">:</span> -</span><span id="Tokenizer-1147"><a href="#Tokenizer-1147"><span class="linenos">1147</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Missing </span><span class="si">{</span><span class="n">delimiter</span><span class="si">}</span><span class="s2"> from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> -</span><span id="Tokenizer-1148"><a href="#Tokenizer-1148"><span class="linenos">1148</span></a> -</span><span id="Tokenizer-1149"><a href="#Tokenizer-1149"><span class="linenos">1149</span></a> <span class="n">current</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> -</span><span id="Tokenizer-1150"><a href="#Tokenizer-1150"><span class="linenos">1150</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> -</span><span id="Tokenizer-1151"><a href="#Tokenizer-1151"><span class="linenos">1151</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">current</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> +</span><span id="Tokenizer-1077"><a href="#Tokenizer-1077"><span class="linenos">1077</span></a> <span class="k">def</span> <span class="nf">_scan_string</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">start</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="nb">bool</span><span class="p">:</span> +</span><span id="Tokenizer-1078"><a href="#Tokenizer-1078"><span class="linenos">1078</span></a> <span class="n">base</span> <span class="o">=</span> <span class="kc">None</span> +</span><span id="Tokenizer-1079"><a href="#Tokenizer-1079"><span class="linenos">1079</span></a> <span class="n">token_type</span> <span class="o">=</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">STRING</span> +</span><span id="Tokenizer-1080"><a href="#Tokenizer-1080"><span class="linenos">1080</span></a> +</span><span id="Tokenizer-1081"><a href="#Tokenizer-1081"><span class="linenos">1081</span></a> <span class="k">if</span> <span class="n">start</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_QUOTES</span><span class="p">:</span> +</span><span id="Tokenizer-1082"><a href="#Tokenizer-1082"><span class="linenos">1082</span></a> <span class="n">end</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_QUOTES</span><span class="p">[</span><span class="n">start</span><span class="p">]</span> +</span><span id="Tokenizer-1083"><a href="#Tokenizer-1083"><span class="linenos">1083</span></a> <span class="k">elif</span> <span class="n">start</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span><span class="p">:</span> +</span><span id="Tokenizer-1084"><a href="#Tokenizer-1084"><span class="linenos">1084</span></a> <span class="n">end</span><span class="p">,</span> <span class="n">token_type</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_FORMAT_STRINGS</span><span class="p">[</span><span class="n">start</span><span class="p">]</span> +</span><span id="Tokenizer-1085"><a href="#Tokenizer-1085"><span class="linenos">1085</span></a> +</span><span id="Tokenizer-1086"><a href="#Tokenizer-1086"><span class="linenos">1086</span></a> <span class="k">if</span> <span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">HEX_STRING</span><span class="p">:</span> +</span><span id="Tokenizer-1087"><a href="#Tokenizer-1087"><span class="linenos">1087</span></a> <span class="n">base</span> <span class="o">=</span> <span class="mi">16</span> +</span><span id="Tokenizer-1088"><a href="#Tokenizer-1088"><span class="linenos">1088</span></a> <span class="k">elif</span> <span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">BIT_STRING</span><span class="p">:</span> +</span><span id="Tokenizer-1089"><a href="#Tokenizer-1089"><span class="linenos">1089</span></a> <span class="n">base</span> <span class="o">=</span> <span class="mi">2</span> +</span><span id="Tokenizer-1090"><a href="#Tokenizer-1090"><span class="linenos">1090</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-1091"><a href="#Tokenizer-1091"><span class="linenos">1091</span></a> <span class="k">return</span> <span class="kc">False</span> +</span><span id="Tokenizer-1092"><a href="#Tokenizer-1092"><span class="linenos">1092</span></a> +</span><span id="Tokenizer-1093"><a href="#Tokenizer-1093"><span class="linenos">1093</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">start</span><span class="p">))</span> +</span><span id="Tokenizer-1094"><a href="#Tokenizer-1094"><span class="linenos">1094</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_string</span><span class="p">(</span><span class="n">end</span><span class="p">)</span> +</span><span id="Tokenizer-1095"><a href="#Tokenizer-1095"><span class="linenos">1095</span></a> +</span><span id="Tokenizer-1096"><a href="#Tokenizer-1096"><span class="linenos">1096</span></a> <span class="k">if</span> <span class="n">base</span><span class="p">:</span> +</span><span id="Tokenizer-1097"><a href="#Tokenizer-1097"><span class="linenos">1097</span></a> <span class="k">try</span><span class="p">:</span> +</span><span id="Tokenizer-1098"><a href="#Tokenizer-1098"><span class="linenos">1098</span></a> <span class="nb">int</span><span class="p">(</span><span class="n">text</span><span class="p">,</span> <span class="n">base</span><span class="p">)</span> +</span><span id="Tokenizer-1099"><a href="#Tokenizer-1099"><span class="linenos">1099</span></a> <span class="k">except</span><span class="p">:</span> +</span><span id="Tokenizer-1100"><a href="#Tokenizer-1100"><span class="linenos">1100</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span> +</span><span id="Tokenizer-1101"><a href="#Tokenizer-1101"><span class="linenos">1101</span></a> <span class="sa">f</span><span class="s2">"Numeric string contains invalid characters from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="si">}</span><span class="s2">"</span> +</span><span id="Tokenizer-1102"><a href="#Tokenizer-1102"><span class="linenos">1102</span></a> <span class="p">)</span> +</span><span id="Tokenizer-1103"><a href="#Tokenizer-1103"><span class="linenos">1103</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-1104"><a href="#Tokenizer-1104"><span class="linenos">1104</span></a> <span class="n">text</span> <span class="o">=</span> <span class="n">text</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span><span class="p">)</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span><span class="p">)</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">ENCODE</span> <span class="k">else</span> <span class="n">text</span> +</span><span id="Tokenizer-1105"><a href="#Tokenizer-1105"><span class="linenos">1105</span></a> +</span><span id="Tokenizer-1106"><a href="#Tokenizer-1106"><span class="linenos">1106</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">token_type</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> +</span><span id="Tokenizer-1107"><a href="#Tokenizer-1107"><span class="linenos">1107</span></a> <span class="k">return</span> <span class="kc">True</span> +</span><span id="Tokenizer-1108"><a href="#Tokenizer-1108"><span class="linenos">1108</span></a> +</span><span id="Tokenizer-1109"><a href="#Tokenizer-1109"><span class="linenos">1109</span></a> <span class="k">def</span> <span class="nf">_scan_identifier</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">identifier_end</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-1110"><a href="#Tokenizer-1110"><span class="linenos">1110</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">()</span> +</span><span id="Tokenizer-1111"><a href="#Tokenizer-1111"><span class="linenos">1111</span></a> <span class="n">text</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_extract_string</span><span class="p">(</span><span class="n">identifier_end</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">_IDENTIFIER_ESCAPES</span><span class="p">)</span> +</span><span id="Tokenizer-1112"><a href="#Tokenizer-1112"><span class="linenos">1112</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span><span class="n">TokenType</span><span class="o">.</span><span class="n">IDENTIFIER</span><span class="p">,</span> <span class="n">text</span><span class="p">)</span> +</span><span id="Tokenizer-1113"><a href="#Tokenizer-1113"><span class="linenos">1113</span></a> +</span><span id="Tokenizer-1114"><a href="#Tokenizer-1114"><span class="linenos">1114</span></a> <span class="k">def</span> <span class="nf">_scan_var</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer-1115"><a href="#Tokenizer-1115"><span class="linenos">1115</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> +</span><span id="Tokenizer-1116"><a href="#Tokenizer-1116"><span class="linenos">1116</span></a> <span class="n">char</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span> +</span><span id="Tokenizer-1117"><a href="#Tokenizer-1117"><span class="linenos">1117</span></a> <span class="k">if</span> <span class="n">char</span> <span class="ow">and</span> <span class="p">(</span><span class="n">char</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">VAR_SINGLE_TOKENS</span> <span class="ow">or</span> <span class="n">char</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">SINGLE_TOKENS</span><span class="p">):</span> +</span><span id="Tokenizer-1118"><a href="#Tokenizer-1118"><span class="linenos">1118</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Tokenizer-1119"><a href="#Tokenizer-1119"><span class="linenos">1119</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-1120"><a href="#Tokenizer-1120"><span class="linenos">1120</span></a> <span class="k">break</span> +</span><span id="Tokenizer-1121"><a href="#Tokenizer-1121"><span class="linenos">1121</span></a> +</span><span id="Tokenizer-1122"><a href="#Tokenizer-1122"><span class="linenos">1122</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_add</span><span class="p">(</span> +</span><span id="Tokenizer-1123"><a href="#Tokenizer-1123"><span class="linenos">1123</span></a> <span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span> +</span><span id="Tokenizer-1124"><a href="#Tokenizer-1124"><span class="linenos">1124</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> <span class="ow">and</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">token_type</span> <span class="o">==</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">PARAMETER</span> +</span><span id="Tokenizer-1125"><a href="#Tokenizer-1125"><span class="linenos">1125</span></a> <span class="k">else</span> <span class="bp">self</span><span class="o">.</span><span class="n">KEYWORDS</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_text</span><span class="o">.</span><span class="n">upper</span><span class="p">(),</span> <span class="n">TokenType</span><span class="o">.</span><span class="n">VAR</span><span class="p">)</span> +</span><span id="Tokenizer-1126"><a href="#Tokenizer-1126"><span class="linenos">1126</span></a> <span class="p">)</span> +</span><span id="Tokenizer-1127"><a href="#Tokenizer-1127"><span class="linenos">1127</span></a> +</span><span id="Tokenizer-1128"><a href="#Tokenizer-1128"><span class="linenos">1128</span></a> <span class="k">def</span> <span class="nf">_extract_string</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">delimiter</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">escapes</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Tokenizer-1129"><a href="#Tokenizer-1129"><span class="linenos">1129</span></a> <span class="n">text</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="Tokenizer-1130"><a href="#Tokenizer-1130"><span class="linenos">1130</span></a> <span class="n">delim_size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">delimiter</span><span class="p">)</span> +</span><span id="Tokenizer-1131"><a href="#Tokenizer-1131"><span class="linenos">1131</span></a> <span class="n">escapes</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_STRING_ESCAPES</span> <span class="k">if</span> <span class="n">escapes</span> <span class="ow">is</span> <span class="kc">None</span> <span class="k">else</span> <span class="n">escapes</span> +</span><span id="Tokenizer-1132"><a href="#Tokenizer-1132"><span class="linenos">1132</span></a> +</span><span id="Tokenizer-1133"><a href="#Tokenizer-1133"><span class="linenos">1133</span></a> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span> +</span><span id="Tokenizer-1134"><a href="#Tokenizer-1134"><span class="linenos">1134</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="ow">in</span> <span class="n">escapes</span> <span class="ow">and</span> <span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="n">delimiter</span> <span class="ow">or</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="ow">in</span> <span class="n">escapes</span><span class="p">):</span> +</span><span id="Tokenizer-1135"><a href="#Tokenizer-1135"><span class="linenos">1135</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">==</span> <span class="n">delimiter</span><span class="p">:</span> +</span><span id="Tokenizer-1136"><a href="#Tokenizer-1136"><span class="linenos">1136</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> +</span><span id="Tokenizer-1137"><a href="#Tokenizer-1137"><span class="linenos">1137</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-1138"><a href="#Tokenizer-1138"><span class="linenos">1138</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> +</span><span id="Tokenizer-1139"><a href="#Tokenizer-1139"><span class="linenos">1139</span></a> +</span><span id="Tokenizer-1140"><a href="#Tokenizer-1140"><span class="linenos">1140</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="mi">1</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> +</span><span id="Tokenizer-1141"><a href="#Tokenizer-1141"><span class="linenos">1141</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> +</span><span id="Tokenizer-1142"><a href="#Tokenizer-1142"><span class="linenos">1142</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-1143"><a href="#Tokenizer-1143"><span class="linenos">1143</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Missing </span><span class="si">{</span><span class="n">delimiter</span><span class="si">}</span><span class="s2"> from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> +</span><span id="Tokenizer-1144"><a href="#Tokenizer-1144"><span class="linenos">1144</span></a> <span class="k">else</span><span class="p">:</span> +</span><span id="Tokenizer-1145"><a href="#Tokenizer-1145"><span class="linenos">1145</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_chars</span><span class="p">(</span><span class="n">delim_size</span><span class="p">)</span> <span class="o">==</span> <span class="n">delimiter</span><span class="p">:</span> +</span><span id="Tokenizer-1146"><a href="#Tokenizer-1146"><span class="linenos">1146</span></a> <span class="k">if</span> <span class="n">delim_size</span> <span class="o">></span> <span class="mi">1</span><span class="p">:</span> +</span><span id="Tokenizer-1147"><a href="#Tokenizer-1147"><span class="linenos">1147</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">delim_size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="Tokenizer-1148"><a href="#Tokenizer-1148"><span class="linenos">1148</span></a> <span class="k">break</span> +</span><span id="Tokenizer-1149"><a href="#Tokenizer-1149"><span class="linenos">1149</span></a> +</span><span id="Tokenizer-1150"><a href="#Tokenizer-1150"><span class="linenos">1150</span></a> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span><span class="p">:</span> +</span><span id="Tokenizer-1151"><a href="#Tokenizer-1151"><span class="linenos">1151</span></a> <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Missing </span><span class="si">{</span><span class="n">delimiter</span><span class="si">}</span><span class="s2"> from </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_line</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">_start</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span> </span><span id="Tokenizer-1152"><a href="#Tokenizer-1152"><span class="linenos">1152</span></a> -</span><span id="Tokenizer-1153"><a href="#Tokenizer-1153"><span class="linenos">1153</span></a> <span class="k">return</span> <span class="n">text</span> +</span><span id="Tokenizer-1153"><a href="#Tokenizer-1153"><span class="linenos">1153</span></a> <span class="n">current</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span> +</span><span id="Tokenizer-1154"><a href="#Tokenizer-1154"><span class="linenos">1154</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_advance</span><span class="p">(</span><span class="n">alnum</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> +</span><span id="Tokenizer-1155"><a href="#Tokenizer-1155"><span class="linenos">1155</span></a> <span class="n">text</span> <span class="o">+=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">current</span> <span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">1</span><span class="p">]</span> +</span><span id="Tokenizer-1156"><a href="#Tokenizer-1156"><span class="linenos">1156</span></a> +</span><span id="Tokenizer-1157"><a href="#Tokenizer-1157"><span class="linenos">1157</span></a> <span class="k">return</span> <span class="n">text</span> </span></pre></div> + <div id="Tokenizer.SINGLE_TOKENS" class="classattr"> + <div class="attr variable"> + <span class="name">SINGLE_TOKENS</span> = +<input id="Tokenizer.SINGLE_TOKENS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> + <label class="view-value-button pdoc-button" for="Tokenizer.SINGLE_TOKENS-view-value"></label><span class="default_value">{'(': <<a href="#TokenType.L_PAREN">TokenType.L_PAREN</a>: 'L_PAREN'>, ')': <<a href="#TokenType.R_PAREN">TokenType.R_PAREN</a>: 'R_PAREN'>, '[': <<a href="#TokenType.L_BRACKET">TokenType.L_BRACKET</a>: 'L_BRACKET'>, ']': <<a href="#TokenType.R_BRACKET">TokenType.R_BRACKET</a>: 'R_BRACKET'>, '{': <<a href="#TokenType.L_BRACE">TokenType.L_BRACE</a>: 'L_BRACE'>, '}': <<a href="#TokenType.R_BRACE">TokenType.R_BRACE</a>: 'R_BRACE'>, '&': <<a href="#TokenType.AMP">TokenType.AMP</a>: 'AMP'>, '^': <<a href="#TokenType.CARET">TokenType.CARET</a>: 'CARET'>, ':': <<a href="#TokenType.COLON">TokenType.COLON</a>: 'COLON'>, ',': <<a href="#TokenType.COMMA">TokenType.COMMA</a>: 'COMMA'>, '.': <<a href="#TokenType.DOT">TokenType.DOT</a>: 'DOT'>, '-': <<a href="#TokenType.DASH">TokenType.DASH</a>: 'DASH'>, '=': <<a href="#TokenType.EQ">TokenType.EQ</a>: 'EQ'>, '>': <<a href="#TokenType.GT">TokenType.GT</a>: 'GT'>, '<': <<a href="#TokenType.LT">TokenType.LT</a>: 'LT'>, '%': <<a href="#TokenType.MOD">TokenType.MOD</a>: 'MOD'>, '!': <<a href="#TokenType.NOT">TokenType.NOT</a>: 'NOT'>, '|': <<a href="#TokenType.PIPE">TokenType.PIPE</a>: 'PIPE'>, '+': <<a href="#TokenType.PLUS">TokenType.PLUS</a>: 'PLUS'>, ';': <<a href="#TokenType.SEMICOLON">TokenType.SEMICOLON</a>: 'SEMICOLON'>, '/': <<a href="#TokenType.SLASH">TokenType.SLASH</a>: 'SLASH'>, '\\': <<a href="#TokenType.BACKSLASH">TokenType.BACKSLASH</a>: 'BACKSLASH'>, '*': <<a href="#TokenType.STAR">TokenType.STAR</a>: 'STAR'>, '~': <<a href="#TokenType.TILDA">TokenType.TILDA</a>: 'TILDA'>, '?': <<a href="#TokenType.PLACEHOLDER">TokenType.PLACEHOLDER</a>: 'PLACEHOLDER'>, '@': <<a href="#TokenType.PARAMETER">TokenType.PARAMETER</a>: 'PARAMETER'>, "'": <<a href="#TokenType.QUOTE">TokenType.QUOTE</a>: 'QUOTE'>, '`': <<a href="#TokenType.IDENTIFIER">TokenType.IDENTIFIER</a>: 'IDENTIFIER'>, '"': <<a href="#TokenType.IDENTIFIER">TokenType.IDENTIFIER</a>: 'IDENTIFIER'>, '#': <<a href="#TokenType.HASH">TokenType.HASH</a>: 'HASH'>}</span> + + + </div> + <a class="headerlink" href="#Tokenizer.SINGLE_TOKENS"></a> + + + + </div> + <div id="Tokenizer.BIT_STRINGS" class="classattr"> + <div class="attr variable"> + <span class="name">BIT_STRINGS</span><span class="annotation">: List[Union[str, Tuple[str, str]]]</span> = +<span class="default_value">[]</span> + + + </div> + <a class="headerlink" href="#Tokenizer.BIT_STRINGS"></a> + + + + </div> + <div id="Tokenizer.BYTE_STRINGS" class="classattr"> + <div class="attr variable"> + <span class="name">BYTE_STRINGS</span><span class="annotation">: List[Union[str, Tuple[str, str]]]</span> = +<span class="default_value">[]</span> + + + </div> + <a class="headerlink" href="#Tokenizer.BYTE_STRINGS"></a> + + + + </div> + <div id="Tokenizer.HEX_STRINGS" class="classattr"> + <div class="attr variable"> + <span class="name">HEX_STRINGS</span><span class="annotation">: List[Union[str, Tuple[str, str]]]</span> = +<span class="default_value">[]</span> + + + </div> + <a class="headerlink" href="#Tokenizer.HEX_STRINGS"></a> + + + + </div> + <div id="Tokenizer.RAW_STRINGS" class="classattr"> + <div class="attr variable"> + <span class="name">RAW_STRINGS</span><span class="annotation">: List[Union[str, Tuple[str, str]]]</span> = +<span class="default_value">[]</span> + + + </div> + <a class="headerlink" href="#Tokenizer.RAW_STRINGS"></a> + + + + </div> + <div id="Tokenizer.IDENTIFIERS" class="classattr"> + <div class="attr variable"> + <span class="name">IDENTIFIERS</span><span class="annotation">: List[Union[str, Tuple[str, str]]]</span> = +<span class="default_value">['"']</span> + + + </div> + <a class="headerlink" href="#Tokenizer.IDENTIFIERS"></a> + + + + </div> + <div id="Tokenizer.IDENTIFIER_ESCAPES" class="classattr"> + <div class="attr variable"> + <span class="name">IDENTIFIER_ESCAPES</span> = +<span class="default_value">['"']</span> + + + </div> + <a class="headerlink" href="#Tokenizer.IDENTIFIER_ESCAPES"></a> + + + + </div> + <div id="Tokenizer.QUOTES" class="classattr"> + <div class="attr variable"> + <span class="name">QUOTES</span><span class="annotation">: List[Union[str, Tuple[str, str]]]</span> = +<span class="default_value">["'"]</span> + + + </div> + <a class="headerlink" href="#Tokenizer.QUOTES"></a> + + + + </div> + <div id="Tokenizer.STRING_ESCAPES" class="classattr"> + <div class="attr variable"> + <span class="name">STRING_ESCAPES</span> = +<span class="default_value">["'"]</span> + + + </div> + <a class="headerlink" href="#Tokenizer.STRING_ESCAPES"></a> + + + + </div> + <div id="Tokenizer.VAR_SINGLE_TOKENS" class="classattr"> + <div class="attr variable"> + <span class="name">VAR_SINGLE_TOKENS</span><span class="annotation">: Set[str]</span> = +<span class="default_value">set()</span> + + + </div> + <a class="headerlink" href="#Tokenizer.VAR_SINGLE_TOKENS"></a> + + + + </div> + <div id="Tokenizer.IDENTIFIERS_CAN_START_WITH_DIGIT" class="classattr"> + <div class="attr variable"> + <span class="name">IDENTIFIERS_CAN_START_WITH_DIGIT</span><span class="annotation">: bool</span> = +<span class="default_value">False</span> + + + </div> + <a class="headerlink" href="#Tokenizer.IDENTIFIERS_CAN_START_WITH_DIGIT"></a> + + + + </div> + <div id="Tokenizer.KEYWORDS" class="classattr"> + <div class="attr variable"> + <span class="name">KEYWORDS</span><span class="annotation">: Dict[str, <a href="#TokenType">sqlglot.tokens.TokenType</a>]</span> = +<input id="Tokenizer.KEYWORDS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> + <label class="view-value-button pdoc-button" for="Tokenizer.KEYWORDS-view-value"></label><span class="default_value">{'{%': <<a href="#TokenType.BLOCK_START">TokenType.BLOCK_START</a>: 'BLOCK_START'>, '{%+': <<a href="#TokenType.BLOCK_START">TokenType.BLOCK_START</a>: 'BLOCK_START'>, '{%-': <<a href="#TokenType.BLOCK_START">TokenType.BLOCK_START</a>: 'BLOCK_START'>, '%}': <<a href="#TokenType.BLOCK_END">TokenType.BLOCK_END</a>: 'BLOCK_END'>, '+%}': <<a href="#TokenType.BLOCK_END">TokenType.BLOCK_END</a>: 'BLOCK_END'>, '-%}': <<a href="#TokenType.BLOCK_END">TokenType.BLOCK_END</a>: 'BLOCK_END'>, '{{+': <<a href="#TokenType.BLOCK_START">TokenType.BLOCK_START</a>: 'BLOCK_START'>, '{{-': <<a href="#TokenType.BLOCK_START">TokenType.BLOCK_START</a>: 'BLOCK_START'>, '+}}': <<a href="#TokenType.BLOCK_END">TokenType.BLOCK_END</a>: 'BLOCK_END'>, '-}}': <<a href="#TokenType.BLOCK_END">TokenType.BLOCK_END</a>: 'BLOCK_END'>, '/*+': <<a href="#TokenType.HINT">TokenType.HINT</a>: 'HINT'>, '==': <<a href="#TokenType.EQ">TokenType.EQ</a>: 'EQ'>, '::': <<a href="#TokenType.DCOLON">TokenType.DCOLON</a>: 'DCOLON'>, '||': <<a href="#TokenType.DPIPE">TokenType.DPIPE</a>: 'DPIPE'>, '>=': <<a href="#TokenType.GTE">TokenType.GTE</a>: 'GTE'>, '<=': <<a href="#TokenType.LTE">TokenType.LTE</a>: 'LTE'>, '<>': <<a href="#TokenType.NEQ">TokenType.NEQ</a>: 'NEQ'>, '!=': <<a href="#TokenType.NEQ">TokenType.NEQ</a>: 'NEQ'>, '<=>': <<a href="#TokenType.NULLSAFE_EQ">TokenType.NULLSAFE_EQ</a>: 'NULLSAFE_EQ'>, '->': <<a href="#TokenType.ARROW">TokenType.ARROW</a>: 'ARROW'>, '->>': <<a href="#TokenType.DARROW">TokenType.DARROW</a>: 'DARROW'>, '=>': <<a href="#TokenType.FARROW">TokenType.FARROW</a>: 'FARROW'>, '#>': <<a href="#TokenType.HASH_ARROW">TokenType.HASH_ARROW</a>: 'HASH_ARROW'>, '#>>': <<a href="#TokenType.DHASH_ARROW">TokenType.DHASH_ARROW</a>: 'DHASH_ARROW'>, '<->': <<a href="#TokenType.LR_ARROW">TokenType.LR_ARROW</a>: 'LR_ARROW'>, '&&': <<a href="#TokenType.DAMP">TokenType.DAMP</a>: 'DAMP'>, 'ALL': <<a href="#TokenType.ALL">TokenType.ALL</a>: 'ALL'>, 'ALWAYS': <<a href="#TokenType.ALWAYS">TokenType.ALWAYS</a>: 'ALWAYS'>, 'AND': <<a href="#TokenType.AND">TokenType.AND</a>: 'AND'>, 'ANTI': <<a href="#TokenType.ANTI">TokenType.ANTI</a>: 'ANTI'>, 'ANY': <<a href="#TokenType.ANY">TokenType.ANY</a>: 'ANY'>, 'ASC': <<a href="#TokenType.ASC">TokenType.ASC</a>: 'ASC'>, 'AS': <<a href="#TokenType.ALIAS">TokenType.ALIAS</a>: 'ALIAS'>, 'ASOF': <<a href="#TokenType.ASOF">TokenType.ASOF</a>: 'ASOF'>, 'AUTOINCREMENT': <<a href="#TokenType.AUTO_INCREMENT">TokenType.AUTO_INCREMENT</a>: 'AUTO_INCREMENT'>, 'AUTO_INCREMENT': <<a href="#TokenType.AUTO_INCREMENT">TokenType.AUTO_INCREMENT</a>: 'AUTO_INCREMENT'>, 'BEGIN': <<a href="#TokenType.BEGIN">TokenType.BEGIN</a>: 'BEGIN'>, 'BETWEEN': <<a href="#TokenType.BETWEEN">TokenType.BETWEEN</a>: 'BETWEEN'>, 'CACHE': <<a href="#TokenType.CACHE">TokenType.CACHE</a>: 'CACHE'>, 'UNCACHE': <<a href="#TokenType.UNCACHE">TokenType.UNCACHE</a>: 'UNCACHE'>, 'CASE': <<a href="#TokenType.CASE">TokenType.CASE</a>: 'CASE'>, 'CHARACTER SET': <<a href="#TokenType.CHARACTER_SET">TokenType.CHARACTER_SET</a>: 'CHARACTER_SET'>, 'CLUSTER BY': <<a href="#TokenType.CLUSTER_BY">TokenType.CLUSTER_BY</a>: 'CLUSTER_BY'>, 'COLLATE': <<a href="#TokenType.COLLATE">TokenType.COLLATE</a>: 'COLLATE'>, 'COLUMN': <<a href="#TokenType.COLUMN">TokenType.COLUMN</a>: 'COLUMN'>, 'COMMIT': <<a href="#TokenType.COMMIT">TokenType.COMMIT</a>: 'COMMIT'>, 'CONSTRAINT': <<a href="#TokenType.CONSTRAINT">TokenType.CONSTRAINT</a>: 'CONSTRAINT'>, 'CREATE': <<a href="#TokenType.CREATE">TokenType.CREATE</a>: 'CREATE'>, 'CROSS': <<a href="#TokenType.CROSS">TokenType.CROSS</a>: 'CROSS'>, 'CUBE': <<a href="#TokenType.CUBE">TokenType.CUBE</a>: 'CUBE'>, 'CURRENT_DATE': <<a href="#TokenType.CURRENT_DATE">TokenType.CURRENT_DATE</a>: 'CURRENT_DATE'>, 'CURRENT_TIME': <<a href="#TokenType.CURRENT_TIME">TokenType.CURRENT_TIME</a>: 'CURRENT_TIME'>, 'CURRENT_TIMESTAMP': <<a href="#TokenType.CURRENT_TIMESTAMP">TokenType.CURRENT_TIMESTAMP</a>: 'CURRENT_TIMESTAMP'>, 'CURRENT_USER': <<a href="#TokenType.CURRENT_USER">TokenType.CURRENT_USER</a>: 'CURRENT_USER'>, 'DATABASE': <<a href="#TokenType.DATABASE">TokenType.DATABASE</a>: 'DATABASE'>, 'DEFAULT': <<a href="#TokenType.DEFAULT">TokenType.DEFAULT</a>: 'DEFAULT'>, 'DELETE': <<a href="#TokenType.DELETE">TokenType.DELETE</a>: 'DELETE'>, 'DESC': <<a href="#TokenType.DESC">TokenType.DESC</a>: 'DESC'>, 'DESCRIBE': <<a href="#TokenType.DESCRIBE">TokenType.DESCRIBE</a>: 'DESCRIBE'>, 'DISTINCT': <<a href="#TokenType.DISTINCT">TokenType.DISTINCT</a>: 'DISTINCT'>, 'DISTRIBUTE BY': <<a href="#TokenType.DISTRIBUTE_BY">TokenType.DISTRIBUTE_BY</a>: 'DISTRIBUTE_BY'>, 'DIV': <<a href="#TokenType.DIV">TokenType.DIV</a>: 'DIV'>, 'DROP': <<a href="#TokenType.DROP">TokenType.DROP</a>: 'DROP'>, 'ELSE': <<a href="#TokenType.ELSE">TokenType.ELSE</a>: 'ELSE'>, 'END': <<a href="#TokenType.END">TokenType.END</a>: 'END'>, 'ESCAPE': <<a href="#TokenType.ESCAPE">TokenType.ESCAPE</a>: 'ESCAPE'>, 'EXCEPT': <<a href="#TokenType.EXCEPT">TokenType.EXCEPT</a>: 'EXCEPT'>, 'EXECUTE': <<a href="#TokenType.EXECUTE">TokenType.EXECUTE</a>: 'EXECUTE'>, 'EXISTS': <<a href="#TokenType.EXISTS">TokenType.EXISTS</a>: 'EXISTS'>, 'FALSE': <<a href="#TokenType.FALSE">TokenType.FALSE</a>: 'FALSE'>, 'FETCH': <<a href="#TokenType.FETCH">TokenType.FETCH</a>: 'FETCH'>, 'FILTER': <<a href="#TokenType.FILTER">TokenType.FILTER</a>: 'FILTER'>, 'FIRST': <<a href="#TokenType.FIRST">TokenType.FIRST</a>: 'FIRST'>, 'FULL': <<a href="#TokenType.FULL">TokenType.FULL</a>: 'FULL'>, 'FUNCTION': <<a href="#TokenType.FUNCTION">TokenType.FUNCTION</a>: 'FUNCTION'>, 'FOR': <<a href="#TokenType.FOR">TokenType.FOR</a>: 'FOR'>, 'FOREIGN KEY': <<a href="#TokenType.FOREIGN_KEY">TokenType.FOREIGN_KEY</a>: 'FOREIGN_KEY'>, 'FORMAT': <<a href="#TokenType.FORMAT">TokenType.FORMAT</a>: 'FORMAT'>, 'FROM': <<a href="#TokenType.FROM">TokenType.FROM</a>: 'FROM'>, 'GEOGRAPHY': <<a href="#TokenType.GEOGRAPHY">TokenType.GEOGRAPHY</a>: 'GEOGRAPHY'>, 'GEOMETRY': <<a href="#TokenType.GEOMETRY">TokenType.GEOMETRY</a>: 'GEOMETRY'>, 'GLOB': <<a href="#TokenType.GLOB">TokenType.GLOB</a>: 'GLOB'>, 'GROUP BY': <<a href="#TokenType.GROUP_BY">TokenType.GROUP_BY</a>: 'GROUP_BY'>, 'GROUPING SETS': <<a href="#TokenType.GROUPING_SETS">TokenType.GROUPING_SETS</a>: 'GROUPING_SETS'>, 'HAVING': <<a href="#TokenType.HAVING">TokenType.HAVING</a>: 'HAVING'>, 'IF': <<a href="#TokenType.IF">TokenType.IF</a>: 'IF'>, 'ILIKE': <<a href="#TokenType.ILIKE">TokenType.ILIKE</a>: 'ILIKE'>, 'IN': <<a href="#TokenType.IN">TokenType.IN</a>: 'IN'>, 'INDEX': <<a href="#TokenType.INDEX">TokenType.INDEX</a>: 'INDEX'>, 'INET': <<a href="#TokenType.INET">TokenType.INET</a>: 'INET'>, 'INNER': <<a href="#TokenType.INNER">TokenType.INNER</a>: 'INNER'>, 'INSERT': <<a href="#TokenType.INSERT">TokenType.INSERT</a>: 'INSERT'>, 'INTERVAL': <<a href="#TokenType.INTERVAL">TokenType.INTERVAL</a>: 'INTERVAL'>, 'INTERSECT': <<a href="#TokenType.INTERSECT">TokenType.INTERSECT</a>: 'INTERSECT'>, 'INTO': <<a href="#TokenType.INTO">TokenType.INTO</a>: 'INTO'>, 'IS': <<a href="#TokenType.IS">TokenType.IS</a>: 'IS'>, 'ISNULL': <<a href="#TokenType.ISNULL">TokenType.ISNULL</a>: 'ISNULL'>, 'JOIN': <<a href="#TokenType.JOIN">TokenType.JOIN</a>: 'JOIN'>, 'KEEP': <<a href="#TokenType.KEEP">TokenType.KEEP</a>: 'KEEP'>, 'LATERAL': <<a href="#TokenType.LATERAL">TokenType.LATERAL</a>: 'LATERAL'>, 'LEFT': <<a href="#TokenType.LEFT">TokenType.LEFT</a>: 'LEFT'>, 'LIKE': <<a href="#TokenType.LIKE">TokenType.LIKE</a>: 'LIKE'>, 'LIMIT': <<a href="#TokenType.LIMIT">TokenType.LIMIT</a>: 'LIMIT'>, 'LOAD': <<a href="#TokenType.LOAD">TokenType.LOAD</a>: 'LOAD'>, 'LOCK': <<a href="#TokenType.LOCK">TokenType.LOCK</a>: 'LOCK'>, 'MERGE': <<a href="#TokenType.MERGE">TokenType.MERGE</a>: 'MERGE'>, 'NATURAL': <<a href="#TokenType.NATURAL">TokenType.NATURAL</a>: 'NATURAL'>, 'NEXT': <<a href="#TokenType.NEXT">TokenType.NEXT</a>: 'NEXT'>, 'NEXT VALUE FOR': <<a href="#TokenType.NEXT_VALUE_FOR">TokenType.NEXT_VALUE_FOR</a>: 'NEXT_VALUE_FOR'>, 'NOT': <<a href="#TokenType.NOT">TokenType.NOT</a>: 'NOT'>, 'NOTNULL': <<a href="#TokenType.NOTNULL">TokenType.NOTNULL</a>: 'NOTNULL'>, 'NULL': <<a href="#TokenType.NULL">TokenType.NULL</a>: 'NULL'>, 'OBJECT': <<a href="#TokenType.OBJECT">TokenType.OBJECT</a>: 'OBJECT'>, 'OFFSET': <<a href="#TokenType.OFFSET">TokenType.OFFSET</a>: 'OFFSET'>, 'ON': <<a href="#TokenType.ON">TokenType.ON</a>: 'ON'>, 'OR': <<a href="#TokenType.OR">TokenType.OR</a>: 'OR'>, 'ORDER BY': <<a href="#TokenType.ORDER_BY">TokenType.ORDER_BY</a>: 'ORDER_BY'>, 'ORDINALITY': <<a href="#TokenType.ORDINALITY">TokenType.ORDINALITY</a>: 'ORDINALITY'>, 'OUTER': <<a href="#TokenType.OUTER">TokenType.OUTER</a>: 'OUTER'>, 'OVER': <<a href="#TokenType.OVER">TokenType.OVER</a>: 'OVER'>, 'OVERLAPS': <<a href="#TokenType.OVERLAPS">TokenType.OVERLAPS</a>: 'OVERLAPS'>, 'OVERWRITE': <<a href="#TokenType.OVERWRITE">TokenType.OVERWRITE</a>: 'OVERWRITE'>, 'PARTITION': <<a href="#TokenType.PARTITION">TokenType.PARTITION</a>: 'PARTITION'>, 'PARTITION BY': <<a href="#TokenType.PARTITION_BY">TokenType.PARTITION_BY</a>: 'PARTITION_BY'>, 'PARTITIONED BY': <<a href="#TokenType.PARTITION_BY">TokenType.PARTITION_BY</a>: 'PARTITION_BY'>, 'PARTITIONED_BY': <<a href="#TokenType.PARTITION_BY">TokenType.PARTITION_BY</a>: 'PARTITION_BY'>, 'PERCENT': <<a href="#TokenType.PERCENT">TokenType.PERCENT</a>: 'PERCENT'>, 'PIVOT': <<a href="#TokenType.PIVOT">TokenType.PIVOT</a>: 'PIVOT'>, 'PRAGMA': <<a href="#TokenType.PRAGMA">TokenType.PRAGMA</a>: 'PRAGMA'>, 'PRIMARY KEY': <<a href="#TokenType.PRIMARY_KEY">TokenType.PRIMARY_KEY</a>: 'PRIMARY_KEY'>, 'PROCEDURE': <<a href="#TokenType.PROCEDURE">TokenType.PROCEDURE</a>: 'PROCEDURE'>, 'QUALIFY': <<a href="#TokenType.QUALIFY">TokenType.QUALIFY</a>: 'QUALIFY'>, 'RANGE': <<a href="#TokenType.RANGE">TokenType.RANGE</a>: 'RANGE'>, 'RECURSIVE': <<a href="#TokenType.RECURSIVE">TokenType.RECURSIVE</a>: 'RECURSIVE'>, 'REGEXP': <<a href="#TokenType.RLIKE">TokenType.RLIKE</a>: 'RLIKE'>, 'REPLACE': <<a href="#TokenType.REPLACE">TokenType.REPLACE</a>: 'REPLACE'>, 'RETURNING': <<a href="#TokenType.RETURNING">TokenType.RETURNING</a>: 'RETURNING'>, 'REFERENCES': <<a href="#TokenType.REFERENCES">TokenType.REFERENCES</a>: 'REFERENCES'>, 'RIGHT': <<a href="#TokenType.RIGHT">TokenType.RIGHT</a>: 'RIGHT'>, 'RLIKE': <<a href="#TokenType.RLIKE">TokenType.RLIKE</a>: 'RLIKE'>, 'ROLLBACK': <<a href="#TokenType.ROLLBACK">TokenType.ROLLBACK</a>: 'ROLLBACK'>, 'ROLLUP': <<a href="#TokenType.ROLLUP">TokenType.ROLLUP</a>: 'ROLLUP'>, 'ROW': <<a href="#TokenType.ROW">TokenType.ROW</a>: 'ROW'>, 'ROWS': <<a href="#TokenType.ROWS">TokenType.ROWS</a>: 'ROWS'>, 'SCHEMA': <<a href="#TokenType.SCHEMA">TokenType.SCHEMA</a>: 'SCHEMA'>, 'SELECT': <<a href="#TokenType.SELECT">TokenType.SELECT</a>: 'SELECT'>, 'SEMI': <<a href="#TokenType.SEMI">TokenType.SEMI</a>: 'SEMI'>, 'SET': <<a href="#TokenType.SET">TokenType.SET</a>: 'SET'>, 'SETTINGS': <<a href="#TokenType.SETTINGS">TokenType.SETTINGS</a>: 'SETTINGS'>, 'SHOW': <<a href="#TokenType.SHOW">TokenType.SHOW</a>: 'SHOW'>, 'SIMILAR TO': <<a href="#TokenType.SIMILAR_TO">TokenType.SIMILAR_TO</a>: 'SIMILAR_TO'>, 'SOME': <<a href="#TokenType.SOME">TokenType.SOME</a>: 'SOME'>, 'SORT BY': <<a href="#TokenType.SORT_BY">TokenType.SORT_BY</a>: 'SORT_BY'>, 'TABLE': <<a href="#TokenType.TABLE">TokenType.TABLE</a>: 'TABLE'>, 'TABLESAMPLE': <<a href="#TokenType.TABLE_SAMPLE">TokenType.TABLE_SAMPLE</a>: 'TABLE_SAMPLE'>, 'TEMP': <<a href="#TokenType.TEMPORARY">TokenType.TEMPORARY</a>: 'TEMPORARY'>, 'TEMPORARY': <<a href="#TokenType.TEMPORARY">TokenType.TEMPORARY</a>: 'TEMPORARY'>, 'THEN': <<a href="#TokenType.THEN">TokenType.THEN</a>: 'THEN'>, 'TRUE': <<a href="#TokenType.TRUE">TokenType.TRUE</a>: 'TRUE'>, 'UNION': <<a href="#TokenType.UNION">TokenType.UNION</a>: 'UNION'>, 'UNNEST': <<a href="#TokenType.UNNEST">TokenType.UNNEST</a>: 'UNNEST'>, 'UNPIVOT': <<a href="#TokenType.UNPIVOT">TokenType.UNPIVOT</a>: 'UNPIVOT'>, 'UPDATE': <<a href="#TokenType.UPDATE">TokenType.UPDATE</a>: 'UPDATE'>, 'USE': <<a href="#TokenType.USE">TokenType.USE</a>: 'USE'>, 'USING': <<a href="#TokenType.USING">TokenType.USING</a>: 'USING'>, 'UUID': <<a href="#TokenType.UUID">TokenType.UUID</a>: 'UUID'>, 'VALUES': <<a href="#TokenType.VALUES">TokenType.VALUES</a>: 'VALUES'>, 'VIEW': <<a href="#TokenType.VIEW">TokenType.VIEW</a>: 'VIEW'>, 'VOLATILE': <<a href="#TokenType.VOLATILE">TokenType.VOLATILE</a>: 'VOLATILE'>, 'WHEN': <<a href="#TokenType.WHEN">TokenType.WHEN</a>: 'WHEN'>, 'WHERE': <<a href="#TokenType.WHERE">TokenType.WHERE</a>: 'WHERE'>, 'WINDOW': <<a href="#TokenType.WINDOW">TokenType.WINDOW</a>: 'WINDOW'>, 'WITH': <<a href="#TokenType.WITH">TokenType.WITH</a>: 'WITH'>, 'APPLY': <<a href="#TokenType.APPLY">TokenType.APPLY</a>: 'APPLY'>, 'ARRAY': <<a href="#TokenType.ARRAY">TokenType.ARRAY</a>: 'ARRAY'>, 'BIT': <<a href="#TokenType.BIT">TokenType.BIT</a>: 'BIT'>, 'BOOL': <<a href="#TokenType.BOOLEAN">TokenType.BOOLEAN</a>: 'BOOLEAN'>, 'BOOLEAN': <<a href="#TokenType.BOOLEAN">TokenType.BOOLEAN</a>: 'BOOLEAN'>, 'BYTE': <<a href="#TokenType.TINYINT">TokenType.TINYINT</a>: 'TINYINT'>, 'TINYINT': <<a href="#TokenType.TINYINT">TokenType.TINYINT</a>: 'TINYINT'>, 'SHORT': <<a href="#TokenType.SMALLINT">TokenType.SMALLINT</a>: 'SMALLINT'>, 'SMALLINT': <<a href="#TokenType.SMALLINT">TokenType.SMALLINT</a>: 'SMALLINT'>, 'INT2': <<a href="#TokenType.SMALLINT">TokenType.SMALLINT</a>: 'SMALLINT'>, 'INTEGER': <<a href="#TokenType.INT">TokenType.INT</a>: 'INT'>, 'INT': <<a href="#TokenType.INT">TokenType.INT</a>: 'INT'>, 'INT4': <<a href="#TokenType.INT">TokenType.INT</a>: 'INT'>, 'LONG': <<a href="#TokenType.BIGINT">TokenType.BIGINT</a>: 'BIGINT'>, 'BIGINT': <<a href="#TokenType.BIGINT">TokenType.BIGINT</a>: 'BIGINT'>, 'INT8': <<a href="#TokenType.BIGINT">TokenType.BIGINT</a>: 'BIGINT'>, 'DEC': <<a href="#TokenType.DECIMAL">TokenType.DECIMAL</a>: 'DECIMAL'>, 'DECIMAL': <<a href="#TokenType.DECIMAL">TokenType.DECIMAL</a>: 'DECIMAL'>, 'BIGDECIMAL': <<a href="#TokenType.BIGDECIMAL">TokenType.BIGDECIMAL</a>: 'BIGDECIMAL'>, 'BIGNUMERIC': <<a href="#TokenType.BIGDECIMAL">TokenType.BIGDECIMAL</a>: 'BIGDECIMAL'>, 'MAP': <<a href="#TokenType.MAP">TokenType.MAP</a>: 'MAP'>, 'NULLABLE': <<a href="#TokenType.NULLABLE">TokenType.NULLABLE</a>: 'NULLABLE'>, 'NUMBER': <<a href="#TokenType.DECIMAL">TokenType.DECIMAL</a>: 'DECIMAL'>, 'NUMERIC': <<a href="#TokenType.DECIMAL">TokenType.DECIMAL</a>: 'DECIMAL'>, 'FIXED': <<a href="#TokenType.DECIMAL">TokenType.DECIMAL</a>: 'DECIMAL'>, 'REAL': <<a href="#TokenType.FLOAT">TokenType.FLOAT</a>: 'FLOAT'>, 'FLOAT': <<a href="#TokenType.FLOAT">TokenType.FLOAT</a>: 'FLOAT'>, 'FLOAT4': <<a href="#TokenType.FLOAT">TokenType.FLOAT</a>: 'FLOAT'>, 'FLOAT8': <<a href="#TokenType.DOUBLE">TokenType.DOUBLE</a>: 'DOUBLE'>, 'DOUBLE': <<a href="#TokenType.DOUBLE">TokenType.DOUBLE</a>: 'DOUBLE'>, 'DOUBLE PRECISION': <<a href="#TokenType.DOUBLE">TokenType.DOUBLE</a>: 'DOUBLE'>, 'JSON': <<a href="#TokenType.JSON">TokenType.JSON</a>: 'JSON'>, 'CHAR': <<a href="#TokenType.CHAR">TokenType.CHAR</a>: 'CHAR'>, 'CHARACTER': <<a href="#TokenType.CHAR">TokenType.CHAR</a>: 'CHAR'>, 'NCHAR': <<a href="#TokenType.NCHAR">TokenType.NCHAR</a>: 'NCHAR'>, 'VARCHAR': <<a href="#TokenType.VARCHAR">TokenType.VARCHAR</a>: 'VARCHAR'>, 'VARCHAR2': <<a href="#TokenType.VARCHAR">TokenType.VARCHAR</a>: 'VARCHAR'>, 'NVARCHAR': <<a href="#TokenType.NVARCHAR">TokenType.NVARCHAR</a>: 'NVARCHAR'>, 'NVARCHAR2': <<a href="#TokenType.NVARCHAR">TokenType.NVARCHAR</a>: 'NVARCHAR'>, 'STR': <<a href="#TokenType.TEXT">TokenType.TEXT</a>: 'TEXT'>, 'STRING': <<a href="#TokenType.TEXT">TokenType.TEXT</a>: 'TEXT'>, 'TEXT': <<a href="#TokenType.TEXT">TokenType.TEXT</a>: 'TEXT'>, 'CLOB': <<a href="#TokenType.TEXT">TokenType.TEXT</a>: 'TEXT'>, 'LONGVARCHAR': <<a href="#TokenType.TEXT">TokenType.TEXT</a>: 'TEXT'>, 'BINARY': <<a href="#TokenType.BINARY">TokenType.BINARY</a>: 'BINARY'>, 'BLOB': <<a href="#TokenType.VARBINARY">TokenType.VARBINARY</a>: 'VARBINARY'>, 'BYTEA': <<a href="#TokenType.VARBINARY">TokenType.VARBINARY</a>: 'VARBINARY'>, 'VARBINARY': <<a href="#TokenType.VARBINARY">TokenType.VARBINARY</a>: 'VARBINARY'>, 'TIME': <<a href="#TokenType.TIME">TokenType.TIME</a>: 'TIME'>, 'TIMESTAMP': <<a href="#TokenType.TIMESTAMP">TokenType.TIMESTAMP</a>: 'TIMESTAMP'>, 'TIMESTAMPTZ': <<a href="#TokenType.TIMESTAMPTZ">TokenType.TIMESTAMPTZ</a>: 'TIMESTAMPTZ'>, 'TIMESTAMPLTZ': <<a href="#TokenType.TIMESTAMPLTZ">TokenType.TIMESTAMPLTZ</a>: 'TIMESTAMPLTZ'>, 'DATE': <<a href="#TokenType.DATE">TokenType.DATE</a>: 'DATE'>, 'DATETIME': <<a href="#TokenType.DATETIME">TokenType.DATETIME</a>: 'DATETIME'>, 'INT4RANGE': <<a href="#TokenType.INT4RANGE">TokenType.INT4RANGE</a>: 'INT4RANGE'>, 'INT4MULTIRANGE': <<a href="#TokenType.INT4MULTIRANGE">TokenType.INT4MULTIRANGE</a>: 'INT4MULTIRANGE'>, 'INT8RANGE': <<a href="#TokenType.INT8RANGE">TokenType.INT8RANGE</a>: 'INT8RANGE'>, 'INT8MULTIRANGE': <<a href="#TokenType.INT8MULTIRANGE">TokenType.INT8MULTIRANGE</a>: 'INT8MULTIRANGE'>, 'NUMRANGE': <<a href="#TokenType.NUMRANGE">TokenType.NUMRANGE</a>: 'NUMRANGE'>, 'NUMMULTIRANGE': <<a href="#TokenType.NUMMULTIRANGE">TokenType.NUMMULTIRANGE</a>: 'NUMMULTIRANGE'>, 'TSRANGE': <<a href="#TokenType.TSRANGE">TokenType.TSRANGE</a>: 'TSRANGE'>, 'TSMULTIRANGE': <<a href="#TokenType.TSMULTIRANGE">TokenType.TSMULTIRANGE</a>: 'TSMULTIRANGE'>, 'TSTZRANGE': <<a href="#TokenType.TSTZRANGE">TokenType.TSTZRANGE</a>: 'TSTZRANGE'>, 'TSTZMULTIRANGE': <<a href="#TokenType.TSTZMULTIRANGE">TokenType.TSTZMULTIRANGE</a>: 'TSTZMULTIRANGE'>, 'DATERANGE': <<a href="#TokenType.DATERANGE">TokenType.DATERANGE</a>: 'DATERANGE'>, 'DATEMULTIRANGE': <<a href="#TokenType.DATEMULTIRANGE">TokenType.DATEMULTIRANGE</a>: 'DATEMULTIRANGE'>, 'UNIQUE': <<a href="#TokenType.UNIQUE">TokenType.UNIQUE</a>: 'UNIQUE'>, 'STRUCT': <<a href="#TokenType.STRUCT">TokenType.STRUCT</a>: 'STRUCT'>, 'VARIANT': <<a href="#TokenType.VARIANT">TokenType.VARIANT</a>: 'VARIANT'>, 'ALTER': <<a href="#TokenType.ALTER">TokenType.ALTER</a>: 'ALTER'>, 'ANALYZE': <<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: 'COMMAND'>, 'CALL': <<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: 'COMMAND'>, 'COMMENT': <<a href="#TokenType.COMMENT">TokenType.COMMENT</a>: 'COMMENT'>, 'COPY': <<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: 'COMMAND'>, 'EXPLAIN': <<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: 'COMMAND'>, 'GRANT': <<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: 'COMMAND'>, 'OPTIMIZE': <<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: 'COMMAND'>, 'PREPARE': <<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: 'COMMAND'>, 'TRUNCATE': <<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: 'COMMAND'>, 'VACUUM': <<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: 'COMMAND'>, 'USER-DEFINED': <<a href="#TokenType.USERDEFINED">TokenType.USERDEFINED</a>: 'USERDEFINED'>}</span> + + + </div> + <a class="headerlink" href="#Tokenizer.KEYWORDS"></a> + + + + </div> + <div id="Tokenizer.WHITE_SPACE" class="classattr"> + <div class="attr variable"> + <span class="name">WHITE_SPACE</span><span class="annotation">: Dict[Optional[str], <a href="#TokenType">sqlglot.tokens.TokenType</a>]</span> = +<input id="Tokenizer.WHITE_SPACE-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> + <label class="view-value-button pdoc-button" for="Tokenizer.WHITE_SPACE-view-value"></label><span class="default_value">{' ': <<a href="#TokenType.SPACE">TokenType.SPACE</a>: 'SPACE'>, '\t': <<a href="#TokenType.SPACE">TokenType.SPACE</a>: 'SPACE'>, '\n': <<a href="#TokenType.BREAK">TokenType.BREAK</a>: 'BREAK'>, '\r': <<a href="#TokenType.BREAK">TokenType.BREAK</a>: 'BREAK'>, '\r\n': <<a href="#TokenType.BREAK">TokenType.BREAK</a>: 'BREAK'>}</span> + + + </div> + <a class="headerlink" href="#Tokenizer.WHITE_SPACE"></a> + + + + </div> + <div id="Tokenizer.COMMANDS" class="classattr"> + <div class="attr variable"> + <span class="name">COMMANDS</span> = +<input id="Tokenizer.COMMANDS-view-value" class="view-value-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> + <label class="view-value-button pdoc-button" for="Tokenizer.COMMANDS-view-value"></label><span class="default_value">{<<a href="#TokenType.FETCH">TokenType.FETCH</a>: 'FETCH'>, <<a href="#TokenType.SHOW">TokenType.SHOW</a>: 'SHOW'>, <<a href="#TokenType.EXECUTE">TokenType.EXECUTE</a>: 'EXECUTE'>, <<a href="#TokenType.COMMAND">TokenType.COMMAND</a>: 'COMMAND'>}</span> + + + </div> + <a class="headerlink" href="#Tokenizer.COMMANDS"></a> + + + + </div> + <div id="Tokenizer.COMMAND_PREFIX_TOKENS" class="classattr"> + <div class="attr variable"> + <span class="name">COMMAND_PREFIX_TOKENS</span> = +<span class="default_value">{<<a href="#TokenType.BEGIN">TokenType.BEGIN</a>: 'BEGIN'>, <<a href="#TokenType.SEMICOLON">TokenType.SEMICOLON</a>: 'SEMICOLON'>}</span> + + + </div> + <a class="headerlink" href="#Tokenizer.COMMAND_PREFIX_TOKENS"></a> + + + + </div> + <div id="Tokenizer.NUMERIC_LITERALS" class="classattr"> + <div class="attr variable"> + <span class="name">NUMERIC_LITERALS</span><span class="annotation">: Dict[str, str]</span> = +<span class="default_value">{}</span> + + + </div> + <a class="headerlink" href="#Tokenizer.NUMERIC_LITERALS"></a> + + + + </div> + <div id="Tokenizer.ENCODE" class="classattr"> + <div class="attr variable"> + <span class="name">ENCODE</span><span class="annotation">: Optional[str]</span> = +<span class="default_value">None</span> + + + </div> + <a class="headerlink" href="#Tokenizer.ENCODE"></a> + + + + </div> + <div id="Tokenizer.COMMENTS" class="classattr"> + <div class="attr variable"> + <span class="name">COMMENTS</span> = +<span class="default_value">['--', ('/*', '*/')]</span> + + + </div> + <a class="headerlink" href="#Tokenizer.COMMENTS"></a> + + + + </div> <div id="Tokenizer.reset" class="classattr"> <input id="Tokenizer.reset-view-source" class="view-source-toggle-state" type="checkbox" aria-hidden="true" tabindex="-1"> <div class="attr function"> @@ -6929,20 +7363,20 @@ </div> <a class="headerlink" href="#Tokenizer.reset"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Tokenizer.reset-770"><a href="#Tokenizer.reset-770"><span class="linenos">770</span></a> <span class="k">def</span> <span class="nf">reset</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> -</span><span id="Tokenizer.reset-771"><a href="#Tokenizer.reset-771"><span class="linenos">771</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="Tokenizer.reset-772"><a href="#Tokenizer.reset-772"><span class="linenos">772</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="Tokenizer.reset-773"><a href="#Tokenizer.reset-773"><span class="linenos">773</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Tokenizer.reset-774"><a href="#Tokenizer.reset-774"><span class="linenos">774</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="Tokenizer.reset-775"><a href="#Tokenizer.reset-775"><span class="linenos">775</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="Tokenizer.reset-776"><a href="#Tokenizer.reset-776"><span class="linenos">776</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> <span class="o">=</span> <span class="mi">1</span> -</span><span id="Tokenizer.reset-777"><a href="#Tokenizer.reset-777"><span class="linenos">777</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="mi">0</span> -</span><span id="Tokenizer.reset-778"><a href="#Tokenizer.reset-778"><span class="linenos">778</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> -</span><span id="Tokenizer.reset-779"><a href="#Tokenizer.reset-779"><span class="linenos">779</span></a> -</span><span id="Tokenizer.reset-780"><a href="#Tokenizer.reset-780"><span class="linenos">780</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="Tokenizer.reset-781"><a href="#Tokenizer.reset-781"><span class="linenos">781</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="kc">False</span> -</span><span id="Tokenizer.reset-782"><a href="#Tokenizer.reset-782"><span class="linenos">782</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> -</span><span id="Tokenizer.reset-783"><a href="#Tokenizer.reset-783"><span class="linenos">783</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Tokenizer.reset-774"><a href="#Tokenizer.reset-774"><span class="linenos">774</span></a> <span class="k">def</span> <span class="nf">reset</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-></span> <span class="kc">None</span><span class="p">:</span> +</span><span id="Tokenizer.reset-775"><a href="#Tokenizer.reset-775"><span class="linenos">775</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="Tokenizer.reset-776"><a href="#Tokenizer.reset-776"><span class="linenos">776</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="Tokenizer.reset-777"><a href="#Tokenizer.reset-777"><span class="linenos">777</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Tokenizer.reset-778"><a href="#Tokenizer.reset-778"><span class="linenos">778</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_start</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="Tokenizer.reset-779"><a href="#Tokenizer.reset-779"><span class="linenos">779</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="Tokenizer.reset-780"><a href="#Tokenizer.reset-780"><span class="linenos">780</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_line</span> <span class="o">=</span> <span class="mi">1</span> +</span><span id="Tokenizer.reset-781"><a href="#Tokenizer.reset-781"><span class="linenos">781</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_col</span> <span class="o">=</span> <span class="mi">0</span> +</span><span id="Tokenizer.reset-782"><a href="#Tokenizer.reset-782"><span class="linenos">782</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_comments</span><span class="p">:</span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span> +</span><span id="Tokenizer.reset-783"><a href="#Tokenizer.reset-783"><span class="linenos">783</span></a> +</span><span id="Tokenizer.reset-784"><a href="#Tokenizer.reset-784"><span class="linenos">784</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_char</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="Tokenizer.reset-785"><a href="#Tokenizer.reset-785"><span class="linenos">785</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_end</span> <span class="o">=</span> <span class="kc">False</span> +</span><span id="Tokenizer.reset-786"><a href="#Tokenizer.reset-786"><span class="linenos">786</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_peek</span> <span class="o">=</span> <span class="s2">""</span> +</span><span id="Tokenizer.reset-787"><a href="#Tokenizer.reset-787"><span class="linenos">787</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_prev_token_line</span> <span class="o">=</span> <span class="o">-</span><span class="mi">1</span> </span></pre></div> @@ -6960,25 +7394,25 @@ </div> <a class="headerlink" href="#Tokenizer.tokenize"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Tokenizer.tokenize-785"><a href="#Tokenizer.tokenize-785"><span class="linenos">785</span></a> <span class="k">def</span> <span class="nf">tokenize</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sql</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]:</span> -</span><span id="Tokenizer.tokenize-786"><a href="#Tokenizer.tokenize-786"><span class="linenos">786</span></a><span class="w"> </span><span class="sd">"""Returns a list of tokens corresponding to the SQL string `sql`."""</span> -</span><span id="Tokenizer.tokenize-787"><a href="#Tokenizer.tokenize-787"><span class="linenos">787</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> -</span><span id="Tokenizer.tokenize-788"><a href="#Tokenizer.tokenize-788"><span class="linenos">788</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="n">sql</span> -</span><span id="Tokenizer.tokenize-789"><a href="#Tokenizer.tokenize-789"><span class="linenos">789</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">sql</span><span class="p">)</span> -</span><span id="Tokenizer.tokenize-790"><a href="#Tokenizer.tokenize-790"><span class="linenos">790</span></a> -</span><span id="Tokenizer.tokenize-791"><a href="#Tokenizer.tokenize-791"><span class="linenos">791</span></a> <span class="k">try</span><span class="p">:</span> -</span><span id="Tokenizer.tokenize-792"><a href="#Tokenizer.tokenize-792"><span class="linenos">792</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan</span><span class="p">()</span> -</span><span id="Tokenizer.tokenize-793"><a href="#Tokenizer.tokenize-793"><span class="linenos">793</span></a> <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> -</span><span id="Tokenizer.tokenize-794"><a href="#Tokenizer.tokenize-794"><span class="linenos">794</span></a> <span class="n">start</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">50</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> -</span><span id="Tokenizer.tokenize-795"><a href="#Tokenizer.tokenize-795"><span class="linenos">795</span></a> <span class="n">end</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="mi">50</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> -</span><span id="Tokenizer.tokenize-796"><a href="#Tokenizer.tokenize-796"><span class="linenos">796</span></a> <span class="n">context</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">]</span> -</span><span id="Tokenizer.tokenize-797"><a href="#Tokenizer.tokenize-797"><span class="linenos">797</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Error tokenizing '</span><span class="si">{</span><span class="n">context</span><span class="si">}</span><span class="s2">'"</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">e</span> -</span><span id="Tokenizer.tokenize-798"><a href="#Tokenizer.tokenize-798"><span class="linenos">798</span></a> -</span><span id="Tokenizer.tokenize-799"><a href="#Tokenizer.tokenize-799"><span class="linenos">799</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Tokenizer.tokenize-789"><a href="#Tokenizer.tokenize-789"><span class="linenos">789</span></a> <span class="k">def</span> <span class="nf">tokenize</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">sql</span><span class="p">:</span> <span class="nb">str</span><span class="p">)</span> <span class="o">-></span> <span class="n">t</span><span class="o">.</span><span class="n">List</span><span class="p">[</span><span class="n">Token</span><span class="p">]:</span> +</span><span id="Tokenizer.tokenize-790"><a href="#Tokenizer.tokenize-790"><span class="linenos">790</span></a><span class="w"> </span><span class="sd">"""Returns a list of tokens corresponding to the SQL string `sql`."""</span> +</span><span id="Tokenizer.tokenize-791"><a href="#Tokenizer.tokenize-791"><span class="linenos">791</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span> +</span><span id="Tokenizer.tokenize-792"><a href="#Tokenizer.tokenize-792"><span class="linenos">792</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span> <span class="o">=</span> <span class="n">sql</span> +</span><span id="Tokenizer.tokenize-793"><a href="#Tokenizer.tokenize-793"><span class="linenos">793</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">sql</span><span class="p">)</span> +</span><span id="Tokenizer.tokenize-794"><a href="#Tokenizer.tokenize-794"><span class="linenos">794</span></a> +</span><span id="Tokenizer.tokenize-795"><a href="#Tokenizer.tokenize-795"><span class="linenos">795</span></a> <span class="k">try</span><span class="p">:</span> +</span><span id="Tokenizer.tokenize-796"><a href="#Tokenizer.tokenize-796"><span class="linenos">796</span></a> <span class="bp">self</span><span class="o">.</span><span class="n">_scan</span><span class="p">()</span> +</span><span id="Tokenizer.tokenize-797"><a href="#Tokenizer.tokenize-797"><span class="linenos">797</span></a> <span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span> +</span><span id="Tokenizer.tokenize-798"><a href="#Tokenizer.tokenize-798"><span class="linenos">798</span></a> <span class="n">start</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">-</span> <span class="mi">50</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> +</span><span id="Tokenizer.tokenize-799"><a href="#Tokenizer.tokenize-799"><span class="linenos">799</span></a> <span class="n">end</span> <span class="o">=</span> <span class="nb">min</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="mi">50</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span> <span class="o">-</span> <span class="mi">1</span><span class="p">)</span> +</span><span id="Tokenizer.tokenize-800"><a href="#Tokenizer.tokenize-800"><span class="linenos">800</span></a> <span class="n">context</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">]</span> +</span><span id="Tokenizer.tokenize-801"><a href="#Tokenizer.tokenize-801"><span class="linenos">801</span></a> <span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Error tokenizing '</span><span class="si">{</span><span class="n">context</span><span class="si">}</span><span class="s2">'"</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">e</span> +</span><span id="Tokenizer.tokenize-802"><a href="#Tokenizer.tokenize-802"><span class="linenos">802</span></a> +</span><span id="Tokenizer.tokenize-803"><a href="#Tokenizer.tokenize-803"><span class="linenos">803</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">tokens</span> </span></pre></div> - <div class="docstring"><p>Returns a list of tokens corresponding to the SQL string <code>sql</code>.</p> + <div class="docstring"><p>Returns a list of tokens corresponding to the SQL string <code><a href="#Tokenizer.sql">sql</a></code>.</p> </div> @@ -6994,17 +7428,50 @@ </div> <a class="headerlink" href="#Tokenizer.peek"></a> - <div class="pdoc-code codehilite"><pre><span></span><span id="Tokenizer.peek-867"><a href="#Tokenizer.peek-867"><span class="linenos">867</span></a> <span class="k">def</span> <span class="nf">peek</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">i</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> -</span><span id="Tokenizer.peek-868"><a href="#Tokenizer.peek-868"><span class="linenos">868</span></a> <span class="n">i</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="n">i</span> -</span><span id="Tokenizer.peek-869"><a href="#Tokenizer.peek-869"><span class="linenos">869</span></a> <span class="k">if</span> <span class="n">i</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> -</span><span id="Tokenizer.peek-870"><a href="#Tokenizer.peek-870"><span class="linenos">870</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> -</span><span id="Tokenizer.peek-871"><a href="#Tokenizer.peek-871"><span class="linenos">871</span></a> <span class="k">return</span> <span class="s2">""</span> + <div class="pdoc-code codehilite"><pre><span></span><span id="Tokenizer.peek-871"><a href="#Tokenizer.peek-871"><span class="linenos">871</span></a> <span class="k">def</span> <span class="nf">peek</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">i</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span> <span class="o">-></span> <span class="nb">str</span><span class="p">:</span> +</span><span id="Tokenizer.peek-872"><a href="#Tokenizer.peek-872"><span class="linenos">872</span></a> <span class="n">i</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_current</span> <span class="o">+</span> <span class="n">i</span> +</span><span id="Tokenizer.peek-873"><a href="#Tokenizer.peek-873"><span class="linenos">873</span></a> <span class="k">if</span> <span class="n">i</span> <span class="o"><</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">:</span> +</span><span id="Tokenizer.peek-874"><a href="#Tokenizer.peek-874"><span class="linenos">874</span></a> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">sql</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> +</span><span id="Tokenizer.peek-875"><a href="#Tokenizer.peek-875"><span class="linenos">875</span></a> <span class="k">return</span> <span class="s2">""</span> </span></pre></div> </div> + <div id="Tokenizer.size" class="classattr"> + <div class="attr variable"> + <span class="name">size</span> + + + </div> + <a class="headerlink" href="#Tokenizer.size"></a> + + + + </div> + <div id="Tokenizer.sql" class="classattr"> + <div class="attr variable"> + <span class="name">sql</span> + + + </div> + <a class="headerlink" href="#Tokenizer.sql"></a> + + + + </div> + <div id="Tokenizer.tokens" class="classattr"> + <div class="attr variable"> + <span class="name">tokens</span> + + + </div> + <a class="headerlink" href="#Tokenizer.tokens"></a> + + + + </div> </section> </main> <script> |