261 Commits

Author SHA1 Message Date
Andreas Dangel
38ce869b12 Merge branch 'pr-2332'
[plsql] Fixed Execute Immediate statement parsing
2020-03-06 10:24:26 +01:00
Andreas Dangel
7bf8493307 Merge branch 'pr-2331'
[plsql] Fix in Comment statement
2020-03-06 10:19:48 +01:00
Andreas Dangel
a682d36745 [plsql] Remove CursorBody and keep CursorSpecification 2020-03-06 10:18:27 +01:00
Andreas Dangel
d8afacd6a3 Formatting 2020-03-06 09:47:17 +01:00
Piotr Szymanski
8ae59231a2 fixed and turned on Execute Immediate 2020-03-05 17:47:45 +01:00
Piotr Szymanski
72587706b3 small fix in Comment statement, removed not needed cursorSpecification, code formatting 2020-03-05 16:50:46 +01:00
Andreas Dangel
d759f8126b Merge branch 'pr-2327'
[plsql] Parsing of WHERE CURRENT OF added
2020-03-05 12:22:05 +01:00
Andreas Dangel
2c68e13598 [plsql] Refactor XMLROOT and XMLFOREST
* Undo changes for XMLFOREST - <AS> is not optional alone
* Remove token for keyword "VALUE"
2020-03-05 12:04:07 +01:00
Andreas Dangel
3329374214 [plsql] Refactor ExtractExpression
* Separate helper productions for datetime/xml
* Use StringLiteral for xpath and namespace
2020-03-05 12:02:56 +01:00
Piotr Szymanski
97043a75c5 parsing where_current_of added 2020-03-04 17:22:15 +01:00
Piotr Szymanski
69025d7522 extract(xml), xml_root, xml_forest fix 2020-03-04 15:10:24 +01:00
Clément Fournier
23cb9f41fb Fix PLSQL 2020-01-19 05:54:16 +01:00
Clément Fournier
99700d7526 Extract changes from #2166 to 7.0.x
* Make Java nodes text-available
* Introduce shared JavaccToken in pmd-core
* Use factory to produce char streams

Tests are still on java-grammar,
since they use the DSL & newer
AST structure.

This is to prepare for other changes
that concern all javacc languages and
should not be done on java-grammar
2020-01-10 21:15:15 +01:00
Clément Fournier
271efff289 [plsql] Use token::getImage instead of token::toString in grammar
If we change token.toString to be more descriptive
(eg display kind), the parser breaks. This prepares
changes for 7.0
2020-01-10 18:13:17 +01:00
Clément Fournier
af537034a9 Use getters for tokens in javacc grammars 2020-01-06 15:01:18 +01:00
Andreas Dangel
1d82918efa Merge branch 'pr-2184'
[plsql] Fix DDLCommands parsing
2020-01-05 19:20:29 +01:00
Andreas Dangel
e345e811be [plsql] Use ReadPastNextOccurrence rather than SkipPastNextToken
The token SQLPLUS_TERMINATOR is useless, since the token ";" is
matched before. So, we always skipped till the end of the file.

Improved the image of the skipped nodes, so that it can be of some
use.

Note: This will fix the problem #2009, but it doesn't parse
DDL Commands fully. It just skips past the next ";".
2019-12-24 11:37:41 +01:00
Andreas Dangel
e230027f9a [plsql] Support COMMENT statement
Ref #2009
2019-12-24 11:17:59 +01:00
Andreas Dangel
4599b6989a [plsql] Fix StringLiteral token
StringLiterals can use a custom quote delimiter that
marks the end of a string literal. This quote delimiter
is only effective together with the quote character.
A single quote character, that is not preceded by the
delimiter, should be allowed.

Additionally, the ASTStringLiteral node gives
now access to the plain string value of the
literal without the quoting.

