summaryrefslogtreecommitdiff
path: root/sqlparse/lexer.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix typostypoVictor Uriarte2017-11-291-1/+1
|
* Fix encoding logic/orderVictor Uriarte2017-01-101-5/+6
| | | | | | - If user provides an encoding value, use it instead of trying to _guess_ first. - If no value is provided, then decode with default of utf-8, otherwise try with unicode-escape
* Fix #315 support utf-8 by defaultTao Wang2017-01-111-1/+1
| | | | Signed-off-by: Tao Wang <twang2218@gmail.com>
* Correct license link (fixes #288).Andi Albrecht2016-09-141-1/+1
|
* Decode bytes to unicode in Lexer.get_tokens().Oleg Broytman2016-08-311-5/+16
| | | | | | | Raise TypeError if the input is neither bytes in a known encoding nor unicode nor a file-like object (file, StringIO). Remove function u(). Add bytes_type to compat. Add tests for non-ascii.
* Revert "Parse double dollars (PostgreSQL) as literal strings (fixes #277)."Victor Uriarte2016-08-131-5/+2
| | | | This reverts commit 2893bd1857d685cf892beac3a7429d03cf1a09f1.
* Parse double dollars (PostgreSQL) as literal strings (fixes #277).Andi Albrecht2016-08-131-2/+5
|
* Move file_types list to compat module.Andi Albrecht2016-08-101-9/+1
|
* Fix a bug: recognize file (Python 2) as a streamOleg Broytman2016-08-061-1/+7
|
* Fix parsing of streams (fixes #273).Andi Albrecht2016-07-221-1/+3
|
* Misc. small code clean-up/commentsVictor Uriarte2016-06-181-1/+1
|
* Redo unicode-encoding on lexer.pyVictor Uriarte2016-06-111-11/+4
|
* Allow re to compile onceVictor Uriarte2016-06-041-12/+6
| | | | | Otherwise re will need to recompile everytime a call to tokenize is made.
* Simplify multi-line commentsVictor Uriarte2016-06-041-28/+6
|
* Add or Update copyright year to filesVictor Uriarte2016-06-041-3/+3
|
* Replace iter(range(len(...))) with enumerateVictor Uriarte2016-06-021-5/+4
|
* Pass encoding into lexer as a parameterVictor Uriarte2016-06-021-7/+4
|
* Simplify handling of encoding in lexer.pyVictor Uriarte2016-05-291-22/+10
|
* Remove encoding guessing on lexer.pyVictor Uriarte2016-05-291-11/+1
|
* Refactor lexer.tokens_unprocessedVictor Uriarte2016-05-291-60/+27
| | | | | | | Remove unused return pos Remove redundant streamer func Remove unreached else statement Clean-up Lexer tokenization
* Bid Adieu to metaclassVictor Uriarte2016-05-291-40/+17
| | | | | | | | | | The singleton pattern isn't applicable since only one language is being implemented. Simplify Lexer initialization. Fix compat func `u` on Py3. Signature didn't match Py2. Feature isn't used yet.
* Merge process_state and __call__Victor Uriarte2016-05-291-34/+16
| | | | | | | | Other Changes: Only #pop state is used by multiline comments. Remove unused states Simplify RegEx compilation RegEx Exception too generic
* Merge process_tokendef and __call__Victor Uriarte2016-05-291-16/+6
| | | | Remove unused token_variants
* Remove assert statements from lexer.pyVictor Uriarte2016-05-291-19/+0
|
* Remove undocumented ws handlers from lexer.pyVictor Uriarte2016-05-291-15/+2
| | | | | Removing nl before tokenizing breaks comments (stripnl/stripall) Remove tab-expansion.
* Remove unused func/class/args in lexer.pyVictor Uriarte2016-05-291-60/+3
| | | | | | Remove unused apply_filters from lexer.py Remove unused filters function from lexer.py Remove unused arguments get_tokens func
* Refactor var Lexer.tokens & func is_keywordVictor Uriarte2016-05-291-68/+3
|
* Don't call is_keyword for the new 'USING(' regexkoljonen2016-05-151-1/+1
|
* Recognize USING as a keyword in 'USING(', not just in 'USING ('koljonen2016-05-141-0/+1
| | | | These were previously caught by (r'[^\W\d_]\w*(?=[.(])', tokens.Name), so I added a special regex just above that one.
* fix issue #215Shen Longxing2015-12-181-1/+1
| | | Add token for 'END WHILE'
* Cleanup module code.Andi Albrecht2015-10-261-1/+1
|
* Fix tab expansion for Python 3.Andi Albrecht2015-10-261-5/+7
|
* Use compat module for single Python 2/3 code base.Andi Albrecht2015-10-261-13/+16
| | | | This change includes minor fixes and code cleanup too.
* Recognize MSSQL temp tables and distinguish from MySQL comments (fixes #192).Andi Albrecht2015-07-261-3/+3
|
* Never interpret IN keyword as function name (fixes #183).Andi Albrecht2015-04-121-0/+3
|
* Fix other regex to identify comments starting with '#' character.Andi Albrecht2015-03-161-1/+1
|
* Support comments starting with '#' character (fixes #178).Andi Albrecht2015-03-161-1/+1
|
* get rid of tokens.Punctuation.ArrayIndex, add negative lookbehind for sqlite ↵Darik Gamble2015-03-041-2/+4
| | | | identifiers
* Allow identifiers to start with an underscore (fixes #175).Andi Albrecht2015-03-011-2/+1
|
* Recognize escaped backslashes within stringscasey2015-02-261-2/+1
| | | | | Previously if a single quoted string ended with an escaped backslash, parsing would not consider the string to be terminated.
* Fix of problem with multiline treated as stackable while /* /* */ is one ↵JacekPliszka2015-02-121-1/+7
| | | | comment, not two stacked
* (postgresql) Add support for square bracket array indexing, by darikg.Andi Albrecht2015-02-081-0/+1
| | | | Pull request #170 with trivial conflicts resolved.
* Add double precision as a built-in datatypeDarik Gamble2015-02-061-0/+1
|
* Fix a regression for identifiers with square bracktes notation (fixes #153).Andi Albrecht2014-12-011-1/+1
|
* Handle modulo operator without spacesGavin Wahl2014-08-071-1/+2
| | | | | | | `x %3` should be interpreted as a modulo operation, not a parameter marker. Co-authored-by: Rocky Meza <rmeza@fusionbox.com>
* Fix incorrect parsing of string literals with line breaks (fixes #118).Andi Albrecht2013-11-061-2/+2
|
* Merge pull request #112 from alexander-beedie/masterAndi Albrecht2013-10-231-1/+1
|\ | | | | extended JOIN token recognition/lexing (eg: FULL OUTER JOIN, NATURAL JOIN)
| * tighten up JOIN regexAlexander Beedie2013-10-171-1/+1
| | | | | | ensure the regex does not match against invalid permutations such as 'LEFT OUTER CROSS JOIN', since CROSS/NATURAL keywords were added
| * extend regex to allow recognition of 'NATURAL JOIN'Alexander Beedie2013-10-171-1/+1
| |
| * add keyword recognition for "FULL OUTER JOIN" and "CROSS JOIN"Alexander Beedie2013-09-021-1/+1
| |