@designliquido/delegua 0.62.0 → 0.64.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/README.md +17 -9
- package/avaliador-sintatico/avaliador-sintatico.d.ts +2 -0
- package/avaliador-sintatico/avaliador-sintatico.d.ts.map +1 -1
- package/avaliador-sintatico/avaliador-sintatico.js +49 -2
- package/avaliador-sintatico/avaliador-sintatico.js.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.d.ts +17 -2
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.d.ts.map +1 -1
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.js +133 -11
- package/avaliador-sintatico/dialetos/avaliador-sintatico-pitugues.js.map +1 -1
- package/bin/package.json +1 -1
- package/construtos/acesso-indice-variavel.d.ts +2 -1
- package/construtos/acesso-indice-variavel.d.ts.map +1 -1
- package/construtos/acesso-indice-variavel.js +3 -1
- package/construtos/acesso-indice-variavel.js.map +1 -1
- package/construtos/binario.d.ts +4 -0
- package/construtos/binario.d.ts.map +1 -1
- package/construtos/binario.js +7 -6
- package/construtos/binario.js.map +1 -1
- package/construtos/leia.d.ts +1 -1
- package/construtos/leia.d.ts.map +1 -1
- package/construtos/leia.js +1 -0
- package/construtos/leia.js.map +1 -1
- package/construtos/unario.d.ts +1 -0
- package/construtos/unario.d.ts.map +1 -1
- package/construtos/unario.js +2 -0
- package/construtos/unario.js.map +1 -1
- package/formatadores/formatador-pitugues.js +1 -1
- package/formatadores/formatador-pitugues.js.map +1 -1
- package/interfaces/retornos/retorno-lexador.d.ts +2 -2
- package/interfaces/retornos/retorno-lexador.d.ts.map +1 -1
- package/lexador/dialetos/lexador-pitugues.d.ts +3 -3
- package/lexador/dialetos/lexador-pitugues.d.ts.map +1 -1
- package/lexador/dialetos/lexador-pitugues.js +7 -6
- package/lexador/dialetos/lexador-pitugues.js.map +1 -1
- package/lexador/dialetos/lexador-tenda.d.ts +2 -2
- package/lexador/dialetos/lexador-tenda.d.ts.map +1 -1
- package/lexador/dialetos/localizacao.d.ts +9 -0
- package/lexador/dialetos/localizacao.d.ts.map +1 -0
- package/lexador/dialetos/{pragma.js → localizacao.js} +1 -1
- package/lexador/dialetos/localizacao.js.map +1 -0
- package/lexador/dialetos/palavras-reservadas/pitugues.d.ts +0 -3
- package/lexador/dialetos/palavras-reservadas/pitugues.d.ts.map +1 -1
- package/lexador/dialetos/palavras-reservadas/pitugues.js +0 -3
- package/lexador/dialetos/palavras-reservadas/pitugues.js.map +1 -1
- package/package.json +1 -1
- package/tradutores/index.d.ts +2 -0
- package/tradutores/index.d.ts.map +1 -1
- package/tradutores/index.js +2 -0
- package/tradutores/index.js.map +1 -1
- package/tradutores/mermaid/aresta-fluxograma.d.ts +7 -0
- package/tradutores/mermaid/aresta-fluxograma.d.ts.map +1 -0
- package/tradutores/mermaid/aresta-fluxograma.js +11 -0
- package/tradutores/mermaid/aresta-fluxograma.js.map +1 -0
- package/tradutores/mermaid/diagrama-classe.d.ts +16 -0
- package/tradutores/mermaid/diagrama-classe.d.ts.map +1 -0
- package/tradutores/mermaid/diagrama-classe.js +33 -0
- package/tradutores/mermaid/diagrama-classe.js.map +1 -0
- package/tradutores/mermaid/index.d.ts +5 -0
- package/tradutores/mermaid/index.d.ts.map +1 -0
- package/tradutores/mermaid/index.js +21 -0
- package/tradutores/mermaid/index.js.map +1 -0
- package/tradutores/mermaid/subgrafo-classe.d.ts +14 -0
- package/tradutores/mermaid/subgrafo-classe.d.ts.map +1 -0
- package/tradutores/mermaid/subgrafo-classe.js +45 -0
- package/tradutores/mermaid/subgrafo-classe.js.map +1 -0
- package/tradutores/mermaid/vertice-fluxograma.d.ts +9 -0
- package/tradutores/mermaid/vertice-fluxograma.d.ts.map +1 -0
- package/tradutores/mermaid/vertice-fluxograma.js +16 -0
- package/tradutores/mermaid/vertice-fluxograma.js.map +1 -0
- package/tradutores/tradutor-assembly-arm.d.ts +98 -0
- package/tradutores/tradutor-assembly-arm.d.ts.map +1 -0
- package/tradutores/tradutor-assembly-arm.js +715 -0
- package/tradutores/tradutor-assembly-arm.js.map +1 -0
- package/tradutores/tradutor-assembly-x64.d.ts +4 -1
- package/tradutores/tradutor-assembly-x64.d.ts.map +1 -1
- package/tradutores/tradutor-assembly-x64.js +57 -21
- package/tradutores/tradutor-assembly-x64.js.map +1 -1
- package/tradutores/tradutor-mermaidjs.d.ts +10 -16
- package/tradutores/tradutor-mermaidjs.d.ts.map +1 -1
- package/tradutores/tradutor-mermaidjs.js +107 -43
- package/tradutores/tradutor-mermaidjs.js.map +1 -1
- package/umd/delegua.js +2071 -317
- package/lexador/dialetos/pragma.d.ts +0 -9
- package/lexador/dialetos/pragma.d.ts.map +0 -1
- package/lexador/dialetos/pragma.js.map +0 -1
package/umd/delegua.js
CHANGED
|
@@ -705,6 +705,29 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
705
705
|
}
|
|
706
706
|
throw this.erro(this.simbolos[this.atual], 'Esperado expressão.');
|
|
707
707
|
}
|
|
708
|
+
resolverTipoAcessoIndiceVariavel(expressaoAnterior) {
|
|
709
|
+
let identificadorAcessado = '';
|
|
710
|
+
switch (expressaoAnterior.constructor) {
|
|
711
|
+
case construtos_1.Variavel:
|
|
712
|
+
identificadorAcessado = expressaoAnterior.simbolo.lexema;
|
|
713
|
+
break;
|
|
714
|
+
default:
|
|
715
|
+
return 'qualquer';
|
|
716
|
+
}
|
|
717
|
+
// Primeiro verificar se é acesso a índice de vetor.
|
|
718
|
+
const tipoIdentificadorCorrespondente = this.pilhaEscopos.obterTipoVariavelPorNome(expressaoAnterior.simbolo.lexema);
|
|
719
|
+
if (!tipoIdentificadorCorrespondente.endsWith('[]') && !['dicionário', 'qualquer', 'texto', 'tupla', 'vetor'].includes(tipoIdentificadorCorrespondente)) {
|
|
720
|
+
throw this.erro(this.simbolos[this.atual], `Tipo ${tipoIdentificadorCorrespondente} não suporta acesso por índice.`);
|
|
721
|
+
}
|
|
722
|
+
let tipoAcesso = 'qualquer';
|
|
723
|
+
if (tipoIdentificadorCorrespondente.endsWith('[]')) {
|
|
724
|
+
tipoAcesso = tipoIdentificadorCorrespondente.replace('[]', '');
|
|
725
|
+
}
|
|
726
|
+
else {
|
|
727
|
+
tipoAcesso = 'qualquer';
|
|
728
|
+
}
|
|
729
|
+
return tipoAcesso;
|
|
730
|
+
}
|
|
708
731
|
resolverCadeiaChamadas(expressaoAnterior, tipoAnterior = 'qualquer') {
|
|
709
732
|
if (!this.simbolos[this.atual]) {
|
|
710
733
|
return expressaoAnterior;
|
|
@@ -733,10 +756,11 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
733
756
|
const acesso = new construtos_1.AcessoMetodoOuPropriedade(this.hashArquivo, expressaoAnterior, nome, tipoInferido);
|
|
734
757
|
return this.resolverCadeiaChamadas(acesso, tipoInferido);
|
|
735
758
|
case delegua_2.default.COLCHETE_ESQUERDO:
|
|
759
|
+
const tipoAcesso = this.resolverTipoAcessoIndiceVariavel(expressaoAnterior);
|
|
736
760
|
this.avancarEDevolverAnterior();
|
|
737
761
|
const indice = this.expressao();
|
|
738
762
|
const simboloFechamento = this.consumir(delegua_2.default.COLCHETE_DIREITO, "Esperado ']' após escrita do indice.");
|
|
739
|
-
const acessoVariavel = new construtos_1.AcessoIndiceVariavel(this.hashArquivo, expressaoAnterior, indice, simboloFechamento);
|
|
763
|
+
const acessoVariavel = new construtos_1.AcessoIndiceVariavel(this.hashArquivo, expressaoAnterior, indice, simboloFechamento, tipoAcesso);
|
|
740
764
|
return this.resolverCadeiaChamadas(acessoVariavel);
|
|
741
765
|
default:
|
|
742
766
|
return expressaoAnterior;
|
|
@@ -931,11 +955,34 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
931
955
|
}
|
|
932
956
|
return expressao;
|
|
933
957
|
}
|
|
958
|
+
verificacaoOperacoesBinariasIlegais(esquerdo, direito, operador) {
|
|
959
|
+
if (esquerdo.tipo === 'vetor' || esquerdo.tipo.endsWith('[]')) {
|
|
960
|
+
if (['dicionario', 'dicionário', 'nulo'].includes(direito.tipo)) {
|
|
961
|
+
throw this.erro(operador, `Operação inválida: não é possível realizar operação ${operador.lexema} entre vetor e ${direito.tipo}.`);
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
if (direito.tipo === 'vetor' || direito.tipo.endsWith('[]')) {
|
|
965
|
+
if (['dicionario', 'dicionário', 'nulo'].includes(esquerdo.tipo)) {
|
|
966
|
+
throw this.erro(operador, `Operação inválida: não é possível realizar operação ${operador.lexema} entre vetor e ${esquerdo.tipo}.`);
|
|
967
|
+
}
|
|
968
|
+
}
|
|
969
|
+
if (esquerdo.tipo === 'dicionario' || esquerdo.tipo === 'dicionário') {
|
|
970
|
+
if (['vetor', 'nulo'].includes(direito.tipo)) {
|
|
971
|
+
throw this.erro(operador, `Operação inválida: não é possível realizar operação ${operador.lexema} entre dicionário e ${direito.tipo}.`);
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
if (direito.tipo === 'dicionario' || direito.tipo === 'dicionário') {
|
|
975
|
+
if (['vetor', 'nulo'].includes(esquerdo.tipo)) {
|
|
976
|
+
throw this.erro(operador, `Operação inválida: não é possível realizar operação ${operador.lexema} entre dicionário e ${esquerdo.tipo}.`);
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
}
|
|
934
980
|
multiplicar() {
|
|
935
981
|
let expressao = this.exponenciacao();
|
|
936
982
|
while (this.verificarSeSimboloAtualEIgualA(delegua_2.default.DIVISAO, delegua_2.default.DIVISAO_IGUAL, delegua_2.default.DIVISAO_INTEIRA, delegua_2.default.DIVISAO_INTEIRA_IGUAL, delegua_2.default.MODULO, delegua_2.default.MODULO_IGUAL, delegua_2.default.MULTIPLICACAO, delegua_2.default.MULTIPLICACAO_IGUAL)) {
|
|
937
983
|
const operador = this.simbolos[this.atual - 1];
|
|
938
984
|
const direito = this.exponenciacao();
|
|
985
|
+
this.verificacaoOperacoesBinariasIlegais(expressao, direito, operador);
|
|
939
986
|
expressao = new construtos_1.Binario(this.hashArquivo, expressao, operador, direito);
|
|
940
987
|
}
|
|
941
988
|
return expressao;
|
|
@@ -950,7 +997,7 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
950
997
|
while (this.verificarSeSimboloAtualEIgualA(delegua_2.default.SUBTRACAO, delegua_2.default.ADICAO, delegua_2.default.MENOS_IGUAL)) {
|
|
951
998
|
const operador = this.simbolos[this.atual - 1];
|
|
952
999
|
const direito = this.multiplicar();
|
|
953
|
-
|
|
1000
|
+
this.verificacaoOperacoesBinariasIlegais(expressao, direito, operador);
|
|
954
1001
|
expressao = new construtos_1.Binario(this.hashArquivo, expressao, operador, direito);
|
|
955
1002
|
}
|
|
956
1003
|
if (this.verificarSeSimboloAtualEIgualA(delegua_2.default.MAIS_IGUAL)) {
|
|
@@ -2260,7 +2307,7 @@ class AvaliadorSintatico extends avaliador_sintatico_base_1.AvaliadorSintaticoBa
|
|
|
2260
2307
|
}
|
|
2261
2308
|
exports.AvaliadorSintatico = AvaliadorSintatico;
|
|
2262
2309
|
|
|
2263
|
-
},{"../bibliotecas/primitivas-dicionario":20,"../bibliotecas/primitivas-numero":21,"../bibliotecas/primitivas-texto":22,"../bibliotecas/primitivas-vetor":23,"../construtos":51,"../construtos/tuplas":68,"../declaracoes":96,"../inferenciador":116,"../informacao-elemento-sintatico":117,"../tipos-de-dados/delegua":185,"../tipos-de-simbolos/delegua":190,"./avaliador-sintatico-base":1,"./comum":3,"./elemento-montao-tipos":11,"./erro-avaliador-sintatico":12,"./informacao-escopo":14,"./montao-tipos":17,"./pilha-escopos":18,"browser-process-hrtime":
|
|
2310
|
+
},{"../bibliotecas/primitivas-dicionario":20,"../bibliotecas/primitivas-numero":21,"../bibliotecas/primitivas-texto":22,"../bibliotecas/primitivas-vetor":23,"../construtos":51,"../construtos/tuplas":68,"../declaracoes":96,"../inferenciador":116,"../informacao-elemento-sintatico":117,"../tipos-de-dados/delegua":185,"../tipos-de-simbolos/delegua":190,"./avaliador-sintatico-base":1,"./comum":3,"./elemento-montao-tipos":11,"./erro-avaliador-sintatico":12,"./informacao-escopo":14,"./montao-tipos":17,"./pilha-escopos":18,"browser-process-hrtime":378}],3:[function(require,module,exports){
|
|
2264
2311
|
"use strict";
|
|
2265
2312
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2266
2313
|
exports.buscarRetornos = buscarRetornos;
|
|
@@ -3376,6 +3423,75 @@ class AvaliadorSintaticoPitugues {
|
|
|
3376
3423
|
declaracaoDeVariavel() {
|
|
3377
3424
|
throw new Error('Método não implementado.');
|
|
3378
3425
|
}
|
|
3426
|
+
variavelJaDeclarada(nome) {
|
|
3427
|
+
try {
|
|
3428
|
+
this.pilhaEscopos.obterTipoVariavelPorNome(nome);
|
|
3429
|
+
return true;
|
|
3430
|
+
}
|
|
3431
|
+
catch (_a) {
|
|
3432
|
+
return false;
|
|
3433
|
+
}
|
|
3434
|
+
}
|
|
3435
|
+
declaracaoImplicita() {
|
|
3436
|
+
const identificador = this.consumir(pitugues_2.default.IDENTIFICADOR, 'Esperado nome de variável.');
|
|
3437
|
+
this.consumir(pitugues_2.default.IGUAL, "Esperado '=' após identificador.");
|
|
3438
|
+
if (this.estaNoFinal()) {
|
|
3439
|
+
throw this.erro(this.simboloAnterior(), 'Esperado valor após o símbolo de igual.');
|
|
3440
|
+
}
|
|
3441
|
+
const valor = this.expressao();
|
|
3442
|
+
const tipo = this.logicaComumInferenciaTiposVariaveisEConstantes(valor, 'qualquer');
|
|
3443
|
+
this.pilhaEscopos.definirInformacoesVariavel(identificador.lexema, new informacao_elemento_sintatico_1.InformacaoElementoSintatico(identificador.lexema, tipo));
|
|
3444
|
+
return new declaracoes_1.Var(identificador, valor, tipo);
|
|
3445
|
+
}
|
|
3446
|
+
temPadraoMultiplaAtribuicao() {
|
|
3447
|
+
// Verifica padrão: IDENTIFICADOR, VIRGULA, IDENTIFICADOR, ..., IGUAL
|
|
3448
|
+
let pos = this.atual;
|
|
3449
|
+
let contadorIdentificadores = 0;
|
|
3450
|
+
while (pos < this.simbolos.length) {
|
|
3451
|
+
if (this.simbolos[pos].tipo === pitugues_2.default.IDENTIFICADOR) {
|
|
3452
|
+
contadorIdentificadores++;
|
|
3453
|
+
pos++;
|
|
3454
|
+
if (pos >= this.simbolos.length)
|
|
3455
|
+
return false;
|
|
3456
|
+
// Se encontrou =, verifica se tinha mais de 1 identificador
|
|
3457
|
+
if (this.simbolos[pos].tipo === pitugues_2.default.IGUAL) {
|
|
3458
|
+
return contadorIdentificadores > 1;
|
|
3459
|
+
}
|
|
3460
|
+
// Se não é vírgula, não é padrão múltiplo
|
|
3461
|
+
if (this.simbolos[pos].tipo !== pitugues_2.default.VIRGULA) {
|
|
3462
|
+
return false;
|
|
3463
|
+
}
|
|
3464
|
+
pos++;
|
|
3465
|
+
continue;
|
|
3466
|
+
}
|
|
3467
|
+
break;
|
|
3468
|
+
}
|
|
3469
|
+
return false;
|
|
3470
|
+
}
|
|
3471
|
+
temPadraoVarComoPalavraChave() {
|
|
3472
|
+
// Verifica padrão: var identificador = ...
|
|
3473
|
+
var _a;
|
|
3474
|
+
if (this.simbolos[this.atual].lexema !== 'var') {
|
|
3475
|
+
return false;
|
|
3476
|
+
}
|
|
3477
|
+
// Exemplos permitidos: var = 10 | var, a = 10, 20
|
|
3478
|
+
if (((_a = this.simbolos[this.atual + 1]) === null || _a === void 0 ? void 0 : _a.tipo) !== pitugues_2.default.IDENTIFICADOR) {
|
|
3479
|
+
return false;
|
|
3480
|
+
}
|
|
3481
|
+
let pos = this.atual + 1;
|
|
3482
|
+
while (pos < this.simbolos.length) {
|
|
3483
|
+
if (this.simbolos[pos].tipo === pitugues_2.default.IGUAL) {
|
|
3484
|
+
return true; // Encontrou padrão var identificador = ...
|
|
3485
|
+
}
|
|
3486
|
+
// Se encontrou algo que não seja IDENTIFICADOR ou VIRGULA, não é o padrão
|
|
3487
|
+
if (this.simbolos[pos].tipo !== pitugues_2.default.IDENTIFICADOR &&
|
|
3488
|
+
this.simbolos[pos].tipo !== pitugues_2.default.VIRGULA) {
|
|
3489
|
+
return false;
|
|
3490
|
+
}
|
|
3491
|
+
pos++;
|
|
3492
|
+
}
|
|
3493
|
+
return false;
|
|
3494
|
+
}
|
|
3379
3495
|
declaracaoDeVariaveis() {
|
|
3380
3496
|
const identificadores = [];
|
|
3381
3497
|
let retorno = [];
|
|
@@ -3383,14 +3499,7 @@ class AvaliadorSintaticoPitugues {
|
|
|
3383
3499
|
do {
|
|
3384
3500
|
identificadores.push(this.consumir(pitugues_2.default.IDENTIFICADOR, 'Esperado nome de variável.'));
|
|
3385
3501
|
} while (this.verificarSeSimboloAtualEIgualA(pitugues_2.default.VIRGULA));
|
|
3386
|
-
|
|
3387
|
-
// Inicialização de variáveis sem valor.
|
|
3388
|
-
for (let [indice, identificador] of identificadores.entries()) {
|
|
3389
|
-
retorno.push(new declaracoes_1.Var(identificador, null));
|
|
3390
|
-
}
|
|
3391
|
-
this.verificarSeSimboloAtualEIgualA(pitugues_2.default.PONTO_E_VIRGULA);
|
|
3392
|
-
return retorno;
|
|
3393
|
-
}
|
|
3502
|
+
this.consumir(pitugues_2.default.IGUAL, 'Esperado o símbolo igual(=) após identificador.');
|
|
3394
3503
|
const inicializadores = [];
|
|
3395
3504
|
do {
|
|
3396
3505
|
inicializadores.push(this.expressao());
|
|
@@ -4158,7 +4267,9 @@ class AvaliadorSintaticoPitugues {
|
|
|
4158
4267
|
const possivelDocumentacao = this.declaracaoTextoDeDocumentacao();
|
|
4159
4268
|
const metodos = [];
|
|
4160
4269
|
const propriedades = [];
|
|
4270
|
+
const indentacaoLinha = this.localizacoes[this.simboloAtual().linha].espacosIndentacao;
|
|
4161
4271
|
while (!this.estaNoFinal() &&
|
|
4272
|
+
this.localizacoes[this.simboloAtual().linha].espacosIndentacao === indentacaoLinha &&
|
|
4162
4273
|
this.verificarSeSimboloAtualEIgualA(pitugues_2.default.CONSTRUTOR, pitugues_2.default.FUNCAO, pitugues_2.default.FUNÇÃO, pitugues_2.default.IDENTIFICADOR)) {
|
|
4163
4274
|
const simboloAnterior = this.simbolos[this.atual - 1];
|
|
4164
4275
|
if (simboloAnterior.tipo === pitugues_2.default.IDENTIFICADOR) {
|
|
@@ -4184,6 +4295,34 @@ class AvaliadorSintaticoPitugues {
|
|
|
4184
4295
|
const textoFalha = this.consumir(pitugues_2.default.TEXTO, 'Esperado texto para explicar falha.');
|
|
4185
4296
|
return new declaracoes_1.Falhar(simboloFalha, textoFalha.literal);
|
|
4186
4297
|
}
|
|
4298
|
+
/**
|
|
4299
|
+
* Verifica se há pontos e vírgula no final de sentenças.
|
|
4300
|
+
* Em Pituguês, ; só é permitido para separar múltiplos comandos na mesma linha,
|
|
4301
|
+
* mas não no final de uma sentença/linha.
|
|
4302
|
+
*/
|
|
4303
|
+
verificarPontosEVirgulasInvalidos() {
|
|
4304
|
+
for (let i = 0; i < this.simbolos.length; i++) {
|
|
4305
|
+
const simboloAtual = this.simbolos[i];
|
|
4306
|
+
if (simboloAtual.tipo === pitugues_2.default.PONTO_E_VIRGULA) {
|
|
4307
|
+
const proximoSimbolo = this.encontrarProximoSimboloNaoComentario(i + 1);
|
|
4308
|
+
if (!proximoSimbolo || proximoSimbolo.linha > simboloAtual.linha) {
|
|
4309
|
+
this.erros.push(new erro_avaliador_sintatico_1.ErroAvaliadorSintatico(simboloAtual, 'Ponto e vírgula (;) não é permitido no final da sentença de código.'));
|
|
4310
|
+
}
|
|
4311
|
+
}
|
|
4312
|
+
}
|
|
4313
|
+
}
|
|
4314
|
+
/**
|
|
4315
|
+
* Encontra o próximo símbolo que não seja comentário.
|
|
4316
|
+
* Isso é importante porque comentários não afetam a validade do ponto e vírgula.
|
|
4317
|
+
*/
|
|
4318
|
+
encontrarProximoSimboloNaoComentario(inicio) {
|
|
4319
|
+
for (let i = inicio; i < this.simbolos.length; i++) {
|
|
4320
|
+
if (this.simbolos[i].tipo !== pitugues_2.default.COMENTARIO) {
|
|
4321
|
+
return this.simbolos[i];
|
|
4322
|
+
}
|
|
4323
|
+
}
|
|
4324
|
+
return null;
|
|
4325
|
+
}
|
|
4187
4326
|
/**
|
|
4188
4327
|
* Consome o símbolo atual, verificando se é uma declaração de função, variável, classe
|
|
4189
4328
|
* ou uma expressão.
|
|
@@ -4207,6 +4346,25 @@ class AvaliadorSintaticoPitugues {
|
|
|
4207
4346
|
}
|
|
4208
4347
|
}
|
|
4209
4348
|
resolverDeclaracao() {
|
|
4349
|
+
var _a;
|
|
4350
|
+
// Detecção de declaração implícita
|
|
4351
|
+
if (this.simbolos[this.atual].tipo === pitugues_2.default.IDENTIFICADOR) {
|
|
4352
|
+
// Detecta e bloqueia "var x = 10"
|
|
4353
|
+
if (this.temPadraoVarComoPalavraChave()) {
|
|
4354
|
+
throw this.erro(this.simbolos[this.atual], 'Palavra "var" não pode ser usada como palavra-chave para declaração. Use declarações implícitas: "x = 10" em vez de "var x = 10".');
|
|
4355
|
+
}
|
|
4356
|
+
// Verifica se é múltipla atribuição (a, b, c = 1, 2, 3)
|
|
4357
|
+
if (this.temPadraoMultiplaAtribuicao()) {
|
|
4358
|
+
return this.declaracaoDeVariaveis();
|
|
4359
|
+
}
|
|
4360
|
+
// Verifica se é atribuição simples (a = 1)
|
|
4361
|
+
if (((_a = this.simbolos[this.atual + 1]) === null || _a === void 0 ? void 0 : _a.tipo) === pitugues_2.default.IGUAL) {
|
|
4362
|
+
const nomeVariavel = this.simbolos[this.atual].lexema;
|
|
4363
|
+
if (!this.variavelJaDeclarada(nomeVariavel)) {
|
|
4364
|
+
return this.declaracaoImplicita();
|
|
4365
|
+
}
|
|
4366
|
+
}
|
|
4367
|
+
}
|
|
4210
4368
|
switch (this.simbolos[this.atual].tipo) {
|
|
4211
4369
|
case pitugues_2.default.COMENTARIO:
|
|
4212
4370
|
return this.declaracaoComentario();
|
|
@@ -4251,9 +4409,6 @@ class AvaliadorSintaticoPitugues {
|
|
|
4251
4409
|
return this.declaracaoTente();
|
|
4252
4410
|
case pitugues_2.default.TEXTO_MULTILINHAS:
|
|
4253
4411
|
return this.declaracaoTextoDeDocumentacao();
|
|
4254
|
-
case pitugues_2.default.VARIAVEL:
|
|
4255
|
-
this.avancarEDevolverAnterior();
|
|
4256
|
-
return this.declaracaoDeVariaveis();
|
|
4257
4412
|
}
|
|
4258
4413
|
return this.declaracaoExpressao();
|
|
4259
4414
|
}
|
|
@@ -4361,15 +4516,29 @@ class AvaliadorSintaticoPitugues {
|
|
|
4361
4516
|
this.hashArquivo = hashArquivo || 0;
|
|
4362
4517
|
this.simbolos = (retornoLexador === null || retornoLexador === void 0 ? void 0 : retornoLexador.simbolos) || [];
|
|
4363
4518
|
this.localizacoes = (retornoLexador === null || retornoLexador === void 0 ? void 0 : retornoLexador.pragmas) || {};
|
|
4519
|
+
this.verificarPontosEVirgulasInvalidos();
|
|
4364
4520
|
let declaracoes = [];
|
|
4365
4521
|
while (!this.estaNoFinal()) {
|
|
4366
4522
|
const retornoDeclaracao = this.resolverDeclaracaoForaDeBloco();
|
|
4523
|
+
if (retornoDeclaracao === null) {
|
|
4524
|
+
continue;
|
|
4525
|
+
}
|
|
4367
4526
|
if (Array.isArray(retornoDeclaracao)) {
|
|
4368
4527
|
declaracoes = declaracoes.concat(retornoDeclaracao);
|
|
4369
4528
|
}
|
|
4370
4529
|
else {
|
|
4371
4530
|
declaracoes.push(retornoDeclaracao);
|
|
4372
4531
|
}
|
|
4532
|
+
if (!this.estaNoFinal() && this.verificarTipoSimboloAtual(pitugues_2.default.PONTO_E_VIRGULA)) {
|
|
4533
|
+
// Verificar se este ; está na mesma linha da declaração anterior
|
|
4534
|
+
const declaracaoAnterior = declaracoes[declaracoes.length - 1];
|
|
4535
|
+
const linhaDeclaraoAnterior = declaracaoAnterior.linha || 0;
|
|
4536
|
+
const linhaPontoVirgula = this.simboloAtual().linha;
|
|
4537
|
+
if (linhaPontoVirgula === linhaDeclaraoAnterior) {
|
|
4538
|
+
// Está na mesma linha, então é um separador válido
|
|
4539
|
+
this.avancarEDevolverAnterior();
|
|
4540
|
+
}
|
|
4541
|
+
}
|
|
4373
4542
|
}
|
|
4374
4543
|
if (this.performance) {
|
|
4375
4544
|
const deltaAnalise = (0, browser_process_hrtime_1.default)(inicioAnalise);
|
|
@@ -4384,7 +4553,7 @@ class AvaliadorSintaticoPitugues {
|
|
|
4384
4553
|
}
|
|
4385
4554
|
exports.AvaliadorSintaticoPitugues = AvaliadorSintaticoPitugues;
|
|
4386
4555
|
|
|
4387
|
-
},{"../../bibliotecas/primitivas-dicionario":20,"../../bibliotecas/primitivas-numero":21,"../../bibliotecas/primitivas-texto":22,"../../bibliotecas/primitivas-vetor":23,"../../construtos":51,"../../declaracoes":96,"../../inferenciador":116,"../../informacao-elemento-sintatico":117,"../../lexador":177,"../../tipos-de-dados/dialetos/pitugues":186,"../../tipos-de-simbolos/pitugues":194,"../comum":3,"../erro-avaliador-sintatico":12,"../informacao-escopo":14,"../pilha-escopos":18,"browser-process-hrtime":
|
|
4556
|
+
},{"../../bibliotecas/primitivas-dicionario":20,"../../bibliotecas/primitivas-numero":21,"../../bibliotecas/primitivas-texto":22,"../../bibliotecas/primitivas-vetor":23,"../../construtos":51,"../../declaracoes":96,"../../inferenciador":116,"../../informacao-elemento-sintatico":117,"../../lexador":177,"../../tipos-de-dados/dialetos/pitugues":186,"../../tipos-de-simbolos/pitugues":194,"../comum":3,"../erro-avaliador-sintatico":12,"../informacao-escopo":14,"../pilha-escopos":18,"browser-process-hrtime":378}],7:[function(require,module,exports){
|
|
4388
4557
|
"use strict";
|
|
4389
4558
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4390
4559
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -5273,7 +5442,7 @@ class AvaliadorSintaticoPrisma extends avaliador_sintatico_base_1.AvaliadorSinta
|
|
|
5273
5442
|
}
|
|
5274
5443
|
exports.AvaliadorSintaticoPrisma = AvaliadorSintaticoPrisma;
|
|
5275
5444
|
|
|
5276
|
-
},{"../../bibliotecas/primitivas-dicionario":20,"../../bibliotecas/primitivas-numero":21,"../../bibliotecas/primitivas-texto":22,"../../bibliotecas/primitivas-vetor":23,"../../construtos":51,"../../declaracoes":96,"../../inferenciador":116,"../../informacao-elemento-sintatico":117,"../../lexador":177,"../../tipos-de-simbolos/prisma":196,"../avaliador-sintatico-base":1,"../comum":3,"../erro-avaliador-sintatico":12,"../informacao-escopo":14,"../pilha-escopos":18,"browser-process-hrtime":
|
|
5445
|
+
},{"../../bibliotecas/primitivas-dicionario":20,"../../bibliotecas/primitivas-numero":21,"../../bibliotecas/primitivas-texto":22,"../../bibliotecas/primitivas-vetor":23,"../../construtos":51,"../../declaracoes":96,"../../inferenciador":116,"../../informacao-elemento-sintatico":117,"../../lexador":177,"../../tipos-de-simbolos/prisma":196,"../avaliador-sintatico-base":1,"../comum":3,"../erro-avaliador-sintatico":12,"../informacao-escopo":14,"../pilha-escopos":18,"browser-process-hrtime":378}],9:[function(require,module,exports){
|
|
5277
5446
|
"use strict";
|
|
5278
5447
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5279
5448
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -6259,7 +6428,7 @@ class AvaliadorSintaticoTenda extends avaliador_sintatico_base_1.AvaliadorSintat
|
|
|
6259
6428
|
}
|
|
6260
6429
|
exports.AvaliadorSintaticoTenda = AvaliadorSintaticoTenda;
|
|
6261
6430
|
|
|
6262
|
-
},{"../../bibliotecas/primitivas-dicionario":20,"../../bibliotecas/primitivas-numero":21,"../../bibliotecas/primitivas-texto":22,"../../bibliotecas/primitivas-vetor":23,"../../construtos":51,"../../construtos/tuplas":68,"../../declaracoes":96,"../../inferenciador":116,"../../informacao-elemento-sintatico":117,"../../lexador/simbolo":183,"../../tipos-de-dados/delegua":185,"../../tipos-de-simbolos/tenda":197,"../avaliador-sintatico-base":1,"./../erro-avaliador-sintatico":12,"./../informacao-escopo":14,"./../pilha-escopos":18,"browser-process-hrtime":
|
|
6431
|
+
},{"../../bibliotecas/primitivas-dicionario":20,"../../bibliotecas/primitivas-numero":21,"../../bibliotecas/primitivas-texto":22,"../../bibliotecas/primitivas-vetor":23,"../../construtos":51,"../../construtos/tuplas":68,"../../declaracoes":96,"../../inferenciador":116,"../../informacao-elemento-sintatico":117,"../../lexador/simbolo":183,"../../tipos-de-dados/delegua":185,"../../tipos-de-simbolos/tenda":197,"../avaliador-sintatico-base":1,"./../erro-avaliador-sintatico":12,"./../informacao-escopo":14,"./../pilha-escopos":18,"browser-process-hrtime":378}],10:[function(require,module,exports){
|
|
6263
6432
|
"use strict";
|
|
6264
6433
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6265
6434
|
if (k2 === undefined) k2 = k;
|
|
@@ -8574,12 +8743,14 @@ exports.AcessoIndiceVariavel = void 0;
|
|
|
8574
8743
|
* vetores e dicionários.
|
|
8575
8744
|
*/
|
|
8576
8745
|
class AcessoIndiceVariavel {
|
|
8577
|
-
constructor(hashArquivo, entidadeChamada, indice, simboloFechamento) {
|
|
8746
|
+
constructor(hashArquivo, entidadeChamada, indice, simboloFechamento, tipo = 'qualquer') {
|
|
8747
|
+
this.tipo = 'qualquer';
|
|
8578
8748
|
this.linha = entidadeChamada.linha;
|
|
8579
8749
|
this.hashArquivo = hashArquivo;
|
|
8580
8750
|
this.entidadeChamada = entidadeChamada;
|
|
8581
8751
|
this.indice = indice;
|
|
8582
8752
|
this.simboloFechamento = simboloFechamento;
|
|
8753
|
+
this.tipo = tipo;
|
|
8583
8754
|
}
|
|
8584
8755
|
async aceitar(visitante) {
|
|
8585
8756
|
return await visitante.visitarExpressaoAcessoIndiceVariavel(this);
|
|
@@ -8862,21 +9033,22 @@ class Binario {
|
|
|
8862
9033
|
this.direita = direita;
|
|
8863
9034
|
this.tipo = this.deduzirTipo();
|
|
8864
9035
|
}
|
|
9036
|
+
/**
|
|
9037
|
+
* Dedução otimista de tipos para expressões binárias.
|
|
9038
|
+
* @returns O tipo deduzido.
|
|
9039
|
+
*/
|
|
8865
9040
|
deduzirTipo() {
|
|
8866
9041
|
if (['logico', 'lógico'].includes(this.esquerda.tipo) ||
|
|
8867
9042
|
['logico', 'lógico'].includes(this.direita.tipo)) {
|
|
8868
9043
|
return 'lógico';
|
|
8869
9044
|
}
|
|
8870
|
-
if (this.esquerda.tipo === 'texto' || this.direita.tipo === 'texto') {
|
|
8871
|
-
return 'texto';
|
|
8872
|
-
}
|
|
8873
|
-
if (this.esquerda.tipo === 'inteiro' && this.direita.tipo === 'inteiro') {
|
|
8874
|
-
return 'inteiro';
|
|
8875
|
-
}
|
|
8876
9045
|
if (['numero', 'número'].includes(this.esquerda.tipo) ||
|
|
8877
9046
|
['numero', 'número'].includes(this.direita.tipo)) {
|
|
8878
9047
|
return 'número';
|
|
8879
9048
|
}
|
|
9049
|
+
if (this.esquerda.tipo === this.direita.tipo) {
|
|
9050
|
+
return this.esquerda.tipo;
|
|
9051
|
+
}
|
|
8880
9052
|
return 'qualquer';
|
|
8881
9053
|
}
|
|
8882
9054
|
async aceitar(visitante) {
|
|
@@ -9386,6 +9558,7 @@ const geracao_identificadores_1 = require("../geracao-identificadores");
|
|
|
9386
9558
|
*/
|
|
9387
9559
|
class Leia {
|
|
9388
9560
|
constructor(simbolo, argumentos) {
|
|
9561
|
+
this.tipo = 'texto';
|
|
9389
9562
|
this.linha = simbolo.linha;
|
|
9390
9563
|
this.hashArquivo = simbolo.hashArquivo;
|
|
9391
9564
|
this.simbolo = simbolo;
|
|
@@ -10068,11 +10241,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10068
10241
|
exports.Unario = void 0;
|
|
10069
10242
|
class Unario {
|
|
10070
10243
|
constructor(hashArquivo, operador, operando, incidenciaOperador = 'ANTES') {
|
|
10244
|
+
this.tipo = 'qualquer';
|
|
10071
10245
|
this.linha = operador.linha;
|
|
10072
10246
|
this.hashArquivo = hashArquivo;
|
|
10073
10247
|
this.operador = operador;
|
|
10074
10248
|
this.operando = operando;
|
|
10075
10249
|
this.incidenciaOperador = incidenciaOperador;
|
|
10250
|
+
this.tipo = operando.tipo;
|
|
10076
10251
|
}
|
|
10077
10252
|
async aceitar(visitante) {
|
|
10078
10253
|
return await visitante.visitarExpressaoUnaria(this);
|
|
@@ -11775,7 +11950,7 @@ class FormatadorPitugues {
|
|
|
11775
11950
|
this.códigoFormatado += `'''${declaracao.conteudo}'''`;
|
|
11776
11951
|
}
|
|
11777
11952
|
async visitarDeclaracaoVar(declaração) {
|
|
11778
|
-
this.códigoFormatado += this.indentar() +
|
|
11953
|
+
this.códigoFormatado += this.indentar() + `${declaração.simbolo.lexema} = `;
|
|
11779
11954
|
if (declaração.inicializador) {
|
|
11780
11955
|
this.códigoFormatado += await declaração.inicializador.aceitar(this);
|
|
11781
11956
|
}
|
|
@@ -14741,7 +14916,7 @@ class InterpretadorBase {
|
|
|
14741
14916
|
exports.InterpretadorBase = InterpretadorBase;
|
|
14742
14917
|
|
|
14743
14918
|
}).call(this)}).call(this,require('_process'))
|
|
14744
|
-
},{"../avaliador-sintatico":13,"../bibliotecas/primitivas-dicionario":20,"../bibliotecas/primitivas-vetor":23,"../construtos":51,"../excecoes":110,"../inferenciador":116,"../lexador":177,"../quebras":184,"../tipos-de-dados/delegua":185,"../tipos-de-dados/primitivos":187,"../tipos-de-simbolos/delegua":190,"./espaco-memoria":144,"./estruturas":151,"./estruturas/metodo-primitiva":152,"./pilha-escopos-execucao":161,"_process":
|
|
14919
|
+
},{"../avaliador-sintatico":13,"../bibliotecas/primitivas-dicionario":20,"../bibliotecas/primitivas-vetor":23,"../construtos":51,"../excecoes":110,"../inferenciador":116,"../lexador":177,"../quebras":184,"../tipos-de-dados/delegua":185,"../tipos-de-dados/primitivos":187,"../tipos-de-simbolos/delegua":190,"./espaco-memoria":144,"./estruturas":151,"./estruturas/metodo-primitiva":152,"./pilha-escopos-execucao":161,"_process":432,"browser-process-hrtime":378}],159:[function(require,module,exports){
|
|
14745
14920
|
"use strict";
|
|
14746
14921
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14747
14922
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -16779,7 +16954,7 @@ class LexadorPitugues {
|
|
|
16779
16954
|
this.performance = performance;
|
|
16780
16955
|
this.simbolos = [];
|
|
16781
16956
|
this.erros = [];
|
|
16782
|
-
this.
|
|
16957
|
+
this.localizacoes = {};
|
|
16783
16958
|
this.inicioSimbolo = 0;
|
|
16784
16959
|
this.atual = 0;
|
|
16785
16960
|
this.linha = 0;
|
|
@@ -16961,7 +17136,7 @@ class LexadorPitugues {
|
|
|
16961
17136
|
espacos++;
|
|
16962
17137
|
this.avancar();
|
|
16963
17138
|
}
|
|
16964
|
-
this.
|
|
17139
|
+
this.localizacoes[this.linha + 1] = {
|
|
16965
17140
|
linha: this.linha + 1,
|
|
16966
17141
|
espacosIndentacao: espacos,
|
|
16967
17142
|
};
|
|
@@ -16987,12 +17162,13 @@ class LexadorPitugues {
|
|
|
16987
17162
|
switch (caractere) {
|
|
16988
17163
|
case ' ':
|
|
16989
17164
|
case '\t':
|
|
16990
|
-
this.avancar();
|
|
16991
|
-
break;
|
|
16992
17165
|
case '\r':
|
|
16993
17166
|
case '\n':
|
|
16994
17167
|
case '\0':
|
|
17168
|
+
this.avancar();
|
|
17169
|
+
break;
|
|
16995
17170
|
case ';':
|
|
17171
|
+
this.adicionarSimbolo(pitugues_2.default.PONTO_E_VIRGULA);
|
|
16996
17172
|
this.avancar();
|
|
16997
17173
|
break;
|
|
16998
17174
|
case '=':
|
|
@@ -17178,7 +17354,7 @@ class LexadorPitugues {
|
|
|
17178
17354
|
const inicioMapeamento = (0, browser_process_hrtime_1.default)();
|
|
17179
17355
|
this.simbolos = [];
|
|
17180
17356
|
this.erros = [];
|
|
17181
|
-
this.
|
|
17357
|
+
this.localizacoes = {};
|
|
17182
17358
|
this.inicioSimbolo = 0;
|
|
17183
17359
|
this.atual = 0;
|
|
17184
17360
|
this.linha = 0;
|
|
@@ -17198,13 +17374,13 @@ class LexadorPitugues {
|
|
|
17198
17374
|
return {
|
|
17199
17375
|
simbolos: this.simbolos,
|
|
17200
17376
|
erros: this.erros,
|
|
17201
|
-
pragmas: this.
|
|
17377
|
+
pragmas: this.localizacoes,
|
|
17202
17378
|
};
|
|
17203
17379
|
}
|
|
17204
17380
|
}
|
|
17205
17381
|
exports.LexadorPitugues = LexadorPitugues;
|
|
17206
17382
|
|
|
17207
|
-
},{"../../tipos-de-simbolos/pitugues":194,"../simbolo":183,"./palavras-reservadas/pitugues":173,"browser-process-hrtime":
|
|
17383
|
+
},{"../../tipos-de-simbolos/pitugues":194,"../simbolo":183,"./palavras-reservadas/pitugues":173,"browser-process-hrtime":378}],167:[function(require,module,exports){
|
|
17208
17384
|
"use strict";
|
|
17209
17385
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17210
17386
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -17814,7 +17990,7 @@ class LexadorPrisma {
|
|
|
17814
17990
|
}
|
|
17815
17991
|
exports.LexadorPrisma = LexadorPrisma;
|
|
17816
17992
|
|
|
17817
|
-
},{"../../tipos-de-simbolos/prisma":196,"../simbolo":183,"./palavras-reservadas/prisma":175,"browser-process-hrtime":
|
|
17993
|
+
},{"../../tipos-de-simbolos/prisma":196,"../simbolo":183,"./palavras-reservadas/prisma":175,"browser-process-hrtime":378}],169:[function(require,module,exports){
|
|
17818
17994
|
"use strict";
|
|
17819
17995
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17820
17996
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -18205,7 +18381,7 @@ class LexadorTenda {
|
|
|
18205
18381
|
}
|
|
18206
18382
|
exports.LexadorTenda = LexadorTenda;
|
|
18207
18383
|
|
|
18208
|
-
},{"../../tipos-de-simbolos/tenda":197,"../simbolo":183,"./palavras-reservadas/tenda":176,"browser-process-hrtime":
|
|
18384
|
+
},{"../../tipos-de-simbolos/tenda":197,"../simbolo":183,"./palavras-reservadas/tenda":176,"browser-process-hrtime":378}],170:[function(require,module,exports){
|
|
18209
18385
|
"use strict";
|
|
18210
18386
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18211
18387
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -18330,9 +18506,6 @@ exports.palavrasReservadasPitugues = {
|
|
|
18330
18506
|
tendo: pitugues_1.default.TENDO,
|
|
18331
18507
|
tente: pitugues_1.default.TENTE,
|
|
18332
18508
|
tipo: pitugues_1.default.TIPO,
|
|
18333
|
-
var: pitugues_1.default.VARIAVEL,
|
|
18334
|
-
variavel: pitugues_1.default.VARIAVEL,
|
|
18335
|
-
variável: pitugues_1.default.VARIAVEL,
|
|
18336
18509
|
verdadeiro: pitugues_1.default.VERDADEIRO,
|
|
18337
18510
|
};
|
|
18338
18511
|
exports.palavrasReservadasMicroGramatica = {
|
|
@@ -19164,7 +19337,7 @@ class Lexador {
|
|
|
19164
19337
|
}
|
|
19165
19338
|
exports.Lexador = Lexador;
|
|
19166
19339
|
|
|
19167
|
-
},{"../tipos-de-simbolos/delegua":190,"./palavras-reservadas":182,"./simbolo":183,"browser-process-hrtime":
|
|
19340
|
+
},{"../tipos-de-simbolos/delegua":190,"./palavras-reservadas":182,"./simbolo":183,"browser-process-hrtime":378}],181:[function(require,module,exports){
|
|
19168
19341
|
"use strict";
|
|
19169
19342
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19170
19343
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -20226,6 +20399,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20226
20399
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20227
20400
|
};
|
|
20228
20401
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20402
|
+
__exportStar(require("./tradutor-assembly-arm"), exports);
|
|
20403
|
+
__exportStar(require("./tradutor-assembly-x64"), exports);
|
|
20229
20404
|
__exportStar(require("./tradutor-assemblyscript"), exports);
|
|
20230
20405
|
__exportStar(require("./tradutor-calango"), exports);
|
|
20231
20406
|
__exportStar(require("./tradutor-javascript"), exports);
|
|
@@ -20236,7 +20411,138 @@ __exportStar(require("./tradutor-reverso-javascript"), exports);
|
|
|
20236
20411
|
__exportStar(require("./tradutor-reverso-python"), exports);
|
|
20237
20412
|
__exportStar(require("./tradutor-reverso-tenda"), exports);
|
|
20238
20413
|
|
|
20239
|
-
},{"./tradutor-assemblyscript":
|
|
20414
|
+
},{"./tradutor-assembly-arm":206,"./tradutor-assembly-x64":207,"./tradutor-assemblyscript":208,"./tradutor-calango":209,"./tradutor-javascript":210,"./tradutor-mermaidjs":211,"./tradutor-portugol-ipt":212,"./tradutor-python":213,"./tradutor-reverso-javascript":214,"./tradutor-reverso-python":215,"./tradutor-reverso-tenda":216}],199:[function(require,module,exports){
|
|
20415
|
+
"use strict";
|
|
20416
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20417
|
+
exports.ArestaFluxograma = void 0;
|
|
20418
|
+
class ArestaFluxograma {
|
|
20419
|
+
constructor(declaracao, texto) {
|
|
20420
|
+
this.declaracao = declaracao;
|
|
20421
|
+
this.texto = texto;
|
|
20422
|
+
}
|
|
20423
|
+
}
|
|
20424
|
+
exports.ArestaFluxograma = ArestaFluxograma;
|
|
20425
|
+
|
|
20426
|
+
},{}],200:[function(require,module,exports){
|
|
20427
|
+
"use strict";
|
|
20428
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20429
|
+
exports.DiagramaClasse = void 0;
|
|
20430
|
+
class DiagramaClasse {
|
|
20431
|
+
constructor(nome, superClasse) {
|
|
20432
|
+
this.nome = nome;
|
|
20433
|
+
this.superClasse = superClasse;
|
|
20434
|
+
this.metodos = [];
|
|
20435
|
+
this.propriedades = [];
|
|
20436
|
+
}
|
|
20437
|
+
paraTexto() {
|
|
20438
|
+
let resultado = ` classe ${this.nome} {\n`;
|
|
20439
|
+
// Adiciona propriedades (se houver)
|
|
20440
|
+
for (const prop of this.propriedades) {
|
|
20441
|
+
const tipo = prop.tipo ? `: ${prop.tipo}` : '';
|
|
20442
|
+
resultado += ` +${prop.nome}${tipo}\n`;
|
|
20443
|
+
}
|
|
20444
|
+
// Adiciona métodos
|
|
20445
|
+
for (const metodo of this.metodos) {
|
|
20446
|
+
const params = metodo.parametros.join(', ');
|
|
20447
|
+
const retorno = metodo.tipoRetorno ? `: ${metodo.tipoRetorno}` : '';
|
|
20448
|
+
resultado += ` +${metodo.nome}(${params})${retorno}\n`;
|
|
20449
|
+
}
|
|
20450
|
+
resultado += ` }\n`;
|
|
20451
|
+
// Adiciona herança se houver
|
|
20452
|
+
if (this.superClasse) {
|
|
20453
|
+
resultado += ` ${this.superClasse} <|-- ${this.nome}\n`;
|
|
20454
|
+
}
|
|
20455
|
+
return resultado;
|
|
20456
|
+
}
|
|
20457
|
+
}
|
|
20458
|
+
exports.DiagramaClasse = DiagramaClasse;
|
|
20459
|
+
|
|
20460
|
+
},{}],201:[function(require,module,exports){
|
|
20461
|
+
"use strict";
|
|
20462
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
20463
|
+
if (k2 === undefined) k2 = k;
|
|
20464
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20465
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
20466
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20467
|
+
}
|
|
20468
|
+
Object.defineProperty(o, k2, desc);
|
|
20469
|
+
}) : (function(o, m, k, k2) {
|
|
20470
|
+
if (k2 === undefined) k2 = k;
|
|
20471
|
+
o[k2] = m[k];
|
|
20472
|
+
}));
|
|
20473
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
20474
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20475
|
+
};
|
|
20476
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20477
|
+
__exportStar(require("./aresta-fluxograma"), exports);
|
|
20478
|
+
__exportStar(require("./diagrama-classe"), exports);
|
|
20479
|
+
__exportStar(require("./subgrafo-classe"), exports);
|
|
20480
|
+
__exportStar(require("./vertice-fluxograma"), exports);
|
|
20481
|
+
|
|
20482
|
+
},{"./aresta-fluxograma":199,"./diagrama-classe":200,"./subgrafo-classe":202,"./vertice-fluxograma":203}],202:[function(require,module,exports){
|
|
20483
|
+
"use strict";
|
|
20484
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20485
|
+
exports.SubgrafoClasse = void 0;
|
|
20486
|
+
class SubgrafoClasse {
|
|
20487
|
+
constructor(nomeClasse, linha, superClasse) {
|
|
20488
|
+
this.nomeClasse = nomeClasse;
|
|
20489
|
+
this.linha = linha;
|
|
20490
|
+
this.superClasse = superClasse;
|
|
20491
|
+
this.vertices = [];
|
|
20492
|
+
this.metodos = [];
|
|
20493
|
+
}
|
|
20494
|
+
paraTexto() {
|
|
20495
|
+
let resultado = ` subgraph Classe_${this.nomeClasse}_${this.linha}["Classe: ${this.nomeClasse}`;
|
|
20496
|
+
if (this.superClasse) {
|
|
20497
|
+
resultado += ` (estende ${this.superClasse})`;
|
|
20498
|
+
}
|
|
20499
|
+
resultado += `"]\n`;
|
|
20500
|
+
resultado += ` direction TB\n`;
|
|
20501
|
+
// Nó de início da classe
|
|
20502
|
+
resultado += ` ClasseInicio_${this.nomeClasse}_${this.linha}((Início da Classe))\n`;
|
|
20503
|
+
// Adiciona os métodos como sub-subgrafos
|
|
20504
|
+
for (const metodo of this.metodos) {
|
|
20505
|
+
resultado += ` subgraph Metodo_${metodo.nome}_${this.nomeClasse}_${this.linha}["Método: ${metodo.nome}"]\n`;
|
|
20506
|
+
resultado += ` direction TB\n`;
|
|
20507
|
+
for (const vertice of metodo.vertices) {
|
|
20508
|
+
// Adiciona indentação extra para vértices dentro do método
|
|
20509
|
+
const textoVertice = vertice.paraTexto().replace(/^ {4}/, ' ');
|
|
20510
|
+
resultado += textoVertice;
|
|
20511
|
+
}
|
|
20512
|
+
resultado += ` end\n`;
|
|
20513
|
+
}
|
|
20514
|
+
// Conecta o início da classe aos métodos
|
|
20515
|
+
if (this.metodos.length > 0) {
|
|
20516
|
+
const primeiroMetodo = this.metodos[0];
|
|
20517
|
+
if (primeiroMetodo.vertices.length > 0) {
|
|
20518
|
+
const primeiraAresta = primeiroMetodo.vertices[0].origem.texto;
|
|
20519
|
+
resultado += ` ClasseInicio_${this.nomeClasse}_${this.linha} --> ${primeiraAresta}\n`;
|
|
20520
|
+
}
|
|
20521
|
+
}
|
|
20522
|
+
resultado += ` end\n`;
|
|
20523
|
+
return resultado;
|
|
20524
|
+
}
|
|
20525
|
+
}
|
|
20526
|
+
exports.SubgrafoClasse = SubgrafoClasse;
|
|
20527
|
+
|
|
20528
|
+
},{}],203:[function(require,module,exports){
|
|
20529
|
+
"use strict";
|
|
20530
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20531
|
+
exports.VerticeFluxograma = void 0;
|
|
20532
|
+
class VerticeFluxograma {
|
|
20533
|
+
constructor(origem, destino, texto) {
|
|
20534
|
+
this.origem = origem;
|
|
20535
|
+
this.destino = destino;
|
|
20536
|
+
this.texto = texto;
|
|
20537
|
+
}
|
|
20538
|
+
paraTexto() {
|
|
20539
|
+
const seta = this.texto ? `-->|${this.texto}|` : '-->';
|
|
20540
|
+
return ` ${this.origem.texto}${seta}${this.destino.texto};\n`;
|
|
20541
|
+
}
|
|
20542
|
+
}
|
|
20543
|
+
exports.VerticeFluxograma = VerticeFluxograma;
|
|
20544
|
+
|
|
20545
|
+
},{}],204:[function(require,module,exports){
|
|
20240
20546
|
"use strict";
|
|
20241
20547
|
// Generated from fontes\tradutores\python\Python3.g4 by ANTLR 4.9.0-SNAPSHOT
|
|
20242
20548
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -21476,7 +21782,7 @@ __decorate([
|
|
|
21476
21782
|
Decorators_1.Override
|
|
21477
21783
|
], Python3Lexer.prototype, "nextToken", null);
|
|
21478
21784
|
|
|
21479
|
-
},{"./python3-parser":
|
|
21785
|
+
},{"./python3-parser":205,"antlr4ts/CommonToken":226,"antlr4ts/Decorators":230,"antlr4ts/Lexer":238,"antlr4ts/Token":255,"antlr4ts/VocabularyImpl":261,"antlr4ts/atn/ATNDeserializer":267,"antlr4ts/atn/LexerATNSimulator":288,"antlr4ts/misc/Utils":349}],205:[function(require,module,exports){
|
|
21480
21786
|
"use strict";
|
|
21481
21787
|
// Generated from fontes\tradutores\python\Python3.g4 by ANTLR 4.9.0-SNAPSHOT
|
|
21482
21788
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -32723,7 +33029,1391 @@ class Yield_argContext extends ParserRuleContext_1.ParserRuleContext {
|
|
|
32723
33029
|
}
|
|
32724
33030
|
exports.Yield_argContext = Yield_argContext;
|
|
32725
33031
|
|
|
32726
|
-
},{"antlr4ts/FailedPredicateException":
|
|
33032
|
+
},{"antlr4ts/FailedPredicateException":234,"antlr4ts/NoViableAltException":242,"antlr4ts/Parser":243,"antlr4ts/ParserRuleContext":246,"antlr4ts/RecognitionException":249,"antlr4ts/Token":255,"antlr4ts/VocabularyImpl":261,"antlr4ts/atn/ATN":263,"antlr4ts/atn/ATNDeserializer":267,"antlr4ts/atn/ParserATNSimulator":304,"antlr4ts/misc/Utils":349}],206:[function(require,module,exports){
|
|
33033
|
+
"use strict";
|
|
33034
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33035
|
+
exports.TradutorAssemblyARM = void 0;
|
|
33036
|
+
const construtos_1 = require("../construtos");
|
|
33037
|
+
const declaracoes_1 = require("../declaracoes");
|
|
33038
|
+
class TradutorAssemblyARM {
|
|
33039
|
+
constructor(alvo = 'linux-arm') {
|
|
33040
|
+
this.alvo = alvo;
|
|
33041
|
+
this.indentacao = 0;
|
|
33042
|
+
this.contadorLabels = 0;
|
|
33043
|
+
this.variaveis = new Map();
|
|
33044
|
+
this.registradoresDisponiveis = ['r4', 'r5', 'r6', 'r7', 'r8', 'r9', 'r10'];
|
|
33045
|
+
this.pilhaRegistradores = [];
|
|
33046
|
+
this.bss = '.bss\n';
|
|
33047
|
+
this.data = '.data\n';
|
|
33048
|
+
this.dicionarioConstrutos = {
|
|
33049
|
+
AcessoIndiceVariavel: this.traduzirAcessoIndiceVariavel.bind(this),
|
|
33050
|
+
AcessoMetodoOuPropriedade: this.trazudirConstrutoAcessoMetodo.bind(this),
|
|
33051
|
+
Agrupamento: this.traduzirConstrutoAgrupamento.bind(this),
|
|
33052
|
+
AtribuicaoPorIndice: this.traduzirConstrutoAtribuicaoPorIndice.bind(this),
|
|
33053
|
+
Atribuir: this.traduzirConstrutoAtribuir.bind(this),
|
|
33054
|
+
Binario: this.traduzirConstrutoBinario.bind(this),
|
|
33055
|
+
Chamada: this.traduzirConstrutoChamada.bind(this),
|
|
33056
|
+
DefinirValor: this.traduzirConstrutoDefinirValor.bind(this),
|
|
33057
|
+
FuncaoConstruto: this.traduzirFuncaoConstruto.bind(this),
|
|
33058
|
+
Isto: () => 'this',
|
|
33059
|
+
Literal: this.traduzirConstrutoLiteral.bind(this),
|
|
33060
|
+
Logico: this.traduzirConstrutoLogico.bind(this),
|
|
33061
|
+
TipoDe: this.traduzirConstrutoTipoDe.bind(this),
|
|
33062
|
+
Unario: this.traduzirConstrutoUnario.bind(this),
|
|
33063
|
+
Variavel: this.traduzirConstrutoVariavel.bind(this),
|
|
33064
|
+
Vetor: this.traduzirConstrutoVetor.bind(this),
|
|
33065
|
+
};
|
|
33066
|
+
this.dicionarioDeclaracoes = {
|
|
33067
|
+
Bloco: this.traduzirDeclaracaoBloco.bind(this),
|
|
33068
|
+
Enquanto: this.traduzirDeclaracaoEnquanto.bind(this),
|
|
33069
|
+
Continua: () => 'b .continue_label',
|
|
33070
|
+
Escolha: this.traduzirDeclaracaoEscolha.bind(this),
|
|
33071
|
+
Escreva: this.traduzirDeclaracaoEscreva.bind(this),
|
|
33072
|
+
Expressao: this.traduzirDeclaracaoExpressao.bind(this),
|
|
33073
|
+
Fazer: this.traduzirDeclaracaoFazer.bind(this),
|
|
33074
|
+
Falhar: this.traduzirDeclaracaoFalhar.bind(this),
|
|
33075
|
+
FuncaoDeclaracao: this.traduzirDeclaracaoFuncao.bind(this),
|
|
33076
|
+
Importar: this.traduzirDeclaracaoImportar.bind(this),
|
|
33077
|
+
Leia: this.traduzirDeclaracaoLeia.bind(this),
|
|
33078
|
+
Para: this.traduzirDeclaracaoPara.bind(this),
|
|
33079
|
+
ParaCada: this.traduzirDeclaracaoParaCada.bind(this),
|
|
33080
|
+
Retorna: this.traduzirDeclaracaoRetorna.bind(this),
|
|
33081
|
+
Se: this.traduzirDeclaracaoSe.bind(this),
|
|
33082
|
+
Sustar: () => 'b .break_label',
|
|
33083
|
+
Classe: this.traduzirDeclaracaoClasse.bind(this),
|
|
33084
|
+
Tente: this.traduzirDeclaracaoTente.bind(this),
|
|
33085
|
+
Const: this.traduzirDeclaracaoConst.bind(this),
|
|
33086
|
+
Var: this.traduzirDeclaracaoVar.bind(this),
|
|
33087
|
+
};
|
|
33088
|
+
this.indentacao = 0;
|
|
33089
|
+
// Seleciona o símbolo de entrada conforme a plataforma alvo.
|
|
33090
|
+
// Para linux-arm: programa standalone com _start.
|
|
33091
|
+
// Para android: ainda é um binário standalone, mas com rótulo Delegua_main
|
|
33092
|
+
// para deixar claro que não é o _start do CRT padrão.
|
|
33093
|
+
const entryLabel = this.alvo === 'android' ? 'Delegua_main' : '_start';
|
|
33094
|
+
this.text = `
|
|
33095
|
+
.text
|
|
33096
|
+
.global ${entryLabel}
|
|
33097
|
+
|
|
33098
|
+
${entryLabel}:`;
|
|
33099
|
+
}
|
|
33100
|
+
gerarDigitoAleatorio() {
|
|
33101
|
+
let result = '';
|
|
33102
|
+
const digits = '0123456789';
|
|
33103
|
+
for (let i = 0; i < 5; i++) {
|
|
33104
|
+
const randomIndex = Math.floor(Math.random() * digits.length);
|
|
33105
|
+
result += digits.charAt(randomIndex);
|
|
33106
|
+
}
|
|
33107
|
+
return result;
|
|
33108
|
+
}
|
|
33109
|
+
gerarLabel() {
|
|
33110
|
+
return `.L${this.contadorLabels++}`;
|
|
33111
|
+
}
|
|
33112
|
+
obterRegistrador() {
|
|
33113
|
+
if (this.registradoresDisponiveis.length > 0) {
|
|
33114
|
+
const reg = this.registradoresDisponiveis.pop();
|
|
33115
|
+
this.pilhaRegistradores.push(reg);
|
|
33116
|
+
return reg;
|
|
33117
|
+
}
|
|
33118
|
+
return 'r0'; // fallback
|
|
33119
|
+
}
|
|
33120
|
+
liberarRegistrador(reg) {
|
|
33121
|
+
const index = this.pilhaRegistradores.indexOf(reg);
|
|
33122
|
+
if (index > -1) {
|
|
33123
|
+
this.pilhaRegistradores.splice(index, 1);
|
|
33124
|
+
this.registradoresDisponiveis.push(reg);
|
|
33125
|
+
}
|
|
33126
|
+
}
|
|
33127
|
+
// Implementação dos Construtos
|
|
33128
|
+
traduzirAcessoIndiceVariavel(construto) {
|
|
33129
|
+
var _a;
|
|
33130
|
+
let nomeVar;
|
|
33131
|
+
if (construto.entidadeChamada instanceof construtos_1.Variavel) {
|
|
33132
|
+
nomeVar = (_a = construto.entidadeChamada.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33133
|
+
}
|
|
33134
|
+
if (!nomeVar) {
|
|
33135
|
+
nomeVar = 'unknown';
|
|
33136
|
+
}
|
|
33137
|
+
const indice = this.dicionarioConstrutos[construto.indice.constructor.name](construto.indice);
|
|
33138
|
+
const reg = this.obterRegistrador();
|
|
33139
|
+
this.text += `
|
|
33140
|
+
ldr ${reg}, =${nomeVar}
|
|
33141
|
+
ldr r0, =${indice}
|
|
33142
|
+
lsl r0, r0, #2 @ multiply index by 4 (word size)
|
|
33143
|
+
add ${reg}, ${reg}, r0
|
|
33144
|
+
ldr r0, [${reg}]`;
|
|
33145
|
+
this.liberarRegistrador(reg);
|
|
33146
|
+
return 'r0';
|
|
33147
|
+
}
|
|
33148
|
+
trazudirConstrutoAcessoMetodo(construto) {
|
|
33149
|
+
const objeto = this.dicionarioConstrutos[construto.objeto.constructor.name](construto.objeto);
|
|
33150
|
+
return `${objeto}_${construto.nomeMetodo}`;
|
|
33151
|
+
}
|
|
33152
|
+
traduzirConstrutoAgrupamento(construto) {
|
|
33153
|
+
return this.dicionarioConstrutos[construto.expressao.constructor.name](construto.expressao);
|
|
33154
|
+
}
|
|
33155
|
+
traduzirConstrutoAtribuicaoPorIndice(construto) {
|
|
33156
|
+
var _a;
|
|
33157
|
+
let nomeVar;
|
|
33158
|
+
if (construto.objeto instanceof construtos_1.Variavel) {
|
|
33159
|
+
nomeVar = (_a = construto.objeto.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33160
|
+
}
|
|
33161
|
+
if (!nomeVar) {
|
|
33162
|
+
nomeVar = 'unknown';
|
|
33163
|
+
}
|
|
33164
|
+
const indice = this.dicionarioConstrutos[construto.indice.constructor.name](construto.indice);
|
|
33165
|
+
const valor = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
33166
|
+
const reg = this.obterRegistrador();
|
|
33167
|
+
this.text += `
|
|
33168
|
+
ldr ${reg}, =${nomeVar}
|
|
33169
|
+
ldr r1, =${indice}
|
|
33170
|
+
lsl r1, r1, #2 @ multiply by 4
|
|
33171
|
+
add ${reg}, ${reg}, r1
|
|
33172
|
+
ldr r1, =${valor}
|
|
33173
|
+
str r1, [${reg}]`;
|
|
33174
|
+
this.liberarRegistrador(reg);
|
|
33175
|
+
}
|
|
33176
|
+
traduzirConstrutoAtribuir(construto) {
|
|
33177
|
+
var _a;
|
|
33178
|
+
let nomeVar;
|
|
33179
|
+
if (construto.alvo instanceof construtos_1.Variavel) {
|
|
33180
|
+
nomeVar = (_a = construto.alvo.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33181
|
+
}
|
|
33182
|
+
if (!nomeVar) {
|
|
33183
|
+
return;
|
|
33184
|
+
}
|
|
33185
|
+
const valor = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
33186
|
+
if (!this.variaveis.has(nomeVar)) {
|
|
33187
|
+
const varLabel = `var_${nomeVar}`;
|
|
33188
|
+
this.bss += ` ${varLabel}: .space 4\n`;
|
|
33189
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
33190
|
+
}
|
|
33191
|
+
this.text += `
|
|
33192
|
+
ldr r0, =${valor}
|
|
33193
|
+
ldr r1, =${this.variaveis.get(nomeVar)}
|
|
33194
|
+
str r0, [r1]`;
|
|
33195
|
+
}
|
|
33196
|
+
traduzirConstrutoBinario(construto) {
|
|
33197
|
+
const esquerda = this.dicionarioConstrutos[construto.esquerda.constructor.name](construto.esquerda);
|
|
33198
|
+
const direita = this.dicionarioConstrutos[construto.direita.constructor.name](construto.direita);
|
|
33199
|
+
const operador = construto.operador.lexema;
|
|
33200
|
+
const reg = this.obterRegistrador();
|
|
33201
|
+
// Load left operand into r0
|
|
33202
|
+
if (esquerda !== 'r0') {
|
|
33203
|
+
this.text += `
|
|
33204
|
+
ldr r0, =${esquerda}`;
|
|
33205
|
+
}
|
|
33206
|
+
// Load right operand into reg
|
|
33207
|
+
this.text += `
|
|
33208
|
+
ldr ${reg}, =${direita}`;
|
|
33209
|
+
switch (operador) {
|
|
33210
|
+
case '+':
|
|
33211
|
+
this.text += `
|
|
33212
|
+
add r0, r0, ${reg}`;
|
|
33213
|
+
break;
|
|
33214
|
+
case '-':
|
|
33215
|
+
this.text += `
|
|
33216
|
+
sub r0, r0, ${reg}`;
|
|
33217
|
+
break;
|
|
33218
|
+
case '*':
|
|
33219
|
+
this.text += `
|
|
33220
|
+
mul r0, r0, ${reg}`;
|
|
33221
|
+
break;
|
|
33222
|
+
case '/':
|
|
33223
|
+
this.text += `
|
|
33224
|
+
sdiv r0, r0, ${reg}`;
|
|
33225
|
+
break;
|
|
33226
|
+
case '%':
|
|
33227
|
+
this.text += `
|
|
33228
|
+
sdiv r1, r0, ${reg}
|
|
33229
|
+
mul r1, r1, ${reg}
|
|
33230
|
+
sub r0, r0, r1 @ r0 = r0 - (r0/reg)*reg`;
|
|
33231
|
+
break;
|
|
33232
|
+
case '<':
|
|
33233
|
+
this.text += `
|
|
33234
|
+
cmp r0, ${reg}
|
|
33235
|
+
movlt r0, #1
|
|
33236
|
+
movge r0, #0`;
|
|
33237
|
+
break;
|
|
33238
|
+
case '>':
|
|
33239
|
+
this.text += `
|
|
33240
|
+
cmp r0, ${reg}
|
|
33241
|
+
movgt r0, #1
|
|
33242
|
+
movle r0, #0`;
|
|
33243
|
+
break;
|
|
33244
|
+
case '<=':
|
|
33245
|
+
this.text += `
|
|
33246
|
+
cmp r0, ${reg}
|
|
33247
|
+
movle r0, #1
|
|
33248
|
+
movgt r0, #0`;
|
|
33249
|
+
break;
|
|
33250
|
+
case '>=':
|
|
33251
|
+
this.text += `
|
|
33252
|
+
cmp r0, ${reg}
|
|
33253
|
+
movge r0, #1
|
|
33254
|
+
movlt r0, #0`;
|
|
33255
|
+
break;
|
|
33256
|
+
case '==':
|
|
33257
|
+
case '===':
|
|
33258
|
+
this.text += `
|
|
33259
|
+
cmp r0, ${reg}
|
|
33260
|
+
moveq r0, #1
|
|
33261
|
+
movne r0, #0`;
|
|
33262
|
+
break;
|
|
33263
|
+
case '!=':
|
|
33264
|
+
case '!==':
|
|
33265
|
+
this.text += `
|
|
33266
|
+
cmp r0, ${reg}
|
|
33267
|
+
movne r0, #1
|
|
33268
|
+
moveq r0, #0`;
|
|
33269
|
+
break;
|
|
33270
|
+
default:
|
|
33271
|
+
this.text += `
|
|
33272
|
+
@ Operador ${operador} não implementado`;
|
|
33273
|
+
}
|
|
33274
|
+
this.liberarRegistrador(reg);
|
|
33275
|
+
return 'r0';
|
|
33276
|
+
}
|
|
33277
|
+
traduzirConstrutoChamada(construto) {
|
|
33278
|
+
var _a;
|
|
33279
|
+
let nomeFuncao = 'funcao';
|
|
33280
|
+
if (construto.entidadeChamada instanceof construtos_1.Variavel) {
|
|
33281
|
+
nomeFuncao = ((_a = construto.entidadeChamada.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || 'funcao';
|
|
33282
|
+
}
|
|
33283
|
+
// ARM calling convention: r0-r3 for first 4 args, rest on stack
|
|
33284
|
+
const registrosArgs = ['r0', 'r1', 'r2', 'r3'];
|
|
33285
|
+
construto.argumentos.forEach((arg, index) => {
|
|
33286
|
+
if (index < registrosArgs.length) {
|
|
33287
|
+
const valorArg = this.dicionarioConstrutos[arg.constructor.name](arg);
|
|
33288
|
+
if (valorArg !== registrosArgs[index]) {
|
|
33289
|
+
this.text += `
|
|
33290
|
+
ldr ${registrosArgs[index]}, =${valorArg}`;
|
|
33291
|
+
}
|
|
33292
|
+
}
|
|
33293
|
+
else {
|
|
33294
|
+
// Push extra args on stack
|
|
33295
|
+
const valorArg = this.dicionarioConstrutos[arg.constructor.name](arg);
|
|
33296
|
+
this.text += `
|
|
33297
|
+
ldr r0, =${valorArg}
|
|
33298
|
+
push {r0}`;
|
|
33299
|
+
}
|
|
33300
|
+
});
|
|
33301
|
+
this.text += `
|
|
33302
|
+
bl ${nomeFuncao}`;
|
|
33303
|
+
}
|
|
33304
|
+
traduzirConstrutoDefinirValor(construto) {
|
|
33305
|
+
const objeto = this.dicionarioConstrutos[construto.objeto.constructor.name](construto.objeto);
|
|
33306
|
+
const valor = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
33307
|
+
this.text += `
|
|
33308
|
+
ldr r0, =${valor}
|
|
33309
|
+
ldr r1, =${objeto}
|
|
33310
|
+
str r0, [r1]`;
|
|
33311
|
+
}
|
|
33312
|
+
traduzirFuncaoConstruto(construto) {
|
|
33313
|
+
const labelFuncao = `func_${this.gerarDigitoAleatorio()}`;
|
|
33314
|
+
this.text += `
|
|
33315
|
+
|
|
33316
|
+
${labelFuncao}:
|
|
33317
|
+
push {fp, lr}
|
|
33318
|
+
mov fp, sp`;
|
|
33319
|
+
// Traduzir corpo da função
|
|
33320
|
+
if (construto.corpo && Array.isArray(construto.corpo)) {
|
|
33321
|
+
construto.corpo.forEach((declaracao) => {
|
|
33322
|
+
if (this.dicionarioDeclaracoes[declaracao.constructor.name]) {
|
|
33323
|
+
this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao);
|
|
33324
|
+
}
|
|
33325
|
+
});
|
|
33326
|
+
}
|
|
33327
|
+
this.text += `
|
|
33328
|
+
mov sp, fp
|
|
33329
|
+
pop {fp, pc}`;
|
|
33330
|
+
}
|
|
33331
|
+
traduzirConstrutoLiteral(construto) {
|
|
33332
|
+
if (typeof construto.valor === 'string') {
|
|
33333
|
+
return this.criaStringLiteral(construto);
|
|
33334
|
+
}
|
|
33335
|
+
return String(construto.valor);
|
|
33336
|
+
}
|
|
33337
|
+
traduzirConstrutoLogico(construto) {
|
|
33338
|
+
const esquerda = this.dicionarioConstrutos[construto.esquerda.constructor.name](construto.esquerda);
|
|
33339
|
+
const direita = this.dicionarioConstrutos[construto.direita.constructor.name](construto.direita);
|
|
33340
|
+
const operador = construto.operador.lexema;
|
|
33341
|
+
const labelVerdadeiro = this.gerarLabel();
|
|
33342
|
+
const labelFim = this.gerarLabel();
|
|
33343
|
+
this.text += `
|
|
33344
|
+
ldr r0, =${esquerda}
|
|
33345
|
+
cmp r0, #0`;
|
|
33346
|
+
if (operador === 'e' || operador === '&&') {
|
|
33347
|
+
this.text += `
|
|
33348
|
+
beq ${labelFim}
|
|
33349
|
+
ldr r0, =${direita}
|
|
33350
|
+
cmp r0, #0
|
|
33351
|
+
beq ${labelFim}
|
|
33352
|
+
${labelVerdadeiro}:
|
|
33353
|
+
mov r0, #1
|
|
33354
|
+
${labelFim}:`;
|
|
33355
|
+
}
|
|
33356
|
+
else if (operador === 'ou' || operador === '||') {
|
|
33357
|
+
this.text += `
|
|
33358
|
+
bne ${labelVerdadeiro}
|
|
33359
|
+
ldr r0, =${direita}
|
|
33360
|
+
cmp r0, #0
|
|
33361
|
+
bne ${labelVerdadeiro}
|
|
33362
|
+
mov r0, #0
|
|
33363
|
+
b ${labelFim}
|
|
33364
|
+
${labelVerdadeiro}:
|
|
33365
|
+
mov r0, #1
|
|
33366
|
+
${labelFim}:`;
|
|
33367
|
+
}
|
|
33368
|
+
return 'r0';
|
|
33369
|
+
}
|
|
33370
|
+
traduzirConstrutoTipoDe(construto) {
|
|
33371
|
+
const expressao = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
33372
|
+
return expressao;
|
|
33373
|
+
}
|
|
33374
|
+
traduzirConstrutoUnario(construto) {
|
|
33375
|
+
const operando = this.dicionarioConstrutos[construto.operando.constructor.name](construto.operando);
|
|
33376
|
+
const operador = construto.operador.lexema;
|
|
33377
|
+
this.text += `
|
|
33378
|
+
ldr r0, =${operando}`;
|
|
33379
|
+
if (operador === '-') {
|
|
33380
|
+
this.text += `
|
|
33381
|
+
neg r0, r0`;
|
|
33382
|
+
}
|
|
33383
|
+
else if (operador === '!' || operador === 'nao') {
|
|
33384
|
+
this.text += `
|
|
33385
|
+
cmp r0, #0
|
|
33386
|
+
moveq r0, #1
|
|
33387
|
+
movne r0, #0`;
|
|
33388
|
+
}
|
|
33389
|
+
return 'r0';
|
|
33390
|
+
}
|
|
33391
|
+
traduzirConstrutoVariavel(construto) {
|
|
33392
|
+
var _a;
|
|
33393
|
+
const nomeVar = (_a = construto.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33394
|
+
if (nomeVar && this.variaveis.has(nomeVar)) {
|
|
33395
|
+
const varLabel = this.variaveis.get(nomeVar);
|
|
33396
|
+
this.text += `
|
|
33397
|
+
ldr r0, =${varLabel}
|
|
33398
|
+
ldr r0, [r0]`;
|
|
33399
|
+
return 'r0';
|
|
33400
|
+
}
|
|
33401
|
+
return nomeVar || 'unknown';
|
|
33402
|
+
}
|
|
33403
|
+
traduzirConstrutoVetor(construto) {
|
|
33404
|
+
var _a;
|
|
33405
|
+
const labelVetor = `vetor_${this.gerarDigitoAleatorio()}`;
|
|
33406
|
+
const tamanho = ((_a = construto.valores) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
33407
|
+
this.bss += ` ${labelVetor}: .space ${tamanho * 4}\n`;
|
|
33408
|
+
if (construto.valores && Array.isArray(construto.valores)) {
|
|
33409
|
+
construto.valores.forEach((valor, index) => {
|
|
33410
|
+
if (this.dicionarioConstrutos[valor.constructor.name]) {
|
|
33411
|
+
const valorTraduzido = this.dicionarioConstrutos[valor.constructor.name](valor);
|
|
33412
|
+
this.text += `
|
|
33413
|
+
ldr r0, =${valorTraduzido}
|
|
33414
|
+
ldr r1, =${labelVetor}
|
|
33415
|
+
str r0, [r1, #${index * 4}]`;
|
|
33416
|
+
}
|
|
33417
|
+
});
|
|
33418
|
+
}
|
|
33419
|
+
return labelVetor;
|
|
33420
|
+
}
|
|
33421
|
+
// Implementação das Declarações
|
|
33422
|
+
traduzirDeclaracaoBloco(declaracao) {
|
|
33423
|
+
if (declaracao.declaracoes && Array.isArray(declaracao.declaracoes)) {
|
|
33424
|
+
declaracao.declaracoes.forEach((decl) => {
|
|
33425
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
33426
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
33427
|
+
}
|
|
33428
|
+
});
|
|
33429
|
+
}
|
|
33430
|
+
}
|
|
33431
|
+
traduzirDeclaracaoEnquanto(declaracao) {
|
|
33432
|
+
const labelInicio = this.gerarLabel();
|
|
33433
|
+
const labelFim = this.gerarLabel();
|
|
33434
|
+
this.text += `
|
|
33435
|
+
${labelInicio}:`;
|
|
33436
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicao.constructor.name](declaracao.condicao);
|
|
33437
|
+
this.text += `
|
|
33438
|
+
cmp ${condicao}, #0
|
|
33439
|
+
beq ${labelFim}`;
|
|
33440
|
+
if (this.dicionarioDeclaracoes[declaracao.corpo.constructor.name]) {
|
|
33441
|
+
this.dicionarioDeclaracoes[declaracao.corpo.constructor.name](declaracao.corpo);
|
|
33442
|
+
}
|
|
33443
|
+
this.text += `
|
|
33444
|
+
b ${labelInicio}
|
|
33445
|
+
${labelFim}:`;
|
|
33446
|
+
}
|
|
33447
|
+
traduzirDeclaracaoEscolha(declaracao) {
|
|
33448
|
+
const labelFim = this.gerarLabel();
|
|
33449
|
+
const valorEscolha = this.dicionarioConstrutos[declaracao.identificadorOuLiteral.constructor.name](declaracao.identificadorOuLiteral);
|
|
33450
|
+
if (declaracao.caminhos && Array.isArray(declaracao.caminhos)) {
|
|
33451
|
+
declaracao.caminhos.forEach((caminho) => {
|
|
33452
|
+
const labelProximo = this.gerarLabel();
|
|
33453
|
+
if (caminho.condicoes && caminho.condicoes[0]) {
|
|
33454
|
+
const valorCaso = this.dicionarioConstrutos[caminho.condicoes[0].constructor.name](caminho.condicoes[0]);
|
|
33455
|
+
this.text += `
|
|
33456
|
+
ldr r0, =${valorEscolha}
|
|
33457
|
+
ldr r1, =${valorCaso}
|
|
33458
|
+
cmp r0, r1
|
|
33459
|
+
bne ${labelProximo}`;
|
|
33460
|
+
if (caminho.declaracoes && Array.isArray(caminho.declaracoes)) {
|
|
33461
|
+
caminho.declaracoes.forEach((decl) => {
|
|
33462
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
33463
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
33464
|
+
}
|
|
33465
|
+
});
|
|
33466
|
+
}
|
|
33467
|
+
this.text += `
|
|
33468
|
+
b ${labelFim}
|
|
33469
|
+
${labelProximo}:`;
|
|
33470
|
+
}
|
|
33471
|
+
});
|
|
33472
|
+
}
|
|
33473
|
+
this.text += `
|
|
33474
|
+
${labelFim}:`;
|
|
33475
|
+
}
|
|
33476
|
+
traduzirDeclaracaoExpressao(declaracao) {
|
|
33477
|
+
if (declaracao.expressao && this.dicionarioConstrutos[declaracao.expressao.constructor.name]) {
|
|
33478
|
+
this.dicionarioConstrutos[declaracao.expressao.constructor.name](declaracao.expressao);
|
|
33479
|
+
}
|
|
33480
|
+
}
|
|
33481
|
+
traduzirDeclaracaoFazer(declaracao) {
|
|
33482
|
+
const labelInicio = this.gerarLabel();
|
|
33483
|
+
this.text += `
|
|
33484
|
+
${labelInicio}:`;
|
|
33485
|
+
if (declaracao.caminhoFazer && declaracao.caminhoFazer.declaracoes) {
|
|
33486
|
+
declaracao.caminhoFazer.declaracoes.forEach((decl) => {
|
|
33487
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
33488
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
33489
|
+
}
|
|
33490
|
+
});
|
|
33491
|
+
}
|
|
33492
|
+
if (declaracao.condicaoEnquanto) {
|
|
33493
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicaoEnquanto.constructor.name](declaracao.condicaoEnquanto);
|
|
33494
|
+
this.text += `
|
|
33495
|
+
cmp ${condicao}, #0
|
|
33496
|
+
bne ${labelInicio}`;
|
|
33497
|
+
}
|
|
33498
|
+
}
|
|
33499
|
+
traduzirDeclaracaoFalhar(declaracao) {
|
|
33500
|
+
let mensagem = '"Erro"';
|
|
33501
|
+
if (declaracao.explicacao && typeof declaracao.explicacao === 'object' && 'constructor' in declaracao.explicacao) {
|
|
33502
|
+
const explicacao = declaracao.explicacao;
|
|
33503
|
+
if (explicacao.constructor && this.dicionarioConstrutos[explicacao.constructor.name]) {
|
|
33504
|
+
mensagem = this.dicionarioConstrutos[explicacao.constructor.name](explicacao);
|
|
33505
|
+
}
|
|
33506
|
+
}
|
|
33507
|
+
this.text += `
|
|
33508
|
+
@ Falhar com mensagem: ${mensagem}
|
|
33509
|
+
mov r0, #1
|
|
33510
|
+
mov r7, #1 @ sys_exit
|
|
33511
|
+
swi 0`;
|
|
33512
|
+
}
|
|
33513
|
+
traduzirDeclaracaoFuncao(declaracao) {
|
|
33514
|
+
var _a;
|
|
33515
|
+
const nomeFuncao = ((_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || 'funcao';
|
|
33516
|
+
this.text += `
|
|
33517
|
+
|
|
33518
|
+
${nomeFuncao}:
|
|
33519
|
+
push {fp, lr}
|
|
33520
|
+
mov fp, sp`;
|
|
33521
|
+
if (declaracao.funcao && declaracao.funcao.corpo && Array.isArray(declaracao.funcao.corpo)) {
|
|
33522
|
+
declaracao.funcao.corpo.forEach((decl) => {
|
|
33523
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
33524
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
33525
|
+
}
|
|
33526
|
+
});
|
|
33527
|
+
}
|
|
33528
|
+
this.text += `
|
|
33529
|
+
mov sp, fp
|
|
33530
|
+
pop {fp, pc}`;
|
|
33531
|
+
}
|
|
33532
|
+
traduzirDeclaracaoImportar(declaracao) {
|
|
33533
|
+
this.text += `
|
|
33534
|
+
@ Importar: ${declaracao.caminho || 'unknown'}`;
|
|
33535
|
+
}
|
|
33536
|
+
traduzirDeclaracaoLeia(declaracao) {
|
|
33537
|
+
var _a;
|
|
33538
|
+
let nomeVar;
|
|
33539
|
+
if (declaracao.argumentos && declaracao.argumentos[0] && declaracao.argumentos[0] instanceof construtos_1.Variavel) {
|
|
33540
|
+
nomeVar = (_a = declaracao.argumentos[0].simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33541
|
+
}
|
|
33542
|
+
if (!nomeVar)
|
|
33543
|
+
return;
|
|
33544
|
+
if (!this.variaveis.has(nomeVar)) {
|
|
33545
|
+
const varLabel = `var_${nomeVar}`;
|
|
33546
|
+
this.bss += ` ${varLabel}: .space 256\n`;
|
|
33547
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
33548
|
+
}
|
|
33549
|
+
this.text += `
|
|
33550
|
+
ldr r1, =${this.variaveis.get(nomeVar)}
|
|
33551
|
+
mov r2, #256
|
|
33552
|
+
mov r0, #0 @ stdin
|
|
33553
|
+
mov r7, #3 @ sys_read
|
|
33554
|
+
swi 0`;
|
|
33555
|
+
}
|
|
33556
|
+
traduzirDeclaracaoPara(declaracao) {
|
|
33557
|
+
const labelInicio = this.gerarLabel();
|
|
33558
|
+
const labelFim = this.gerarLabel();
|
|
33559
|
+
if (declaracao.inicializador) {
|
|
33560
|
+
const tipoInicializador = declaracao.inicializador.constructor.name;
|
|
33561
|
+
if (this.dicionarioDeclaracoes[tipoInicializador]) {
|
|
33562
|
+
this.dicionarioDeclaracoes[tipoInicializador](declaracao.inicializador);
|
|
33563
|
+
}
|
|
33564
|
+
else if (this.dicionarioConstrutos[tipoInicializador]) {
|
|
33565
|
+
this.dicionarioConstrutos[tipoInicializador](declaracao.inicializador);
|
|
33566
|
+
}
|
|
33567
|
+
}
|
|
33568
|
+
this.text += `
|
|
33569
|
+
${labelInicio}:`;
|
|
33570
|
+
if (declaracao.condicao) {
|
|
33571
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicao.constructor.name](declaracao.condicao);
|
|
33572
|
+
this.text += `
|
|
33573
|
+
cmp ${condicao}, #0
|
|
33574
|
+
beq ${labelFim}`;
|
|
33575
|
+
}
|
|
33576
|
+
if (this.dicionarioDeclaracoes[declaracao.corpo.constructor.name]) {
|
|
33577
|
+
this.dicionarioDeclaracoes[declaracao.corpo.constructor.name](declaracao.corpo);
|
|
33578
|
+
}
|
|
33579
|
+
if (declaracao.incrementar) {
|
|
33580
|
+
if (this.dicionarioConstrutos[declaracao.incrementar.constructor.name]) {
|
|
33581
|
+
this.dicionarioConstrutos[declaracao.incrementar.constructor.name](declaracao.incrementar);
|
|
33582
|
+
}
|
|
33583
|
+
}
|
|
33584
|
+
this.text += `
|
|
33585
|
+
b ${labelInicio}
|
|
33586
|
+
${labelFim}:`;
|
|
33587
|
+
}
|
|
33588
|
+
traduzirDeclaracaoParaCada(declaracao) {
|
|
33589
|
+
var _a;
|
|
33590
|
+
const labelInicio = this.gerarLabel();
|
|
33591
|
+
const labelFim = this.gerarLabel();
|
|
33592
|
+
let nomeVar;
|
|
33593
|
+
if (declaracao.variavelIteracao instanceof construtos_1.Variavel) {
|
|
33594
|
+
nomeVar = (_a = declaracao.variavelIteracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33595
|
+
}
|
|
33596
|
+
const vetor = declaracao.vetorOuDicionario;
|
|
33597
|
+
let tamanhoVetor = 0;
|
|
33598
|
+
if (vetor instanceof construtos_1.Vetor) {
|
|
33599
|
+
tamanhoVetor = vetor.tamanho || 0;
|
|
33600
|
+
}
|
|
33601
|
+
this.text += `
|
|
33602
|
+
mov r4, #0 @ counter
|
|
33603
|
+
${labelInicio}:
|
|
33604
|
+
cmp r4, #${tamanhoVetor}
|
|
33605
|
+
bge ${labelFim}`;
|
|
33606
|
+
if (this.dicionarioDeclaracoes[declaracao.corpo.constructor.name]) {
|
|
33607
|
+
this.dicionarioDeclaracoes[declaracao.corpo.constructor.name](declaracao.corpo);
|
|
33608
|
+
}
|
|
33609
|
+
this.text += `
|
|
33610
|
+
add r4, r4, #1
|
|
33611
|
+
b ${labelInicio}
|
|
33612
|
+
${labelFim}:`;
|
|
33613
|
+
}
|
|
33614
|
+
traduzirDeclaracaoRetorna(declaracao) {
|
|
33615
|
+
if (declaracao.valor) {
|
|
33616
|
+
const valor = this.dicionarioConstrutos[declaracao.valor.constructor.name](declaracao.valor);
|
|
33617
|
+
this.text += `
|
|
33618
|
+
ldr r0, =${valor}`;
|
|
33619
|
+
}
|
|
33620
|
+
this.text += `
|
|
33621
|
+
mov sp, fp
|
|
33622
|
+
pop {fp, pc}`;
|
|
33623
|
+
}
|
|
33624
|
+
traduzirDeclaracaoSe(declaracao) {
|
|
33625
|
+
const labelSenao = this.gerarLabel();
|
|
33626
|
+
const labelFim = this.gerarLabel();
|
|
33627
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicao.constructor.name](declaracao.condicao);
|
|
33628
|
+
this.text += `
|
|
33629
|
+
cmp ${condicao}, #0
|
|
33630
|
+
beq ${labelSenao}`;
|
|
33631
|
+
if (this.dicionarioDeclaracoes[declaracao.caminhoEntao.constructor.name]) {
|
|
33632
|
+
this.dicionarioDeclaracoes[declaracao.caminhoEntao.constructor.name](declaracao.caminhoEntao);
|
|
33633
|
+
}
|
|
33634
|
+
this.text += `
|
|
33635
|
+
b ${labelFim}
|
|
33636
|
+
${labelSenao}:`;
|
|
33637
|
+
if (declaracao.caminhoSenao && this.dicionarioDeclaracoes[declaracao.caminhoSenao.constructor.name]) {
|
|
33638
|
+
this.dicionarioDeclaracoes[declaracao.caminhoSenao.constructor.name](declaracao.caminhoSenao);
|
|
33639
|
+
}
|
|
33640
|
+
this.text += `
|
|
33641
|
+
${labelFim}:`;
|
|
33642
|
+
}
|
|
33643
|
+
traduzirDeclaracaoClasse(declaracao) {
|
|
33644
|
+
var _a;
|
|
33645
|
+
this.text += `
|
|
33646
|
+
@ Classe: ${((_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || 'unknown'}`;
|
|
33647
|
+
}
|
|
33648
|
+
traduzirDeclaracaoTente(declaracao) {
|
|
33649
|
+
this.text += `
|
|
33650
|
+
@ Tente-pegue`;
|
|
33651
|
+
if (declaracao.caminhoTente && Array.isArray(declaracao.caminhoTente)) {
|
|
33652
|
+
declaracao.caminhoTente.forEach((decl) => {
|
|
33653
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
33654
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
33655
|
+
}
|
|
33656
|
+
});
|
|
33657
|
+
}
|
|
33658
|
+
}
|
|
33659
|
+
traduzirDeclaracaoConst(declaracao) {
|
|
33660
|
+
var _a;
|
|
33661
|
+
const nomeVar = (_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33662
|
+
if (!nomeVar)
|
|
33663
|
+
return;
|
|
33664
|
+
const valor = this.dicionarioConstrutos[declaracao.inicializador.constructor.name](declaracao.inicializador);
|
|
33665
|
+
const varLabel = `const_${nomeVar}`;
|
|
33666
|
+
this.data += ` ${varLabel}: .word ${valor}\n`;
|
|
33667
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
33668
|
+
}
|
|
33669
|
+
traduzirDeclaracaoVar(declaracao) {
|
|
33670
|
+
var _a;
|
|
33671
|
+
const nomeVar = (_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33672
|
+
if (!nomeVar)
|
|
33673
|
+
return;
|
|
33674
|
+
const varLabel = `var_${nomeVar}`;
|
|
33675
|
+
this.bss += ` ${varLabel}: .space 4\n`;
|
|
33676
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
33677
|
+
if (declaracao.inicializador && declaracao.inicializador.valor !== null) {
|
|
33678
|
+
const tipoInicializador = declaracao.inicializador.constructor.name;
|
|
33679
|
+
// Verificar se é um vetor
|
|
33680
|
+
if (declaracao.inicializador instanceof construtos_1.Vetor) {
|
|
33681
|
+
// Vetor precisa de tratamento especial
|
|
33682
|
+
const labelVetor = this.traduzirConstrutoVetor(declaracao.inicializador);
|
|
33683
|
+
// Associar o nome da variável com o label do vetor
|
|
33684
|
+
this.variaveis.set(nomeVar, labelVetor);
|
|
33685
|
+
}
|
|
33686
|
+
else if (this.dicionarioConstrutos[tipoInicializador]) {
|
|
33687
|
+
const valor = this.dicionarioConstrutos[tipoInicializador](declaracao.inicializador);
|
|
33688
|
+
this.text += `
|
|
33689
|
+
ldr r0, =${valor}
|
|
33690
|
+
ldr r1, =${varLabel}
|
|
33691
|
+
str r0, [r1]`;
|
|
33692
|
+
}
|
|
33693
|
+
}
|
|
33694
|
+
}
|
|
33695
|
+
criaStringLiteral(literal) {
|
|
33696
|
+
const varLiteral = `Delegua_${this.gerarDigitoAleatorio()}`;
|
|
33697
|
+
this.data += ` ${varLiteral}: .asciz "${literal.valor}"\n`;
|
|
33698
|
+
return varLiteral;
|
|
33699
|
+
}
|
|
33700
|
+
criaTamanhoNaMemoriaReferenteAVar(nomeStringLiteral) {
|
|
33701
|
+
const varTamanho = `tam_${nomeStringLiteral}`;
|
|
33702
|
+
// Em ARM, calculamos o tamanho de forma diferente
|
|
33703
|
+
// Podemos usar uma diretiva ou calcular em tempo de execução
|
|
33704
|
+
return varTamanho;
|
|
33705
|
+
}
|
|
33706
|
+
traduzirDeclaracaoEscreva(declaracaoEscreva) {
|
|
33707
|
+
let tam_string_literal = '';
|
|
33708
|
+
let nome_string_literal = '';
|
|
33709
|
+
if (declaracaoEscreva.argumentos[0] instanceof construtos_1.Literal) {
|
|
33710
|
+
nome_string_literal = this.criaStringLiteral(declaracaoEscreva.argumentos[0]);
|
|
33711
|
+
const stringValue = declaracaoEscreva.argumentos[0].valor;
|
|
33712
|
+
tam_string_literal = String(stringValue.length);
|
|
33713
|
+
}
|
|
33714
|
+
// Para ambos linux-arm e android, continuamos usando a convenção
|
|
33715
|
+
// de syscall Linux ARM (write). Em Android típico, esse binário
|
|
33716
|
+
// seria executado via adb/Termux, onde essa convenção ainda é válida.
|
|
33717
|
+
this.text += `
|
|
33718
|
+
ldr r1, =${nome_string_literal}
|
|
33719
|
+
mov r2, #${tam_string_literal}
|
|
33720
|
+
mov r0, #1 @ fd stdout
|
|
33721
|
+
mov r7, #4 @ sys_write
|
|
33722
|
+
swi 0`;
|
|
33723
|
+
}
|
|
33724
|
+
saidaSistema() {
|
|
33725
|
+
// Mesmo comentário da função Escreva: usamos sys_exit Linux.
|
|
33726
|
+
// Em um futuro modo Android "NDK/JNI", esta função deveria
|
|
33727
|
+
// apenas retornar ao chamador em vez de fazer syscall direta.
|
|
33728
|
+
this.text += `
|
|
33729
|
+
mov r0, #1 @ exit status
|
|
33730
|
+
mov r7, #1 @ sys_exit
|
|
33731
|
+
swi 0`;
|
|
33732
|
+
}
|
|
33733
|
+
traduzir(declaracoes) {
|
|
33734
|
+
let resultado = '';
|
|
33735
|
+
this.declaracoesDeClasses = declaracoes.filter((declaracao) => declaracao instanceof declaracoes_1.Classe);
|
|
33736
|
+
for (const declaracao of declaracoes) {
|
|
33737
|
+
if (this.dicionarioDeclaracoes[declaracao.constructor.name]) {
|
|
33738
|
+
this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao);
|
|
33739
|
+
}
|
|
33740
|
+
}
|
|
33741
|
+
this.saidaSistema();
|
|
33742
|
+
resultado += this.bss + '\n' + this.data + '\n' + this.text;
|
|
33743
|
+
return resultado;
|
|
33744
|
+
}
|
|
33745
|
+
}
|
|
33746
|
+
exports.TradutorAssemblyARM = TradutorAssemblyARM;
|
|
33747
|
+
|
|
33748
|
+
},{"../construtos":51,"../declaracoes":96}],207:[function(require,module,exports){
|
|
33749
|
+
"use strict";
|
|
33750
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33751
|
+
exports.TradutorAssemblyX64 = void 0;
|
|
33752
|
+
const construtos_1 = require("../construtos");
|
|
33753
|
+
const declaracoes_1 = require("../declaracoes");
|
|
33754
|
+
class TradutorAssemblyX64 {
|
|
33755
|
+
constructor(alvo = 'linux') {
|
|
33756
|
+
this.alvo = alvo;
|
|
33757
|
+
this.indentacao = 0;
|
|
33758
|
+
this.contadorLabels = 0;
|
|
33759
|
+
this.variaveis = new Map();
|
|
33760
|
+
this.registradoresDisponiveis = ['rbx', 'r12', 'r13', 'r14', 'r15'];
|
|
33761
|
+
this.pilhaRegistradores = [];
|
|
33762
|
+
this.bss = 'section .bss\n';
|
|
33763
|
+
this.data = 'section .data\n';
|
|
33764
|
+
this.dicionarioConstrutos = {
|
|
33765
|
+
AcessoIndiceVariavel: this.traduzirAcessoIndiceVariavel.bind(this),
|
|
33766
|
+
AcessoMetodoOuPropriedade: this.trazudirConstrutoAcessoMetodo.bind(this),
|
|
33767
|
+
Agrupamento: this.traduzirConstrutoAgrupamento.bind(this),
|
|
33768
|
+
AtribuicaoPorIndice: this.traduzirConstrutoAtribuicaoPorIndice.bind(this),
|
|
33769
|
+
Atribuir: this.traduzirConstrutoAtribuir.bind(this),
|
|
33770
|
+
Binario: this.traduzirConstrutoBinario.bind(this),
|
|
33771
|
+
Chamada: this.traduzirConstrutoChamada.bind(this),
|
|
33772
|
+
DefinirValor: this.traduzirConstrutoDefinirValor.bind(this),
|
|
33773
|
+
FuncaoConstruto: this.traduzirFuncaoConstruto.bind(this),
|
|
33774
|
+
Isto: () => 'this',
|
|
33775
|
+
Literal: this.traduzirConstrutoLiteral.bind(this),
|
|
33776
|
+
Logico: this.traduzirConstrutoLogico.bind(this),
|
|
33777
|
+
TipoDe: this.traduzirConstrutoTipoDe.bind(this),
|
|
33778
|
+
Unario: this.traduzirConstrutoUnario.bind(this),
|
|
33779
|
+
Variavel: this.traduzirConstrutoVariavel.bind(this),
|
|
33780
|
+
Vetor: this.traduzirConstrutoVetor.bind(this),
|
|
33781
|
+
};
|
|
33782
|
+
this.dicionarioDeclaracoes = {
|
|
33783
|
+
Bloco: this.traduzirDeclaracaoBloco.bind(this),
|
|
33784
|
+
Enquanto: this.traduzirDeclaracaoEnquanto.bind(this),
|
|
33785
|
+
Continua: () => 'continue',
|
|
33786
|
+
Escolha: this.traduzirDeclaracaoEscolha.bind(this),
|
|
33787
|
+
Expressao: this.traduzirDeclaracaoExpressao.bind(this),
|
|
33788
|
+
Fazer: this.traduzirDeclaracaoFazer.bind(this),
|
|
33789
|
+
Falhar: this.traduzirDeclaracaoFalhar.bind(this),
|
|
33790
|
+
FuncaoDeclaracao: this.traduzirDeclaracaoFuncao.bind(this),
|
|
33791
|
+
Importar: this.traduzirDeclaracaoImportar.bind(this),
|
|
33792
|
+
Leia: this.traduzirDeclaracaoLeia.bind(this),
|
|
33793
|
+
Para: this.traduzirDeclaracaoPara.bind(this),
|
|
33794
|
+
ParaCada: this.traduzirDeclaracaoParaCada.bind(this),
|
|
33795
|
+
Retorna: this.traduzirDeclaracaoRetorna.bind(this),
|
|
33796
|
+
Se: this.traduzirDeclaracaoSe.bind(this),
|
|
33797
|
+
Sustar: () => 'break',
|
|
33798
|
+
Classe: this.traduzirDeclaracaoClasse.bind(this),
|
|
33799
|
+
Tente: this.traduzirDeclaracaoTente.bind(this),
|
|
33800
|
+
Const: this.traduzirDeclaracaoConst.bind(this),
|
|
33801
|
+
Var: this.traduzirDeclaracaoVar.bind(this),
|
|
33802
|
+
Escreva: this.traduzirDeclaracaoEscreva.bind(this),
|
|
33803
|
+
};
|
|
33804
|
+
this.indentacao = 0;
|
|
33805
|
+
this.text = `
|
|
33806
|
+
section .text
|
|
33807
|
+
${this.alvo === 'linux' ? 'global _start' : 'global main'}
|
|
33808
|
+
${this.alvo === 'linux' ? '_start:' : 'main:'}`;
|
|
33809
|
+
if (this.alvo === 'windows') {
|
|
33810
|
+
this.text = `
|
|
33811
|
+
extern printf
|
|
33812
|
+
` + this.text;
|
|
33813
|
+
}
|
|
33814
|
+
}
|
|
33815
|
+
gerarDigitoAleatorio() {
|
|
33816
|
+
let result = '';
|
|
33817
|
+
const digits = '0123456789';
|
|
33818
|
+
for (let i = 0; i < 5; i++) {
|
|
33819
|
+
const randomIndex = Math.floor(Math.random() * digits.length);
|
|
33820
|
+
result += digits.charAt(randomIndex);
|
|
33821
|
+
}
|
|
33822
|
+
return result;
|
|
33823
|
+
}
|
|
33824
|
+
gerarLabel() {
|
|
33825
|
+
return `L${this.contadorLabels++}`;
|
|
33826
|
+
}
|
|
33827
|
+
obterRegistrador() {
|
|
33828
|
+
if (this.registradoresDisponiveis.length > 0) {
|
|
33829
|
+
const reg = this.registradoresDisponiveis.pop();
|
|
33830
|
+
this.pilhaRegistradores.push(reg);
|
|
33831
|
+
return reg;
|
|
33832
|
+
}
|
|
33833
|
+
return 'rax'; // fallback
|
|
33834
|
+
}
|
|
33835
|
+
liberarRegistrador(reg) {
|
|
33836
|
+
const index = this.pilhaRegistradores.indexOf(reg);
|
|
33837
|
+
if (index > -1) {
|
|
33838
|
+
this.pilhaRegistradores.splice(index, 1);
|
|
33839
|
+
this.registradoresDisponiveis.push(reg);
|
|
33840
|
+
}
|
|
33841
|
+
}
|
|
33842
|
+
// Implementação dos Construtos
|
|
33843
|
+
traduzirAcessoIndiceVariavel(construto) {
|
|
33844
|
+
var _a;
|
|
33845
|
+
let nomeVar;
|
|
33846
|
+
if (construto.entidadeChamada instanceof construtos_1.Variavel) {
|
|
33847
|
+
nomeVar = (_a = construto.entidadeChamada.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33848
|
+
}
|
|
33849
|
+
if (!nomeVar) {
|
|
33850
|
+
nomeVar = 'unknown';
|
|
33851
|
+
}
|
|
33852
|
+
const indice = this.dicionarioConstrutos[construto.indice.constructor.name](construto.indice);
|
|
33853
|
+
return `[${nomeVar} + ${indice} * 8]`;
|
|
33854
|
+
}
|
|
33855
|
+
trazudirConstrutoAcessoMetodo(construto) {
|
|
33856
|
+
const objeto = this.dicionarioConstrutos[construto.objeto.constructor.name](construto.objeto);
|
|
33857
|
+
return `${objeto}.${construto.nomeMetodo}`;
|
|
33858
|
+
}
|
|
33859
|
+
traduzirConstrutoAgrupamento(construto) {
|
|
33860
|
+
return this.dicionarioConstrutos[construto.expressao.constructor.name](construto.expressao);
|
|
33861
|
+
}
|
|
33862
|
+
traduzirConstrutoAtribuicaoPorIndice(construto) {
|
|
33863
|
+
var _a;
|
|
33864
|
+
let nomeVar;
|
|
33865
|
+
if (construto.objeto instanceof construtos_1.Variavel) {
|
|
33866
|
+
nomeVar = (_a = construto.objeto.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33867
|
+
}
|
|
33868
|
+
if (!nomeVar) {
|
|
33869
|
+
nomeVar = 'unknown';
|
|
33870
|
+
}
|
|
33871
|
+
const indice = this.dicionarioConstrutos[construto.indice.constructor.name](construto.indice);
|
|
33872
|
+
const valor = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
33873
|
+
this.text += `
|
|
33874
|
+
mov rax, ${valor}
|
|
33875
|
+
mov [${nomeVar} + ${indice} * 8], rax`;
|
|
33876
|
+
}
|
|
33877
|
+
traduzirConstrutoAtribuir(construto) {
|
|
33878
|
+
var _a;
|
|
33879
|
+
// Atribuir tem a estrutura: { alvo, valor }
|
|
33880
|
+
let nomeVar;
|
|
33881
|
+
if (construto.alvo instanceof construtos_1.Variavel) {
|
|
33882
|
+
nomeVar = (_a = construto.alvo.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
33883
|
+
}
|
|
33884
|
+
if (!nomeVar) {
|
|
33885
|
+
return;
|
|
33886
|
+
}
|
|
33887
|
+
const valor = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
33888
|
+
if (!this.variaveis.has(nomeVar)) {
|
|
33889
|
+
const varLabel = `var_${nomeVar}`;
|
|
33890
|
+
this.bss += ` ${varLabel} resq 1\n`;
|
|
33891
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
33892
|
+
}
|
|
33893
|
+
this.text += `
|
|
33894
|
+
mov rax, ${valor}
|
|
33895
|
+
mov [${this.variaveis.get(nomeVar)}], rax`;
|
|
33896
|
+
}
|
|
33897
|
+
traduzirConstrutoBinario(construto) {
|
|
33898
|
+
const esquerda = this.dicionarioConstrutos[construto.esquerda.constructor.name](construto.esquerda);
|
|
33899
|
+
const direita = this.dicionarioConstrutos[construto.direita.constructor.name](construto.direita);
|
|
33900
|
+
const operador = construto.operador.lexema;
|
|
33901
|
+
const reg = this.obterRegistrador();
|
|
33902
|
+
this.text += `
|
|
33903
|
+
mov rax, ${esquerda}
|
|
33904
|
+
mov ${reg}, ${direita}`;
|
|
33905
|
+
switch (operador) {
|
|
33906
|
+
case '+':
|
|
33907
|
+
this.text += `
|
|
33908
|
+
add rax, ${reg}`;
|
|
33909
|
+
break;
|
|
33910
|
+
case '-':
|
|
33911
|
+
this.text += `
|
|
33912
|
+
sub rax, ${reg}`;
|
|
33913
|
+
break;
|
|
33914
|
+
case '*':
|
|
33915
|
+
this.text += `
|
|
33916
|
+
imul rax, ${reg}`;
|
|
33917
|
+
break;
|
|
33918
|
+
case '/':
|
|
33919
|
+
this.text += `
|
|
33920
|
+
xor rdx, rdx
|
|
33921
|
+
idiv ${reg}`;
|
|
33922
|
+
break;
|
|
33923
|
+
case '%':
|
|
33924
|
+
this.text += `
|
|
33925
|
+
xor rdx, rdx
|
|
33926
|
+
idiv ${reg}
|
|
33927
|
+
mov rax, rdx`;
|
|
33928
|
+
break;
|
|
33929
|
+
default:
|
|
33930
|
+
this.text += `
|
|
33931
|
+
; Operador ${operador} não implementado`;
|
|
33932
|
+
}
|
|
33933
|
+
this.liberarRegistrador(reg);
|
|
33934
|
+
return 'rax';
|
|
33935
|
+
}
|
|
33936
|
+
traduzirConstrutoChamada(construto) {
|
|
33937
|
+
var _a;
|
|
33938
|
+
let nomeFuncao = 'funcao';
|
|
33939
|
+
if (construto.entidadeChamada instanceof construtos_1.Variavel) {
|
|
33940
|
+
nomeFuncao = ((_a = construto.entidadeChamada.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || 'funcao';
|
|
33941
|
+
}
|
|
33942
|
+
// Preparar argumentos (convenção de chamada System V AMD64)
|
|
33943
|
+
const registrosArgs = this.alvo === 'linux'
|
|
33944
|
+
? ['rdi', 'rsi', 'rdx', 'rcx', 'r8', 'r9'] // System V AMD64 [web:8]
|
|
33945
|
+
: ['rcx', 'rdx', 'r8', 'r9']; // Windows x64 [web:2]
|
|
33946
|
+
construto.argumentos.forEach((arg, index) => {
|
|
33947
|
+
if (index < registrosArgs.length) {
|
|
33948
|
+
const valorArg = this.dicionarioConstrutos[arg.constructor.name](arg);
|
|
33949
|
+
this.text += `
|
|
33950
|
+
mov ${registrosArgs[index]}, ${valorArg}`;
|
|
33951
|
+
}
|
|
33952
|
+
else {
|
|
33953
|
+
// TODO: push extra args on stack according to target ABI
|
|
33954
|
+
}
|
|
33955
|
+
});
|
|
33956
|
+
this.text += `
|
|
33957
|
+
call ${nomeFuncao}`;
|
|
33958
|
+
}
|
|
33959
|
+
traduzirConstrutoDefinirValor(construto) {
|
|
33960
|
+
const objeto = this.dicionarioConstrutos[construto.objeto.constructor.name](construto.objeto);
|
|
33961
|
+
const valor = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
33962
|
+
this.text += `
|
|
33963
|
+
mov rax, ${valor}
|
|
33964
|
+
mov [${objeto}], rax`;
|
|
33965
|
+
}
|
|
33966
|
+
traduzirFuncaoConstruto(construto) {
|
|
33967
|
+
const labelFuncao = `func_${this.gerarDigitoAleatorio()}`;
|
|
33968
|
+
this.text += `
|
|
33969
|
+
${labelFuncao}:
|
|
33970
|
+
push rbp
|
|
33971
|
+
mov rbp, rsp`;
|
|
33972
|
+
// Traduzir corpo da função
|
|
33973
|
+
if (construto.corpo && Array.isArray(construto.corpo)) {
|
|
33974
|
+
construto.corpo.forEach((declaracao) => {
|
|
33975
|
+
if (this.dicionarioDeclaracoes[declaracao.constructor.name]) {
|
|
33976
|
+
this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao);
|
|
33977
|
+
}
|
|
33978
|
+
});
|
|
33979
|
+
}
|
|
33980
|
+
this.text += `
|
|
33981
|
+
pop rbp
|
|
33982
|
+
ret`;
|
|
33983
|
+
}
|
|
33984
|
+
traduzirConstrutoLiteral(construto) {
|
|
33985
|
+
if (typeof construto.valor === 'string') {
|
|
33986
|
+
return this.criaStringLiteral(construto);
|
|
33987
|
+
}
|
|
33988
|
+
return String(construto.valor);
|
|
33989
|
+
}
|
|
33990
|
+
traduzirConstrutoLogico(construto) {
|
|
33991
|
+
const esquerda = this.dicionarioConstrutos[construto.esquerda.constructor.name](construto.esquerda);
|
|
33992
|
+
const direita = this.dicionarioConstrutos[construto.direita.constructor.name](construto.direita);
|
|
33993
|
+
const operador = construto.operador.lexema;
|
|
33994
|
+
const labelVerdadeiro = this.gerarLabel();
|
|
33995
|
+
const labelFim = this.gerarLabel();
|
|
33996
|
+
this.text += `
|
|
33997
|
+
mov rax, ${esquerda}
|
|
33998
|
+
cmp rax, 0`;
|
|
33999
|
+
if (operador === 'e' || operador === '&&') {
|
|
34000
|
+
this.text += `
|
|
34001
|
+
je ${labelFim}
|
|
34002
|
+
mov rax, ${direita}
|
|
34003
|
+
cmp rax, 0
|
|
34004
|
+
je ${labelFim}
|
|
34005
|
+
${labelVerdadeiro}:
|
|
34006
|
+
mov rax, 1
|
|
34007
|
+
${labelFim}:`;
|
|
34008
|
+
}
|
|
34009
|
+
else if (operador === 'ou' || operador === '||') {
|
|
34010
|
+
this.text += `
|
|
34011
|
+
jne ${labelVerdadeiro}
|
|
34012
|
+
mov rax, ${direita}
|
|
34013
|
+
cmp rax, 0
|
|
34014
|
+
jne ${labelVerdadeiro}
|
|
34015
|
+
mov rax, 0
|
|
34016
|
+
jmp ${labelFim}
|
|
34017
|
+
${labelVerdadeiro}:
|
|
34018
|
+
mov rax, 1
|
|
34019
|
+
${labelFim}:`;
|
|
34020
|
+
}
|
|
34021
|
+
return 'rax';
|
|
34022
|
+
}
|
|
34023
|
+
traduzirConstrutoTipoDe(construto) {
|
|
34024
|
+
// Simplificado - retorna tipo como número
|
|
34025
|
+
const expressao = this.dicionarioConstrutos[construto.valor.constructor.name](construto.valor);
|
|
34026
|
+
return expressao;
|
|
34027
|
+
}
|
|
34028
|
+
traduzirConstrutoUnario(construto) {
|
|
34029
|
+
const operando = this.dicionarioConstrutos[construto.operando.constructor.name](construto.operando);
|
|
34030
|
+
const operador = construto.operador.lexema;
|
|
34031
|
+
this.text += `
|
|
34032
|
+
mov rax, ${operando}`;
|
|
34033
|
+
if (operador === '-') {
|
|
34034
|
+
this.text += `
|
|
34035
|
+
neg rax`;
|
|
34036
|
+
}
|
|
34037
|
+
else if (operador === '!' || operador === 'nao') {
|
|
34038
|
+
this.text += `
|
|
34039
|
+
cmp rax, 0
|
|
34040
|
+
sete al
|
|
34041
|
+
movzx rax, al`;
|
|
34042
|
+
}
|
|
34043
|
+
return 'rax';
|
|
34044
|
+
}
|
|
34045
|
+
traduzirConstrutoVariavel(construto) {
|
|
34046
|
+
var _a;
|
|
34047
|
+
const nomeVar = (_a = construto.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
34048
|
+
if (nomeVar && this.variaveis.has(nomeVar)) {
|
|
34049
|
+
return `[${this.variaveis.get(nomeVar)}]`;
|
|
34050
|
+
}
|
|
34051
|
+
return nomeVar || 'unknown';
|
|
34052
|
+
}
|
|
34053
|
+
traduzirConstrutoVetor(construto) {
|
|
34054
|
+
var _a;
|
|
34055
|
+
const labelVetor = `vetor_${this.gerarDigitoAleatorio()}`;
|
|
34056
|
+
const tamanho = ((_a = construto.valores) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
34057
|
+
this.bss += ` ${labelVetor} resq ${tamanho}\n`;
|
|
34058
|
+
if (construto.valores && Array.isArray(construto.valores)) {
|
|
34059
|
+
construto.valores.forEach((valor, index) => {
|
|
34060
|
+
if (this.dicionarioConstrutos[valor.constructor.name]) {
|
|
34061
|
+
const valorTraduzido = this.dicionarioConstrutos[valor.constructor.name](valor);
|
|
34062
|
+
this.text += `
|
|
34063
|
+
mov rax, ${valorTraduzido}
|
|
34064
|
+
mov [${labelVetor} + ${index * 8}], rax`;
|
|
34065
|
+
}
|
|
34066
|
+
});
|
|
34067
|
+
}
|
|
34068
|
+
return labelVetor;
|
|
34069
|
+
}
|
|
34070
|
+
// Implementação das Declarações
|
|
34071
|
+
traduzirDeclaracaoBloco(declaracao) {
|
|
34072
|
+
if (declaracao.declaracoes && Array.isArray(declaracao.declaracoes)) {
|
|
34073
|
+
declaracao.declaracoes.forEach((decl) => {
|
|
34074
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
34075
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
34076
|
+
}
|
|
34077
|
+
});
|
|
34078
|
+
}
|
|
34079
|
+
}
|
|
34080
|
+
traduzirDeclaracaoEnquanto(declaracao) {
|
|
34081
|
+
const labelInicio = this.gerarLabel();
|
|
34082
|
+
const labelFim = this.gerarLabel();
|
|
34083
|
+
this.text += `
|
|
34084
|
+
${labelInicio}:`;
|
|
34085
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicao.constructor.name](declaracao.condicao);
|
|
34086
|
+
this.text += `
|
|
34087
|
+
cmp ${condicao}, 0
|
|
34088
|
+
je ${labelFim}`;
|
|
34089
|
+
if (this.dicionarioDeclaracoes[declaracao.corpo.constructor.name]) {
|
|
34090
|
+
this.dicionarioDeclaracoes[declaracao.corpo.constructor.name](declaracao.corpo);
|
|
34091
|
+
}
|
|
34092
|
+
this.text += `
|
|
34093
|
+
jmp ${labelInicio}
|
|
34094
|
+
${labelFim}:`;
|
|
34095
|
+
}
|
|
34096
|
+
traduzirDeclaracaoEscolha(declaracao) {
|
|
34097
|
+
const labelFim = this.gerarLabel();
|
|
34098
|
+
const valorEscolha = this.dicionarioConstrutos[declaracao.identificadorOuLiteral.constructor.name](declaracao.identificadorOuLiteral);
|
|
34099
|
+
if (declaracao.caminhos && Array.isArray(declaracao.caminhos)) {
|
|
34100
|
+
declaracao.caminhos.forEach((caminho) => {
|
|
34101
|
+
const labelProximo = this.gerarLabel();
|
|
34102
|
+
if (caminho.condicoes && caminho.condicoes[0]) {
|
|
34103
|
+
const valorCaso = this.dicionarioConstrutos[caminho.condicoes[0].constructor.name](caminho.condicoes[0]);
|
|
34104
|
+
this.text += `
|
|
34105
|
+
mov rax, ${valorEscolha}
|
|
34106
|
+
cmp rax, ${valorCaso}
|
|
34107
|
+
jne ${labelProximo}`;
|
|
34108
|
+
if (caminho.declaracoes && Array.isArray(caminho.declaracoes)) {
|
|
34109
|
+
caminho.declaracoes.forEach((decl) => {
|
|
34110
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
34111
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
34112
|
+
}
|
|
34113
|
+
});
|
|
34114
|
+
}
|
|
34115
|
+
this.text += `
|
|
34116
|
+
jmp ${labelFim}
|
|
34117
|
+
${labelProximo}:`;
|
|
34118
|
+
}
|
|
34119
|
+
});
|
|
34120
|
+
}
|
|
34121
|
+
this.text += `
|
|
34122
|
+
${labelFim}:`;
|
|
34123
|
+
}
|
|
34124
|
+
traduzirDeclaracaoExpressao(declaracao) {
|
|
34125
|
+
if (declaracao.expressao && this.dicionarioConstrutos[declaracao.expressao.constructor.name]) {
|
|
34126
|
+
this.dicionarioConstrutos[declaracao.expressao.constructor.name](declaracao.expressao);
|
|
34127
|
+
}
|
|
34128
|
+
}
|
|
34129
|
+
traduzirDeclaracaoFazer(declaracao) {
|
|
34130
|
+
const labelInicio = this.gerarLabel();
|
|
34131
|
+
this.text += `
|
|
34132
|
+
${labelInicio}:`;
|
|
34133
|
+
// Em Delégua, fazer-enquanto tem caminhoFazer que é um Bloco
|
|
34134
|
+
if (declaracao.caminhoFazer && declaracao.caminhoFazer.declaracoes) {
|
|
34135
|
+
declaracao.caminhoFazer.declaracoes.forEach((decl) => {
|
|
34136
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
34137
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
34138
|
+
}
|
|
34139
|
+
});
|
|
34140
|
+
}
|
|
34141
|
+
if (declaracao.condicaoEnquanto) {
|
|
34142
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicaoEnquanto.constructor.name](declaracao.condicaoEnquanto);
|
|
34143
|
+
this.text += `
|
|
34144
|
+
cmp ${condicao}, 0
|
|
34145
|
+
jne ${labelInicio}`;
|
|
34146
|
+
}
|
|
34147
|
+
}
|
|
34148
|
+
traduzirDeclaracaoFalhar(declaracao) {
|
|
34149
|
+
let mensagem = '"Erro"';
|
|
34150
|
+
if (declaracao.explicacao && typeof declaracao.explicacao === 'object' && 'constructor' in declaracao.explicacao) {
|
|
34151
|
+
const explicacao = declaracao.explicacao;
|
|
34152
|
+
if (explicacao.constructor && this.dicionarioConstrutos[explicacao.constructor.name]) {
|
|
34153
|
+
mensagem = this.dicionarioConstrutos[explicacao.constructor.name](explicacao);
|
|
34154
|
+
}
|
|
34155
|
+
}
|
|
34156
|
+
if (this.alvo === 'linux') {
|
|
34157
|
+
this.text += `
|
|
34158
|
+
; Falhar com mensagem: ${mensagem}
|
|
34159
|
+
mov eax, 1
|
|
34160
|
+
mov ebx, 1
|
|
34161
|
+
int 0x80`;
|
|
34162
|
+
}
|
|
34163
|
+
else {
|
|
34164
|
+
this.text += `
|
|
34165
|
+
; Falhar com mensagem: ${mensagem}
|
|
34166
|
+
mov eax, 1
|
|
34167
|
+
ret`;
|
|
34168
|
+
}
|
|
34169
|
+
}
|
|
34170
|
+
traduzirDeclaracaoFuncao(declaracao) {
|
|
34171
|
+
var _a;
|
|
34172
|
+
const nomeFuncao = ((_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || 'funcao';
|
|
34173
|
+
this.text += `
|
|
34174
|
+
${nomeFuncao}:
|
|
34175
|
+
push rbp
|
|
34176
|
+
mov rbp, rsp`;
|
|
34177
|
+
if (declaracao.funcao && declaracao.funcao.corpo && Array.isArray(declaracao.funcao.corpo)) {
|
|
34178
|
+
declaracao.funcao.corpo.forEach((decl) => {
|
|
34179
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
34180
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
34181
|
+
}
|
|
34182
|
+
});
|
|
34183
|
+
}
|
|
34184
|
+
this.text += `
|
|
34185
|
+
pop rbp
|
|
34186
|
+
ret`;
|
|
34187
|
+
}
|
|
34188
|
+
traduzirDeclaracaoImportar(declaracao) {
|
|
34189
|
+
// Importação é tratada em tempo de linkagem
|
|
34190
|
+
this.text += `
|
|
34191
|
+
; Importar: ${declaracao.caminho || 'unknown'}`;
|
|
34192
|
+
}
|
|
34193
|
+
traduzirDeclaracaoLeia(declaracao) {
|
|
34194
|
+
var _a;
|
|
34195
|
+
let nomeVar;
|
|
34196
|
+
if (declaracao.argumentos && declaracao.argumentos[0] && declaracao.argumentos[0] instanceof construtos_1.Variavel) {
|
|
34197
|
+
nomeVar = (_a = declaracao.argumentos[0].simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
34198
|
+
}
|
|
34199
|
+
if (!nomeVar)
|
|
34200
|
+
return;
|
|
34201
|
+
if (!this.variaveis.has(nomeVar)) {
|
|
34202
|
+
const varLabel = `var_${nomeVar}`;
|
|
34203
|
+
this.bss += ` ${varLabel} resb 256\n`;
|
|
34204
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
34205
|
+
}
|
|
34206
|
+
this.text += `
|
|
34207
|
+
mov eax, 3
|
|
34208
|
+
mov ebx, 0
|
|
34209
|
+
mov ecx, ${this.variaveis.get(nomeVar)}
|
|
34210
|
+
mov edx, 256
|
|
34211
|
+
int 0x80`;
|
|
34212
|
+
}
|
|
34213
|
+
traduzirDeclaracaoPara(declaracao) {
|
|
34214
|
+
const labelInicio = this.gerarLabel();
|
|
34215
|
+
const labelFim = this.gerarLabel();
|
|
34216
|
+
// Inicializador pode ser uma declaração ou construto
|
|
34217
|
+
if (declaracao.inicializador) {
|
|
34218
|
+
const tipoInicializador = declaracao.inicializador.constructor.name;
|
|
34219
|
+
if (this.dicionarioDeclaracoes[tipoInicializador]) {
|
|
34220
|
+
this.dicionarioDeclaracoes[tipoInicializador](declaracao.inicializador);
|
|
34221
|
+
}
|
|
34222
|
+
else if (this.dicionarioConstrutos[tipoInicializador]) {
|
|
34223
|
+
this.dicionarioConstrutos[tipoInicializador](declaracao.inicializador);
|
|
34224
|
+
}
|
|
34225
|
+
}
|
|
34226
|
+
this.text += `
|
|
34227
|
+
${labelInicio}:`;
|
|
34228
|
+
if (declaracao.condicao) {
|
|
34229
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicao.constructor.name](declaracao.condicao);
|
|
34230
|
+
this.text += `
|
|
34231
|
+
cmp ${condicao}, 0
|
|
34232
|
+
je ${labelFim}`;
|
|
34233
|
+
}
|
|
34234
|
+
if (this.dicionarioDeclaracoes[declaracao.corpo.constructor.name]) {
|
|
34235
|
+
this.dicionarioDeclaracoes[declaracao.corpo.constructor.name](declaracao.corpo);
|
|
34236
|
+
}
|
|
34237
|
+
if (declaracao.incrementar) {
|
|
34238
|
+
if (this.dicionarioConstrutos[declaracao.incrementar.constructor.name]) {
|
|
34239
|
+
this.dicionarioConstrutos[declaracao.incrementar.constructor.name](declaracao.incrementar);
|
|
34240
|
+
}
|
|
34241
|
+
}
|
|
34242
|
+
this.text += `
|
|
34243
|
+
jmp ${labelInicio}
|
|
34244
|
+
${labelFim}:`;
|
|
34245
|
+
}
|
|
34246
|
+
traduzirDeclaracaoParaCada(declaracao) {
|
|
34247
|
+
var _a;
|
|
34248
|
+
const labelInicio = this.gerarLabel();
|
|
34249
|
+
const labelFim = this.gerarLabel();
|
|
34250
|
+
let nomeVar;
|
|
34251
|
+
if (declaracao.variavelIteracao instanceof construtos_1.Variavel) {
|
|
34252
|
+
nomeVar = (_a = declaracao.variavelIteracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
34253
|
+
}
|
|
34254
|
+
const vetor = declaracao.vetorOuDicionario;
|
|
34255
|
+
let tamanhoVetor = 0;
|
|
34256
|
+
if (vetor instanceof construtos_1.Vetor) {
|
|
34257
|
+
tamanhoVetor = vetor.tamanho || 0;
|
|
34258
|
+
}
|
|
34259
|
+
this.text += `
|
|
34260
|
+
xor rcx, rcx
|
|
34261
|
+
${labelInicio}:
|
|
34262
|
+
cmp rcx, ${tamanhoVetor}
|
|
34263
|
+
jge ${labelFim}`;
|
|
34264
|
+
if (this.dicionarioDeclaracoes[declaracao.corpo.constructor.name]) {
|
|
34265
|
+
this.dicionarioDeclaracoes[declaracao.corpo.constructor.name](declaracao.corpo);
|
|
34266
|
+
}
|
|
34267
|
+
this.text += `
|
|
34268
|
+
inc rcx
|
|
34269
|
+
jmp ${labelInicio}
|
|
34270
|
+
${labelFim}:`;
|
|
34271
|
+
}
|
|
34272
|
+
traduzirDeclaracaoRetorna(declaracao) {
|
|
34273
|
+
if (declaracao.valor) {
|
|
34274
|
+
const valor = this.dicionarioConstrutos[declaracao.valor.constructor.name](declaracao.valor);
|
|
34275
|
+
this.text += `
|
|
34276
|
+
mov rax, ${valor}`;
|
|
34277
|
+
}
|
|
34278
|
+
this.text += `
|
|
34279
|
+
pop rbp
|
|
34280
|
+
ret`;
|
|
34281
|
+
}
|
|
34282
|
+
traduzirDeclaracaoSe(declaracao) {
|
|
34283
|
+
const labelSenao = this.gerarLabel();
|
|
34284
|
+
const labelFim = this.gerarLabel();
|
|
34285
|
+
const condicao = this.dicionarioConstrutos[declaracao.condicao.constructor.name](declaracao.condicao);
|
|
34286
|
+
this.text += `
|
|
34287
|
+
cmp ${condicao}, 0
|
|
34288
|
+
je ${labelSenao}`;
|
|
34289
|
+
if (this.dicionarioDeclaracoes[declaracao.caminhoEntao.constructor.name]) {
|
|
34290
|
+
this.dicionarioDeclaracoes[declaracao.caminhoEntao.constructor.name](declaracao.caminhoEntao);
|
|
34291
|
+
}
|
|
34292
|
+
this.text += `
|
|
34293
|
+
jmp ${labelFim}
|
|
34294
|
+
${labelSenao}:`;
|
|
34295
|
+
if (declaracao.caminhoSenao && this.dicionarioDeclaracoes[declaracao.caminhoSenao.constructor.name]) {
|
|
34296
|
+
this.dicionarioDeclaracoes[declaracao.caminhoSenao.constructor.name](declaracao.caminhoSenao);
|
|
34297
|
+
}
|
|
34298
|
+
this.text += `
|
|
34299
|
+
${labelFim}:`;
|
|
34300
|
+
}
|
|
34301
|
+
traduzirDeclaracaoClasse(declaracao) {
|
|
34302
|
+
var _a;
|
|
34303
|
+
// Classes em assembly são complexas - implementação básica
|
|
34304
|
+
this.text += `
|
|
34305
|
+
; Classe: ${((_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema) || 'unknown'}`;
|
|
34306
|
+
}
|
|
34307
|
+
traduzirDeclaracaoTente(declaracao) {
|
|
34308
|
+
// Try-catch em assembly requer handler complexo
|
|
34309
|
+
this.text += `
|
|
34310
|
+
; Tente-pegue`;
|
|
34311
|
+
if (declaracao.caminhoTente && Array.isArray(declaracao.caminhoTente)) {
|
|
34312
|
+
declaracao.caminhoTente.forEach((decl) => {
|
|
34313
|
+
if (this.dicionarioDeclaracoes[decl.constructor.name]) {
|
|
34314
|
+
this.dicionarioDeclaracoes[decl.constructor.name](decl);
|
|
34315
|
+
}
|
|
34316
|
+
});
|
|
34317
|
+
}
|
|
34318
|
+
}
|
|
34319
|
+
traduzirDeclaracaoConst(declaracao) {
|
|
34320
|
+
var _a;
|
|
34321
|
+
const nomeVar = (_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
34322
|
+
if (!nomeVar)
|
|
34323
|
+
return;
|
|
34324
|
+
const valor = this.dicionarioConstrutos[declaracao.inicializador.constructor.name](declaracao.inicializador);
|
|
34325
|
+
const varLabel = `const_${nomeVar}`;
|
|
34326
|
+
this.data += ` ${varLabel} dq ${valor}\n`;
|
|
34327
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
34328
|
+
}
|
|
34329
|
+
traduzirDeclaracaoVar(declaracao) {
|
|
34330
|
+
var _a;
|
|
34331
|
+
const nomeVar = (_a = declaracao.simbolo) === null || _a === void 0 ? void 0 : _a.lexema;
|
|
34332
|
+
if (!nomeVar)
|
|
34333
|
+
return;
|
|
34334
|
+
const varLabel = `var_${nomeVar}`;
|
|
34335
|
+
this.bss += ` ${varLabel} resq 1\n`;
|
|
34336
|
+
this.variaveis.set(nomeVar, varLabel);
|
|
34337
|
+
if (declaracao.inicializador) {
|
|
34338
|
+
const tipoInicializador = declaracao.inicializador.constructor.name;
|
|
34339
|
+
// Verificar se é um vetor
|
|
34340
|
+
if (declaracao.inicializador instanceof construtos_1.Vetor) {
|
|
34341
|
+
// Vetor precisa de tratamento especial
|
|
34342
|
+
const labelVetor = this.traduzirConstrutoVetor(declaracao.inicializador);
|
|
34343
|
+
// Associar o nome da variável com o label do vetor
|
|
34344
|
+
this.variaveis.set(nomeVar, labelVetor);
|
|
34345
|
+
}
|
|
34346
|
+
else if (this.dicionarioConstrutos[tipoInicializador]) {
|
|
34347
|
+
const valor = this.dicionarioConstrutos[tipoInicializador](declaracao.inicializador);
|
|
34348
|
+
this.text += `
|
|
34349
|
+
mov rax, ${valor}
|
|
34350
|
+
mov [${varLabel}], rax`;
|
|
34351
|
+
}
|
|
34352
|
+
}
|
|
34353
|
+
}
|
|
34354
|
+
criaStringLiteral(literal) {
|
|
34355
|
+
const varLiteral = `Delegua_${this.gerarDigitoAleatorio()}`;
|
|
34356
|
+
this.data += ` ${varLiteral} db '${literal.valor}', 0\n`;
|
|
34357
|
+
return varLiteral;
|
|
34358
|
+
}
|
|
34359
|
+
criaTamanhoNaMemoriaReferenteAVar(nomeStringLiteral) {
|
|
34360
|
+
const varTamanho = `tam_${nomeStringLiteral}`;
|
|
34361
|
+
this.data += ` ${varTamanho} equ $ - ${nomeStringLiteral}\n`;
|
|
34362
|
+
return varTamanho;
|
|
34363
|
+
}
|
|
34364
|
+
traduzirDeclaracaoEscreva(declaracaoEscreva) {
|
|
34365
|
+
let tam_string_literal = '';
|
|
34366
|
+
let nome_string_literal = '';
|
|
34367
|
+
if (declaracaoEscreva.argumentos[0] instanceof construtos_1.Literal) {
|
|
34368
|
+
nome_string_literal = this.criaStringLiteral(declaracaoEscreva.argumentos[0]);
|
|
34369
|
+
tam_string_literal = this.criaTamanhoNaMemoriaReferenteAVar(nome_string_literal);
|
|
34370
|
+
}
|
|
34371
|
+
if (this.alvo === 'linux') {
|
|
34372
|
+
this.text += `
|
|
34373
|
+
mov edx, ${tam_string_literal}
|
|
34374
|
+
mov ecx, ${nome_string_literal}
|
|
34375
|
+
mov ebx, 1 ; fd stdout
|
|
34376
|
+
mov eax, 4 ; sys_write
|
|
34377
|
+
int 0x80`;
|
|
34378
|
+
}
|
|
34379
|
+
else {
|
|
34380
|
+
// Windows: prototype `extern printf` and follow Win64 calling convention
|
|
34381
|
+
// RCX = format pointer; here we use the literal directly as a C string
|
|
34382
|
+
this.text += `
|
|
34383
|
+
lea rcx, [rel ${nome_string_literal}]
|
|
34384
|
+
call printf`;
|
|
34385
|
+
}
|
|
34386
|
+
}
|
|
34387
|
+
saidaSistema() {
|
|
34388
|
+
if (this.alvo === 'linux') {
|
|
34389
|
+
this.text += `
|
|
34390
|
+
mov eax, 1 ; sys_exit
|
|
34391
|
+
xor ebx, ebx ; status 0
|
|
34392
|
+
int 0x80`;
|
|
34393
|
+
}
|
|
34394
|
+
else {
|
|
34395
|
+
// Windows: return from main with 0 in EAX
|
|
34396
|
+
this.text += `
|
|
34397
|
+
xor eax, eax
|
|
34398
|
+
ret`;
|
|
34399
|
+
}
|
|
34400
|
+
}
|
|
34401
|
+
traduzir(declaracoes) {
|
|
34402
|
+
let resultado = '';
|
|
34403
|
+
this.declaracoesDeClasses = declaracoes.filter((declaracao) => declaracao instanceof declaracoes_1.Classe);
|
|
34404
|
+
for (const declaracao of declaracoes) {
|
|
34405
|
+
if (this.dicionarioDeclaracoes[declaracao.constructor.name]) {
|
|
34406
|
+
this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao);
|
|
34407
|
+
}
|
|
34408
|
+
}
|
|
34409
|
+
this.saidaSistema();
|
|
34410
|
+
resultado += this.bss + '\n' + this.data + '\n' + this.text;
|
|
34411
|
+
return resultado;
|
|
34412
|
+
}
|
|
34413
|
+
}
|
|
34414
|
+
exports.TradutorAssemblyX64 = TradutorAssemblyX64;
|
|
34415
|
+
|
|
34416
|
+
},{"../construtos":51,"../declaracoes":96}],208:[function(require,module,exports){
|
|
32727
34417
|
"use strict";
|
|
32728
34418
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
32729
34419
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -33358,7 +35048,7 @@ class TradutorAssemblyScript {
|
|
|
33358
35048
|
}
|
|
33359
35049
|
exports.TradutorAssemblyScript = TradutorAssemblyScript;
|
|
33360
35050
|
|
|
33361
|
-
},{"../construtos":51,"../declaracoes":96,"../tipos-de-simbolos/delegua":190}],
|
|
35051
|
+
},{"../construtos":51,"../declaracoes":96,"../tipos-de-simbolos/delegua":190}],209:[function(require,module,exports){
|
|
33362
35052
|
"use strict";
|
|
33363
35053
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33364
35054
|
exports.TradutorCalango = void 0;
|
|
@@ -33420,7 +35110,7 @@ class TradutorCalango {
|
|
|
33420
35110
|
}
|
|
33421
35111
|
exports.TradutorCalango = TradutorCalango;
|
|
33422
35112
|
|
|
33423
|
-
},{"../avaliador-sintatico/dialetos/avaliador-sintatico-calango":4,"../lexador/dialetos":162}],
|
|
35113
|
+
},{"../avaliador-sintatico/dialetos/avaliador-sintatico-calango":4,"../lexador/dialetos":162}],210:[function(require,module,exports){
|
|
33424
35114
|
"use strict";
|
|
33425
35115
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33426
35116
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -34173,7 +35863,7 @@ class TradutorJavaScript {
|
|
|
34173
35863
|
}
|
|
34174
35864
|
exports.TradutorJavaScript = TradutorJavaScript;
|
|
34175
35865
|
|
|
34176
|
-
},{"../construtos":51,"../declaracoes":96,"../tipos-de-simbolos/delegua":190}],
|
|
35866
|
+
},{"../construtos":51,"../declaracoes":96,"../tipos-de-simbolos/delegua":190}],211:[function(require,module,exports){
|
|
34177
35867
|
"use strict";
|
|
34178
35868
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34179
35869
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -34181,23 +35871,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
34181
35871
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34182
35872
|
exports.TradutorMermaidJs = void 0;
|
|
34183
35873
|
const delegua_1 = __importDefault(require("../tipos-de-simbolos/delegua"));
|
|
34184
|
-
|
|
34185
|
-
constructor(declaracao, texto) {
|
|
34186
|
-
this.declaracao = declaracao;
|
|
34187
|
-
this.texto = texto;
|
|
34188
|
-
}
|
|
34189
|
-
}
|
|
34190
|
-
class VerticeFluxograma {
|
|
34191
|
-
constructor(origem, destino, texto) {
|
|
34192
|
-
this.origem = origem;
|
|
34193
|
-
this.destino = destino;
|
|
34194
|
-
this.texto = texto;
|
|
34195
|
-
}
|
|
34196
|
-
paraTexto() {
|
|
34197
|
-
const seta = this.texto ? `-->|${this.texto}|` : '-->';
|
|
34198
|
-
return ` ${this.origem.texto}${seta}${this.destino.texto};\n`;
|
|
34199
|
-
}
|
|
34200
|
-
}
|
|
35874
|
+
const mermaid_1 = require("./mermaid");
|
|
34201
35875
|
/**
|
|
34202
35876
|
* [MermaidJs](https://mermaid.js.org/) é uma especificação que nos permite
|
|
34203
35877
|
* criar fluxogramas através de uma notação por texto.
|
|
@@ -34224,7 +35898,8 @@ class TradutorMermaidJs {
|
|
|
34224
35898
|
ComentarioComoConstruto: () => '',
|
|
34225
35899
|
DefinirValor: this.traduzirConstrutoDefinirValor.bind(this),
|
|
34226
35900
|
Dicionario: this.traduzirConstrutoDicionario.bind(this),
|
|
34227
|
-
FuncaoConstruto: this.traduzirFuncaoConstruto.bind(this),
|
|
35901
|
+
// FuncaoConstruto: this.traduzirFuncaoConstruto.bind(this),
|
|
35902
|
+
FuncaoConstruto: () => { throw new Error("Fluxogramas de funções ainda não é suportado."); },
|
|
34228
35903
|
Isto: () => 'this',
|
|
34229
35904
|
Leia: this.traduzirConstrutoLeia.bind(this),
|
|
34230
35905
|
Literal: this.traduzirConstrutoLiteral.bind(this),
|
|
@@ -34235,6 +35910,8 @@ class TradutorMermaidJs {
|
|
|
34235
35910
|
};
|
|
34236
35911
|
this.dicionarioDeclaracoes = {
|
|
34237
35912
|
Bloco: this.traduzirDeclaracaoBloco.bind(this),
|
|
35913
|
+
// Classe: this.traduzirDeclaracaoClasse.bind(this),
|
|
35914
|
+
Classe: () => { throw new Error("Fluxogramas de classes ainda não é suportado."); },
|
|
34238
35915
|
Comentario: () => '',
|
|
34239
35916
|
Const: this.traduzirDeclaracaoConst.bind(this),
|
|
34240
35917
|
Enquanto: this.traduzirDeclaracaoEnquanto.bind(this),
|
|
@@ -34242,6 +35919,8 @@ class TradutorMermaidJs {
|
|
|
34242
35919
|
Expressao: this.traduzirDeclaracaoExpressao.bind(this),
|
|
34243
35920
|
Escreva: this.traduzirDeclaracaoEscreva.bind(this),
|
|
34244
35921
|
Fazer: this.traduzirDeclaracaoFazerEnquanto.bind(this),
|
|
35922
|
+
// FuncaoDeclaracao: this.traduzirDeclaracaoFuncao.bind(this),
|
|
35923
|
+
FuncaoDeclaracao: () => { throw new Error("Fluxogramas de funções ainda não é suportado."); },
|
|
34245
35924
|
Para: this.traduzirDeclaracaoPara.bind(this),
|
|
34246
35925
|
ParaCada: this.traduzirDeclaracaoParaCada.bind(this),
|
|
34247
35926
|
Se: this.traduzirDeclaracaoSe.bind(this),
|
|
@@ -34315,7 +35994,19 @@ class TradutorMermaidJs {
|
|
|
34315
35994
|
return texto;
|
|
34316
35995
|
}
|
|
34317
35996
|
traduzirFuncaoConstruto(funcaoConstruto) {
|
|
34318
|
-
|
|
35997
|
+
let vertices = [];
|
|
35998
|
+
if (funcaoConstruto.corpo && funcaoConstruto.corpo.length > 0) {
|
|
35999
|
+
for (const declaracaoCorpo of funcaoConstruto.corpo) {
|
|
36000
|
+
// Usa o mesmo caminho de outras declarações,
|
|
36001
|
+
// então todas as arestas passam por logicaComumConexaoArestas.
|
|
36002
|
+
const verticesCorpo = this.dicionarioDeclaracoes[declaracaoCorpo.constructor.name](declaracaoCorpo);
|
|
36003
|
+
vertices = vertices.concat(verticesCorpo);
|
|
36004
|
+
}
|
|
36005
|
+
}
|
|
36006
|
+
/* if (this.anteriores.length > 0) {
|
|
36007
|
+
vertices = vertices.concat(this.anteriores)
|
|
36008
|
+
} */
|
|
36009
|
+
return vertices;
|
|
34319
36010
|
}
|
|
34320
36011
|
traduzirConstrutoLeia(leia) {
|
|
34321
36012
|
let texto = 'leia da entrada';
|
|
@@ -34375,7 +36066,7 @@ class TradutorMermaidJs {
|
|
|
34375
36066
|
textoVertice = String(this.ultimaDicaVertice);
|
|
34376
36067
|
this.ultimaDicaVertice = undefined;
|
|
34377
36068
|
}
|
|
34378
|
-
vertices.push(new VerticeFluxograma(anterior, aresta, textoVertice));
|
|
36069
|
+
vertices.push(new mermaid_1.VerticeFluxograma(anterior, aresta, textoVertice));
|
|
34379
36070
|
}
|
|
34380
36071
|
return vertices;
|
|
34381
36072
|
}
|
|
@@ -34387,10 +36078,45 @@ class TradutorMermaidJs {
|
|
|
34387
36078
|
}
|
|
34388
36079
|
return vertices;
|
|
34389
36080
|
}
|
|
36081
|
+
traduzirDeclaracaoClasse(declaracaoClasse) {
|
|
36082
|
+
const nomeClasse = declaracaoClasse.simbolo.lexema;
|
|
36083
|
+
const superClasse = declaracaoClasse.superClasse
|
|
36084
|
+
? declaracaoClasse.superClasse.nome.lexema
|
|
36085
|
+
: undefined;
|
|
36086
|
+
// Cria o diagrama de classe
|
|
36087
|
+
const diagramaClasse = new mermaid_1.DiagramaClasse(nomeClasse, superClasse);
|
|
36088
|
+
// Adiciona métodos ao diagrama
|
|
36089
|
+
if (declaracaoClasse.metodos && declaracaoClasse.metodos.length > 0) {
|
|
36090
|
+
for (const metodo of declaracaoClasse.metodos) {
|
|
36091
|
+
const parametros = [];
|
|
36092
|
+
if (metodo.funcao.parametros && metodo.funcao.parametros.length > 0) {
|
|
36093
|
+
for (const param of metodo.funcao.parametros) {
|
|
36094
|
+
const nomeParam = param.nome.lexema;
|
|
36095
|
+
const tipoParam = param.tipoDado || 'qualquer';
|
|
36096
|
+
parametros.push(`${nomeParam}: ${tipoParam}`);
|
|
36097
|
+
}
|
|
36098
|
+
}
|
|
36099
|
+
const tipoRetorno = metodo.funcao.tipo;
|
|
36100
|
+
diagramaClasse.metodos.push({
|
|
36101
|
+
nome: metodo.simbolo.lexema,
|
|
36102
|
+
parametros,
|
|
36103
|
+
tipoRetorno
|
|
36104
|
+
});
|
|
36105
|
+
}
|
|
36106
|
+
}
|
|
36107
|
+
// Adiciona o diagrama à lista
|
|
36108
|
+
this.diagramasClasses.push(diagramaClasse);
|
|
36109
|
+
// No fluxograma principal, apenas mostra a definição da classe
|
|
36110
|
+
const texto = `Linha${declaracaoClasse.linha}[Classe ${nomeClasse}${superClasse ? ` herda ${superClasse}` : ''}]`;
|
|
36111
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoClasse, texto);
|
|
36112
|
+
const vertices = this.logicaComumConexaoArestas(aresta);
|
|
36113
|
+
this.anteriores.push(aresta);
|
|
36114
|
+
return vertices;
|
|
36115
|
+
}
|
|
34390
36116
|
traduzirDeclaracaoConst(declaracaoConst) {
|
|
34391
36117
|
let texto = `Linha${declaracaoConst.linha}(variável: ${declaracaoConst.simbolo.lexema}`;
|
|
34392
36118
|
texto += this.logicaComumTraducaoVarEConst(declaracaoConst, texto);
|
|
34393
|
-
const aresta = new ArestaFluxograma(declaracaoConst, texto);
|
|
36119
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoConst, texto);
|
|
34394
36120
|
const vertices = this.logicaComumConexaoArestas(aresta);
|
|
34395
36121
|
this.anteriores.push(aresta);
|
|
34396
36122
|
return vertices;
|
|
@@ -34399,14 +36125,14 @@ class TradutorMermaidJs {
|
|
|
34399
36125
|
let texto = `Linha${declaracaoEnquanto.linha}(enquanto `;
|
|
34400
36126
|
const condicao = this.dicionarioConstrutos[declaracaoEnquanto.condicao.constructor.name](declaracaoEnquanto.condicao);
|
|
34401
36127
|
texto += condicao + ')';
|
|
34402
|
-
const aresta = new ArestaFluxograma(declaracaoEnquanto, texto);
|
|
36128
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoEnquanto, texto);
|
|
34403
36129
|
let vertices = this.logicaComumConexaoArestas(aresta);
|
|
34404
36130
|
this.anteriores.push(aresta);
|
|
34405
36131
|
// Corpo, normalmente um `Bloco`.
|
|
34406
36132
|
const verticesCorpo = this.dicionarioDeclaracoes[declaracaoEnquanto.corpo.constructor.name](declaracaoEnquanto.corpo);
|
|
34407
36133
|
vertices = vertices.concat(verticesCorpo);
|
|
34408
36134
|
const ultimaArestaCorpo = verticesCorpo[verticesCorpo.length - 1].destino;
|
|
34409
|
-
const verticeLaco = new VerticeFluxograma(ultimaArestaCorpo, aresta);
|
|
36135
|
+
const verticeLaco = new mermaid_1.VerticeFluxograma(ultimaArestaCorpo, aresta);
|
|
34410
36136
|
vertices.push(verticeLaco);
|
|
34411
36137
|
return vertices;
|
|
34412
36138
|
}
|
|
@@ -34425,7 +36151,7 @@ class TradutorMermaidJs {
|
|
|
34425
36151
|
textoCaso = `caso ${textoIdentificadorOuLiteral} tenha qualquer outro valor:`;
|
|
34426
36152
|
}
|
|
34427
36153
|
let textoCaminho = `Linha${linha}(${textoCaso})`;
|
|
34428
|
-
const arestaCondicaoCaminho = new ArestaFluxograma(declaracaoEscolha, textoCaminho);
|
|
36154
|
+
const arestaCondicaoCaminho = new mermaid_1.ArestaFluxograma(declaracaoEscolha, textoCaminho);
|
|
34429
36155
|
this.anteriores.push(arestaCondicaoCaminho);
|
|
34430
36156
|
let verticesResolvidos = [];
|
|
34431
36157
|
for (const declaracaoCaminho of caminhoEscolha.declaracoes) {
|
|
@@ -34444,7 +36170,7 @@ class TradutorMermaidJs {
|
|
|
34444
36170
|
let texto = `Linha${declaracaoEscolha.linha}(escolha um caminho pelo valor de `;
|
|
34445
36171
|
const textoIdentificadorOuLiteral = this.dicionarioConstrutos[declaracaoEscolha.identificadorOuLiteral.constructor.name](declaracaoEscolha.identificadorOuLiteral);
|
|
34446
36172
|
texto += textoIdentificadorOuLiteral + ')';
|
|
34447
|
-
const aresta = new ArestaFluxograma(declaracaoEscolha, texto);
|
|
36173
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoEscolha, texto);
|
|
34448
36174
|
let vertices = this.logicaComumConexaoArestas(aresta);
|
|
34449
36175
|
const arestasCaminho = [];
|
|
34450
36176
|
for (const caminho of declaracaoEscolha.caminhos) {
|
|
@@ -34454,7 +36180,7 @@ class TradutorMermaidJs {
|
|
|
34454
36180
|
arestasCaminho.push(this.logicaComumCaminhoEscolha(declaracaoEscolha, declaracaoEscolha.caminhoPadrao, declaracaoEscolha.caminhoPadrao.declaracoes[0].linha - 1, textoIdentificadorOuLiteral, true));
|
|
34455
36181
|
}
|
|
34456
36182
|
for (const conjunto of Object.values(arestasCaminho)) {
|
|
34457
|
-
const verticeEscolhaECaminho = new VerticeFluxograma(aresta, conjunto.caminho);
|
|
36183
|
+
const verticeEscolhaECaminho = new mermaid_1.VerticeFluxograma(aresta, conjunto.caminho);
|
|
34458
36184
|
vertices.push(verticeEscolhaECaminho);
|
|
34459
36185
|
vertices = vertices.concat(conjunto.declaracoesCaminho);
|
|
34460
36186
|
this.anteriores.push(conjunto.declaracoesCaminho[conjunto.declaracoesCaminho.length - 1].destino);
|
|
@@ -34469,7 +36195,7 @@ class TradutorMermaidJs {
|
|
|
34469
36195
|
}
|
|
34470
36196
|
texto = texto.slice(0, -2);
|
|
34471
36197
|
texto += ')';
|
|
34472
|
-
const aresta = new ArestaFluxograma(declaracaoEscreva, texto);
|
|
36198
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoEscreva, texto);
|
|
34473
36199
|
const vertices = this.logicaComumConexaoArestas(aresta);
|
|
34474
36200
|
this.anteriores.push(aresta);
|
|
34475
36201
|
return vertices;
|
|
@@ -34478,14 +36204,14 @@ class TradutorMermaidJs {
|
|
|
34478
36204
|
let texto = `Linha${declaracaoExpressao.linha}(`;
|
|
34479
36205
|
const textoConstruto = this.dicionarioConstrutos[declaracaoExpressao.expressao.constructor.name](declaracaoExpressao.expressao);
|
|
34480
36206
|
texto += textoConstruto + ')';
|
|
34481
|
-
const aresta = new ArestaFluxograma(declaracaoExpressao, texto);
|
|
36207
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoExpressao, texto);
|
|
34482
36208
|
const vertices = this.logicaComumConexaoArestas(aresta);
|
|
34483
36209
|
this.anteriores.push(aresta);
|
|
34484
36210
|
return vertices;
|
|
34485
36211
|
}
|
|
34486
36212
|
traduzirDeclaracaoFazerEnquanto(declaracaoFazerEnquanto) {
|
|
34487
36213
|
const texto = `Linha${declaracaoFazerEnquanto.linha}(fazer)`;
|
|
34488
|
-
const aresta = new ArestaFluxograma(declaracaoFazerEnquanto, texto);
|
|
36214
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoFazerEnquanto, texto);
|
|
34489
36215
|
let vertices = this.logicaComumConexaoArestas(aresta);
|
|
34490
36216
|
this.anteriores.push(aresta);
|
|
34491
36217
|
// Corpo, normalmente um `Bloco`.
|
|
@@ -34494,15 +36220,37 @@ class TradutorMermaidJs {
|
|
|
34494
36220
|
const ultimaArestaCorpo = verticesCorpo[verticesCorpo.length - 1].destino;
|
|
34495
36221
|
const condicao = this.dicionarioConstrutos[declaracaoFazerEnquanto.condicaoEnquanto.constructor.name](declaracaoFazerEnquanto.condicaoEnquanto);
|
|
34496
36222
|
let textoEnquanto = `Linha${declaracaoFazerEnquanto.condicaoEnquanto.linha}(enquanto ${condicao})`;
|
|
34497
|
-
const arestaEnquanto = new ArestaFluxograma(declaracaoFazerEnquanto, textoEnquanto);
|
|
34498
|
-
const verticeEnquanto = new VerticeFluxograma(ultimaArestaCorpo, arestaEnquanto);
|
|
36223
|
+
const arestaEnquanto = new mermaid_1.ArestaFluxograma(declaracaoFazerEnquanto, textoEnquanto);
|
|
36224
|
+
const verticeEnquanto = new mermaid_1.VerticeFluxograma(ultimaArestaCorpo, arestaEnquanto);
|
|
34499
36225
|
vertices.push(verticeEnquanto);
|
|
34500
|
-
const verticeCondicaoComFazer = new VerticeFluxograma(arestaEnquanto, aresta);
|
|
36226
|
+
const verticeCondicaoComFazer = new mermaid_1.VerticeFluxograma(arestaEnquanto, aresta);
|
|
34501
36227
|
vertices.push(verticeCondicaoComFazer);
|
|
34502
36228
|
this.anteriores.pop();
|
|
34503
36229
|
this.anteriores.push(arestaEnquanto);
|
|
34504
36230
|
return vertices;
|
|
34505
36231
|
}
|
|
36232
|
+
traduzirDeclaracaoFuncao(declaracaoFuncao) {
|
|
36233
|
+
// Gera o corpo como vértices, mas não conecta nada ao fluxo principal
|
|
36234
|
+
const verticesCorpo = this.traduzirFuncaoConstruto(declaracaoFuncao.funcao);
|
|
36235
|
+
if (verticesCorpo.length === 0) {
|
|
36236
|
+
return [];
|
|
36237
|
+
}
|
|
36238
|
+
// Descobre o texto dos nós do corpo
|
|
36239
|
+
let textoSubgraph = `subgraph função ${declaracaoFuncao.simbolo.lexema}\n`;
|
|
36240
|
+
for (const vertice of verticesCorpo) {
|
|
36241
|
+
textoSubgraph += vertice.paraTexto();
|
|
36242
|
+
}
|
|
36243
|
+
textoSubgraph += `end;\n`;
|
|
36244
|
+
// Armazena o subgraph para imprimir depois de graph TD;
|
|
36245
|
+
this.subgrafosFuncoes.push(textoSubgraph);
|
|
36246
|
+
// IMPORTANTE: não altera this.anteriores aqui, para a função
|
|
36247
|
+
// não entrar no fluxo principal. O fluxo principal continua
|
|
36248
|
+
// sendo só as declarações "top-level" (como a chamada em Linha4).
|
|
36249
|
+
// Também não precisa devolver vértices, porque eles já
|
|
36250
|
+
// foram adicionados em this.vertices pelos próprios tradutores
|
|
36251
|
+
// das declarações do corpo (via dicionarioDeclaracoes).
|
|
36252
|
+
return [];
|
|
36253
|
+
}
|
|
34506
36254
|
traduzirDeclaracaoPara(declaracaoPara) {
|
|
34507
36255
|
let texto = `Linha${declaracaoPara.linha}(para `;
|
|
34508
36256
|
if (declaracaoPara.inicializador) {
|
|
@@ -34515,13 +36263,13 @@ class TradutorMermaidJs {
|
|
|
34515
36263
|
texto = texto.slice(0, -2);
|
|
34516
36264
|
}
|
|
34517
36265
|
texto += ')';
|
|
34518
|
-
const aresta = new ArestaFluxograma(declaracaoPara, texto);
|
|
36266
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoPara, texto);
|
|
34519
36267
|
let vertices = this.logicaComumConexaoArestas(aresta);
|
|
34520
36268
|
this.anteriores.push(aresta);
|
|
34521
36269
|
// Condição
|
|
34522
36270
|
const textoCondicao = this.dicionarioConstrutos[declaracaoPara.condicao.constructor.name](declaracaoPara.condicao);
|
|
34523
36271
|
const textoArestaCondicao = `Linha${declaracaoPara.linha}Condicao{se ${textoCondicao}}`;
|
|
34524
|
-
const arestaCondicao = new ArestaFluxograma(declaracaoPara, textoArestaCondicao);
|
|
36272
|
+
const arestaCondicao = new mermaid_1.ArestaFluxograma(declaracaoPara, textoArestaCondicao);
|
|
34525
36273
|
vertices = vertices.concat(this.logicaComumConexaoArestas(arestaCondicao));
|
|
34526
36274
|
this.anteriores.push(arestaCondicao);
|
|
34527
36275
|
this.ultimaDicaVertice = 'Sim';
|
|
@@ -34531,10 +36279,10 @@ class TradutorMermaidJs {
|
|
|
34531
36279
|
// Incremento
|
|
34532
36280
|
const ultimaArestaCorpo = verticesCorpo[verticesCorpo.length - 1].destino;
|
|
34533
36281
|
const textoIncremento = this.dicionarioConstrutos[declaracaoPara.incrementar.constructor.name](declaracaoPara.incrementar);
|
|
34534
|
-
const arestaIncremento = new ArestaFluxograma(declaracaoPara, `Linha${declaracaoPara.linha}Incremento(${textoIncremento})`);
|
|
34535
|
-
const verticeIncremento = new VerticeFluxograma(ultimaArestaCorpo, arestaIncremento);
|
|
36282
|
+
const arestaIncremento = new mermaid_1.ArestaFluxograma(declaracaoPara, `Linha${declaracaoPara.linha}Incremento(${textoIncremento})`);
|
|
36283
|
+
const verticeIncremento = new mermaid_1.VerticeFluxograma(ultimaArestaCorpo, arestaIncremento);
|
|
34536
36284
|
vertices.push(verticeIncremento);
|
|
34537
|
-
const verticeLaco = new VerticeFluxograma(arestaIncremento, arestaCondicao);
|
|
36285
|
+
const verticeLaco = new mermaid_1.VerticeFluxograma(arestaIncremento, arestaCondicao);
|
|
34538
36286
|
vertices.push(verticeLaco);
|
|
34539
36287
|
// Configura a condição como anterior
|
|
34540
36288
|
this.anteriores.pop();
|
|
@@ -34547,14 +36295,14 @@ class TradutorMermaidJs {
|
|
|
34547
36295
|
let texto = `Linha${declaracaoParaCada.linha}(para cada ${textoVariavelIteracao} em `;
|
|
34548
36296
|
const textoVariavelIterada = this.dicionarioConstrutos[declaracaoParaCada.vetorOuDicionario.constructor.name](declaracaoParaCada.vetorOuDicionario);
|
|
34549
36297
|
texto += textoVariavelIterada + ')';
|
|
34550
|
-
const aresta = new ArestaFluxograma(declaracaoParaCada, texto);
|
|
36298
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoParaCada, texto);
|
|
34551
36299
|
let vertices = this.logicaComumConexaoArestas(aresta);
|
|
34552
36300
|
this.anteriores.push(aresta);
|
|
34553
36301
|
// Corpo, normalmente um `Bloco`.
|
|
34554
36302
|
const verticesCorpo = this.dicionarioDeclaracoes[declaracaoParaCada.corpo.constructor.name](declaracaoParaCada.corpo);
|
|
34555
36303
|
vertices = vertices.concat(verticesCorpo);
|
|
34556
36304
|
const ultimaArestaCorpo = verticesCorpo[verticesCorpo.length - 1].destino;
|
|
34557
|
-
vertices.push(new VerticeFluxograma(ultimaArestaCorpo, aresta));
|
|
36305
|
+
vertices.push(new mermaid_1.VerticeFluxograma(ultimaArestaCorpo, aresta));
|
|
34558
36306
|
return vertices;
|
|
34559
36307
|
}
|
|
34560
36308
|
traduzirDeclaracaoSe(declaracaoSe) {
|
|
@@ -34562,7 +36310,7 @@ class TradutorMermaidJs {
|
|
|
34562
36310
|
const condicao = this.dicionarioConstrutos[declaracaoSe.condicao.constructor.name](declaracaoSe.condicao);
|
|
34563
36311
|
texto += condicao;
|
|
34564
36312
|
texto += `}`;
|
|
34565
|
-
const aresta = new ArestaFluxograma(declaracaoSe, texto);
|
|
36313
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoSe, texto);
|
|
34566
36314
|
let vertices = this.logicaComumConexaoArestas(aresta);
|
|
34567
36315
|
this.anteriores.push(aresta);
|
|
34568
36316
|
this.ultimaDicaVertice = 'Sim';
|
|
@@ -34572,8 +36320,8 @@ class TradutorMermaidJs {
|
|
|
34572
36320
|
const ultimaArestaEntao = verticesEntao[verticesEntao.length - 1].destino;
|
|
34573
36321
|
if (declaracaoSe.caminhoSenao) {
|
|
34574
36322
|
this.anteriores = [];
|
|
34575
|
-
const arestaSenao = new ArestaFluxograma(declaracaoSe, `Linha${declaracaoSe.caminhoSenao.linha}(senão)`);
|
|
34576
|
-
vertices.push(new VerticeFluxograma(aresta, arestaSenao, 'Não'));
|
|
36323
|
+
const arestaSenao = new mermaid_1.ArestaFluxograma(declaracaoSe, `Linha${declaracaoSe.caminhoSenao.linha}(senão)`);
|
|
36324
|
+
vertices.push(new mermaid_1.VerticeFluxograma(aresta, arestaSenao, 'Não'));
|
|
34577
36325
|
this.anteriores.push(arestaSenao);
|
|
34578
36326
|
const verticesSenao = this.dicionarioDeclaracoes[declaracaoSe.caminhoSenao.constructor.name](declaracaoSe.caminhoSenao);
|
|
34579
36327
|
vertices = vertices.concat(verticesSenao);
|
|
@@ -34591,7 +36339,7 @@ class TradutorMermaidJs {
|
|
|
34591
36339
|
traduzirDeclaracaoVar(declaracaoVar) {
|
|
34592
36340
|
let texto = `Linha${declaracaoVar.linha}(variável: ${declaracaoVar.simbolo.lexema}`;
|
|
34593
36341
|
texto += this.logicaComumTraducaoVarEConst(declaracaoVar, texto);
|
|
34594
|
-
const aresta = new ArestaFluxograma(declaracaoVar, texto);
|
|
36342
|
+
const aresta = new mermaid_1.ArestaFluxograma(declaracaoVar, texto);
|
|
34595
36343
|
const vertices = this.logicaComumConexaoArestas(aresta);
|
|
34596
36344
|
this.anteriores.push(aresta);
|
|
34597
36345
|
return vertices;
|
|
@@ -34600,9 +36348,15 @@ class TradutorMermaidJs {
|
|
|
34600
36348
|
this.anteriores = [];
|
|
34601
36349
|
this.vertices = [];
|
|
34602
36350
|
let resultado = 'graph TD;\n';
|
|
36351
|
+
this.subgrafosFuncoes = [];
|
|
34603
36352
|
for (const declaracao of declaracoes) {
|
|
34604
36353
|
this.vertices = this.vertices.concat(this.dicionarioDeclaracoes[declaracao.constructor.name](declaracao));
|
|
34605
36354
|
}
|
|
36355
|
+
if (this.subgrafosFuncoes.length > 0) {
|
|
36356
|
+
for (const sub of this.subgrafosFuncoes) {
|
|
36357
|
+
resultado += sub;
|
|
36358
|
+
}
|
|
36359
|
+
}
|
|
34606
36360
|
if (this.vertices.length === 0 && this.anteriores.length === 0) {
|
|
34607
36361
|
resultado += ` Vazio;\n`;
|
|
34608
36362
|
}
|
|
@@ -34627,7 +36381,7 @@ class TradutorMermaidJs {
|
|
|
34627
36381
|
}
|
|
34628
36382
|
exports.TradutorMermaidJs = TradutorMermaidJs;
|
|
34629
36383
|
|
|
34630
|
-
},{"../tipos-de-simbolos/delegua":190}],
|
|
36384
|
+
},{"../tipos-de-simbolos/delegua":190,"./mermaid":201}],212:[function(require,module,exports){
|
|
34631
36385
|
"use strict";
|
|
34632
36386
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34633
36387
|
exports.TradutorPortugolIpt = void 0;
|
|
@@ -34689,7 +36443,7 @@ class TradutorPortugolIpt {
|
|
|
34689
36443
|
}
|
|
34690
36444
|
exports.TradutorPortugolIpt = TradutorPortugolIpt;
|
|
34691
36445
|
|
|
34692
|
-
},{"../avaliador-sintatico/dialetos":10,"../lexador/dialetos":162}],
|
|
36446
|
+
},{"../avaliador-sintatico/dialetos":10,"../lexador/dialetos":162}],213:[function(require,module,exports){
|
|
34693
36447
|
"use strict";
|
|
34694
36448
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
34695
36449
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -35338,7 +37092,7 @@ class TradutorPython {
|
|
|
35338
37092
|
}
|
|
35339
37093
|
exports.TradutorPython = TradutorPython;
|
|
35340
37094
|
|
|
35341
|
-
},{"../construtos":51,"../declaracoes":96,"../tipos-de-simbolos/delegua":190}],
|
|
37095
|
+
},{"../construtos":51,"../declaracoes":96,"../tipos-de-simbolos/delegua":190}],214:[function(require,module,exports){
|
|
35342
37096
|
"use strict";
|
|
35343
37097
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35344
37098
|
exports.TradutorReversoJavaScript = void 0;
|
|
@@ -35735,7 +37489,7 @@ class TradutorReversoJavaScript {
|
|
|
35735
37489
|
}
|
|
35736
37490
|
exports.TradutorReversoJavaScript = TradutorReversoJavaScript;
|
|
35737
37491
|
|
|
35738
|
-
},{}],
|
|
37492
|
+
},{}],215:[function(require,module,exports){
|
|
35739
37493
|
"use strict";
|
|
35740
37494
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35741
37495
|
exports.TradutorReversoPython = void 0;
|
|
@@ -35808,7 +37562,7 @@ class TradutorReversoPython {
|
|
|
35808
37562
|
}
|
|
35809
37563
|
exports.TradutorReversoPython = TradutorReversoPython;
|
|
35810
37564
|
|
|
35811
|
-
},{"./python/python3-lexer":
|
|
37565
|
+
},{"./python/python3-lexer":204,"./python/python3-parser":205,"antlr4ts":332,"antlr4ts/tree/ParseTreeWalker":351}],216:[function(require,module,exports){
|
|
35812
37566
|
"use strict";
|
|
35813
37567
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35814
37568
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
@@ -36402,7 +38156,7 @@ class TradutorReversoTenda {
|
|
|
36402
38156
|
}
|
|
36403
38157
|
exports.TradutorReversoTenda = TradutorReversoTenda;
|
|
36404
38158
|
|
|
36405
|
-
},{"../construtos":51,"../tipos-de-simbolos/tenda":197}],
|
|
38159
|
+
},{"../construtos":51,"../tipos-de-simbolos/tenda":197}],217:[function(require,module,exports){
|
|
36406
38160
|
"use strict";
|
|
36407
38161
|
/*!
|
|
36408
38162
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -36410,7 +38164,7 @@ exports.TradutorReversoTenda = TradutorReversoTenda;
|
|
|
36410
38164
|
*/
|
|
36411
38165
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36412
38166
|
|
|
36413
|
-
},{}],
|
|
38167
|
+
},{}],218:[function(require,module,exports){
|
|
36414
38168
|
"use strict";
|
|
36415
38169
|
/*!
|
|
36416
38170
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -36418,7 +38172,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36418
38172
|
*/
|
|
36419
38173
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36420
38174
|
|
|
36421
|
-
},{}],
|
|
38175
|
+
},{}],219:[function(require,module,exports){
|
|
36422
38176
|
"use strict";
|
|
36423
38177
|
/*!
|
|
36424
38178
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -36580,7 +38334,7 @@ __decorate([
|
|
|
36580
38334
|
], ANTLRInputStream.prototype, "toString", null);
|
|
36581
38335
|
exports.ANTLRInputStream = ANTLRInputStream;
|
|
36582
38336
|
|
|
36583
|
-
},{"./Decorators":
|
|
38337
|
+
},{"./Decorators":230,"./IntStream":236,"assert":373}],220:[function(require,module,exports){
|
|
36584
38338
|
"use strict";
|
|
36585
38339
|
/*!
|
|
36586
38340
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -36663,7 +38417,7 @@ __decorate([
|
|
|
36663
38417
|
], BailErrorStrategy.prototype, "sync", null);
|
|
36664
38418
|
exports.BailErrorStrategy = BailErrorStrategy;
|
|
36665
38419
|
|
|
36666
|
-
},{"./Decorators":
|
|
38420
|
+
},{"./Decorators":230,"./DefaultErrorStrategy":231,"./InputMismatchException":235,"./misc/ParseCancellationException":347}],221:[function(require,module,exports){
|
|
36667
38421
|
"use strict";
|
|
36668
38422
|
/*!
|
|
36669
38423
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -37153,7 +38907,7 @@ BufferedTokenStream = __decorate([
|
|
|
37153
38907
|
], BufferedTokenStream);
|
|
37154
38908
|
exports.BufferedTokenStream = BufferedTokenStream;
|
|
37155
38909
|
|
|
37156
|
-
},{"./CommonToken":
|
|
38910
|
+
},{"./CommonToken":226,"./Decorators":230,"./Lexer":238,"./Token":255,"./misc/Interval":342,"assert":373}],222:[function(require,module,exports){
|
|
37157
38911
|
"use strict";
|
|
37158
38912
|
/*!
|
|
37159
38913
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -37161,7 +38915,7 @@ exports.BufferedTokenStream = BufferedTokenStream;
|
|
|
37161
38915
|
*/
|
|
37162
38916
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37163
38917
|
|
|
37164
|
-
},{}],
|
|
38918
|
+
},{}],223:[function(require,module,exports){
|
|
37165
38919
|
"use strict";
|
|
37166
38920
|
/*!
|
|
37167
38921
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -37295,7 +39049,7 @@ var CharStreams;
|
|
|
37295
39049
|
// }
|
|
37296
39050
|
})(CharStreams = exports.CharStreams || (exports.CharStreams = {}));
|
|
37297
39051
|
|
|
37298
|
-
},{"./CodePointBuffer":
|
|
39052
|
+
},{"./CodePointBuffer":224,"./CodePointCharStream":225,"./IntStream":236}],224:[function(require,module,exports){
|
|
37299
39053
|
"use strict";
|
|
37300
39054
|
/*!
|
|
37301
39055
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -37530,7 +39284,7 @@ exports.CodePointBuffer = CodePointBuffer;
|
|
|
37530
39284
|
CodePointBuffer.Builder = Builder;
|
|
37531
39285
|
})(CodePointBuffer = exports.CodePointBuffer || (exports.CodePointBuffer = {}));
|
|
37532
39286
|
|
|
37533
|
-
},{"./misc/Character":
|
|
39287
|
+
},{"./misc/Character":338,"assert":373}],225:[function(require,module,exports){
|
|
37534
39288
|
"use strict";
|
|
37535
39289
|
/*!
|
|
37536
39290
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -37680,7 +39434,7 @@ __decorate([
|
|
|
37680
39434
|
], CodePointCharStream.prototype, "getText", null);
|
|
37681
39435
|
exports.CodePointCharStream = CodePointCharStream;
|
|
37682
39436
|
|
|
37683
|
-
},{"./Decorators":
|
|
39437
|
+
},{"./Decorators":230,"./IntStream":236,"./misc/Interval":342,"assert":373}],226:[function(require,module,exports){
|
|
37684
39438
|
"use strict";
|
|
37685
39439
|
/*!
|
|
37686
39440
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -37910,7 +39664,7 @@ CommonToken = __decorate([
|
|
|
37910
39664
|
], CommonToken);
|
|
37911
39665
|
exports.CommonToken = CommonToken;
|
|
37912
39666
|
|
|
37913
|
-
},{"./Decorators":
|
|
39667
|
+
},{"./Decorators":230,"./Token":255,"./misc/Interval":342}],227:[function(require,module,exports){
|
|
37914
39668
|
"use strict";
|
|
37915
39669
|
/*!
|
|
37916
39670
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -37974,7 +39728,7 @@ exports.CommonTokenFactory = CommonTokenFactory;
|
|
|
37974
39728
|
CommonTokenFactory.DEFAULT = new CommonTokenFactory();
|
|
37975
39729
|
})(CommonTokenFactory = exports.CommonTokenFactory || (exports.CommonTokenFactory = {}));
|
|
37976
39730
|
|
|
37977
|
-
},{"./CommonToken":
|
|
39731
|
+
},{"./CommonToken":226,"./Decorators":230,"./misc/Interval":342}],228:[function(require,module,exports){
|
|
37978
39732
|
"use strict";
|
|
37979
39733
|
/*!
|
|
37980
39734
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -38101,7 +39855,7 @@ CommonTokenStream = __decorate([
|
|
|
38101
39855
|
], CommonTokenStream);
|
|
38102
39856
|
exports.CommonTokenStream = CommonTokenStream;
|
|
38103
39857
|
|
|
38104
|
-
},{"./BufferedTokenStream":
|
|
39858
|
+
},{"./BufferedTokenStream":221,"./Decorators":230,"./Token":255}],229:[function(require,module,exports){
|
|
38105
39859
|
"use strict";
|
|
38106
39860
|
/*!
|
|
38107
39861
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -38135,7 +39889,7 @@ exports.ConsoleErrorListener = ConsoleErrorListener;
|
|
|
38135
39889
|
*/
|
|
38136
39890
|
ConsoleErrorListener.INSTANCE = new ConsoleErrorListener();
|
|
38137
39891
|
|
|
38138
|
-
},{}],
|
|
39892
|
+
},{}],230:[function(require,module,exports){
|
|
38139
39893
|
"use strict";
|
|
38140
39894
|
/*!
|
|
38141
39895
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -38162,7 +39916,7 @@ function SuppressWarnings(options) {
|
|
|
38162
39916
|
}
|
|
38163
39917
|
exports.SuppressWarnings = SuppressWarnings;
|
|
38164
39918
|
|
|
38165
|
-
},{}],
|
|
39919
|
+
},{}],231:[function(require,module,exports){
|
|
38166
39920
|
"use strict";
|
|
38167
39921
|
/*!
|
|
38168
39922
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -38976,7 +40730,7 @@ __decorate([
|
|
|
38976
40730
|
], DefaultErrorStrategy.prototype, "consumeUntil", null);
|
|
38977
40731
|
exports.DefaultErrorStrategy = DefaultErrorStrategy;
|
|
38978
40732
|
|
|
38979
|
-
},{"./Decorators":
|
|
40733
|
+
},{"./Decorators":230,"./FailedPredicateException":234,"./InputMismatchException":235,"./NoViableAltException":242,"./Token":255,"./atn/ATNState":269,"./atn/ATNStateType":270,"./atn/PredictionContext":310,"./misc/IntervalSet":343}],232:[function(require,module,exports){
|
|
38980
40734
|
"use strict";
|
|
38981
40735
|
/*!
|
|
38982
40736
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -39052,7 +40806,7 @@ var Dependents;
|
|
|
39052
40806
|
Dependents[Dependents["FOLLOWING"] = 9] = "FOLLOWING";
|
|
39053
40807
|
})(Dependents = exports.Dependents || (exports.Dependents = {}));
|
|
39054
40808
|
|
|
39055
|
-
},{}],
|
|
40809
|
+
},{}],233:[function(require,module,exports){
|
|
39056
40810
|
"use strict";
|
|
39057
40811
|
/*!
|
|
39058
40812
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -39200,7 +40954,7 @@ __decorate([
|
|
|
39200
40954
|
], DiagnosticErrorListener.prototype, "getConflictingAlts", null);
|
|
39201
40955
|
exports.DiagnosticErrorListener = DiagnosticErrorListener;
|
|
39202
40956
|
|
|
39203
|
-
},{"./Decorators":
|
|
40957
|
+
},{"./Decorators":230,"./misc/BitSet":337,"./misc/Interval":342}],234:[function(require,module,exports){
|
|
39204
40958
|
"use strict";
|
|
39205
40959
|
/*!
|
|
39206
40960
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -39265,7 +41019,7 @@ FailedPredicateException = __decorate([
|
|
|
39265
41019
|
], FailedPredicateException);
|
|
39266
41020
|
exports.FailedPredicateException = FailedPredicateException;
|
|
39267
41021
|
|
|
39268
|
-
},{"./Decorators":
|
|
41022
|
+
},{"./Decorators":230,"./RecognitionException":249,"./atn/PredicateTransition":309}],235:[function(require,module,exports){
|
|
39269
41023
|
"use strict";
|
|
39270
41024
|
/*!
|
|
39271
41025
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -39305,7 +41059,7 @@ InputMismatchException = __decorate([
|
|
|
39305
41059
|
], InputMismatchException);
|
|
39306
41060
|
exports.InputMismatchException = InputMismatchException;
|
|
39307
41061
|
|
|
39308
|
-
},{"./Decorators":
|
|
41062
|
+
},{"./Decorators":230,"./RecognitionException":249}],236:[function(require,module,exports){
|
|
39309
41063
|
"use strict";
|
|
39310
41064
|
/*!
|
|
39311
41065
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -39328,7 +41082,7 @@ var IntStream;
|
|
|
39328
41082
|
IntStream.UNKNOWN_SOURCE_NAME = "<unknown>";
|
|
39329
41083
|
})(IntStream = exports.IntStream || (exports.IntStream = {}));
|
|
39330
41084
|
|
|
39331
|
-
},{}],
|
|
41085
|
+
},{}],237:[function(require,module,exports){
|
|
39332
41086
|
"use strict";
|
|
39333
41087
|
/*!
|
|
39334
41088
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -39375,7 +41129,7 @@ __decorate([
|
|
|
39375
41129
|
], InterpreterRuleContext.prototype, "ruleIndex", null);
|
|
39376
41130
|
exports.InterpreterRuleContext = InterpreterRuleContext;
|
|
39377
41131
|
|
|
39378
|
-
},{"./Decorators":
|
|
41132
|
+
},{"./Decorators":230,"./ParserRuleContext":246}],238:[function(require,module,exports){
|
|
39379
41133
|
"use strict";
|
|
39380
41134
|
/*!
|
|
39381
41135
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -39711,7 +41465,7 @@ __decorate([
|
|
|
39711
41465
|
], Lexer.prototype, "charPositionInLine", null);
|
|
39712
41466
|
exports.Lexer = Lexer;
|
|
39713
41467
|
|
|
39714
|
-
},{"./CommonTokenFactory":
|
|
41468
|
+
},{"./CommonTokenFactory":227,"./Decorators":230,"./IntStream":236,"./LexerNoViableAltException":240,"./Recognizer":250,"./Token":255,"./atn/LexerATNSimulator":288,"./misc/IntegerStack":341,"./misc/Interval":342}],239:[function(require,module,exports){
|
|
39715
41469
|
"use strict";
|
|
39716
41470
|
/*!
|
|
39717
41471
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -39791,7 +41545,7 @@ LexerInterpreter = __decorate([
|
|
|
39791
41545
|
], LexerInterpreter);
|
|
39792
41546
|
exports.LexerInterpreter = LexerInterpreter;
|
|
39793
41547
|
|
|
39794
|
-
},{"./Decorators":
|
|
41548
|
+
},{"./Decorators":230,"./Lexer":238,"./atn/LexerATNSimulator":288}],240:[function(require,module,exports){
|
|
39795
41549
|
"use strict";
|
|
39796
41550
|
/*!
|
|
39797
41551
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -39848,7 +41602,7 @@ LexerNoViableAltException = __decorate([
|
|
|
39848
41602
|
], LexerNoViableAltException);
|
|
39849
41603
|
exports.LexerNoViableAltException = LexerNoViableAltException;
|
|
39850
41604
|
|
|
39851
|
-
},{"./Decorators":
|
|
41605
|
+
},{"./Decorators":230,"./RecognitionException":249,"./misc/Interval":342,"./misc/Utils":349}],241:[function(require,module,exports){
|
|
39852
41606
|
"use strict";
|
|
39853
41607
|
/*!
|
|
39854
41608
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -40058,7 +41812,7 @@ ListTokenSource = __decorate([
|
|
|
40058
41812
|
], ListTokenSource);
|
|
40059
41813
|
exports.ListTokenSource = ListTokenSource;
|
|
40060
41814
|
|
|
40061
|
-
},{"./CommonTokenFactory":
|
|
41815
|
+
},{"./CommonTokenFactory":227,"./Decorators":230,"./Token":255}],242:[function(require,module,exports){
|
|
40062
41816
|
"use strict";
|
|
40063
41817
|
/*!
|
|
40064
41818
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -40113,7 +41867,7 @@ __decorate([
|
|
|
40113
41867
|
], NoViableAltException.prototype, "_startToken", void 0);
|
|
40114
41868
|
exports.NoViableAltException = NoViableAltException;
|
|
40115
41869
|
|
|
40116
|
-
},{"./Decorators":
|
|
41870
|
+
},{"./Decorators":230,"./Parser":243,"./RecognitionException":249}],243:[function(require,module,exports){
|
|
40117
41871
|
(function (process){(function (){
|
|
40118
41872
|
"use strict";
|
|
40119
41873
|
/*!
|
|
@@ -40959,7 +42713,7 @@ __decorate([
|
|
|
40959
42713
|
exports.Parser = Parser;
|
|
40960
42714
|
|
|
40961
42715
|
}).call(this)}).call(this,require('_process'))
|
|
40962
|
-
},{"./Decorators":
|
|
42716
|
+
},{"./Decorators":230,"./DefaultErrorStrategy":231,"./Lexer":238,"./ProxyParserErrorListener":248,"./Recognizer":250,"./Token":255,"./atn/ATNDeserializationOptions":266,"./atn/ATNDeserializer":267,"./atn/ParseInfo":303,"./atn/ParserATNSimulator":304,"./atn/ProfilingATNSimulator":313,"./misc/IntegerStack":341,"./misc/Utils":349,"./tree/ErrorNode":350,"./tree/TerminalNode":353,"./tree/pattern/ParseTreePatternMatcher":358,"_process":432}],244:[function(require,module,exports){
|
|
40963
42717
|
"use strict";
|
|
40964
42718
|
/*!
|
|
40965
42719
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -40967,7 +42721,7 @@ exports.Parser = Parser;
|
|
|
40967
42721
|
*/
|
|
40968
42722
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40969
42723
|
|
|
40970
|
-
},{}],
|
|
42724
|
+
},{}],245:[function(require,module,exports){
|
|
40971
42725
|
"use strict";
|
|
40972
42726
|
/*!
|
|
40973
42727
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -41375,7 +43129,7 @@ ParserInterpreter = __decorate([
|
|
|
41375
43129
|
], ParserInterpreter);
|
|
41376
43130
|
exports.ParserInterpreter = ParserInterpreter;
|
|
41377
43131
|
|
|
41378
|
-
},{"./Decorators":
|
|
43132
|
+
},{"./Decorators":230,"./FailedPredicateException":234,"./InputMismatchException":235,"./InterpreterRuleContext":237,"./Parser":243,"./RecognitionException":249,"./Token":255,"./atn/ATNState":269,"./atn/ATNStateType":270,"./atn/LoopEndState":300,"./atn/ParserATNSimulator":304,"./atn/StarLoopEntryState":322,"./misc/BitSet":337}],246:[function(require,module,exports){
|
|
41379
43133
|
"use strict";
|
|
41380
43134
|
/*!
|
|
41381
43135
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -41676,7 +43430,7 @@ __decorate([
|
|
|
41676
43430
|
], ParserRuleContext.prototype, "sourceInterval", null);
|
|
41677
43431
|
exports.ParserRuleContext = ParserRuleContext;
|
|
41678
43432
|
|
|
41679
|
-
},{"./Decorators":
|
|
43433
|
+
},{"./Decorators":230,"./RuleContext":251,"./misc/Interval":342,"./tree/ErrorNode":350,"./tree/TerminalNode":353}],247:[function(require,module,exports){
|
|
41680
43434
|
"use strict";
|
|
41681
43435
|
/*!
|
|
41682
43436
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -41726,7 +43480,7 @@ __decorate([
|
|
|
41726
43480
|
], ProxyErrorListener.prototype, "syntaxError", null);
|
|
41727
43481
|
exports.ProxyErrorListener = ProxyErrorListener;
|
|
41728
43482
|
|
|
41729
|
-
},{"./Decorators":
|
|
43483
|
+
},{"./Decorators":230}],248:[function(require,module,exports){
|
|
41730
43484
|
"use strict";
|
|
41731
43485
|
/*!
|
|
41732
43486
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -41785,7 +43539,7 @@ __decorate([
|
|
|
41785
43539
|
], ProxyParserErrorListener.prototype, "reportContextSensitivity", null);
|
|
41786
43540
|
exports.ProxyParserErrorListener = ProxyParserErrorListener;
|
|
41787
43541
|
|
|
41788
|
-
},{"./Decorators":
|
|
43542
|
+
},{"./Decorators":230,"./ProxyErrorListener":247}],249:[function(require,module,exports){
|
|
41789
43543
|
"use strict";
|
|
41790
43544
|
/*!
|
|
41791
43545
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -41890,7 +43644,7 @@ class RecognitionException extends Error {
|
|
|
41890
43644
|
}
|
|
41891
43645
|
exports.RecognitionException = RecognitionException;
|
|
41892
43646
|
|
|
41893
|
-
},{}],
|
|
43647
|
+
},{}],250:[function(require,module,exports){
|
|
41894
43648
|
"use strict";
|
|
41895
43649
|
/*!
|
|
41896
43650
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42109,7 +43863,7 @@ __decorate([
|
|
|
42109
43863
|
], Recognizer.prototype, "getErrorListeners", null);
|
|
42110
43864
|
exports.Recognizer = Recognizer;
|
|
42111
43865
|
|
|
42112
|
-
},{"./ConsoleErrorListener":
|
|
43866
|
+
},{"./ConsoleErrorListener":229,"./Decorators":230,"./ProxyErrorListener":247,"./Token":255,"./misc/Utils":349}],251:[function(require,module,exports){
|
|
42113
43867
|
"use strict";
|
|
42114
43868
|
/*!
|
|
42115
43869
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42326,7 +44080,7 @@ __decorate([
|
|
|
42326
44080
|
], RuleContext.prototype, "toStringTree", null);
|
|
42327
44081
|
exports.RuleContext = RuleContext;
|
|
42328
44082
|
|
|
42329
|
-
},{"./Decorators":
|
|
44083
|
+
},{"./Decorators":230,"./ParserRuleContext":246,"./Recognizer":250,"./atn/ATN":263,"./misc/Interval":342,"./tree/RuleNode":352,"./tree/Trees":354}],252:[function(require,module,exports){
|
|
42330
44084
|
"use strict";
|
|
42331
44085
|
/*!
|
|
42332
44086
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42377,7 +44131,7 @@ __decorate([
|
|
|
42377
44131
|
], RuleContextWithAltNum.prototype, "altNumber", null);
|
|
42378
44132
|
exports.RuleContextWithAltNum = RuleContextWithAltNum;
|
|
42379
44133
|
|
|
42380
|
-
},{"./Decorators":
|
|
44134
|
+
},{"./Decorators":230,"./ParserRuleContext":246,"./atn/ATN":263}],253:[function(require,module,exports){
|
|
42381
44135
|
"use strict";
|
|
42382
44136
|
/*!
|
|
42383
44137
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42400,7 +44154,7 @@ function RuleDependency(dependency) {
|
|
|
42400
44154
|
}
|
|
42401
44155
|
exports.RuleDependency = RuleDependency;
|
|
42402
44156
|
|
|
42403
|
-
},{}],
|
|
44157
|
+
},{}],254:[function(require,module,exports){
|
|
42404
44158
|
"use strict";
|
|
42405
44159
|
/*!
|
|
42406
44160
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42419,7 +44173,7 @@ function RuleVersion(version) {
|
|
|
42419
44173
|
}
|
|
42420
44174
|
exports.RuleVersion = RuleVersion;
|
|
42421
44175
|
|
|
42422
|
-
},{}],
|
|
44176
|
+
},{}],255:[function(require,module,exports){
|
|
42423
44177
|
"use strict";
|
|
42424
44178
|
/*!
|
|
42425
44179
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42459,7 +44213,7 @@ var Token;
|
|
|
42459
44213
|
Token.MIN_USER_CHANNEL_VALUE = 2;
|
|
42460
44214
|
})(Token = exports.Token || (exports.Token = {}));
|
|
42461
44215
|
|
|
42462
|
-
},{"./IntStream":
|
|
44216
|
+
},{"./IntStream":236}],256:[function(require,module,exports){
|
|
42463
44217
|
"use strict";
|
|
42464
44218
|
/*!
|
|
42465
44219
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42467,7 +44221,7 @@ var Token;
|
|
|
42467
44221
|
*/
|
|
42468
44222
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42469
44223
|
|
|
42470
|
-
},{}],
|
|
44224
|
+
},{}],257:[function(require,module,exports){
|
|
42471
44225
|
"use strict";
|
|
42472
44226
|
/*!
|
|
42473
44227
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42475,7 +44229,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
42475
44229
|
*/
|
|
42476
44230
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42477
44231
|
|
|
42478
|
-
},{}],
|
|
44232
|
+
},{}],258:[function(require,module,exports){
|
|
42479
44233
|
"use strict";
|
|
42480
44234
|
/*!
|
|
42481
44235
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42483,7 +44237,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
42483
44237
|
*/
|
|
42484
44238
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42485
44239
|
|
|
42486
|
-
},{}],
|
|
44240
|
+
},{}],259:[function(require,module,exports){
|
|
42487
44241
|
"use strict";
|
|
42488
44242
|
/*!
|
|
42489
44243
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42991,7 +44745,7 @@ __decorate([
|
|
|
42991
44745
|
Decorators_1.Override
|
|
42992
44746
|
], ReplaceOp.prototype, "toString", null);
|
|
42993
44747
|
|
|
42994
|
-
},{"./Decorators":
|
|
44748
|
+
},{"./Decorators":230,"./Token":255,"./misc/Interval":342}],260:[function(require,module,exports){
|
|
42995
44749
|
"use strict";
|
|
42996
44750
|
/*!
|
|
42997
44751
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -42999,7 +44753,7 @@ __decorate([
|
|
|
42999
44753
|
*/
|
|
43000
44754
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43001
44755
|
|
|
43002
|
-
},{}],
|
|
44756
|
+
},{}],261:[function(require,module,exports){
|
|
43003
44757
|
"use strict";
|
|
43004
44758
|
/*!
|
|
43005
44759
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -43119,7 +44873,7 @@ __decorate([
|
|
|
43119
44873
|
], VocabularyImpl, "EMPTY_VOCABULARY", void 0);
|
|
43120
44874
|
exports.VocabularyImpl = VocabularyImpl;
|
|
43121
44875
|
|
|
43122
|
-
},{"./Decorators":
|
|
44876
|
+
},{"./Decorators":230,"./Token":255}],262:[function(require,module,exports){
|
|
43123
44877
|
"use strict";
|
|
43124
44878
|
/*!
|
|
43125
44879
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -43127,7 +44881,7 @@ exports.VocabularyImpl = VocabularyImpl;
|
|
|
43127
44881
|
*/
|
|
43128
44882
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43129
44883
|
|
|
43130
|
-
},{}],
|
|
44884
|
+
},{}],263:[function(require,module,exports){
|
|
43131
44885
|
"use strict";
|
|
43132
44886
|
/*!
|
|
43133
44887
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -43349,7 +45103,7 @@ exports.ATN = ATN;
|
|
|
43349
45103
|
})(ATN = exports.ATN || (exports.ATN = {}));
|
|
43350
45104
|
exports.ATN = ATN;
|
|
43351
45105
|
|
|
43352
|
-
},{"../Decorators":
|
|
45106
|
+
},{"../Decorators":230,"../Token":255,"../dfa/DFA":328,"../misc/Array2DHashMap":333,"../misc/IntervalSet":343,"../misc/ObjectEqualityComparator":346,"./InvalidState":286,"./LL1Analyzer":287,"./PredictionContext":310,"assert":373}],264:[function(require,module,exports){
|
|
43353
45107
|
"use strict";
|
|
43354
45108
|
/*!
|
|
43355
45109
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -43874,7 +45628,7 @@ ActionSemanticContextATNConfig = __decorate([
|
|
|
43874
45628
|
__param(1, Decorators_1.NotNull), __param(2, Decorators_1.NotNull)
|
|
43875
45629
|
], ActionSemanticContextATNConfig);
|
|
43876
45630
|
|
|
43877
|
-
},{"../Decorators":
|
|
45631
|
+
},{"../Decorators":230,"../misc/Array2DHashMap":333,"../misc/MurmurHash":345,"../misc/ObjectEqualityComparator":346,"./DecisionState":283,"./PredictionContext":310,"./SemanticContext":318,"assert":373}],265:[function(require,module,exports){
|
|
43878
45632
|
"use strict";
|
|
43879
45633
|
/*!
|
|
43880
45634
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -44321,7 +46075,7 @@ __decorate([
|
|
|
44321
46075
|
], ATNConfigSet.prototype, "hashCode", null);
|
|
44322
46076
|
exports.ATNConfigSet = ATNConfigSet;
|
|
44323
46077
|
|
|
44324
|
-
},{"../Decorators":
|
|
46078
|
+
},{"../Decorators":230,"../misc/Array2DHashMap":333,"../misc/Array2DHashSet":334,"../misc/ArrayEqualityComparator":335,"../misc/BitSet":337,"../misc/ObjectEqualityComparator":346,"../misc/Utils":349,"./ATN":263,"./ATNConfig":264,"./PredictionContext":310,"./PredictionContextCache":311,"./SemanticContext":318,"assert":373}],266:[function(require,module,exports){
|
|
44325
46079
|
"use strict";
|
|
44326
46080
|
/*!
|
|
44327
46081
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -44400,7 +46154,7 @@ __decorate([
|
|
|
44400
46154
|
], ATNDeserializationOptions, "defaultOptions", null);
|
|
44401
46155
|
exports.ATNDeserializationOptions = ATNDeserializationOptions;
|
|
44402
46156
|
|
|
44403
|
-
},{"../Decorators":
|
|
46157
|
+
},{"../Decorators":230}],267:[function(require,module,exports){
|
|
44404
46158
|
"use strict";
|
|
44405
46159
|
/*!
|
|
44406
46160
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45487,7 +47241,7 @@ __decorate([
|
|
|
45487
47241
|
], ATNDeserializer.prototype, "edgeFactory", null);
|
|
45488
47242
|
exports.ATNDeserializer = ATNDeserializer;
|
|
45489
47243
|
|
|
45490
|
-
},{"../Decorators":
|
|
47244
|
+
},{"../Decorators":230,"../Token":255,"../dfa/DFA":328,"../misc/Array2DHashSet":334,"../misc/BitSet":337,"../misc/IntervalSet":343,"../misc/UUID":348,"./ATN":263,"./ATNDeserializationOptions":266,"./ATNStateType":270,"./ActionTransition":272,"./AtomTransition":274,"./BasicBlockStartState":275,"./BasicState":276,"./BlockEndState":277,"./BlockStartState":278,"./DecisionState":283,"./EpsilonTransition":284,"./InvalidState":286,"./LexerChannelAction":290,"./LexerCustomAction":291,"./LexerModeAction":293,"./LexerMoreAction":294,"./LexerPopModeAction":295,"./LexerPushModeAction":296,"./LexerSkipAction":297,"./LexerTypeAction":298,"./LoopEndState":300,"./NotSetTransition":301,"./ParserATNSimulator":304,"./PlusBlockStartState":305,"./PlusLoopbackState":306,"./PrecedencePredicateTransition":307,"./PredicateTransition":309,"./RangeTransition":314,"./RuleStartState":315,"./RuleStopState":316,"./RuleTransition":317,"./SetTransition":319,"./StarBlockStartState":321,"./StarLoopEntryState":322,"./StarLoopbackState":323,"./TokensStartState":324,"./WildcardTransition":326}],268:[function(require,module,exports){
|
|
45491
47245
|
"use strict";
|
|
45492
47246
|
/*!
|
|
45493
47247
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45551,7 +47305,7 @@ exports.ATNSimulator = ATNSimulator;
|
|
|
45551
47305
|
})(ATNSimulator = exports.ATNSimulator || (exports.ATNSimulator = {}));
|
|
45552
47306
|
exports.ATNSimulator = ATNSimulator;
|
|
45553
47307
|
|
|
45554
|
-
},{"../Decorators":
|
|
47308
|
+
},{"../Decorators":230,"../dfa/DFAState":330,"./ATNConfigSet":265,"./PredictionContext":310}],269:[function(require,module,exports){
|
|
45555
47309
|
"use strict";
|
|
45556
47310
|
/*!
|
|
45557
47311
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45738,7 +47492,7 @@ exports.ATNState = ATNState;
|
|
|
45738
47492
|
ATNState.INVALID_STATE_NUMBER = -1;
|
|
45739
47493
|
})(ATNState = exports.ATNState || (exports.ATNState = {}));
|
|
45740
47494
|
|
|
45741
|
-
},{"../Decorators":
|
|
47495
|
+
},{"../Decorators":230}],270:[function(require,module,exports){
|
|
45742
47496
|
"use strict";
|
|
45743
47497
|
/*!
|
|
45744
47498
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45764,7 +47518,7 @@ var ATNStateType;
|
|
|
45764
47518
|
ATNStateType[ATNStateType["LOOP_END"] = 12] = "LOOP_END";
|
|
45765
47519
|
})(ATNStateType = exports.ATNStateType || (exports.ATNStateType = {}));
|
|
45766
47520
|
|
|
45767
|
-
},{}],
|
|
47521
|
+
},{}],271:[function(require,module,exports){
|
|
45768
47522
|
"use strict";
|
|
45769
47523
|
/*!
|
|
45770
47524
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45784,7 +47538,7 @@ class AbstractPredicateTransition extends Transition_1.Transition {
|
|
|
45784
47538
|
}
|
|
45785
47539
|
exports.AbstractPredicateTransition = AbstractPredicateTransition;
|
|
45786
47540
|
|
|
45787
|
-
},{"./Transition":
|
|
47541
|
+
},{"./Transition":325}],272:[function(require,module,exports){
|
|
45788
47542
|
"use strict";
|
|
45789
47543
|
/*!
|
|
45790
47544
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45840,7 +47594,7 @@ ActionTransition = __decorate([
|
|
|
45840
47594
|
], ActionTransition);
|
|
45841
47595
|
exports.ActionTransition = ActionTransition;
|
|
45842
47596
|
|
|
45843
|
-
},{"../Decorators":
|
|
47597
|
+
},{"../Decorators":230,"./Transition":325}],273:[function(require,module,exports){
|
|
45844
47598
|
"use strict";
|
|
45845
47599
|
/*!
|
|
45846
47600
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45927,7 +47681,7 @@ AmbiguityInfo = __decorate([
|
|
|
45927
47681
|
], AmbiguityInfo);
|
|
45928
47682
|
exports.AmbiguityInfo = AmbiguityInfo;
|
|
45929
47683
|
|
|
45930
|
-
},{"../Decorators":
|
|
47684
|
+
},{"../Decorators":230,"./DecisionEventInfo":281}],274:[function(require,module,exports){
|
|
45931
47685
|
"use strict";
|
|
45932
47686
|
/*!
|
|
45933
47687
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -45985,7 +47739,7 @@ AtomTransition = __decorate([
|
|
|
45985
47739
|
], AtomTransition);
|
|
45986
47740
|
exports.AtomTransition = AtomTransition;
|
|
45987
47741
|
|
|
45988
|
-
},{"../Decorators":
|
|
47742
|
+
},{"../Decorators":230,"../misc/IntervalSet":343,"./Transition":325}],275:[function(require,module,exports){
|
|
45989
47743
|
"use strict";
|
|
45990
47744
|
/*!
|
|
45991
47745
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46017,7 +47771,7 @@ __decorate([
|
|
|
46017
47771
|
], BasicBlockStartState.prototype, "stateType", null);
|
|
46018
47772
|
exports.BasicBlockStartState = BasicBlockStartState;
|
|
46019
47773
|
|
|
46020
|
-
},{"../Decorators":
|
|
47774
|
+
},{"../Decorators":230,"./ATNStateType":270,"./BlockStartState":278}],276:[function(require,module,exports){
|
|
46021
47775
|
"use strict";
|
|
46022
47776
|
/*!
|
|
46023
47777
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46049,7 +47803,7 @@ __decorate([
|
|
|
46049
47803
|
], BasicState.prototype, "stateType", null);
|
|
46050
47804
|
exports.BasicState = BasicState;
|
|
46051
47805
|
|
|
46052
|
-
},{"../Decorators":
|
|
47806
|
+
},{"../Decorators":230,"./ATNState":269,"./ATNStateType":270}],277:[function(require,module,exports){
|
|
46053
47807
|
"use strict";
|
|
46054
47808
|
/*!
|
|
46055
47809
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46078,7 +47832,7 @@ __decorate([
|
|
|
46078
47832
|
], BlockEndState.prototype, "stateType", null);
|
|
46079
47833
|
exports.BlockEndState = BlockEndState;
|
|
46080
47834
|
|
|
46081
|
-
},{"../Decorators":
|
|
47835
|
+
},{"../Decorators":230,"./ATNState":269,"./ATNStateType":270}],278:[function(require,module,exports){
|
|
46082
47836
|
"use strict";
|
|
46083
47837
|
/*!
|
|
46084
47838
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46092,7 +47846,7 @@ class BlockStartState extends DecisionState_1.DecisionState {
|
|
|
46092
47846
|
}
|
|
46093
47847
|
exports.BlockStartState = BlockStartState;
|
|
46094
47848
|
|
|
46095
|
-
},{"./DecisionState":
|
|
47849
|
+
},{"./DecisionState":283}],279:[function(require,module,exports){
|
|
46096
47850
|
"use strict";
|
|
46097
47851
|
/*!
|
|
46098
47852
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46162,7 +47916,7 @@ __decorate([
|
|
|
46162
47916
|
], ConflictInfo.prototype, "hashCode", null);
|
|
46163
47917
|
exports.ConflictInfo = ConflictInfo;
|
|
46164
47918
|
|
|
46165
|
-
},{"../Decorators":
|
|
47919
|
+
},{"../Decorators":230,"../misc/Utils":349}],280:[function(require,module,exports){
|
|
46166
47920
|
"use strict";
|
|
46167
47921
|
/*!
|
|
46168
47922
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46222,7 +47976,7 @@ ContextSensitivityInfo = __decorate([
|
|
|
46222
47976
|
], ContextSensitivityInfo);
|
|
46223
47977
|
exports.ContextSensitivityInfo = ContextSensitivityInfo;
|
|
46224
47978
|
|
|
46225
|
-
},{"../Decorators":
|
|
47979
|
+
},{"../Decorators":230,"./DecisionEventInfo":281}],281:[function(require,module,exports){
|
|
46226
47980
|
"use strict";
|
|
46227
47981
|
/*!
|
|
46228
47982
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46274,7 +48028,7 @@ DecisionEventInfo = __decorate([
|
|
|
46274
48028
|
], DecisionEventInfo);
|
|
46275
48029
|
exports.DecisionEventInfo = DecisionEventInfo;
|
|
46276
48030
|
|
|
46277
|
-
},{"../Decorators":
|
|
48031
|
+
},{"../Decorators":230}],282:[function(require,module,exports){
|
|
46278
48032
|
"use strict";
|
|
46279
48033
|
/*!
|
|
46280
48034
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46487,7 +48241,7 @@ __decorate([
|
|
|
46487
48241
|
], DecisionInfo.prototype, "toString", null);
|
|
46488
48242
|
exports.DecisionInfo = DecisionInfo;
|
|
46489
48243
|
|
|
46490
|
-
},{"../Decorators":
|
|
48244
|
+
},{"../Decorators":230}],283:[function(require,module,exports){
|
|
46491
48245
|
"use strict";
|
|
46492
48246
|
/*!
|
|
46493
48247
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46507,7 +48261,7 @@ class DecisionState extends ATNState_1.ATNState {
|
|
|
46507
48261
|
}
|
|
46508
48262
|
exports.DecisionState = DecisionState;
|
|
46509
48263
|
|
|
46510
|
-
},{"./ATNState":
|
|
48264
|
+
},{"./ATNState":269}],284:[function(require,module,exports){
|
|
46511
48265
|
"use strict";
|
|
46512
48266
|
/*!
|
|
46513
48267
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46573,7 +48327,7 @@ EpsilonTransition = __decorate([
|
|
|
46573
48327
|
], EpsilonTransition);
|
|
46574
48328
|
exports.EpsilonTransition = EpsilonTransition;
|
|
46575
48329
|
|
|
46576
|
-
},{"../Decorators":
|
|
48330
|
+
},{"../Decorators":230,"./Transition":325}],285:[function(require,module,exports){
|
|
46577
48331
|
"use strict";
|
|
46578
48332
|
/*!
|
|
46579
48333
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46626,7 +48380,7 @@ ErrorInfo = __decorate([
|
|
|
46626
48380
|
], ErrorInfo);
|
|
46627
48381
|
exports.ErrorInfo = ErrorInfo;
|
|
46628
48382
|
|
|
46629
|
-
},{"../Decorators":
|
|
48383
|
+
},{"../Decorators":230,"./DecisionEventInfo":281}],286:[function(require,module,exports){
|
|
46630
48384
|
"use strict";
|
|
46631
48385
|
/*!
|
|
46632
48386
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46657,7 +48411,7 @@ __decorate([
|
|
|
46657
48411
|
], InvalidState.prototype, "stateType", null);
|
|
46658
48412
|
exports.InvalidState = InvalidState;
|
|
46659
48413
|
|
|
46660
|
-
},{"../Decorators":
|
|
48414
|
+
},{"../Decorators":230,"./ATNStateType":270,"./BasicState":276}],287:[function(require,module,exports){
|
|
46661
48415
|
"use strict";
|
|
46662
48416
|
/*!
|
|
46663
48417
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -46879,7 +48633,7 @@ LL1Analyzer = __decorate([
|
|
|
46879
48633
|
], LL1Analyzer);
|
|
46880
48634
|
exports.LL1Analyzer = LL1Analyzer;
|
|
46881
48635
|
|
|
46882
|
-
},{"../Decorators":
|
|
48636
|
+
},{"../Decorators":230,"../Token":255,"../misc/Array2DHashSet":334,"../misc/BitSet":337,"../misc/IntervalSet":343,"../misc/ObjectEqualityComparator":346,"./ATNConfig":264,"./AbstractPredicateTransition":271,"./NotSetTransition":301,"./PredictionContext":310,"./RuleStopState":316,"./RuleTransition":317,"./WildcardTransition":326}],288:[function(require,module,exports){
|
|
46883
48637
|
"use strict";
|
|
46884
48638
|
/*!
|
|
46885
48639
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47596,7 +49350,7 @@ exports.LexerATNSimulator = LexerATNSimulator;
|
|
|
47596
49350
|
})(LexerATNSimulator = exports.LexerATNSimulator || (exports.LexerATNSimulator = {}));
|
|
47597
49351
|
exports.LexerATNSimulator = LexerATNSimulator;
|
|
47598
49352
|
|
|
47599
|
-
},{"../Decorators":
|
|
49353
|
+
},{"../Decorators":230,"../IntStream":236,"../Lexer":238,"../LexerNoViableAltException":240,"../Token":255,"../dfa/AcceptStateInfo":327,"../dfa/DFAState":330,"../misc/Interval":342,"./ATN":263,"./ATNConfig":264,"./ATNConfigSet":265,"./ATNSimulator":268,"./LexerActionExecutor":289,"./OrderedATNConfigSet":302,"./PredictionContext":310,"./RuleStopState":316,"assert":373}],289:[function(require,module,exports){
|
|
47600
49354
|
"use strict";
|
|
47601
49355
|
/*!
|
|
47602
49356
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47797,7 +49551,7 @@ LexerActionExecutor = __decorate([
|
|
|
47797
49551
|
], LexerActionExecutor);
|
|
47798
49552
|
exports.LexerActionExecutor = LexerActionExecutor;
|
|
47799
49553
|
|
|
47800
|
-
},{"../Decorators":
|
|
49554
|
+
},{"../Decorators":230,"../misc/ArrayEqualityComparator":335,"../misc/MurmurHash":345,"./LexerIndexedCustomAction":292}],290:[function(require,module,exports){
|
|
47801
49555
|
"use strict";
|
|
47802
49556
|
/*!
|
|
47803
49557
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -47902,7 +49656,7 @@ __decorate([
|
|
|
47902
49656
|
], LexerChannelAction.prototype, "toString", null);
|
|
47903
49657
|
exports.LexerChannelAction = LexerChannelAction;
|
|
47904
49658
|
|
|
47905
|
-
},{"../Decorators":
|
|
49659
|
+
},{"../Decorators":230,"../misc/MurmurHash":345}],291:[function(require,module,exports){
|
|
47906
49660
|
"use strict";
|
|
47907
49661
|
/*!
|
|
47908
49662
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48031,7 +49785,7 @@ __decorate([
|
|
|
48031
49785
|
], LexerCustomAction.prototype, "equals", null);
|
|
48032
49786
|
exports.LexerCustomAction = LexerCustomAction;
|
|
48033
49787
|
|
|
48034
|
-
},{"../Decorators":
|
|
49788
|
+
},{"../Decorators":230,"../misc/MurmurHash":345}],292:[function(require,module,exports){
|
|
48035
49789
|
"use strict";
|
|
48036
49790
|
/*!
|
|
48037
49791
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48166,7 +49920,7 @@ LexerIndexedCustomAction = __decorate([
|
|
|
48166
49920
|
], LexerIndexedCustomAction);
|
|
48167
49921
|
exports.LexerIndexedCustomAction = LexerIndexedCustomAction;
|
|
48168
49922
|
|
|
48169
|
-
},{"../Decorators":
|
|
49923
|
+
},{"../Decorators":230,"../misc/MurmurHash":345}],293:[function(require,module,exports){
|
|
48170
49924
|
"use strict";
|
|
48171
49925
|
/*!
|
|
48172
49926
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48271,7 +50025,7 @@ __decorate([
|
|
|
48271
50025
|
], LexerModeAction.prototype, "toString", null);
|
|
48272
50026
|
exports.LexerModeAction = LexerModeAction;
|
|
48273
50027
|
|
|
48274
|
-
},{"../Decorators":
|
|
50028
|
+
},{"../Decorators":230,"../misc/MurmurHash":345}],294:[function(require,module,exports){
|
|
48275
50029
|
"use strict";
|
|
48276
50030
|
/*!
|
|
48277
50031
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48367,7 +50121,7 @@ exports.LexerMoreAction = LexerMoreAction;
|
|
|
48367
50121
|
LexerMoreAction.INSTANCE = new LexerMoreAction();
|
|
48368
50122
|
})(LexerMoreAction = exports.LexerMoreAction || (exports.LexerMoreAction = {}));
|
|
48369
50123
|
|
|
48370
|
-
},{"../Decorators":
|
|
50124
|
+
},{"../Decorators":230,"../misc/MurmurHash":345}],295:[function(require,module,exports){
|
|
48371
50125
|
"use strict";
|
|
48372
50126
|
/*!
|
|
48373
50127
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48463,7 +50217,7 @@ exports.LexerPopModeAction = LexerPopModeAction;
|
|
|
48463
50217
|
LexerPopModeAction.INSTANCE = new LexerPopModeAction();
|
|
48464
50218
|
})(LexerPopModeAction = exports.LexerPopModeAction || (exports.LexerPopModeAction = {}));
|
|
48465
50219
|
|
|
48466
|
-
},{"../Decorators":
|
|
50220
|
+
},{"../Decorators":230,"../misc/MurmurHash":345}],296:[function(require,module,exports){
|
|
48467
50221
|
"use strict";
|
|
48468
50222
|
/*!
|
|
48469
50223
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48568,7 +50322,7 @@ __decorate([
|
|
|
48568
50322
|
], LexerPushModeAction.prototype, "toString", null);
|
|
48569
50323
|
exports.LexerPushModeAction = LexerPushModeAction;
|
|
48570
50324
|
|
|
48571
|
-
},{"../Decorators":
|
|
50325
|
+
},{"../Decorators":230,"../misc/MurmurHash":345}],297:[function(require,module,exports){
|
|
48572
50326
|
"use strict";
|
|
48573
50327
|
/*!
|
|
48574
50328
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48664,7 +50418,7 @@ exports.LexerSkipAction = LexerSkipAction;
|
|
|
48664
50418
|
LexerSkipAction.INSTANCE = new LexerSkipAction();
|
|
48665
50419
|
})(LexerSkipAction = exports.LexerSkipAction || (exports.LexerSkipAction = {}));
|
|
48666
50420
|
|
|
48667
|
-
},{"../Decorators":
|
|
50421
|
+
},{"../Decorators":230,"../misc/MurmurHash":345}],298:[function(require,module,exports){
|
|
48668
50422
|
"use strict";
|
|
48669
50423
|
/*!
|
|
48670
50424
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48768,7 +50522,7 @@ __decorate([
|
|
|
48768
50522
|
], LexerTypeAction.prototype, "toString", null);
|
|
48769
50523
|
exports.LexerTypeAction = LexerTypeAction;
|
|
48770
50524
|
|
|
48771
|
-
},{"../Decorators":
|
|
50525
|
+
},{"../Decorators":230,"../misc/MurmurHash":345}],299:[function(require,module,exports){
|
|
48772
50526
|
"use strict";
|
|
48773
50527
|
/*!
|
|
48774
50528
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48820,7 +50574,7 @@ LookaheadEventInfo = __decorate([
|
|
|
48820
50574
|
], LookaheadEventInfo);
|
|
48821
50575
|
exports.LookaheadEventInfo = LookaheadEventInfo;
|
|
48822
50576
|
|
|
48823
|
-
},{"../Decorators":
|
|
50577
|
+
},{"../Decorators":230,"./DecisionEventInfo":281}],300:[function(require,module,exports){
|
|
48824
50578
|
"use strict";
|
|
48825
50579
|
/*!
|
|
48826
50580
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48849,7 +50603,7 @@ __decorate([
|
|
|
48849
50603
|
], LoopEndState.prototype, "stateType", null);
|
|
48850
50604
|
exports.LoopEndState = LoopEndState;
|
|
48851
50605
|
|
|
48852
|
-
},{"../Decorators":
|
|
50606
|
+
},{"../Decorators":230,"./ATNState":269,"./ATNStateType":270}],301:[function(require,module,exports){
|
|
48853
50607
|
"use strict";
|
|
48854
50608
|
/*!
|
|
48855
50609
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48898,7 +50652,7 @@ NotSetTransition = __decorate([
|
|
|
48898
50652
|
], NotSetTransition);
|
|
48899
50653
|
exports.NotSetTransition = NotSetTransition;
|
|
48900
50654
|
|
|
48901
|
-
},{"../Decorators":
|
|
50655
|
+
},{"../Decorators":230,"./SetTransition":319}],302:[function(require,module,exports){
|
|
48902
50656
|
"use strict";
|
|
48903
50657
|
/*!
|
|
48904
50658
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -48953,7 +50707,7 @@ __decorate([
|
|
|
48953
50707
|
], OrderedATNConfigSet.prototype, "canMerge", null);
|
|
48954
50708
|
exports.OrderedATNConfigSet = OrderedATNConfigSet;
|
|
48955
50709
|
|
|
48956
|
-
},{"../Decorators":
|
|
50710
|
+
},{"../Decorators":230,"./ATNConfigSet":265}],303:[function(require,module,exports){
|
|
48957
50711
|
"use strict";
|
|
48958
50712
|
/*!
|
|
48959
50713
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -49115,7 +50869,7 @@ ParseInfo = __decorate([
|
|
|
49115
50869
|
], ParseInfo);
|
|
49116
50870
|
exports.ParseInfo = ParseInfo;
|
|
49117
50871
|
|
|
49118
|
-
},{"../Decorators":
|
|
50872
|
+
},{"../Decorators":230}],304:[function(require,module,exports){
|
|
49119
50873
|
"use strict";
|
|
49120
50874
|
/*!
|
|
49121
50875
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51388,7 +53142,7 @@ ParserATNSimulator = __decorate([
|
|
|
51388
53142
|
], ParserATNSimulator);
|
|
51389
53143
|
exports.ParserATNSimulator = ParserATNSimulator;
|
|
51390
53144
|
|
|
51391
|
-
},{"../Decorators":
|
|
53145
|
+
},{"../Decorators":230,"../IntStream":236,"../NoViableAltException":242,"../ParserRuleContext":246,"../Token":255,"../VocabularyImpl":261,"../dfa/AcceptStateInfo":327,"../dfa/DFAState":330,"../misc/Array2DHashSet":334,"../misc/Arrays":336,"../misc/BitSet":337,"../misc/IntegerList":340,"../misc/Interval":342,"../misc/ObjectEqualityComparator":346,"./ATN":263,"./ATNConfig":264,"./ATNConfigSet":265,"./ATNSimulator":268,"./ATNStateType":270,"./ActionTransition":272,"./AtomTransition":274,"./ConflictInfo":279,"./DecisionState":283,"./NotSetTransition":301,"./PredictionContext":310,"./PredictionContextCache":311,"./PredictionMode":312,"./RuleStopState":316,"./RuleTransition":317,"./SemanticContext":318,"./SetTransition":319,"./SimulatorState":320,"assert":373}],305:[function(require,module,exports){
|
|
51392
53146
|
"use strict";
|
|
51393
53147
|
/*!
|
|
51394
53148
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51421,7 +53175,7 @@ __decorate([
|
|
|
51421
53175
|
], PlusBlockStartState.prototype, "stateType", null);
|
|
51422
53176
|
exports.PlusBlockStartState = PlusBlockStartState;
|
|
51423
53177
|
|
|
51424
|
-
},{"../Decorators":
|
|
53178
|
+
},{"../Decorators":230,"./ATNStateType":270,"./BlockStartState":278}],306:[function(require,module,exports){
|
|
51425
53179
|
"use strict";
|
|
51426
53180
|
/*!
|
|
51427
53181
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51452,7 +53206,7 @@ __decorate([
|
|
|
51452
53206
|
], PlusLoopbackState.prototype, "stateType", null);
|
|
51453
53207
|
exports.PlusLoopbackState = PlusLoopbackState;
|
|
51454
53208
|
|
|
51455
|
-
},{"../Decorators":
|
|
53209
|
+
},{"../Decorators":230,"./ATNStateType":270,"./DecisionState":283}],307:[function(require,module,exports){
|
|
51456
53210
|
"use strict";
|
|
51457
53211
|
/*!
|
|
51458
53212
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51515,7 +53269,7 @@ PrecedencePredicateTransition = __decorate([
|
|
|
51515
53269
|
], PrecedencePredicateTransition);
|
|
51516
53270
|
exports.PrecedencePredicateTransition = PrecedencePredicateTransition;
|
|
51517
53271
|
|
|
51518
|
-
},{"../Decorators":
|
|
53272
|
+
},{"../Decorators":230,"./AbstractPredicateTransition":271,"./SemanticContext":318}],308:[function(require,module,exports){
|
|
51519
53273
|
"use strict";
|
|
51520
53274
|
/*!
|
|
51521
53275
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51578,7 +53332,7 @@ PredicateEvalInfo = __decorate([
|
|
|
51578
53332
|
], PredicateEvalInfo);
|
|
51579
53333
|
exports.PredicateEvalInfo = PredicateEvalInfo;
|
|
51580
53334
|
|
|
51581
|
-
},{"../Decorators":
|
|
53335
|
+
},{"../Decorators":230,"./DecisionEventInfo":281}],309:[function(require,module,exports){
|
|
51582
53336
|
"use strict";
|
|
51583
53337
|
/*!
|
|
51584
53338
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -51644,7 +53398,7 @@ PredicateTransition = __decorate([
|
|
|
51644
53398
|
], PredicateTransition);
|
|
51645
53399
|
exports.PredicateTransition = PredicateTransition;
|
|
51646
53400
|
|
|
51647
|
-
},{"../Decorators":
|
|
53401
|
+
},{"../Decorators":230,"./AbstractPredicateTransition":271,"./SemanticContext":318}],310:[function(require,module,exports){
|
|
51648
53402
|
"use strict";
|
|
51649
53403
|
/*!
|
|
51650
53404
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -52335,7 +54089,7 @@ exports.SingletonPredictionContext = SingletonPredictionContext;
|
|
|
52335
54089
|
PredictionContext.IdentityEqualityComparator = IdentityEqualityComparator;
|
|
52336
54090
|
})(PredictionContext = exports.PredictionContext || (exports.PredictionContext = {}));
|
|
52337
54091
|
|
|
52338
|
-
},{"../Decorators":
|
|
54092
|
+
},{"../Decorators":230,"../misc/Array2DHashMap":333,"../misc/Array2DHashSet":334,"../misc/Arrays":336,"../misc/MurmurHash":345,"./PredictionContextCache":311,"assert":373}],311:[function(require,module,exports){
|
|
52339
54093
|
"use strict";
|
|
52340
54094
|
/*!
|
|
52341
54095
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -52476,7 +54230,7 @@ PredictionContextCache.UNCACHED = new PredictionContextCache(false);
|
|
|
52476
54230
|
PredictionContextCache.IdentityCommutativePredictionContextOperands = IdentityCommutativePredictionContextOperands;
|
|
52477
54231
|
})(PredictionContextCache = exports.PredictionContextCache || (exports.PredictionContextCache = {}));
|
|
52478
54232
|
|
|
52479
|
-
},{"../Decorators":
|
|
54233
|
+
},{"../Decorators":230,"../misc/Array2DHashMap":333,"../misc/ObjectEqualityComparator":346,"./PredictionContext":310,"assert":373}],312:[function(require,module,exports){
|
|
52480
54234
|
"use strict";
|
|
52481
54235
|
/*!
|
|
52482
54236
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -52637,7 +54391,7 @@ var PredictionMode;
|
|
|
52637
54391
|
PredictionMode.allConfigsInRuleStopStates = allConfigsInRuleStopStates;
|
|
52638
54392
|
})(PredictionMode = exports.PredictionMode || (exports.PredictionMode = {}));
|
|
52639
54393
|
|
|
52640
|
-
},{"../Decorators":
|
|
54394
|
+
},{"../Decorators":230,"../misc/Array2DHashMap":333,"../misc/MurmurHash":345,"./RuleStopState":316}],313:[function(require,module,exports){
|
|
52641
54395
|
(function (process){(function (){
|
|
52642
54396
|
"use strict";
|
|
52643
54397
|
/*!
|
|
@@ -52906,7 +54660,7 @@ __decorate([
|
|
|
52906
54660
|
exports.ProfilingATNSimulator = ProfilingATNSimulator;
|
|
52907
54661
|
|
|
52908
54662
|
}).call(this)}).call(this,require('_process'))
|
|
52909
|
-
},{"../Decorators":
|
|
54663
|
+
},{"../Decorators":230,"./ATN":263,"./ATNSimulator":268,"./AmbiguityInfo":273,"./ContextSensitivityInfo":280,"./DecisionInfo":282,"./ErrorInfo":285,"./LookaheadEventInfo":299,"./ParserATNSimulator":304,"./PredicateEvalInfo":308,"./SemanticContext":318,"./SimulatorState":320,"_process":432}],314:[function(require,module,exports){
|
|
52910
54664
|
"use strict";
|
|
52911
54665
|
/*!
|
|
52912
54666
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -52964,7 +54718,7 @@ RangeTransition = __decorate([
|
|
|
52964
54718
|
], RangeTransition);
|
|
52965
54719
|
exports.RangeTransition = RangeTransition;
|
|
52966
54720
|
|
|
52967
|
-
},{"../Decorators":
|
|
54721
|
+
},{"../Decorators":230,"../misc/IntervalSet":343,"./Transition":325}],315:[function(require,module,exports){
|
|
52968
54722
|
"use strict";
|
|
52969
54723
|
/*!
|
|
52970
54724
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -52997,7 +54751,7 @@ __decorate([
|
|
|
52997
54751
|
], RuleStartState.prototype, "stateType", null);
|
|
52998
54752
|
exports.RuleStartState = RuleStartState;
|
|
52999
54753
|
|
|
53000
|
-
},{"../Decorators":
|
|
54754
|
+
},{"../Decorators":230,"./ATNState":269,"./ATNStateType":270}],316:[function(require,module,exports){
|
|
53001
54755
|
"use strict";
|
|
53002
54756
|
/*!
|
|
53003
54757
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53036,7 +54790,7 @@ __decorate([
|
|
|
53036
54790
|
], RuleStopState.prototype, "stateType", null);
|
|
53037
54791
|
exports.RuleStopState = RuleStopState;
|
|
53038
54792
|
|
|
53039
|
-
},{"../Decorators":
|
|
54793
|
+
},{"../Decorators":230,"./ATNState":269,"./ATNStateType":270}],317:[function(require,module,exports){
|
|
53040
54794
|
"use strict";
|
|
53041
54795
|
/*!
|
|
53042
54796
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53092,7 +54846,7 @@ RuleTransition = __decorate([
|
|
|
53092
54846
|
], RuleTransition);
|
|
53093
54847
|
exports.RuleTransition = RuleTransition;
|
|
53094
54848
|
|
|
53095
|
-
},{"../Decorators":
|
|
54849
|
+
},{"../Decorators":230,"./Transition":325}],318:[function(require,module,exports){
|
|
53096
54850
|
"use strict";
|
|
53097
54851
|
/*!
|
|
53098
54852
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53572,7 +55326,7 @@ exports.SemanticContext = SemanticContext;
|
|
|
53572
55326
|
SemanticContext.OR = OR;
|
|
53573
55327
|
})(SemanticContext = exports.SemanticContext || (exports.SemanticContext = {}));
|
|
53574
55328
|
|
|
53575
|
-
},{"../Decorators":
|
|
55329
|
+
},{"../Decorators":230,"../misc/Array2DHashSet":334,"../misc/ArrayEqualityComparator":335,"../misc/MurmurHash":345,"../misc/ObjectEqualityComparator":346,"../misc/Utils":349}],319:[function(require,module,exports){
|
|
53576
55330
|
"use strict";
|
|
53577
55331
|
/*!
|
|
53578
55332
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53638,7 +55392,7 @@ SetTransition = __decorate([
|
|
|
53638
55392
|
], SetTransition);
|
|
53639
55393
|
exports.SetTransition = SetTransition;
|
|
53640
55394
|
|
|
53641
|
-
},{"../Decorators":
|
|
55395
|
+
},{"../Decorators":230,"../Token":255,"../misc/IntervalSet":343,"./Transition":325}],320:[function(require,module,exports){
|
|
53642
55396
|
"use strict";
|
|
53643
55397
|
/*!
|
|
53644
55398
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53674,7 +55428,7 @@ SimulatorState = __decorate([
|
|
|
53674
55428
|
], SimulatorState);
|
|
53675
55429
|
exports.SimulatorState = SimulatorState;
|
|
53676
55430
|
|
|
53677
|
-
},{"../Decorators":
|
|
55431
|
+
},{"../Decorators":230,"../ParserRuleContext":246}],321:[function(require,module,exports){
|
|
53678
55432
|
"use strict";
|
|
53679
55433
|
/*!
|
|
53680
55434
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53702,7 +55456,7 @@ __decorate([
|
|
|
53702
55456
|
], StarBlockStartState.prototype, "stateType", null);
|
|
53703
55457
|
exports.StarBlockStartState = StarBlockStartState;
|
|
53704
55458
|
|
|
53705
|
-
},{"../Decorators":
|
|
55459
|
+
},{"../Decorators":230,"./ATNStateType":270,"./BlockStartState":278}],322:[function(require,module,exports){
|
|
53706
55460
|
"use strict";
|
|
53707
55461
|
/*!
|
|
53708
55462
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53759,7 +55513,7 @@ __decorate([
|
|
|
53759
55513
|
], StarLoopEntryState.prototype, "stateType", null);
|
|
53760
55514
|
exports.StarLoopEntryState = StarLoopEntryState;
|
|
53761
55515
|
|
|
53762
|
-
},{"../Decorators":
|
|
55516
|
+
},{"../Decorators":230,"../misc/BitSet":337,"./ATNStateType":270,"./DecisionState":283}],323:[function(require,module,exports){
|
|
53763
55517
|
"use strict";
|
|
53764
55518
|
/*!
|
|
53765
55519
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53790,7 +55544,7 @@ __decorate([
|
|
|
53790
55544
|
], StarLoopbackState.prototype, "stateType", null);
|
|
53791
55545
|
exports.StarLoopbackState = StarLoopbackState;
|
|
53792
55546
|
|
|
53793
|
-
},{"../Decorators":
|
|
55547
|
+
},{"../Decorators":230,"./ATNState":269,"./ATNStateType":270}],324:[function(require,module,exports){
|
|
53794
55548
|
"use strict";
|
|
53795
55549
|
/*!
|
|
53796
55550
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53819,7 +55573,7 @@ __decorate([
|
|
|
53819
55573
|
], TokensStartState.prototype, "stateType", null);
|
|
53820
55574
|
exports.TokensStartState = TokensStartState;
|
|
53821
55575
|
|
|
53822
|
-
},{"../Decorators":
|
|
55576
|
+
},{"../Decorators":230,"./ATNStateType":270,"./DecisionState":283}],325:[function(require,module,exports){
|
|
53823
55577
|
"use strict";
|
|
53824
55578
|
/*!
|
|
53825
55579
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53893,7 +55647,7 @@ Transition = __decorate([
|
|
|
53893
55647
|
], Transition);
|
|
53894
55648
|
exports.Transition = Transition;
|
|
53895
55649
|
|
|
53896
|
-
},{"../Decorators":
|
|
55650
|
+
},{"../Decorators":230}],326:[function(require,module,exports){
|
|
53897
55651
|
"use strict";
|
|
53898
55652
|
/*!
|
|
53899
55653
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53941,7 +55695,7 @@ WildcardTransition = __decorate([
|
|
|
53941
55695
|
], WildcardTransition);
|
|
53942
55696
|
exports.WildcardTransition = WildcardTransition;
|
|
53943
55697
|
|
|
53944
|
-
},{"../Decorators":
|
|
55698
|
+
},{"../Decorators":230,"./Transition":325}],327:[function(require,module,exports){
|
|
53945
55699
|
"use strict";
|
|
53946
55700
|
/*!
|
|
53947
55701
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -53983,7 +55737,7 @@ class AcceptStateInfo {
|
|
|
53983
55737
|
}
|
|
53984
55738
|
exports.AcceptStateInfo = AcceptStateInfo;
|
|
53985
55739
|
|
|
53986
|
-
},{}],
|
|
55740
|
+
},{}],328:[function(require,module,exports){
|
|
53987
55741
|
"use strict";
|
|
53988
55742
|
/*!
|
|
53989
55743
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54158,7 +55912,7 @@ DFA = __decorate([
|
|
|
54158
55912
|
], DFA);
|
|
54159
55913
|
exports.DFA = DFA;
|
|
54160
55914
|
|
|
54161
|
-
},{"../Decorators":
|
|
55915
|
+
},{"../Decorators":230,"../VocabularyImpl":261,"../atn/ATNConfigSet":265,"../atn/StarLoopEntryState":322,"../misc/Array2DHashSet":334,"../misc/ObjectEqualityComparator":346,"./DFASerializer":329,"./DFAState":330,"./LexerDFASerializer":331}],329:[function(require,module,exports){
|
|
54162
55916
|
"use strict";
|
|
54163
55917
|
/*!
|
|
54164
55918
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54300,7 +56054,7 @@ __decorate([
|
|
|
54300
56054
|
], DFASerializer.prototype, "toString", null);
|
|
54301
56055
|
exports.DFASerializer = DFASerializer;
|
|
54302
56056
|
|
|
54303
|
-
},{"../Decorators":
|
|
56057
|
+
},{"../Decorators":230,"../Recognizer":250,"../VocabularyImpl":261,"../atn/ATNSimulator":268,"../atn/PredictionContext":310}],330:[function(require,module,exports){
|
|
54304
56058
|
"use strict";
|
|
54305
56059
|
/*!
|
|
54306
56060
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54531,7 +56285,7 @@ exports.DFAState = DFAState;
|
|
|
54531
56285
|
DFAState.PredPrediction = PredPrediction;
|
|
54532
56286
|
})(DFAState = exports.DFAState || (exports.DFAState = {}));
|
|
54533
56287
|
|
|
54534
|
-
},{"../Decorators":
|
|
56288
|
+
},{"../Decorators":230,"../atn/ATN":263,"../atn/PredictionContext":310,"../misc/BitSet":337,"../misc/MurmurHash":345,"assert":373}],331:[function(require,module,exports){
|
|
54535
56289
|
"use strict";
|
|
54536
56290
|
/*!
|
|
54537
56291
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54568,7 +56322,7 @@ LexerDFASerializer = __decorate([
|
|
|
54568
56322
|
], LexerDFASerializer);
|
|
54569
56323
|
exports.LexerDFASerializer = LexerDFASerializer;
|
|
54570
56324
|
|
|
54571
|
-
},{"../Decorators":
|
|
56325
|
+
},{"../Decorators":230,"../VocabularyImpl":261,"./DFASerializer":329}],332:[function(require,module,exports){
|
|
54572
56326
|
"use strict";
|
|
54573
56327
|
/*!
|
|
54574
56328
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54634,7 +56388,7 @@ __exportStar(require("./Vocabulary"), exports);
|
|
|
54634
56388
|
__exportStar(require("./VocabularyImpl"), exports);
|
|
54635
56389
|
__exportStar(require("./WritableToken"), exports);
|
|
54636
56390
|
|
|
54637
|
-
},{"./ANTLRErrorListener":
|
|
56391
|
+
},{"./ANTLRErrorListener":217,"./ANTLRErrorStrategy":218,"./ANTLRInputStream":219,"./BailErrorStrategy":220,"./BufferedTokenStream":221,"./CharStream":222,"./CharStreams":223,"./CodePointBuffer":224,"./CodePointCharStream":225,"./CommonToken":226,"./CommonTokenFactory":227,"./CommonTokenStream":228,"./ConsoleErrorListener":229,"./DefaultErrorStrategy":231,"./Dependents":232,"./DiagnosticErrorListener":233,"./FailedPredicateException":234,"./InputMismatchException":235,"./IntStream":236,"./InterpreterRuleContext":237,"./Lexer":238,"./LexerInterpreter":239,"./LexerNoViableAltException":240,"./ListTokenSource":241,"./NoViableAltException":242,"./Parser":243,"./ParserErrorListener":244,"./ParserInterpreter":245,"./ParserRuleContext":246,"./ProxyErrorListener":247,"./ProxyParserErrorListener":248,"./RecognitionException":249,"./Recognizer":250,"./RuleContext":251,"./RuleContextWithAltNum":252,"./RuleDependency":253,"./RuleVersion":254,"./Token":255,"./TokenFactory":256,"./TokenSource":257,"./TokenStream":258,"./TokenStreamRewriter":259,"./Vocabulary":260,"./VocabularyImpl":261,"./WritableToken":262}],333:[function(require,module,exports){
|
|
54638
56392
|
"use strict";
|
|
54639
56393
|
/*!
|
|
54640
56394
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -54717,7 +56471,7 @@ class Array2DHashMap {
|
|
|
54717
56471
|
}
|
|
54718
56472
|
exports.Array2DHashMap = Array2DHashMap;
|
|
54719
56473
|
|
|
54720
|
-
},{"./Array2DHashSet":
|
|
56474
|
+
},{"./Array2DHashSet":334}],334:[function(require,module,exports){
|
|
54721
56475
|
"use strict";
|
|
54722
56476
|
/*!
|
|
54723
56477
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -55084,7 +56838,7 @@ __decorate([
|
|
|
55084
56838
|
], Array2DHashSet.prototype, "createBuckets", null);
|
|
55085
56839
|
exports.Array2DHashSet = Array2DHashSet;
|
|
55086
56840
|
|
|
55087
|
-
},{"../Decorators":
|
|
56841
|
+
},{"../Decorators":230,"./DefaultEqualityComparator":339,"./MurmurHash":345,"assert":373}],335:[function(require,module,exports){
|
|
55088
56842
|
"use strict";
|
|
55089
56843
|
/*!
|
|
55090
56844
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -55156,7 +56910,7 @@ __decorate([
|
|
|
55156
56910
|
], ArrayEqualityComparator.prototype, "equals", null);
|
|
55157
56911
|
exports.ArrayEqualityComparator = ArrayEqualityComparator;
|
|
55158
56912
|
|
|
55159
|
-
},{"../Decorators":
|
|
56913
|
+
},{"../Decorators":230,"./MurmurHash":345,"./ObjectEqualityComparator":346}],336:[function(require,module,exports){
|
|
55160
56914
|
"use strict";
|
|
55161
56915
|
/*!
|
|
55162
56916
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -55226,7 +56980,7 @@ var Arrays;
|
|
|
55226
56980
|
Arrays.toString = toString;
|
|
55227
56981
|
})(Arrays = exports.Arrays || (exports.Arrays = {}));
|
|
55228
56982
|
|
|
55229
|
-
},{}],
|
|
56983
|
+
},{}],337:[function(require,module,exports){
|
|
55230
56984
|
"use strict";
|
|
55231
56985
|
/*!
|
|
55232
56986
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -55898,7 +57652,7 @@ class BitSetIterator {
|
|
|
55898
57652
|
[Symbol.iterator]() { return this; }
|
|
55899
57653
|
}
|
|
55900
57654
|
|
|
55901
|
-
},{"./MurmurHash":
|
|
57655
|
+
},{"./MurmurHash":345,"util":437}],338:[function(require,module,exports){
|
|
55902
57656
|
"use strict";
|
|
55903
57657
|
/*!
|
|
55904
57658
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -55919,7 +57673,7 @@ function isSupplementaryCodePoint(ch) {
|
|
|
55919
57673
|
}
|
|
55920
57674
|
exports.isSupplementaryCodePoint = isSupplementaryCodePoint;
|
|
55921
57675
|
|
|
55922
|
-
},{}],
|
|
57676
|
+
},{}],339:[function(require,module,exports){
|
|
55923
57677
|
"use strict";
|
|
55924
57678
|
/*!
|
|
55925
57679
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -55990,7 +57744,7 @@ __decorate([
|
|
|
55990
57744
|
], DefaultEqualityComparator.prototype, "equals", null);
|
|
55991
57745
|
exports.DefaultEqualityComparator = DefaultEqualityComparator;
|
|
55992
57746
|
|
|
55993
|
-
},{"../Decorators":
|
|
57747
|
+
},{"../Decorators":230,"./MurmurHash":345,"./ObjectEqualityComparator":346}],340:[function(require,module,exports){
|
|
55994
57748
|
"use strict";
|
|
55995
57749
|
/*!
|
|
55996
57750
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -56284,7 +58038,7 @@ __decorate([
|
|
|
56284
58038
|
], IntegerList.prototype, "toString", null);
|
|
56285
58039
|
exports.IntegerList = IntegerList;
|
|
56286
58040
|
|
|
56287
|
-
},{"../Decorators":
|
|
58041
|
+
},{"../Decorators":230,"./Arrays":336}],341:[function(require,module,exports){
|
|
56288
58042
|
"use strict";
|
|
56289
58043
|
/*!
|
|
56290
58044
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -56314,7 +58068,7 @@ class IntegerStack extends IntegerList_1.IntegerList {
|
|
|
56314
58068
|
}
|
|
56315
58069
|
exports.IntegerStack = IntegerStack;
|
|
56316
58070
|
|
|
56317
|
-
},{"./IntegerList":
|
|
58071
|
+
},{"./IntegerList":340}],342:[function(require,module,exports){
|
|
56318
58072
|
"use strict";
|
|
56319
58073
|
/*!
|
|
56320
58074
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -56457,7 +58211,7 @@ __decorate([
|
|
|
56457
58211
|
], Interval.prototype, "toString", null);
|
|
56458
58212
|
exports.Interval = Interval;
|
|
56459
58213
|
|
|
56460
|
-
},{"../Decorators":
|
|
58214
|
+
},{"../Decorators":230}],343:[function(require,module,exports){
|
|
56461
58215
|
"use strict";
|
|
56462
58216
|
/*!
|
|
56463
58217
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57103,7 +58857,7 @@ __decorate([
|
|
|
57103
58857
|
], IntervalSet, "subtract", null);
|
|
57104
58858
|
exports.IntervalSet = IntervalSet;
|
|
57105
58859
|
|
|
57106
|
-
},{"../Decorators":
|
|
58860
|
+
},{"../Decorators":230,"../Lexer":238,"../Token":255,"./ArrayEqualityComparator":335,"./IntegerList":340,"./Interval":342,"./MurmurHash":345}],344:[function(require,module,exports){
|
|
57107
58861
|
"use strict";
|
|
57108
58862
|
/*!
|
|
57109
58863
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57136,7 +58890,7 @@ class MultiMap extends Map {
|
|
|
57136
58890
|
}
|
|
57137
58891
|
exports.MultiMap = MultiMap;
|
|
57138
58892
|
|
|
57139
|
-
},{}],
|
|
58893
|
+
},{}],345:[function(require,module,exports){
|
|
57140
58894
|
"use strict";
|
|
57141
58895
|
/*!
|
|
57142
58896
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57251,7 +59005,7 @@ var MurmurHash;
|
|
|
57251
59005
|
}
|
|
57252
59006
|
})(MurmurHash = exports.MurmurHash || (exports.MurmurHash = {}));
|
|
57253
59007
|
|
|
57254
|
-
},{}],
|
|
59008
|
+
},{}],346:[function(require,module,exports){
|
|
57255
59009
|
"use strict";
|
|
57256
59010
|
/*!
|
|
57257
59011
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57310,7 +59064,7 @@ __decorate([
|
|
|
57310
59064
|
], ObjectEqualityComparator.prototype, "equals", null);
|
|
57311
59065
|
exports.ObjectEqualityComparator = ObjectEqualityComparator;
|
|
57312
59066
|
|
|
57313
|
-
},{"../Decorators":
|
|
59067
|
+
},{"../Decorators":230}],347:[function(require,module,exports){
|
|
57314
59068
|
"use strict";
|
|
57315
59069
|
/*!
|
|
57316
59070
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57339,7 +59093,7 @@ class ParseCancellationException extends Error {
|
|
|
57339
59093
|
}
|
|
57340
59094
|
exports.ParseCancellationException = ParseCancellationException;
|
|
57341
59095
|
|
|
57342
|
-
},{}],
|
|
59096
|
+
},{}],348:[function(require,module,exports){
|
|
57343
59097
|
"use strict";
|
|
57344
59098
|
/*!
|
|
57345
59099
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57393,7 +59147,7 @@ class UUID {
|
|
|
57393
59147
|
}
|
|
57394
59148
|
exports.UUID = UUID;
|
|
57395
59149
|
|
|
57396
|
-
},{"./MurmurHash":
|
|
59150
|
+
},{"./MurmurHash":345}],349:[function(require,module,exports){
|
|
57397
59151
|
"use strict";
|
|
57398
59152
|
/*!
|
|
57399
59153
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57568,7 +59322,7 @@ exports.toCharArray = toCharArray;
|
|
|
57568
59322
|
// return s;
|
|
57569
59323
|
// }
|
|
57570
59324
|
|
|
57571
|
-
},{}],
|
|
59325
|
+
},{}],350:[function(require,module,exports){
|
|
57572
59326
|
"use strict";
|
|
57573
59327
|
/*!
|
|
57574
59328
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57604,7 +59358,7 @@ __decorate([
|
|
|
57604
59358
|
], ErrorNode.prototype, "accept", null);
|
|
57605
59359
|
exports.ErrorNode = ErrorNode;
|
|
57606
59360
|
|
|
57607
|
-
},{"../Decorators":
|
|
59361
|
+
},{"../Decorators":230,"./TerminalNode":353}],351:[function(require,module,exports){
|
|
57608
59362
|
"use strict";
|
|
57609
59363
|
/*!
|
|
57610
59364
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57709,7 +59463,7 @@ exports.ParseTreeWalker = ParseTreeWalker;
|
|
|
57709
59463
|
ParseTreeWalker.DEFAULT = new ParseTreeWalker();
|
|
57710
59464
|
})(ParseTreeWalker = exports.ParseTreeWalker || (exports.ParseTreeWalker = {}));
|
|
57711
59465
|
|
|
57712
|
-
},{"./ErrorNode":
|
|
59466
|
+
},{"./ErrorNode":350,"./RuleNode":352,"./TerminalNode":353}],352:[function(require,module,exports){
|
|
57713
59467
|
"use strict";
|
|
57714
59468
|
/*!
|
|
57715
59469
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57721,7 +59475,7 @@ class RuleNode {
|
|
|
57721
59475
|
}
|
|
57722
59476
|
exports.RuleNode = RuleNode;
|
|
57723
59477
|
|
|
57724
|
-
},{}],
|
|
59478
|
+
},{}],353:[function(require,module,exports){
|
|
57725
59479
|
"use strict";
|
|
57726
59480
|
/*!
|
|
57727
59481
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -57813,7 +59567,7 @@ __decorate([
|
|
|
57813
59567
|
], TerminalNode.prototype, "toString", null);
|
|
57814
59568
|
exports.TerminalNode = TerminalNode;
|
|
57815
59569
|
|
|
57816
|
-
},{"../Decorators":
|
|
59570
|
+
},{"../Decorators":230,"../Token":255,"../misc/Interval":342}],354:[function(require,module,exports){
|
|
57817
59571
|
"use strict";
|
|
57818
59572
|
/*!
|
|
57819
59573
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58057,7 +59811,7 @@ __decorate([
|
|
|
58057
59811
|
], Trees, "getRootOfSubtreeEnclosingRegion", null);
|
|
58058
59812
|
exports.Trees = Trees;
|
|
58059
59813
|
|
|
58060
|
-
},{"../CommonToken":
|
|
59814
|
+
},{"../CommonToken":226,"../Decorators":230,"../Parser":243,"../ParserRuleContext":246,"../Token":255,"../atn/ATN":263,"../misc/Utils":349,"./ErrorNode":350,"./RuleNode":352,"./TerminalNode":353}],355:[function(require,module,exports){
|
|
58061
59815
|
"use strict";
|
|
58062
59816
|
/*!
|
|
58063
59817
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58081,7 +59835,7 @@ class Chunk {
|
|
|
58081
59835
|
}
|
|
58082
59836
|
exports.Chunk = Chunk;
|
|
58083
59837
|
|
|
58084
|
-
},{}],
|
|
59838
|
+
},{}],356:[function(require,module,exports){
|
|
58085
59839
|
"use strict";
|
|
58086
59840
|
/*!
|
|
58087
59841
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58261,7 +60015,7 @@ ParseTreeMatch = __decorate([
|
|
|
58261
60015
|
], ParseTreeMatch);
|
|
58262
60016
|
exports.ParseTreeMatch = ParseTreeMatch;
|
|
58263
60017
|
|
|
58264
|
-
},{"../../Decorators":
|
|
60018
|
+
},{"../../Decorators":230}],357:[function(require,module,exports){
|
|
58265
60019
|
"use strict";
|
|
58266
60020
|
/*!
|
|
58267
60021
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58419,7 +60173,7 @@ ParseTreePattern = __decorate([
|
|
|
58419
60173
|
], ParseTreePattern);
|
|
58420
60174
|
exports.ParseTreePattern = ParseTreePattern;
|
|
58421
60175
|
|
|
58422
|
-
},{"../../Decorators":
|
|
60176
|
+
},{"../../Decorators":230,"../xpath/XPath":363}],358:[function(require,module,exports){
|
|
58423
60177
|
"use strict";
|
|
58424
60178
|
/*!
|
|
58425
60179
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -58897,7 +60651,7 @@ exports.ParseTreePatternMatcher = ParseTreePatternMatcher;
|
|
|
58897
60651
|
ParseTreePatternMatcher.StartRuleDoesNotConsumeFullPattern = StartRuleDoesNotConsumeFullPattern;
|
|
58898
60652
|
})(ParseTreePatternMatcher = exports.ParseTreePatternMatcher || (exports.ParseTreePatternMatcher = {}));
|
|
58899
60653
|
|
|
58900
|
-
},{"../../BailErrorStrategy":
|
|
60654
|
+
},{"../../BailErrorStrategy":220,"../../CharStreams":223,"../../CommonTokenStream":228,"../../Decorators":230,"../../ListTokenSource":241,"../../ParserInterpreter":245,"../../ParserRuleContext":246,"../../RecognitionException":249,"../../Token":255,"../../misc/MultiMap":344,"../../misc/ParseCancellationException":347,"../RuleNode":352,"../TerminalNode":353,"./ParseTreeMatch":356,"./ParseTreePattern":357,"./RuleTagToken":359,"./TagChunk":360,"./TextChunk":361,"./TokenTagToken":362}],359:[function(require,module,exports){
|
|
58901
60655
|
"use strict";
|
|
58902
60656
|
/*!
|
|
58903
60657
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59095,7 +60849,7 @@ RuleTagToken = __decorate([
|
|
|
59095
60849
|
], RuleTagToken);
|
|
59096
60850
|
exports.RuleTagToken = RuleTagToken;
|
|
59097
60851
|
|
|
59098
|
-
},{"../../Decorators":
|
|
60852
|
+
},{"../../Decorators":230,"../../Token":255}],360:[function(require,module,exports){
|
|
59099
60853
|
"use strict";
|
|
59100
60854
|
/*!
|
|
59101
60855
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59182,7 +60936,7 @@ __decorate([
|
|
|
59182
60936
|
], TagChunk.prototype, "toString", null);
|
|
59183
60937
|
exports.TagChunk = TagChunk;
|
|
59184
60938
|
|
|
59185
|
-
},{"../../Decorators":
|
|
60939
|
+
},{"../../Decorators":230,"./Chunk":355}],361:[function(require,module,exports){
|
|
59186
60940
|
"use strict";
|
|
59187
60941
|
/*!
|
|
59188
60942
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59252,7 +61006,7 @@ TextChunk = __decorate([
|
|
|
59252
61006
|
], TextChunk);
|
|
59253
61007
|
exports.TextChunk = TextChunk;
|
|
59254
61008
|
|
|
59255
|
-
},{"../../Decorators":
|
|
61009
|
+
},{"../../Decorators":230,"./Chunk":355}],362:[function(require,module,exports){
|
|
59256
61010
|
"use strict";
|
|
59257
61011
|
/*!
|
|
59258
61012
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59347,7 +61101,7 @@ TokenTagToken = __decorate([
|
|
|
59347
61101
|
], TokenTagToken);
|
|
59348
61102
|
exports.TokenTagToken = TokenTagToken;
|
|
59349
61103
|
|
|
59350
|
-
},{"../../CommonToken":
|
|
61104
|
+
},{"../../CommonToken":226,"../../Decorators":230}],363:[function(require,module,exports){
|
|
59351
61105
|
"use strict";
|
|
59352
61106
|
/*!
|
|
59353
61107
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59544,7 +61298,7 @@ exports.XPath = XPath;
|
|
|
59544
61298
|
XPath.WILDCARD = "*"; // word not operator/separator
|
|
59545
61299
|
XPath.NOT = "!"; // word for invert operator
|
|
59546
61300
|
|
|
59547
|
-
},{"../../CharStreams":
|
|
61301
|
+
},{"../../CharStreams":223,"../../CommonTokenStream":228,"../../LexerNoViableAltException":240,"../../ParserRuleContext":246,"../../Token":255,"./XPathLexer":365,"./XPathLexerErrorListener":366,"./XPathRuleAnywhereElement":367,"./XPathRuleElement":368,"./XPathTokenAnywhereElement":369,"./XPathTokenElement":370,"./XPathWildcardAnywhereElement":371,"./XPathWildcardElement":372}],364:[function(require,module,exports){
|
|
59548
61302
|
"use strict";
|
|
59549
61303
|
/*!
|
|
59550
61304
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -59579,7 +61333,7 @@ __decorate([
|
|
|
59579
61333
|
], XPathElement.prototype, "toString", null);
|
|
59580
61334
|
exports.XPathElement = XPathElement;
|
|
59581
61335
|
|
|
59582
|
-
},{"../../Decorators":
|
|
61336
|
+
},{"../../Decorators":230}],365:[function(require,module,exports){
|
|
59583
61337
|
"use strict";
|
|
59584
61338
|
// Generated from XPathLexer.g4 by ANTLR 4.9.0-SNAPSHOT
|
|
59585
61339
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -60054,7 +61808,7 @@ XPathLexer._serializedATN = Utils.join([
|
|
|
60054
61808
|
XPathLexer._serializedATNSegment1,
|
|
60055
61809
|
], "");
|
|
60056
61810
|
|
|
60057
|
-
},{"../../Lexer":
|
|
61811
|
+
},{"../../Lexer":238,"../../VocabularyImpl":261,"../../atn/ATNDeserializer":267,"../../atn/LexerATNSimulator":288,"../../misc/Utils":349}],366:[function(require,module,exports){
|
|
60058
61812
|
"use strict";
|
|
60059
61813
|
/*!
|
|
60060
61814
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60079,7 +61833,7 @@ __decorate([
|
|
|
60079
61833
|
], XPathLexerErrorListener.prototype, "syntaxError", null);
|
|
60080
61834
|
exports.XPathLexerErrorListener = XPathLexerErrorListener;
|
|
60081
61835
|
|
|
60082
|
-
},{"../../Decorators":
|
|
61836
|
+
},{"../../Decorators":230}],367:[function(require,module,exports){
|
|
60083
61837
|
"use strict";
|
|
60084
61838
|
/*!
|
|
60085
61839
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60113,7 +61867,7 @@ __decorate([
|
|
|
60113
61867
|
], XPathRuleAnywhereElement.prototype, "evaluate", null);
|
|
60114
61868
|
exports.XPathRuleAnywhereElement = XPathRuleAnywhereElement;
|
|
60115
61869
|
|
|
60116
|
-
},{"../../Decorators":
|
|
61870
|
+
},{"../../Decorators":230,"../Trees":354,"./XPathElement":364}],368:[function(require,module,exports){
|
|
60117
61871
|
"use strict";
|
|
60118
61872
|
/*!
|
|
60119
61873
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60156,7 +61910,7 @@ __decorate([
|
|
|
60156
61910
|
], XPathRuleElement.prototype, "evaluate", null);
|
|
60157
61911
|
exports.XPathRuleElement = XPathRuleElement;
|
|
60158
61912
|
|
|
60159
|
-
},{"../../Decorators":
|
|
61913
|
+
},{"../../Decorators":230,"../../ParserRuleContext":246,"../Trees":354,"./XPathElement":364}],369:[function(require,module,exports){
|
|
60160
61914
|
"use strict";
|
|
60161
61915
|
/*!
|
|
60162
61916
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60188,7 +61942,7 @@ __decorate([
|
|
|
60188
61942
|
], XPathTokenAnywhereElement.prototype, "evaluate", null);
|
|
60189
61943
|
exports.XPathTokenAnywhereElement = XPathTokenAnywhereElement;
|
|
60190
61944
|
|
|
60191
|
-
},{"../../Decorators":
|
|
61945
|
+
},{"../../Decorators":230,"../Trees":354,"./XPathElement":364}],370:[function(require,module,exports){
|
|
60192
61946
|
"use strict";
|
|
60193
61947
|
/*!
|
|
60194
61948
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60231,7 +61985,7 @@ __decorate([
|
|
|
60231
61985
|
], XPathTokenElement.prototype, "evaluate", null);
|
|
60232
61986
|
exports.XPathTokenElement = XPathTokenElement;
|
|
60233
61987
|
|
|
60234
|
-
},{"../../Decorators":
|
|
61988
|
+
},{"../../Decorators":230,"../TerminalNode":353,"../Trees":354,"./XPathElement":364}],371:[function(require,module,exports){
|
|
60235
61989
|
"use strict";
|
|
60236
61990
|
/*!
|
|
60237
61991
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60267,7 +62021,7 @@ __decorate([
|
|
|
60267
62021
|
], XPathWildcardAnywhereElement.prototype, "evaluate", null);
|
|
60268
62022
|
exports.XPathWildcardAnywhereElement = XPathWildcardAnywhereElement;
|
|
60269
62023
|
|
|
60270
|
-
},{"../../Decorators":
|
|
62024
|
+
},{"../../Decorators":230,"../Trees":354,"./XPath":363,"./XPathElement":364}],372:[function(require,module,exports){
|
|
60271
62025
|
"use strict";
|
|
60272
62026
|
/*!
|
|
60273
62027
|
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
@@ -60307,7 +62061,7 @@ __decorate([
|
|
|
60307
62061
|
], XPathWildcardElement.prototype, "evaluate", null);
|
|
60308
62062
|
exports.XPathWildcardElement = XPathWildcardElement;
|
|
60309
62063
|
|
|
60310
|
-
},{"../../Decorators":
|
|
62064
|
+
},{"../../Decorators":230,"../Trees":354,"./XPath":363,"./XPathElement":364}],373:[function(require,module,exports){
|
|
60311
62065
|
(function (global){(function (){
|
|
60312
62066
|
'use strict';
|
|
60313
62067
|
|
|
@@ -60817,7 +62571,7 @@ var objectKeys = Object.keys || function (obj) {
|
|
|
60817
62571
|
};
|
|
60818
62572
|
|
|
60819
62573
|
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
60820
|
-
},{"object.assign/polyfill":
|
|
62574
|
+
},{"object.assign/polyfill":430,"util/":376}],374:[function(require,module,exports){
|
|
60821
62575
|
if (typeof Object.create === 'function') {
|
|
60822
62576
|
// implementation from standard node.js 'util' module
|
|
60823
62577
|
module.exports = function inherits(ctor, superCtor) {
|
|
@@ -60842,14 +62596,14 @@ if (typeof Object.create === 'function') {
|
|
|
60842
62596
|
}
|
|
60843
62597
|
}
|
|
60844
62598
|
|
|
60845
|
-
},{}],
|
|
62599
|
+
},{}],375:[function(require,module,exports){
|
|
60846
62600
|
module.exports = function isBuffer(arg) {
|
|
60847
62601
|
return arg && typeof arg === 'object'
|
|
60848
62602
|
&& typeof arg.copy === 'function'
|
|
60849
62603
|
&& typeof arg.fill === 'function'
|
|
60850
62604
|
&& typeof arg.readUInt8 === 'function';
|
|
60851
62605
|
}
|
|
60852
|
-
},{}],
|
|
62606
|
+
},{}],376:[function(require,module,exports){
|
|
60853
62607
|
(function (process,global){(function (){
|
|
60854
62608
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
60855
62609
|
//
|
|
@@ -61439,7 +63193,7 @@ function hasOwnProperty(obj, prop) {
|
|
|
61439
63193
|
}
|
|
61440
63194
|
|
|
61441
63195
|
}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
61442
|
-
},{"./support/isBuffer":
|
|
63196
|
+
},{"./support/isBuffer":375,"_process":432,"inherits":374}],377:[function(require,module,exports){
|
|
61443
63197
|
(function (global){(function (){
|
|
61444
63198
|
'use strict';
|
|
61445
63199
|
|
|
@@ -61460,7 +63214,7 @@ module.exports = function availableTypedArrays() {
|
|
|
61460
63214
|
};
|
|
61461
63215
|
|
|
61462
63216
|
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
61463
|
-
},{"possible-typed-array-names":
|
|
63217
|
+
},{"possible-typed-array-names":431}],378:[function(require,module,exports){
|
|
61464
63218
|
(function (process,global){(function (){
|
|
61465
63219
|
module.exports = process.hrtime || hrtime
|
|
61466
63220
|
|
|
@@ -61491,7 +63245,7 @@ function hrtime(previousTimestamp){
|
|
|
61491
63245
|
return [seconds,nanoseconds]
|
|
61492
63246
|
}
|
|
61493
63247
|
}).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
61494
|
-
},{"_process":
|
|
63248
|
+
},{"_process":432}],379:[function(require,module,exports){
|
|
61495
63249
|
'use strict';
|
|
61496
63250
|
|
|
61497
63251
|
var bind = require('function-bind');
|
|
@@ -61503,7 +63257,7 @@ var $reflectApply = require('./reflectApply');
|
|
|
61503
63257
|
/** @type {import('./actualApply')} */
|
|
61504
63258
|
module.exports = $reflectApply || bind.call($call, $apply);
|
|
61505
63259
|
|
|
61506
|
-
},{"./functionApply":
|
|
63260
|
+
},{"./functionApply":381,"./functionCall":382,"./reflectApply":384,"function-bind":400}],380:[function(require,module,exports){
|
|
61507
63261
|
'use strict';
|
|
61508
63262
|
|
|
61509
63263
|
var bind = require('function-bind');
|
|
@@ -61515,19 +63269,19 @@ module.exports = function applyBind() {
|
|
|
61515
63269
|
return actualApply(bind, $apply, arguments);
|
|
61516
63270
|
};
|
|
61517
63271
|
|
|
61518
|
-
},{"./actualApply":
|
|
63272
|
+
},{"./actualApply":379,"./functionApply":381,"function-bind":400}],381:[function(require,module,exports){
|
|
61519
63273
|
'use strict';
|
|
61520
63274
|
|
|
61521
63275
|
/** @type {import('./functionApply')} */
|
|
61522
63276
|
module.exports = Function.prototype.apply;
|
|
61523
63277
|
|
|
61524
|
-
},{}],
|
|
63278
|
+
},{}],382:[function(require,module,exports){
|
|
61525
63279
|
'use strict';
|
|
61526
63280
|
|
|
61527
63281
|
/** @type {import('./functionCall')} */
|
|
61528
63282
|
module.exports = Function.prototype.call;
|
|
61529
63283
|
|
|
61530
|
-
},{}],
|
|
63284
|
+
},{}],383:[function(require,module,exports){
|
|
61531
63285
|
'use strict';
|
|
61532
63286
|
|
|
61533
63287
|
var bind = require('function-bind');
|
|
@@ -61544,13 +63298,13 @@ module.exports = function callBindBasic(args) {
|
|
|
61544
63298
|
return $actualApply(bind, $call, args);
|
|
61545
63299
|
};
|
|
61546
63300
|
|
|
61547
|
-
},{"./actualApply":
|
|
63301
|
+
},{"./actualApply":379,"./functionCall":382,"es-errors/type":395,"function-bind":400}],384:[function(require,module,exports){
|
|
61548
63302
|
'use strict';
|
|
61549
63303
|
|
|
61550
63304
|
/** @type {import('./reflectApply')} */
|
|
61551
63305
|
module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
61552
63306
|
|
|
61553
|
-
},{}],
|
|
63307
|
+
},{}],385:[function(require,module,exports){
|
|
61554
63308
|
'use strict';
|
|
61555
63309
|
|
|
61556
63310
|
var setFunctionLength = require('set-function-length');
|
|
@@ -61576,7 +63330,7 @@ if ($defineProperty) {
|
|
|
61576
63330
|
module.exports.apply = applyBind;
|
|
61577
63331
|
}
|
|
61578
63332
|
|
|
61579
|
-
},{"call-bind-apply-helpers":
|
|
63333
|
+
},{"call-bind-apply-helpers":383,"call-bind-apply-helpers/applyBind":380,"es-define-property":389,"set-function-length":434}],386:[function(require,module,exports){
|
|
61580
63334
|
'use strict';
|
|
61581
63335
|
|
|
61582
63336
|
var GetIntrinsic = require('get-intrinsic');
|
|
@@ -61597,7 +63351,7 @@ module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
|
61597
63351
|
return intrinsic;
|
|
61598
63352
|
};
|
|
61599
63353
|
|
|
61600
|
-
},{"call-bind-apply-helpers":
|
|
63354
|
+
},{"call-bind-apply-helpers":383,"get-intrinsic":401}],387:[function(require,module,exports){
|
|
61601
63355
|
'use strict';
|
|
61602
63356
|
|
|
61603
63357
|
var $defineProperty = require('es-define-property');
|
|
@@ -61655,7 +63409,7 @@ module.exports = function defineDataProperty(
|
|
|
61655
63409
|
}
|
|
61656
63410
|
};
|
|
61657
63411
|
|
|
61658
|
-
},{"es-define-property":
|
|
63412
|
+
},{"es-define-property":389,"es-errors/syntax":394,"es-errors/type":395,"gopd":406}],388:[function(require,module,exports){
|
|
61659
63413
|
'use strict';
|
|
61660
63414
|
|
|
61661
63415
|
var callBind = require('call-bind-apply-helpers');
|
|
@@ -61687,7 +63441,7 @@ module.exports = desc && typeof desc.get === 'function'
|
|
|
61687
63441
|
}
|
|
61688
63442
|
: false;
|
|
61689
63443
|
|
|
61690
|
-
},{"call-bind-apply-helpers":
|
|
63444
|
+
},{"call-bind-apply-helpers":383,"gopd":406}],389:[function(require,module,exports){
|
|
61691
63445
|
'use strict';
|
|
61692
63446
|
|
|
61693
63447
|
/** @type {import('.')} */
|
|
@@ -61703,55 +63457,55 @@ if ($defineProperty) {
|
|
|
61703
63457
|
|
|
61704
63458
|
module.exports = $defineProperty;
|
|
61705
63459
|
|
|
61706
|
-
},{}],
|
|
63460
|
+
},{}],390:[function(require,module,exports){
|
|
61707
63461
|
'use strict';
|
|
61708
63462
|
|
|
61709
63463
|
/** @type {import('./eval')} */
|
|
61710
63464
|
module.exports = EvalError;
|
|
61711
63465
|
|
|
61712
|
-
},{}],
|
|
63466
|
+
},{}],391:[function(require,module,exports){
|
|
61713
63467
|
'use strict';
|
|
61714
63468
|
|
|
61715
63469
|
/** @type {import('.')} */
|
|
61716
63470
|
module.exports = Error;
|
|
61717
63471
|
|
|
61718
|
-
},{}],
|
|
63472
|
+
},{}],392:[function(require,module,exports){
|
|
61719
63473
|
'use strict';
|
|
61720
63474
|
|
|
61721
63475
|
/** @type {import('./range')} */
|
|
61722
63476
|
module.exports = RangeError;
|
|
61723
63477
|
|
|
61724
|
-
},{}],
|
|
63478
|
+
},{}],393:[function(require,module,exports){
|
|
61725
63479
|
'use strict';
|
|
61726
63480
|
|
|
61727
63481
|
/** @type {import('./ref')} */
|
|
61728
63482
|
module.exports = ReferenceError;
|
|
61729
63483
|
|
|
61730
|
-
},{}],
|
|
63484
|
+
},{}],394:[function(require,module,exports){
|
|
61731
63485
|
'use strict';
|
|
61732
63486
|
|
|
61733
63487
|
/** @type {import('./syntax')} */
|
|
61734
63488
|
module.exports = SyntaxError;
|
|
61735
63489
|
|
|
61736
|
-
},{}],
|
|
63490
|
+
},{}],395:[function(require,module,exports){
|
|
61737
63491
|
'use strict';
|
|
61738
63492
|
|
|
61739
63493
|
/** @type {import('./type')} */
|
|
61740
63494
|
module.exports = TypeError;
|
|
61741
63495
|
|
|
61742
|
-
},{}],
|
|
63496
|
+
},{}],396:[function(require,module,exports){
|
|
61743
63497
|
'use strict';
|
|
61744
63498
|
|
|
61745
63499
|
/** @type {import('./uri')} */
|
|
61746
63500
|
module.exports = URIError;
|
|
61747
63501
|
|
|
61748
|
-
},{}],
|
|
63502
|
+
},{}],397:[function(require,module,exports){
|
|
61749
63503
|
'use strict';
|
|
61750
63504
|
|
|
61751
63505
|
/** @type {import('.')} */
|
|
61752
63506
|
module.exports = Object;
|
|
61753
63507
|
|
|
61754
|
-
},{}],
|
|
63508
|
+
},{}],398:[function(require,module,exports){
|
|
61755
63509
|
'use strict';
|
|
61756
63510
|
|
|
61757
63511
|
var isCallable = require('is-callable');
|
|
@@ -61822,7 +63576,7 @@ module.exports = function forEach(list, iterator, thisArg) {
|
|
|
61822
63576
|
}
|
|
61823
63577
|
};
|
|
61824
63578
|
|
|
61825
|
-
},{"is-callable":
|
|
63579
|
+
},{"is-callable":414}],399:[function(require,module,exports){
|
|
61826
63580
|
'use strict';
|
|
61827
63581
|
|
|
61828
63582
|
/* eslint no-invalid-this: 1 */
|
|
@@ -61908,14 +63662,14 @@ module.exports = function bind(that) {
|
|
|
61908
63662
|
return bound;
|
|
61909
63663
|
};
|
|
61910
63664
|
|
|
61911
|
-
},{}],
|
|
63665
|
+
},{}],400:[function(require,module,exports){
|
|
61912
63666
|
'use strict';
|
|
61913
63667
|
|
|
61914
63668
|
var implementation = require('./implementation');
|
|
61915
63669
|
|
|
61916
63670
|
module.exports = Function.prototype.bind || implementation;
|
|
61917
63671
|
|
|
61918
|
-
},{"./implementation":
|
|
63672
|
+
},{"./implementation":399}],401:[function(require,module,exports){
|
|
61919
63673
|
'use strict';
|
|
61920
63674
|
|
|
61921
63675
|
var undefined;
|
|
@@ -62295,7 +64049,7 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|
|
62295
64049
|
return value;
|
|
62296
64050
|
};
|
|
62297
64051
|
|
|
62298
|
-
},{"call-bind-apply-helpers/functionApply":
|
|
64052
|
+
},{"call-bind-apply-helpers/functionApply":381,"call-bind-apply-helpers/functionCall":382,"es-define-property":389,"es-errors":391,"es-errors/eval":390,"es-errors/range":392,"es-errors/ref":393,"es-errors/syntax":394,"es-errors/type":395,"es-errors/uri":396,"es-object-atoms":397,"function-bind":400,"get-proto":404,"get-proto/Object.getPrototypeOf":402,"get-proto/Reflect.getPrototypeOf":403,"gopd":406,"has-symbols":408,"hasown":411,"math-intrinsics/abs":418,"math-intrinsics/floor":419,"math-intrinsics/max":421,"math-intrinsics/min":422,"math-intrinsics/pow":423,"math-intrinsics/round":424,"math-intrinsics/sign":425}],402:[function(require,module,exports){
|
|
62299
64053
|
'use strict';
|
|
62300
64054
|
|
|
62301
64055
|
var $Object = require('es-object-atoms');
|
|
@@ -62303,13 +64057,13 @@ var $Object = require('es-object-atoms');
|
|
|
62303
64057
|
/** @type {import('./Object.getPrototypeOf')} */
|
|
62304
64058
|
module.exports = $Object.getPrototypeOf || null;
|
|
62305
64059
|
|
|
62306
|
-
},{"es-object-atoms":
|
|
64060
|
+
},{"es-object-atoms":397}],403:[function(require,module,exports){
|
|
62307
64061
|
'use strict';
|
|
62308
64062
|
|
|
62309
64063
|
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
62310
64064
|
module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
|
62311
64065
|
|
|
62312
|
-
},{}],
|
|
64066
|
+
},{}],404:[function(require,module,exports){
|
|
62313
64067
|
'use strict';
|
|
62314
64068
|
|
|
62315
64069
|
var reflectGetProto = require('./Reflect.getPrototypeOf');
|
|
@@ -62338,13 +64092,13 @@ module.exports = reflectGetProto
|
|
|
62338
64092
|
}
|
|
62339
64093
|
: null;
|
|
62340
64094
|
|
|
62341
|
-
},{"./Object.getPrototypeOf":
|
|
64095
|
+
},{"./Object.getPrototypeOf":402,"./Reflect.getPrototypeOf":403,"dunder-proto/get":388}],405:[function(require,module,exports){
|
|
62342
64096
|
'use strict';
|
|
62343
64097
|
|
|
62344
64098
|
/** @type {import('./gOPD')} */
|
|
62345
64099
|
module.exports = Object.getOwnPropertyDescriptor;
|
|
62346
64100
|
|
|
62347
|
-
},{}],
|
|
64101
|
+
},{}],406:[function(require,module,exports){
|
|
62348
64102
|
'use strict';
|
|
62349
64103
|
|
|
62350
64104
|
/** @type {import('.')} */
|
|
@@ -62361,7 +64115,7 @@ if ($gOPD) {
|
|
|
62361
64115
|
|
|
62362
64116
|
module.exports = $gOPD;
|
|
62363
64117
|
|
|
62364
|
-
},{"./gOPD":
|
|
64118
|
+
},{"./gOPD":405}],407:[function(require,module,exports){
|
|
62365
64119
|
'use strict';
|
|
62366
64120
|
|
|
62367
64121
|
var $defineProperty = require('es-define-property');
|
|
@@ -62385,7 +64139,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
|
|
|
62385
64139
|
|
|
62386
64140
|
module.exports = hasPropertyDescriptors;
|
|
62387
64141
|
|
|
62388
|
-
},{"es-define-property":
|
|
64142
|
+
},{"es-define-property":389}],408:[function(require,module,exports){
|
|
62389
64143
|
'use strict';
|
|
62390
64144
|
|
|
62391
64145
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
@@ -62401,7 +64155,7 @@ module.exports = function hasNativeSymbols() {
|
|
|
62401
64155
|
return hasSymbolSham();
|
|
62402
64156
|
};
|
|
62403
64157
|
|
|
62404
|
-
},{"./shams":
|
|
64158
|
+
},{"./shams":409}],409:[function(require,module,exports){
|
|
62405
64159
|
'use strict';
|
|
62406
64160
|
|
|
62407
64161
|
/** @type {import('./shams')} */
|
|
@@ -62448,7 +64202,7 @@ module.exports = function hasSymbols() {
|
|
|
62448
64202
|
return true;
|
|
62449
64203
|
};
|
|
62450
64204
|
|
|
62451
|
-
},{}],
|
|
64205
|
+
},{}],410:[function(require,module,exports){
|
|
62452
64206
|
'use strict';
|
|
62453
64207
|
|
|
62454
64208
|
var hasSymbols = require('has-symbols/shams');
|
|
@@ -62458,7 +64212,7 @@ module.exports = function hasToStringTagShams() {
|
|
|
62458
64212
|
return hasSymbols() && !!Symbol.toStringTag;
|
|
62459
64213
|
};
|
|
62460
64214
|
|
|
62461
|
-
},{"has-symbols/shams":
|
|
64215
|
+
},{"has-symbols/shams":409}],411:[function(require,module,exports){
|
|
62462
64216
|
'use strict';
|
|
62463
64217
|
|
|
62464
64218
|
var call = Function.prototype.call;
|
|
@@ -62468,7 +64222,7 @@ var bind = require('function-bind');
|
|
|
62468
64222
|
/** @type {import('.')} */
|
|
62469
64223
|
module.exports = bind.call(call, $hasOwn);
|
|
62470
64224
|
|
|
62471
|
-
},{"function-bind":
|
|
64225
|
+
},{"function-bind":400}],412:[function(require,module,exports){
|
|
62472
64226
|
if (typeof Object.create === 'function') {
|
|
62473
64227
|
// implementation from standard node.js 'util' module
|
|
62474
64228
|
module.exports = function inherits(ctor, superCtor) {
|
|
@@ -62497,7 +64251,7 @@ if (typeof Object.create === 'function') {
|
|
|
62497
64251
|
}
|
|
62498
64252
|
}
|
|
62499
64253
|
|
|
62500
|
-
},{}],
|
|
64254
|
+
},{}],413:[function(require,module,exports){
|
|
62501
64255
|
'use strict';
|
|
62502
64256
|
|
|
62503
64257
|
var hasToStringTag = require('has-tostringtag/shams')();
|
|
@@ -62543,7 +64297,7 @@ isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
|
|
|
62543
64297
|
/** @type {import('.')} */
|
|
62544
64298
|
module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
|
|
62545
64299
|
|
|
62546
|
-
},{"call-bound":
|
|
64300
|
+
},{"call-bound":386,"has-tostringtag/shams":410}],414:[function(require,module,exports){
|
|
62547
64301
|
'use strict';
|
|
62548
64302
|
|
|
62549
64303
|
var fnToStr = Function.prototype.toString;
|
|
@@ -62646,7 +64400,7 @@ module.exports = reflectApply
|
|
|
62646
64400
|
return tryFunctionObject(value);
|
|
62647
64401
|
};
|
|
62648
64402
|
|
|
62649
|
-
},{}],
|
|
64403
|
+
},{}],415:[function(require,module,exports){
|
|
62650
64404
|
'use strict';
|
|
62651
64405
|
|
|
62652
64406
|
var callBound = require('call-bound');
|
|
@@ -62695,7 +64449,7 @@ module.exports = function isGeneratorFunction(fn) {
|
|
|
62695
64449
|
return getProto(fn) === GeneratorFunction;
|
|
62696
64450
|
};
|
|
62697
64451
|
|
|
62698
|
-
},{"call-bound":
|
|
64452
|
+
},{"call-bound":386,"get-proto":404,"has-tostringtag/shams":410,"safe-regex-test":433}],416:[function(require,module,exports){
|
|
62699
64453
|
'use strict';
|
|
62700
64454
|
|
|
62701
64455
|
var callBound = require('call-bound');
|
|
@@ -62766,7 +64520,7 @@ if (hasToStringTag) {
|
|
|
62766
64520
|
|
|
62767
64521
|
module.exports = fn;
|
|
62768
64522
|
|
|
62769
|
-
},{"call-bound":
|
|
64523
|
+
},{"call-bound":386,"gopd":406,"has-tostringtag/shams":410,"hasown":411}],417:[function(require,module,exports){
|
|
62770
64524
|
'use strict';
|
|
62771
64525
|
|
|
62772
64526
|
var whichTypedArray = require('which-typed-array');
|
|
@@ -62776,19 +64530,19 @@ module.exports = function isTypedArray(value) {
|
|
|
62776
64530
|
return !!whichTypedArray(value);
|
|
62777
64531
|
};
|
|
62778
64532
|
|
|
62779
|
-
},{"which-typed-array":
|
|
64533
|
+
},{"which-typed-array":438}],418:[function(require,module,exports){
|
|
62780
64534
|
'use strict';
|
|
62781
64535
|
|
|
62782
64536
|
/** @type {import('./abs')} */
|
|
62783
64537
|
module.exports = Math.abs;
|
|
62784
64538
|
|
|
62785
|
-
},{}],
|
|
64539
|
+
},{}],419:[function(require,module,exports){
|
|
62786
64540
|
'use strict';
|
|
62787
64541
|
|
|
62788
64542
|
/** @type {import('./floor')} */
|
|
62789
64543
|
module.exports = Math.floor;
|
|
62790
64544
|
|
|
62791
|
-
},{}],
|
|
64545
|
+
},{}],420:[function(require,module,exports){
|
|
62792
64546
|
'use strict';
|
|
62793
64547
|
|
|
62794
64548
|
/** @type {import('./isNaN')} */
|
|
@@ -62796,31 +64550,31 @@ module.exports = Number.isNaN || function isNaN(a) {
|
|
|
62796
64550
|
return a !== a;
|
|
62797
64551
|
};
|
|
62798
64552
|
|
|
62799
|
-
},{}],
|
|
64553
|
+
},{}],421:[function(require,module,exports){
|
|
62800
64554
|
'use strict';
|
|
62801
64555
|
|
|
62802
64556
|
/** @type {import('./max')} */
|
|
62803
64557
|
module.exports = Math.max;
|
|
62804
64558
|
|
|
62805
|
-
},{}],
|
|
64559
|
+
},{}],422:[function(require,module,exports){
|
|
62806
64560
|
'use strict';
|
|
62807
64561
|
|
|
62808
64562
|
/** @type {import('./min')} */
|
|
62809
64563
|
module.exports = Math.min;
|
|
62810
64564
|
|
|
62811
|
-
},{}],
|
|
64565
|
+
},{}],423:[function(require,module,exports){
|
|
62812
64566
|
'use strict';
|
|
62813
64567
|
|
|
62814
64568
|
/** @type {import('./pow')} */
|
|
62815
64569
|
module.exports = Math.pow;
|
|
62816
64570
|
|
|
62817
|
-
},{}],
|
|
64571
|
+
},{}],424:[function(require,module,exports){
|
|
62818
64572
|
'use strict';
|
|
62819
64573
|
|
|
62820
64574
|
/** @type {import('./round')} */
|
|
62821
64575
|
module.exports = Math.round;
|
|
62822
64576
|
|
|
62823
|
-
},{}],
|
|
64577
|
+
},{}],425:[function(require,module,exports){
|
|
62824
64578
|
'use strict';
|
|
62825
64579
|
|
|
62826
64580
|
var $isNaN = require('./isNaN');
|
|
@@ -62833,7 +64587,7 @@ module.exports = function sign(number) {
|
|
|
62833
64587
|
return number < 0 ? -1 : +1;
|
|
62834
64588
|
};
|
|
62835
64589
|
|
|
62836
|
-
},{"./isNaN":
|
|
64590
|
+
},{"./isNaN":420}],426:[function(require,module,exports){
|
|
62837
64591
|
'use strict';
|
|
62838
64592
|
|
|
62839
64593
|
var keysShim;
|
|
@@ -62957,7 +64711,7 @@ if (!Object.keys) {
|
|
|
62957
64711
|
}
|
|
62958
64712
|
module.exports = keysShim;
|
|
62959
64713
|
|
|
62960
|
-
},{"./isArguments":
|
|
64714
|
+
},{"./isArguments":428}],427:[function(require,module,exports){
|
|
62961
64715
|
'use strict';
|
|
62962
64716
|
|
|
62963
64717
|
var slice = Array.prototype.slice;
|
|
@@ -62991,7 +64745,7 @@ keysShim.shim = function shimObjectKeys() {
|
|
|
62991
64745
|
|
|
62992
64746
|
module.exports = keysShim;
|
|
62993
64747
|
|
|
62994
|
-
},{"./implementation":
|
|
64748
|
+
},{"./implementation":426,"./isArguments":428}],428:[function(require,module,exports){
|
|
62995
64749
|
'use strict';
|
|
62996
64750
|
|
|
62997
64751
|
var toStr = Object.prototype.toString;
|
|
@@ -63010,7 +64764,7 @@ module.exports = function isArguments(value) {
|
|
|
63010
64764
|
return isArgs;
|
|
63011
64765
|
};
|
|
63012
64766
|
|
|
63013
|
-
},{}],
|
|
64767
|
+
},{}],429:[function(require,module,exports){
|
|
63014
64768
|
'use strict';
|
|
63015
64769
|
|
|
63016
64770
|
// modified from https://github.com/es-shims/es6-shim
|
|
@@ -63058,7 +64812,7 @@ module.exports = function assign(target, source1) {
|
|
|
63058
64812
|
return to; // step 4
|
|
63059
64813
|
};
|
|
63060
64814
|
|
|
63061
|
-
},{"call-bound":
|
|
64815
|
+
},{"call-bound":386,"es-object-atoms":397,"has-symbols/shams":409,"object-keys":427}],430:[function(require,module,exports){
|
|
63062
64816
|
'use strict';
|
|
63063
64817
|
|
|
63064
64818
|
var implementation = require('./implementation');
|
|
@@ -63115,7 +64869,7 @@ module.exports = function getPolyfill() {
|
|
|
63115
64869
|
return Object.assign;
|
|
63116
64870
|
};
|
|
63117
64871
|
|
|
63118
|
-
},{"./implementation":
|
|
64872
|
+
},{"./implementation":429}],431:[function(require,module,exports){
|
|
63119
64873
|
'use strict';
|
|
63120
64874
|
|
|
63121
64875
|
/** @type {import('.')} */
|
|
@@ -63134,7 +64888,7 @@ module.exports = [
|
|
|
63134
64888
|
'BigUint64Array'
|
|
63135
64889
|
];
|
|
63136
64890
|
|
|
63137
|
-
},{}],
|
|
64891
|
+
},{}],432:[function(require,module,exports){
|
|
63138
64892
|
// shim for using process in browser
|
|
63139
64893
|
var process = module.exports = {};
|
|
63140
64894
|
|
|
@@ -63320,7 +65074,7 @@ process.chdir = function (dir) {
|
|
|
63320
65074
|
};
|
|
63321
65075
|
process.umask = function() { return 0; };
|
|
63322
65076
|
|
|
63323
|
-
},{}],
|
|
65077
|
+
},{}],433:[function(require,module,exports){
|
|
63324
65078
|
'use strict';
|
|
63325
65079
|
|
|
63326
65080
|
var callBound = require('call-bound');
|
|
@@ -63339,7 +65093,7 @@ module.exports = function regexTester(regex) {
|
|
|
63339
65093
|
};
|
|
63340
65094
|
};
|
|
63341
65095
|
|
|
63342
|
-
},{"call-bound":
|
|
65096
|
+
},{"call-bound":386,"es-errors/type":395,"is-regex":416}],434:[function(require,module,exports){
|
|
63343
65097
|
'use strict';
|
|
63344
65098
|
|
|
63345
65099
|
var GetIntrinsic = require('get-intrinsic');
|
|
@@ -63383,9 +65137,9 @@ module.exports = function setFunctionLength(fn, length) {
|
|
|
63383
65137
|
return fn;
|
|
63384
65138
|
};
|
|
63385
65139
|
|
|
63386
|
-
},{"define-data-property":
|
|
63387
|
-
arguments[4][
|
|
63388
|
-
},{"dup":
|
|
65140
|
+
},{"define-data-property":387,"es-errors/type":395,"get-intrinsic":401,"gopd":406,"has-property-descriptors":407}],435:[function(require,module,exports){
|
|
65141
|
+
arguments[4][375][0].apply(exports,arguments)
|
|
65142
|
+
},{"dup":375}],436:[function(require,module,exports){
|
|
63389
65143
|
// Currently in sync with Node.js lib/internal/util/types.js
|
|
63390
65144
|
// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9
|
|
63391
65145
|
|
|
@@ -63721,7 +65475,7 @@ exports.isAnyArrayBuffer = isAnyArrayBuffer;
|
|
|
63721
65475
|
});
|
|
63722
65476
|
});
|
|
63723
65477
|
|
|
63724
|
-
},{"is-arguments":
|
|
65478
|
+
},{"is-arguments":413,"is-generator-function":415,"is-typed-array":417,"which-typed-array":438}],437:[function(require,module,exports){
|
|
63725
65479
|
(function (process){(function (){
|
|
63726
65480
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
63727
65481
|
//
|
|
@@ -64440,7 +66194,7 @@ function callbackify(original) {
|
|
|
64440
66194
|
exports.callbackify = callbackify;
|
|
64441
66195
|
|
|
64442
66196
|
}).call(this)}).call(this,require('_process'))
|
|
64443
|
-
},{"./support/isBuffer":
|
|
66197
|
+
},{"./support/isBuffer":435,"./support/types":436,"_process":432,"inherits":412}],438:[function(require,module,exports){
|
|
64444
66198
|
(function (global){(function (){
|
|
64445
66199
|
'use strict';
|
|
64446
66200
|
|
|
@@ -64561,5 +66315,5 @@ module.exports = function whichTypedArray(value) {
|
|
|
64561
66315
|
};
|
|
64562
66316
|
|
|
64563
66317
|
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
64564
|
-
},{"available-typed-arrays":
|
|
66318
|
+
},{"available-typed-arrays":377,"call-bind":385,"call-bound":386,"for-each":398,"get-proto":404,"gopd":406,"has-tostringtag/shams":410}]},{},[115])(115)
|
|
64565
66319
|
});
|