Fixes #2008
2019-12-23 18:24:14 +01:00
Andreas Dangel
a24e85488e Merge branch 'pr-1986' 2019-09-08 15:39:49 +02:00
Andreas Dangel
26600e68c7 Merge branch 'pr-1977' 2019-09-08 15:24:35 +02:00
Andreas Dangel
20d34103ce [plsql] Add basic support for with clause 2019-09-08 15:20:00 +02:00
Andreas Dangel
dea41f1b6f Merge branch 'pr-1976' 2019-09-08 12:03:54 +02:00
Andreas Dangel
854cd4c700 Merge branch 'pr-1975' 2019-09-08 12:00:19 +02:00
Andreas Dangel
aee182b0b8 Merge branch 'pr-1974' 2019-09-08 11:47:49 +02:00
Andreas Dangel
f283a663a3 [plsql] New node ForUpdateClause 2019-09-08 11:16:46 +02:00
Andreas Dangel
de21a9008f [plsql] Remove extra tokens, remove reserved words as identifiers 2019-09-08 11:12:51 +02:00
Piotr Szymanski
5a444276f8 simplified lookahead for blocks and proc/func 2019-08-20 21:22:42 +02:00
Piotr Szymanski
dbe3840db1 fix for skipping sql starting with WITH 2019-08-14 14:28:13 +02:00
Piotr Szymanski
a953433f5c lookahead in MultiplicativeExpression 2019-08-14 13:45:02 +02:00
Piotr Szymanski
28b67091f0 fix for trim function with record type variable 2019-08-14 11:51:12 +02:00
Piotr Szymanski
182ba549ba fixes for referencing record type variables 2019-08-14 10:53:56 +02:00
Piotr Szymanski
f9ec14c309 issue-1947 added ForUpdateClause 2019-08-13 18:33:14 +02:00
Piotr Szymanski
363ceadeaa issue-1947 added ForUpdateClause 2019-08-13 18:15:26 +02:00
Andreas Dangel
50d211eae4 [plsql] Introduce new node OuterJoinExpression 2019-07-20 17:32:31 +02:00
Andreas Dangel
fdb31686f0 Fixes #1902 [pslql] ParseException when parsing (+) 2019-07-19 12:21:04 +02:00
Andreas Dangel
9b095e113d [plsql] Fix JoinClause preceded by subquery
Fixes #1879
2019-06-29 09:50:45 +02:00
Andreas Dangel
76d9d83894 Merge branch 'pr-1886' 2019-06-28 22:07:50 +02:00
Andreas Dangel
26832f5d2a Merge branch 'pr-1885' 2019-06-28 22:00:02 +02:00
Andreas Dangel
f6f4512a92 Update release notes, refs #1885 2019-06-28 21:59:34 +02:00
Andreas Dangel
f05cde6f24 [plsql] Fix lookahead for CaseExpression 2019-06-28 21:56:16 +02:00
Hugo Araya Nash
5570e65baf [plsql] Correct case expression 2019-06-28 21:56:16 +02:00
Andreas Dangel
43dde7f8bb Merge branch 'pr-1876' 2019-06-28 21:44:39 +02:00
Andreas Dangel
3e5b3d66aa [plsql] Fix PrimaryPrefix: parse literals first 2019-06-28 21:42:09 +02:00
Andreas Dangel
6b852e4e98 Merge branch 'pr-1883' 2019-06-28 20:48:03 +02:00
Andreas Dangel
930309bb61 Update release notes, fixes #1873, refs #1883 2019-06-28 20:46:12 +02:00
Andreas Dangel
598c9b79ad [plsql] Simplify condition / compound condition 2019-06-28 20:42:38 +02:00
Andreas Dangel
b97a1f29dd [plsql] Keep the grammar compatible 2019-06-28 20:31:25 +02:00
Andreas Dangel
a84869153d [plsql] Fixes #1878 2019-06-27 19:49:01 +02:00
Hugo Araya Nash
c3591dcc1a [plsql] Suport table alias for Insert Clause 2019-06-24 20:02:01 +02:00