@designliquido/lincones-sqlite 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fontes/avaliador-sintatico/avaliador-sintatico.d.ts +1 -1
- package/fontes/comum/babel.config.d.ts +5 -0
- package/fontes/comum/babel.config.js +7 -0
- package/fontes/comum/babel.config.js.map +1 -0
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico-base.d.ts +8 -5
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico-base.js +81 -21
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico-base.js.map +1 -1
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico-sql-ansi.d.ts +7 -0
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico-sql-ansi.js +12 -0
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico-sql-ansi.js.map +1 -0
- package/fontes/comum/fontes/avaliador-sintatico/index.d.ts +1 -0
- package/fontes/comum/fontes/avaliador-sintatico/index.js +1 -0
- package/fontes/comum/fontes/avaliador-sintatico/index.js.map +1 -1
- package/fontes/comum/fontes/comandos/atualizar.d.ts +3 -9
- package/fontes/comum/fontes/comandos/atualizar.js.map +1 -1
- package/fontes/comum/fontes/comandos/criar.d.ts +2 -1
- package/fontes/comum/fontes/comandos/criar.js +2 -1
- package/fontes/comum/fontes/comandos/criar.js.map +1 -1
- package/fontes/comum/fontes/comandos/excluir.d.ts +3 -2
- package/fontes/comum/fontes/comandos/excluir.js.map +1 -1
- package/fontes/comum/fontes/comandos/inserir.d.ts +3 -3
- package/fontes/comum/fontes/comandos/inserir.js.map +1 -1
- package/fontes/comum/fontes/construtos/coluna-e-valor.d.ts +8 -0
- package/fontes/comum/fontes/construtos/coluna-e-valor.js +16 -0
- package/fontes/comum/fontes/construtos/coluna-e-valor.js.map +1 -0
- package/fontes/comum/fontes/construtos/coluna.d.ts +3 -1
- package/fontes/comum/fontes/construtos/coluna.js +21 -1
- package/fontes/comum/fontes/construtos/coluna.js.map +1 -1
- package/fontes/comum/fontes/construtos/condicao.d.ts +6 -4
- package/fontes/comum/fontes/construtos/condicao.js +11 -1
- package/fontes/comum/fontes/construtos/condicao.js.map +1 -1
- package/fontes/comum/fontes/construtos/construto.d.ts +3 -0
- package/fontes/comum/fontes/construtos/construto.js +7 -0
- package/fontes/comum/fontes/construtos/construto.js.map +1 -0
- package/fontes/comum/fontes/construtos/index.d.ts +8 -0
- package/fontes/comum/fontes/construtos/index.js +8 -0
- package/fontes/comum/fontes/construtos/index.js.map +1 -1
- package/fontes/comum/fontes/construtos/literal.d.ts +7 -0
- package/fontes/comum/fontes/construtos/literal.js +16 -0
- package/fontes/comum/fontes/construtos/literal.js.map +1 -0
- package/fontes/comum/fontes/construtos/operacao-alteracao-tabela.d.ts +3 -1
- package/fontes/comum/fontes/construtos/operacao-alteracao-tabela.js +6 -1
- package/fontes/comum/fontes/construtos/operacao-alteracao-tabela.js.map +1 -1
- package/fontes/comum/fontes/construtos/parametro-anonimo.d.ts +4 -0
- package/fontes/comum/fontes/construtos/parametro-anonimo.js +11 -0
- package/fontes/comum/fontes/construtos/parametro-anonimo.js.map +1 -0
- package/fontes/comum/fontes/construtos/parametro-nomeado.d.ts +6 -0
- package/fontes/comum/fontes/construtos/parametro-nomeado.js +15 -0
- package/fontes/comum/fontes/construtos/parametro-nomeado.js.map +1 -0
- package/fontes/comum/fontes/construtos/referencia-coluna.d.ts +6 -0
- package/fontes/comum/fontes/construtos/referencia-coluna.js +15 -0
- package/fontes/comum/fontes/construtos/referencia-coluna.js.map +1 -0
- package/fontes/comum/fontes/construtos/restricao.d.ts +3 -1
- package/fontes/comum/fontes/construtos/restricao.js +24 -1
- package/fontes/comum/fontes/construtos/restricao.js.map +1 -1
- package/fontes/comum/fontes/index.d.ts +7 -0
- package/fontes/comum/{index.js → fontes/index.js} +7 -8
- package/fontes/comum/fontes/index.js.map +1 -0
- package/fontes/comum/fontes/lexador/index.d.ts +1 -0
- package/fontes/comum/fontes/lexador/index.js +1 -0
- package/fontes/comum/fontes/lexador/index.js.map +1 -1
- package/fontes/comum/fontes/lexador/lexador-base.d.ts +26 -0
- package/fontes/comum/fontes/lexador/lexador-base.js +211 -0
- package/fontes/comum/fontes/lexador/lexador-base.js.map +1 -0
- package/fontes/comum/fontes/lexador/lexador-sql-ansi.d.ts +11 -0
- package/fontes/comum/fontes/lexador/lexador-sql-ansi.js +47 -0
- package/fontes/comum/fontes/lexador/lexador-sql-ansi.js.map +1 -0
- package/fontes/comum/fontes/lexador/lexador.d.ts +2 -23
- package/fontes/comum/fontes/lexador/lexador.js +5 -198
- package/fontes/comum/fontes/lexador/lexador.js.map +1 -1
- package/fontes/comum/fontes/lexador/palavras-reservadas/index.d.ts +2 -0
- package/fontes/comum/fontes/lexador/palavras-reservadas/index.js +19 -0
- package/fontes/comum/fontes/lexador/palavras-reservadas/index.js.map +1 -0
- package/fontes/comum/fontes/{palavras-reservadas.d.ts → lexador/palavras-reservadas/lincones.d.ts} +1 -0
- package/fontes/comum/fontes/{palavras-reservadas.js → lexador/palavras-reservadas/lincones.js} +3 -2
- package/fontes/comum/fontes/lexador/palavras-reservadas/lincones.js.map +1 -0
- package/fontes/comum/fontes/lexador/palavras-reservadas/sql.d.ts +37 -0
- package/fontes/comum/fontes/lexador/palavras-reservadas/sql.js +43 -0
- package/fontes/comum/fontes/lexador/palavras-reservadas/sql.js.map +1 -0
- package/fontes/comum/fontes/{tipos-de-simbolos.d.ts → tipos-de-simbolos/index.d.ts} +3 -0
- package/fontes/comum/fontes/{tipos-de-simbolos.js → tipos-de-simbolos/index.js} +4 -1
- package/fontes/comum/fontes/tipos-de-simbolos/index.js.map +1 -0
- package/fontes/comum/fontes/tradutor/index.d.ts +2 -32
- package/fontes/comum/fontes/tradutor/index.js +15 -235
- package/fontes/comum/fontes/tradutor/index.js.map +1 -1
- package/fontes/comum/fontes/tradutor/tradutor-reverso-sql-ansi.d.ts +7 -0
- package/fontes/comum/fontes/tradutor/tradutor-reverso-sql-ansi.js +12 -0
- package/fontes/comum/fontes/tradutor/tradutor-reverso-sql-ansi.js.map +1 -0
- package/fontes/comum/fontes/tradutor/tradutor-sql-ansi.d.ts +33 -0
- package/fontes/comum/fontes/tradutor/tradutor-sql-ansi.js +246 -0
- package/fontes/comum/fontes/tradutor/tradutor-sql-ansi.js.map +1 -0
- package/fontes/comum/testes/avaliador-sintatico.test.js +85 -14
- package/fontes/comum/testes/avaliador-sintatico.test.js.map +1 -1
- package/fontes/comum/testes/construtos.test.js +52 -0
- package/fontes/comum/testes/construtos.test.js.map +1 -0
- package/fontes/comum/testes/lexador-sql-ansi.test.d.ts +1 -0
- package/fontes/comum/testes/lexador-sql-ansi.test.js +83 -0
- package/fontes/comum/testes/lexador-sql-ansi.test.js.map +1 -0
- package/fontes/comum/testes/tradutor-sql-ansi.test.d.ts +1 -0
- package/fontes/comum/testes/{tradutor.test.js → tradutor-sql-ansi.test.js} +29 -25
- package/fontes/comum/testes/tradutor-sql-ansi.test.js.map +1 -0
- package/fontes/infraestrutura/cliente-sqlite.d.ts +1 -1
- package/fontes/infraestrutura/cliente-sqlite.js +10 -9
- package/fontes/infraestrutura/cliente-sqlite.js.map +1 -1
- package/fontes/lincones-sqlite.d.ts +4 -3
- package/fontes/lincones-sqlite.js +5 -4
- package/fontes/lincones-sqlite.js.map +1 -1
- package/fontes/tradutor/index.d.ts +2 -6
- package/fontes/tradutor/index.js +2 -87
- package/fontes/tradutor/index.js.map +1 -1
- package/package.json +1 -1
- package/fontes/comum/fontes/palavras-reservadas.js.map +0 -1
- package/fontes/comum/fontes/tipos-de-simbolos.js.map +0 -1
- package/fontes/comum/index.d.ts +0 -8
- package/fontes/comum/index.js.map +0 -1
- package/fontes/comum/testes/tradutor.test.js.map +0 -1
- /package/fontes/comum/testes/{tradutor.test.d.ts → construtos.test.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lexador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B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC;YAChC,IAAI,CAAC,aAAa,EAAE,CAAC;QACzB,CAAC;QAED,OAAO;YACH,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;SACF,CAAC;IACxB,CAAC;CACJ;AAzCD,wCAyCC"}
|
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
import { SimboloInterface } from '../interfaces';
|
|
2
1
|
import { RetornoLexador } from '../interfaces/retornos';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
atual: number;
|
|
6
|
-
linha: number;
|
|
7
|
-
codigo: string[];
|
|
8
|
-
simbolos: SimboloInterface[];
|
|
9
|
-
erros: any[];
|
|
10
|
-
eDigito(caractere: string): boolean;
|
|
11
|
-
eAlfabeto(caractere: string): boolean;
|
|
12
|
-
eAlfabetoOuDigito(caractere: string): boolean;
|
|
13
|
-
eFinalDoCodigo(): boolean;
|
|
14
|
-
eUltimaLinha(): boolean;
|
|
15
|
-
eFinalDaLinha(): boolean;
|
|
16
|
-
simboloAtual(): string;
|
|
17
|
-
avancar(): void;
|
|
18
|
-
proximoSimbolo(): string;
|
|
19
|
-
simboloAnterior(): string;
|
|
20
|
-
analisarNumero(): void;
|
|
21
|
-
analisarTexto(delimitador?: string): void;
|
|
22
|
-
adicionarSimbolo(tipo: string, literal?: any): void;
|
|
23
|
-
identificarPalavraChave(): void;
|
|
24
|
-
analisarToken(): void;
|
|
2
|
+
import { LexadorBase } from './lexador-base';
|
|
3
|
+
export declare class Lexador extends LexadorBase {
|
|
25
4
|
mapear(codigo: string[]): RetornoLexador;
|
|
26
5
|
}
|
|
@@ -1,204 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.Lexador = void 0;
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const tipos_de_simbolos_1 = __importDefault(require("../tipos-de-simbolos"));
|
|
10
|
-
class Lexador {
|
|
11
|
-
eDigito(caractere) {
|
|
12
|
-
return caractere >= '0' && caractere <= '9';
|
|
13
|
-
}
|
|
14
|
-
eAlfabeto(caractere) {
|
|
15
|
-
const acentuacoes = [
|
|
16
|
-
'á',
|
|
17
|
-
'Á',
|
|
18
|
-
'ã',
|
|
19
|
-
'Ã',
|
|
20
|
-
'â',
|
|
21
|
-
'Â',
|
|
22
|
-
'à',
|
|
23
|
-
'À',
|
|
24
|
-
'é',
|
|
25
|
-
'É',
|
|
26
|
-
'ê',
|
|
27
|
-
'Ê',
|
|
28
|
-
'í',
|
|
29
|
-
'Í',
|
|
30
|
-
'ó',
|
|
31
|
-
'Ó',
|
|
32
|
-
'õ',
|
|
33
|
-
'Õ',
|
|
34
|
-
'ô',
|
|
35
|
-
'Ô',
|
|
36
|
-
'ú',
|
|
37
|
-
'Ú',
|
|
38
|
-
'ç',
|
|
39
|
-
'Ç',
|
|
40
|
-
'_'
|
|
41
|
-
];
|
|
42
|
-
return ((caractere >= 'a' && caractere <= 'z') ||
|
|
43
|
-
(caractere >= 'A' && caractere <= 'Z') ||
|
|
44
|
-
acentuacoes.includes(caractere));
|
|
45
|
-
}
|
|
46
|
-
eAlfabetoOuDigito(caractere) {
|
|
47
|
-
return this.eDigito(caractere) || this.eAlfabeto(caractere);
|
|
48
|
-
}
|
|
49
|
-
eFinalDoCodigo() {
|
|
50
|
-
return (this.eUltimaLinha() &&
|
|
51
|
-
this.codigo[this.codigo.length - 1].length <= this.atual);
|
|
52
|
-
}
|
|
53
|
-
eUltimaLinha() {
|
|
54
|
-
return this.linha >= this.codigo.length - 1;
|
|
55
|
-
}
|
|
56
|
-
eFinalDaLinha() {
|
|
57
|
-
if (this.codigo.length === this.linha) {
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
return this.atual >= this.codigo[this.linha].length;
|
|
61
|
-
}
|
|
62
|
-
simboloAtual() {
|
|
63
|
-
if (this.eFinalDaLinha())
|
|
64
|
-
return '\0';
|
|
65
|
-
return this.codigo[this.linha].charAt(this.atual);
|
|
66
|
-
}
|
|
67
|
-
avancar() {
|
|
68
|
-
this.atual += 1;
|
|
69
|
-
if (this.eFinalDaLinha() && !this.eUltimaLinha()) {
|
|
70
|
-
this.linha++;
|
|
71
|
-
this.atual = 0;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
proximoSimbolo() {
|
|
75
|
-
return this.codigo[this.linha].charAt(this.atual + 1);
|
|
76
|
-
}
|
|
77
|
-
simboloAnterior() {
|
|
78
|
-
return this.codigo[this.linha].charAt(this.atual - 1);
|
|
79
|
-
}
|
|
80
|
-
analisarNumero() {
|
|
81
|
-
while (this.eDigito(this.simboloAtual())) {
|
|
82
|
-
this.avancar();
|
|
83
|
-
}
|
|
84
|
-
if (this.simboloAtual() == '.' && this.eDigito(this.proximoSimbolo())) {
|
|
85
|
-
this.avancar();
|
|
86
|
-
while (this.eDigito(this.simboloAtual())) {
|
|
87
|
-
this.avancar();
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
const numeroCompleto = this.codigo[this.linha].substring(this.inicioSimbolo, this.atual);
|
|
91
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.NUMERO, parseFloat(numeroCompleto));
|
|
92
|
-
}
|
|
93
|
-
analisarTexto(delimitador = '"') {
|
|
94
|
-
while (this.simboloAtual() !== delimitador && !this.eFinalDoCodigo()) {
|
|
95
|
-
this.avancar();
|
|
96
|
-
}
|
|
97
|
-
if (this.eFinalDoCodigo()) {
|
|
98
|
-
this.erros.push({
|
|
99
|
-
linha: this.linha + 1,
|
|
100
|
-
caractere: this.simboloAnterior(),
|
|
101
|
-
mensagem: 'Texto não finalizado.'
|
|
102
|
-
});
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
const valor = this.codigo[this.linha].substring(this.inicioSimbolo + 1, this.atual);
|
|
106
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.TEXTO, valor);
|
|
107
|
-
}
|
|
108
|
-
adicionarSimbolo(tipo, literal = null) {
|
|
109
|
-
const texto = this.codigo[this.linha].substring(this.inicioSimbolo, this.atual);
|
|
110
|
-
this.simbolos.push(new simbolo_1.Simbolo(tipo, literal || texto, literal, this.linha + 1));
|
|
111
|
-
}
|
|
112
|
-
identificarPalavraChave() {
|
|
113
|
-
while (this.eAlfabetoOuDigito(this.simboloAtual())) {
|
|
114
|
-
this.avancar();
|
|
115
|
-
}
|
|
116
|
-
const codigo = this.codigo[this.linha].substring(this.inicioSimbolo, this.atual).toLowerCase();
|
|
117
|
-
const tipo = codigo in palavras_reservadas_1.default
|
|
118
|
-
? palavras_reservadas_1.default[codigo]
|
|
119
|
-
: tipos_de_simbolos_1.default.IDENTIFICADOR;
|
|
120
|
-
this.adicionarSimbolo(tipo);
|
|
121
|
-
}
|
|
122
|
-
analisarToken() {
|
|
123
|
-
const caractere = this.simboloAtual();
|
|
124
|
-
switch (caractere) {
|
|
125
|
-
// Esta sessão ignora espaços em branco na tokenização.
|
|
126
|
-
case ' ':
|
|
127
|
-
case '\0':
|
|
128
|
-
case '\r':
|
|
129
|
-
case '\t':
|
|
130
|
-
this.avancar();
|
|
131
|
-
break;
|
|
132
|
-
case ';':
|
|
133
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.PONTO_VIRGULA, ';');
|
|
134
|
-
//this.linha++;
|
|
135
|
-
this.avancar();
|
|
136
|
-
break;
|
|
137
|
-
case '"':
|
|
138
|
-
this.avancar();
|
|
139
|
-
this.analisarTexto('"');
|
|
140
|
-
this.avancar();
|
|
141
|
-
break;
|
|
142
|
-
case "'":
|
|
143
|
-
this.avancar();
|
|
144
|
-
this.analisarTexto("'");
|
|
145
|
-
this.avancar();
|
|
146
|
-
break;
|
|
147
|
-
case '(':
|
|
148
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.PARENTESE_ESQUERDO, '(');
|
|
149
|
-
this.avancar();
|
|
150
|
-
break;
|
|
151
|
-
case ')':
|
|
152
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.PARENTESE_DIREITO, ')');
|
|
153
|
-
this.avancar();
|
|
154
|
-
break;
|
|
155
|
-
case ',':
|
|
156
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.VIRGULA, ',');
|
|
157
|
-
this.avancar();
|
|
158
|
-
break;
|
|
159
|
-
case '=':
|
|
160
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.IGUAL, '=');
|
|
161
|
-
this.avancar();
|
|
162
|
-
break;
|
|
163
|
-
case '*':
|
|
164
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.TUDO, '*');
|
|
165
|
-
this.avancar();
|
|
166
|
-
break;
|
|
167
|
-
case '<':
|
|
168
|
-
this.avancar();
|
|
169
|
-
if (this.simboloAtual() === '=') {
|
|
170
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.MENOR_IGUAL);
|
|
171
|
-
this.avancar();
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.MENOR);
|
|
175
|
-
}
|
|
176
|
-
break;
|
|
177
|
-
case '>':
|
|
178
|
-
this.avancar();
|
|
179
|
-
if (this.simboloAtual() === '=') {
|
|
180
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.MAIOR_IGUAL);
|
|
181
|
-
this.avancar();
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
this.adicionarSimbolo(tipos_de_simbolos_1.default.MAIOR);
|
|
185
|
-
}
|
|
186
|
-
break;
|
|
187
|
-
default:
|
|
188
|
-
if (this.eDigito(caractere))
|
|
189
|
-
this.analisarNumero();
|
|
190
|
-
else if (this.eAlfabeto(caractere))
|
|
191
|
-
this.identificarPalavraChave();
|
|
192
|
-
else {
|
|
193
|
-
this.erros.push({
|
|
194
|
-
linha: this.linha + 1,
|
|
195
|
-
caractere: caractere,
|
|
196
|
-
mensagem: 'Caractere inesperado.'
|
|
197
|
-
});
|
|
198
|
-
this.avancar();
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
4
|
+
const lexador_base_1 = require("./lexador-base");
|
|
5
|
+
class Lexador extends lexador_base_1.LexadorBase {
|
|
202
6
|
mapear(codigo) {
|
|
203
7
|
this.inicioSimbolo = 0;
|
|
204
8
|
this.atual = 0;
|
|
@@ -206,6 +10,9 @@ class Lexador {
|
|
|
206
10
|
this.codigo = codigo || [''];
|
|
207
11
|
this.simbolos = [];
|
|
208
12
|
this.erros = [];
|
|
13
|
+
for (let iterador = 0; iterador < this.codigo.length; iterador++) {
|
|
14
|
+
this.codigo[iterador] += '\0';
|
|
15
|
+
}
|
|
209
16
|
while (!this.eFinalDoCodigo()) {
|
|
210
17
|
this.inicioSimbolo = this.atual;
|
|
211
18
|
this.analisarToken();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lexador.js","sourceRoot":"","sources":["../../../../../fontes/comum/fontes/lexador/lexador.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lexador.js","sourceRoot":"","sources":["../../../../../fontes/comum/fontes/lexador/lexador.ts"],"names":[],"mappings":";;;AACA,iDAA6C;AAE7C,MAAa,OAAQ,SAAQ,0BAAW;IACpC,MAAM,CAAC,MAAgB;QACnB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAEhB,KAAK,IAAI,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;YAC/D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC;QAClC,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;YAC5B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC;YAChC,IAAI,CAAC,aAAa,EAAE,CAAC;QACzB,CAAC;QAED,OAAO;YACH,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;SACF,CAAC;IACxB,CAAC;CACJ;AAvBD,0BAuBC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lincones"), exports);
|
|
18
|
+
__exportStar(require("./sql"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../fontes/comum/fontes/lexador/palavras-reservadas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,wCAAsB"}
|
package/fontes/comum/fontes/{palavras-reservadas.js → lexador/palavras-reservadas/lincones.js}
RENAMED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const tipos_de_simbolos_1 = __importDefault(require("
|
|
6
|
+
const tipos_de_simbolos_1 = __importDefault(require("../../tipos-de-simbolos"));
|
|
7
7
|
exports.default = {
|
|
8
8
|
adicionar: tipos_de_simbolos_1.default.ADICIONAR,
|
|
9
9
|
agrupar: tipos_de_simbolos_1.default.AGRUPAR,
|
|
@@ -21,6 +21,7 @@ exports.default = {
|
|
|
21
21
|
em: tipos_de_simbolos_1.default.EM,
|
|
22
22
|
estrangeira: tipos_de_simbolos_1.default.ESTRANGEIRA,
|
|
23
23
|
excluir: tipos_de_simbolos_1.default.EXCLUIR,
|
|
24
|
+
existir: tipos_de_simbolos_1.default.EXISTIR,
|
|
24
25
|
falso: tipos_de_simbolos_1.default.FALSO,
|
|
25
26
|
identidade: tipos_de_simbolos_1.default.IDENTIDADE,
|
|
26
27
|
incremento: tipos_de_simbolos_1.default.INCREMENTO,
|
|
@@ -54,4 +55,4 @@ exports.default = {
|
|
|
54
55
|
visao: tipos_de_simbolos_1.default.VISAO,
|
|
55
56
|
visão: tipos_de_simbolos_1.default.VISAO
|
|
56
57
|
};
|
|
57
|
-
//# sourceMappingURL=
|
|
58
|
+
//# sourceMappingURL=lincones.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lincones.js","sourceRoot":"","sources":["../../../../../../fontes/comum/fontes/lexador/palavras-reservadas/lincones.ts"],"names":[],"mappings":";;;;;AAAA,gFAAsD;AAEtD,kBAAe;IACX,SAAS,EAAE,2BAAe,CAAC,SAAS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,2BAAe,CAAC,QAAQ;IAClC,UAAU,EAAE,2BAAe,CAAC,UAAU;IACtC,QAAQ,EAAE,2BAAe,CAAC,QAAQ;IAClC,OAAO,EAAE,2BAAe,CAAC,OAAO;IAChC,SAAS,EAAE,2BAAe,CAAC,SAAS;IACpC,SAAS,EAAE,2BAAe,CAAC,SAAS;IACpC,EAAE,EAAE,2BAAe,CAAC,EAAE;IACtB,UAAU,EAAE,2BAAe,CAAC,UAAU;IACtC,MAAM,EAAE,2BAAe,CAAC,MAAM;IAC9B,KAAK,EAAE,2BAAe,CAAC,KAAK;IAC5B,KAAK,EAAE,2BAAe,CAAC,KAAK;IAC5B,KAAK,EAAE,2BAAe,CAAC,KAAK;IAC5B,OAAO,EAAE,2BAAe,CAAC,OAAO;IAChC,UAAU,EAAE,2BAAe,CAAC,UAAU;IACtC,KAAK,EAAE,2BAAe,CAAC,KAAK;IAC5B,KAAK,EAAE,2BAAe,CAAC,KAAK;CAC/B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
add: string;
|
|
3
|
+
alter: string;
|
|
4
|
+
and: string;
|
|
5
|
+
auto: string;
|
|
6
|
+
between: string;
|
|
7
|
+
column: string;
|
|
8
|
+
constraint: string;
|
|
9
|
+
create: string;
|
|
10
|
+
delete: string;
|
|
11
|
+
distinct: string;
|
|
12
|
+
false: string;
|
|
13
|
+
foreign: string;
|
|
14
|
+
from: string;
|
|
15
|
+
group: string;
|
|
16
|
+
identity: string;
|
|
17
|
+
increment: string;
|
|
18
|
+
insert: string;
|
|
19
|
+
integer: string;
|
|
20
|
+
key: string;
|
|
21
|
+
not: string;
|
|
22
|
+
null: string;
|
|
23
|
+
order: string;
|
|
24
|
+
primary: string;
|
|
25
|
+
references: string;
|
|
26
|
+
select: string;
|
|
27
|
+
set: string;
|
|
28
|
+
string: string;
|
|
29
|
+
table: string;
|
|
30
|
+
true: string;
|
|
31
|
+
unique: string;
|
|
32
|
+
update: string;
|
|
33
|
+
values: string;
|
|
34
|
+
view: string;
|
|
35
|
+
where: string;
|
|
36
|
+
};
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const tipos_de_simbolos_1 = __importDefault(require("../../tipos-de-simbolos"));
|
|
7
|
+
exports.default = {
|
|
8
|
+
add: tipos_de_simbolos_1.default.ADICIONAR,
|
|
9
|
+
alter: tipos_de_simbolos_1.default.ALTERAR,
|
|
10
|
+
and: tipos_de_simbolos_1.default.E,
|
|
11
|
+
auto: tipos_de_simbolos_1.default.AUTO,
|
|
12
|
+
between: tipos_de_simbolos_1.default.ENTRE,
|
|
13
|
+
column: tipos_de_simbolos_1.default.COLUNA,
|
|
14
|
+
constraint: tipos_de_simbolos_1.default.RESTRICAO,
|
|
15
|
+
create: tipos_de_simbolos_1.default.CRIAR,
|
|
16
|
+
delete: tipos_de_simbolos_1.default.EXCLUIR,
|
|
17
|
+
distinct: tipos_de_simbolos_1.default.DISTINTO,
|
|
18
|
+
false: tipos_de_simbolos_1.default.FALSO,
|
|
19
|
+
foreign: tipos_de_simbolos_1.default.ESTRANGEIRA,
|
|
20
|
+
from: tipos_de_simbolos_1.default.DE,
|
|
21
|
+
group: tipos_de_simbolos_1.default.AGRUPAR,
|
|
22
|
+
identity: tipos_de_simbolos_1.default.IDENTIDADE,
|
|
23
|
+
increment: tipos_de_simbolos_1.default.INCREMENTO,
|
|
24
|
+
insert: tipos_de_simbolos_1.default.INSERIR,
|
|
25
|
+
integer: tipos_de_simbolos_1.default.INTEIRO,
|
|
26
|
+
key: tipos_de_simbolos_1.default.CHAVE,
|
|
27
|
+
not: tipos_de_simbolos_1.default.NAO,
|
|
28
|
+
null: tipos_de_simbolos_1.default.NULO,
|
|
29
|
+
order: tipos_de_simbolos_1.default.ORDENAR,
|
|
30
|
+
primary: tipos_de_simbolos_1.default.PRIMARIA,
|
|
31
|
+
references: tipos_de_simbolos_1.default.REFERENCIA,
|
|
32
|
+
select: tipos_de_simbolos_1.default.SELECIONAR,
|
|
33
|
+
set: tipos_de_simbolos_1.default.DEFINIR,
|
|
34
|
+
string: tipos_de_simbolos_1.default.TEXTO,
|
|
35
|
+
table: tipos_de_simbolos_1.default.TABELA,
|
|
36
|
+
true: tipos_de_simbolos_1.default.VERDADEIRO,
|
|
37
|
+
unique: tipos_de_simbolos_1.default.UNICA,
|
|
38
|
+
update: tipos_de_simbolos_1.default.ATUALIZAR,
|
|
39
|
+
values: tipos_de_simbolos_1.default.VALORES,
|
|
40
|
+
view: tipos_de_simbolos_1.default.VISAO,
|
|
41
|
+
where: tipos_de_simbolos_1.default.ONDE
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=sql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sql.js","sourceRoot":"","sources":["../../../../../../fontes/comum/fontes/lexador/palavras-reservadas/sql.ts"],"names":[],"mappings":";;;;;AAAA,gFAAsD;AAEtD,kBAAe;IACX,GAAG,EAAE,2BAAe,CAAC,SAAS;IAC9B,KAAK,EAAE,2BAAe,CAAC,OAAO;IAC9B,GAAG,EAAE,2BAAe,CAAC,CAAC;IACtB,IAAI,EAAE,2BAAe,CAAC,IAAI;IAC1B,OAAO,EAAE,2BAAe,CAAC,KAAK;IAC9B,MAAM,EAAE,2BAAe,CAAC,MAAM;IAC9B,UAAU,EAAE,2BAAe,CAAC,SAAS;IACrC,MAAM,EAAE,2BAAe,CAAC,KAAK;IAC7B,MAAM,EAAE,2BAAe,CAAC,OAAO;IAC/B,QAAQ,EAAE,2BAAe,CAAC,QAAQ;IAClC,KAAK,EAAE,2BAAe,CAAC,KAAK;IAC5B,OAAO,EAAE,2BAAe,CAAC,WAAW;IACpC,IAAI,EAAE,2BAAe,CAAC,EAAE;IACxB,KAAK,EAAE,2BAAe,CAAC,OAAO;IAC9B,QAAQ,EAAE,2BAAe,CAAC,UAAU;IACpC,SAAS,EAAE,2BAAe,CAAC,UAAU;IACrC,MAAM,EAAE,2BAAe,CAAC,OAAO;IAC/B,OAAO,EAAE,2BAAe,CAAC,OAAO;IAChC,GAAG,EAAE,2BAAe,CAAC,KAAK;IAC1B,GAAG,EAAE,2BAAe,CAAC,GAAG;IACxB,IAAI,EAAE,2BAAe,CAAC,IAAI;IAC1B,KAAK,EAAE,2BAAe,CAAC,OAAO;IAC9B,OAAO,EAAE,2BAAe,CAAC,QAAQ;IACjC,UAAU,EAAE,2BAAe,CAAC,UAAU;IACtC,MAAM,EAAE,2BAAe,CAAC,UAAU;IAClC,GAAG,EAAE,2BAAe,CAAC,OAAO;IAC5B,MAAM,EAAE,2BAAe,CAAC,KAAK;IAC7B,KAAK,EAAE,2BAAe,CAAC,MAAM;IAC7B,IAAI,EAAE,2BAAe,CAAC,UAAU;IAChC,MAAM,EAAE,2BAAe,CAAC,KAAK;IAC7B,MAAM,EAAE,2BAAe,CAAC,SAAS;IACjC,MAAM,EAAE,2BAAe,CAAC,OAAO;IAC/B,IAAI,EAAE,2BAAe,CAAC,KAAK;IAC3B,KAAK,EAAE,2BAAe,CAAC,IAAI;CAC9B,CAAA"}
|
|
@@ -10,11 +10,13 @@ declare const _default: {
|
|
|
10
10
|
DE: string;
|
|
11
11
|
DEFINIR: string;
|
|
12
12
|
DISTINTO: string;
|
|
13
|
+
DOIS_PONTOS: string;
|
|
13
14
|
E: string;
|
|
14
15
|
ENTRE: string;
|
|
15
16
|
EM: string;
|
|
16
17
|
ESTRANGEIRA: string;
|
|
17
18
|
EXCLUIR: string;
|
|
19
|
+
EXISTIR: string;
|
|
18
20
|
FALSO: string;
|
|
19
21
|
IDENTIDADE: string;
|
|
20
22
|
IDENTIFICADOR: string;
|
|
@@ -22,6 +24,7 @@ declare const _default: {
|
|
|
22
24
|
INCREMENTO: string;
|
|
23
25
|
INSERIR: string;
|
|
24
26
|
INTEIRO: string;
|
|
27
|
+
INTERROGACAO: string;
|
|
25
28
|
LOGICO: string;
|
|
26
29
|
MAIOR: string;
|
|
27
30
|
MAIOR_IGUAL: string;
|
|
@@ -12,11 +12,13 @@ exports.default = {
|
|
|
12
12
|
DE: 'DE',
|
|
13
13
|
DEFINIR: 'DEFINIR',
|
|
14
14
|
DISTINTO: 'DISTINTO',
|
|
15
|
+
DOIS_PONTOS: 'DOIS_PONTOS',
|
|
15
16
|
E: 'E',
|
|
16
17
|
ENTRE: 'ENTRE',
|
|
17
18
|
EM: 'EM',
|
|
18
19
|
ESTRANGEIRA: 'ESTRANGEIRA',
|
|
19
20
|
EXCLUIR: 'EXCLUIR',
|
|
21
|
+
EXISTIR: 'EXISTIR',
|
|
20
22
|
FALSO: 'FALSO',
|
|
21
23
|
IDENTIDADE: 'IDENTIDADE',
|
|
22
24
|
IDENTIFICADOR: 'IDENTIFICADOR',
|
|
@@ -24,6 +26,7 @@ exports.default = {
|
|
|
24
26
|
INCREMENTO: 'INCREMENTO',
|
|
25
27
|
INSERIR: 'INSERIR',
|
|
26
28
|
INTEIRO: 'INTEIRO',
|
|
29
|
+
INTERROGACAO: 'INTERROGACAO',
|
|
27
30
|
LOGICO: 'LOGICO',
|
|
28
31
|
MAIOR: 'MAIOR',
|
|
29
32
|
MAIOR_IGUAL: 'MAIOR_IGUAL',
|
|
@@ -56,4 +59,4 @@ exports.default = {
|
|
|
56
59
|
VIRGULA: 'VIRGULA',
|
|
57
60
|
VISAO: 'VISAO'
|
|
58
61
|
};
|
|
59
|
-
//# sourceMappingURL=
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../fontes/comum/fontes/tipos-de-simbolos/index.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACX,SAAS,EAAE,WAAW;IACtB,OAAO,E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K,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACjB,CAAC"}
|
|
@@ -1,32 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Este tradutor traduz sentenças em SQL ANSI, e a ideia é poder
|
|
5
|
-
* utilizar para outros tradutores futuros, com pequenas nuances em
|
|
6
|
-
* alguns comandos quando for o caso.
|
|
7
|
-
*/
|
|
8
|
-
export declare class TradutorSqlAnsi {
|
|
9
|
-
tamanhoIndentacao: number;
|
|
10
|
-
constructor(tamanhoIndentacao?: number);
|
|
11
|
-
protected traduzirOperador(operador: string): boolean | "=";
|
|
12
|
-
protected traduzirTipoDeDados(tipo: string): "INTEGER" | "BOOLEAN" | "INT" | "VARCHAR";
|
|
13
|
-
protected traduzirTipoDeRestricao(tipo: string): "PRIMARY KEY" | "FOREIGN KEY" | "UNIQUE";
|
|
14
|
-
protected traduzirColunaComTipo(coluna: Coluna): string;
|
|
15
|
-
protected traduzirComandoAtualizar(comandoAtualizar: Atualizar): string;
|
|
16
|
-
protected traduzirComandoCriar(comandoCriar: Criar): string;
|
|
17
|
-
protected traduzirComandoExcluir(comandoExcluir: Excluir): string;
|
|
18
|
-
protected traduzirComandoInserir(comandoInserir: Inserir): string;
|
|
19
|
-
protected traduzirComandoSelecionar(comandoSelecionar: Selecionar): string;
|
|
20
|
-
private logicaManipulacaoColunas;
|
|
21
|
-
private traduzirTipoEntidade;
|
|
22
|
-
protected traduzirComandoAlterar(comandoAlterar: Alterar): string;
|
|
23
|
-
dicionarioComandos: {
|
|
24
|
-
Alterar: any;
|
|
25
|
-
Atualizar: any;
|
|
26
|
-
Criar: any;
|
|
27
|
-
Excluir: any;
|
|
28
|
-
Inserir: any;
|
|
29
|
-
Selecionar: any;
|
|
30
|
-
};
|
|
31
|
-
traduzir(comandos: Comando[]): string;
|
|
32
|
-
}
|
|
1
|
+
export * from './tradutor-reverso-sql-ansi';
|
|
2
|
+
export * from './tradutor-sql-ansi';
|